SMS API
Contacts
Manage contacts within address books
POST
/api/contact/newAdd a new contact
Add a new contact
Parameters
group_idintegerrequiredAddress book ID
phone_numberstringrequiredPhone number
first_namestringoptionalFirst name
last_namestringoptionalLast name
companystringoptionalCompany name
custom_1stringoptionalCustom field
custom_2stringoptionalCustom field
custom_3stringoptionalCustom field
custom_4stringoptionalCustom field
Request
curl \
-X POST \
"{{api_url}}/api/contact/new" \
-H "Authorization: Bearer {{access_token}}" \
-H "Content-Type: application/json" \
-d '{
"group_id": 1,
"phone_number": "0412345678",
"first_name": "John",
"last_name": "Doe"
}'Response200 Success
{
"status": "success",
"result": {
"id": 123456
}
}POST
/api/contact/detailGet contact details
Get contact details
Parameters
idstringrequiredContact ID
Request
curl \
-X POST \
"{{api_url}}/api/contact/detail" \
-H "Authorization: Bearer {{access_token}}" \
-H "Content-Type: application/json" \
-d '{
"id": "1"
}'Response200 Success
{
"status": "success",
"result": {
"contact": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"company": "ABC Inc.",
"phone_number": "1234567890",
"custom_1": "Custom Data 1",
"custom_2": "Custom Data 2",
"custom_3": "Custom Data 3",
"custom_4": "Custom Data 4"
}
}
}POST
/api/contact/editEdit a contact
Edit a contact
Parameters
idintegerrequiredContact ID
group_idintegeroptionalMove to different address book
first_namestringoptionalFirst name
last_namestringoptionalLast name
companystringoptionalCompany name
phone_numberstringoptionalPhone number
custom_1stringoptionalCustom field
custom_2stringoptionalCustom field
custom_3stringoptionalCustom field
custom_4stringoptionalCustom field
Request
curl \
-X POST \
"{{api_url}}/api/contact/edit" \
-H "Authorization: Bearer {{access_token}}" \
-H "Content-Type: application/json" \
-d '{
"id": 123456,
"first_name": "Jane"
}'Response200 Success
{
"status": "success",
"result": {
"id": 123456
}
}POST
/api/contact/deleteDelete a contact
Delete a contact
Parameters
idintegerrequiredContact ID
Request
curl \
-X POST \
"{{api_url}}/api/contact/delete" \
-H "Authorization: Bearer {{access_token}}" \
-H "Content-Type: application/json" \
-d '{
"id": 1234
}'Response200 Success
{
"status": "success",
"result": {
"id": 1234
}
}