Add Contact
Description
Section titled “Description”wss contact_add
The contact_add
request allows you to create a contact in the database and assign it to the appropriate users who match the specified data.
Request Parameters
Section titled “Request Parameters”Name | Type | Description |
---|---|---|
first_name | string | First name |
last_name | string | Last name |
company | string | Company name |
email | array[object] | List of email addresses |
phone | array[object] | List of phone numbers |
Response Fields
Section titled “Response Fields”All the same as in the request, but with the specified ID of the record, and the field matched_user_id
will appear in the email & phone arrays if the data matches a specific user.
Example
Section titled “Example”{ "request": { "contact_add": { "first_name": "Name", "last_name": "Surname", "company": "UserCompany", "email": [ { "type": "work", "value": "..." }, { "type": "home", "value": "..." }, ... ], "phone": [ { "type": "work", "value": "..." }, { "type": "home", "value": "..." }, ... ] }, "id": "RequestId" }}
{ "response": { "id": "RequestId", "contact": { "_id": "63480e68f4794709f802a2fa", "first_name": "Name", "last_name": "Surname", "company": "UserCompany", "email": [ { "type": "work", "value": "...", "matched_user_id": "UID5" }, { "type": "home", "value": "..." }, ... ], "phone": [ { "type": "work", "value": "..." }, { "type": "home", "value": "...", "matched_user_id": "UID7" }, ... ], "updated_at": "2025-08-13T05:51:44.733Z", "created_at": "2025-08-13T05:51:44.733Z" } }}
email
or phone
param is required, as well as first_name
or last_name
.
See Also
Section titled “See Also” SAMA chat server API: Address book Each of us has at least once faced a situation where we wanted to write to an friend from our contact list, but couldn’t find them on the platform. That is why...