SMS API

Contacts

Manage contacts within address books

POST/api/contact/new

Add a new contact

Add a new contact

Parameters

group_idintegerrequired

Address book ID

phone_numberstringrequired

Phone number

first_namestringoptional

First name

last_namestringoptional

Last name

companystringoptional

Company name

custom_1stringoptional

Custom field

custom_2stringoptional

Custom field

custom_3stringoptional

Custom field

custom_4stringoptional

Custom 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/detail

Get contact details

Get contact details

Parameters

idstringrequired

Contact 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/edit

Edit a contact

Edit a contact

Parameters

idintegerrequired

Contact ID

group_idintegeroptional

Move to different address book

first_namestringoptional

First name

last_namestringoptional

Last name

companystringoptional

Company name

phone_numberstringoptional

Phone number

custom_1stringoptional

Custom field

custom_2stringoptional

Custom field

custom_3stringoptional

Custom field

custom_4stringoptional

Custom 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/delete

Delete a contact

Delete a contact

Parameters

idintegerrequired

Contact 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
  }
}
Back to API Documentation