POST
/
address_book.json
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: 6d59d901c1231a4d74572224b88ccbc487012bba" \
-d '{
  "contacts": [
    {
      "name": "Mike Howard",
      "phone": "463571393241"
    },
    {
      "name": "Morgan Fuller",
      "phone": "65021272571"
    }
  ],
  "udid": "A337E8A4-80AD-8ABA-9F5D-579EFF6BACAB"
}' \
https://api.quickblox.com/address_book.json
{
  "created": 2,
  "updated": 0,
  "deleted": 0
}

Recipes

This API allows you to do following things:

  • Upload new address book.
  • Replace old address book with a new one.
  • Add/delete individual contacts.
  • Update existing contacts.

Body Parameters

contacts
array
required

Contains an array of contact objects. Each contact can contain 3 keys - phone, name, and destroy.

force
integer

Defines force rewrite mode. Set force=1 to apply, then all previous contacts for the device context will be replaced by new ones.

udid
string

User’s device identifier. If specified, all operations will be in this context. Max. length is 64 symbols. If the device identifier is not specified, it means that a user has one global address book across all their devices.

Headers

QB-Token
string
required
A user session token. See our Authentication page to learn more about the session token.

Responses

curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: 6d59d901c1231a4d74572224b88ccbc487012bba" \
-d '{
  "contacts": [
    {
      "name": "Mike Howard",
      "phone": "463571393241"
    },
    {
      "name": "Morgan Fuller",
      "phone": "65021272571"
    }
  ],
  "udid": "A337E8A4-80AD-8ABA-9F5D-579EFF6BACAB"
}' \
https://api.quickblox.com/address_book.json
{
  "created": 2,
  "updated": 0,
  "deleted": 0
}