Difference between revisions of "Create New contact pinning"
Ashley DeBon (talk | contribs) (Created page with "== Update Pin Accounts == === Base URL === https://apimobile.callproof.com === Endpoint === /api/contact/pin-accounts === Purpose === Pins or unpins a contact account and o...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| Line 41: | Line 41: | ||
| position || integer || No || Sort/position value for the pinned contact | | position || integer || No || Sort/position value for the pinned contact | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | <pre> | ||
| + | curl --location --request POST 'https://apimobile.callproof.com/api/contact/pin-accounts' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ | ||
| + | --form 'contact_id=12345' \ | ||
| + | --form 'is_pinned=1' | ||
| + | </pre> | ||
| + | === cURL Example for iOS === | ||
| + | <pre> | ||
| + | curl --location --request POST 'https://apimobile.callproof.com/api/contact/pin-accounts' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ | ||
| + | --form 'contact_id=12345' \ | ||
| + | --form 'is_pinned=1' | ||
| + | </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 13:22, 17 July 2026
Contents
Update Pin Accounts
Base URL
https://apimobile.callproof.com
Endpoint
/api/contact/pin-accounts
Purpose
Pins or unpins a contact account and optionally updates its pin position for the authenticated user’s company.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| contact_id | integer/string | Yes | Unique identifier of the contact to pin or unpin |
| is_pinned | boolean/string | Yes | Whether the contact should be pinned (true/1) or unpinned (false/0)
|
| position | integer | No | Sort/position value for the pinned contact |
cURL Example for Android
curl --location --request POST 'https://apimobile.callproof.com/api/contact/pin-accounts' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'contact_id=12345' \ --form 'is_pinned=1'
cURL Example for iOS
curl --location --request POST 'https://apimobile.callproof.com/api/contact/pin-accounts' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'contact_id=12345' \ --form 'is_pinned=1'
Successful Response (200)
Indicates that the contact pinning details were updated successfully.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| message | string | Confirmation message (for example, "Contact Pinning Details was successfully updated.") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – pinning details could not be updated |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – Contact not found ("Contact not found"), or another error while updating pinning (for example, "Error While Updating Contact Pinning Details" / "Error while Updating the Accounts Pinning Details").
- 401 – Authentication failed or the access token is missing/expired.