Update Contact
Each user API request in TeleCMI platform includes user login token. After getting the user login token, make a POST request to the below base URL to update existing contact details.
Base URL
Send your POST method request with valid parameters, to the following base URL.
https://rest.telecmi.com/v3/contact/update
Required Parameters
These are the required POST method parameters with description
| Parameter Name | Type | Description |
|---|---|---|
| *token | string | Your user token |
| *contacts | array | List of contact objects to update (max 100) |
Update Contact Object Fields
| Field | Type | Required | Description |
|---|---|---|---|
| *contact_id | string | Yes | UUID of the contact to update |
| phone_no | string | No | New phone number |
| first_name | string | No | Updated first name |
| last_name | string | No | Updated last name |
| email_id | string | No | Updated email address |
| company | string | No | Updated company name |
| job_title | string | No | Updated job title |
Note
The * marked parameter/field is mandatory.
Sample JSON Request
Below is the following sample JSON POST method request
{
"token": "xxxx-xxxx-xxxx-xxxx",
"contacts": [
{
"contact_id": "d3b07384-d113-4ec5-a5ae-be81d6e3c239",
"phone_no": "919200000001",
"first_name": "John",
"last_name": "Smith",
"email_id": "john.smith@example.com",
"company": "Acme Corp",
"job_title": "Senior Software Engineer"
}
]
}
Sample Response
If the provided information is valid, your web server will get a sample response from TeleCMI Platform as given below
{
"code": 200,
"msg": "Contacts updated successfully"
}
Properties
These are the list of properties and its description
| Property | Type | Description |
|---|---|---|
| code | number | HTTP status code (200 for success) |
| msg | string | Response message details |
HTTP status codes
TeleCMI API platform represents the following status code to identity the errors.
| Status code | Status Type | Description |
|---|---|---|
| 200 | Success | Contacts updated successfully |
| 400 | Error | Invalid request parameters / Validation error |
| 404 | Error | Authenticated user record not found |
| 409 | Error | Duplicate contact detected within the organization |
| 500 | Error | Something went wrong! |