SMS API

Address Book

Manage address books for campaigns

POST/api/address-book/new

Create an address book

Create an address book

Parameters

namestringrequired

Name of the address book

Request

curl \
  -X POST \
  "{{api_url}}/api/address-book/new" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Friends"
}'
Response
200 Success
{
  "status": "success",
  "result": {
    "id": 1,
    "name": "Friends"
  }
}
POST/api/address-book/edit

Edit an address book

Edit an address book

Parameters

idintegerrequired

Address book ID

namestringoptional

New name

Request

curl \
  -X POST \
  "{{api_url}}/api/address-book/edit" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 123456,
  "name": "Address book b"
}'
Response200 Success
{
  "status": "success",
  "result": {
    "id": "123456",
    "name": "Address book b"
  }
}
POST/api/address-book/list

List all address books

List all address books

No parameters required.

Request

curl \
  -X POST \
  "{{api_url}}/api/address-book/list" \
  -H "Authorization: Bearer {{access_token}}"
Response200 Success
{
  "status": "success",
  "result": []
}
POST/api/address-book/detail

Get address book details with contacts

Get address book details with contacts

Parameters

idintegerrequired

Address book ID

Request

curl \
  -X POST \
  "{{api_url}}/api/address-book/detail" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1
}'
Response200 Success
{
  "status": "success",
  "result": {
    "id": 1,
    "name": "Friends",
    "contacts": [
      {
        "id": 1,
        "first_name": "John",
        "last_name": "Doe",
        "phone_number": "1234567890"
      }
    ]
  }
}
POST/api/address-book/delete

Delete an address book

Delete an address book

Parameters

idintegerrequired

Address book ID

Request

curl \
  -X POST \
  "{{api_url}}/api/address-book/delete" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 123456
}'
Response200 Success
{
  "status": "success",
  "result": {
    "id": "123456"
  }
}
Back to API Documentation