/v1/accounts/{accountId}/contactLists/{contactListId}/numbersAdds one or more numbers to a contact list, with their variable values. A number with the same variable values as an existing one is skipped.
ID of your SIP Caller account. See Account ID.
ID of the contact list.
Names of the variables whose values are sent in varValues, in the same order, such as ["Customer Name","Due Balance"]. Each name must start with a letter, and contain only letters, digits, spaces and underscores, up to 255 characters.
The first numbers added to the contact list define its variable names: if varNames is omitted at that point, they're named Var1, Var2, and so on. Later requests must send the same number of variable values, and if varNames is included, the names must match the existing ones.
A JSON array of objects, one for each number to add. A single object is also accepted.
Phone number to call. Separators such as spaces, dashes, dots and parentheses are allowed and removed, for example +1 (555) 123-9000. The number must contain between 3 and 50 digits, and can end with p followed by DTMF digits to dial after the call is answered, such as +15551239000p123. Up to 15 numbers can be specified for the same contact, separated by semicolons (;).
Values of the variables for this number. All the numbers of the request must have the same number of values, matching the variables of the contact list. Defaults to an empty array.
Returns an array with the contact list number objects added. Skipped duplicates are not included, so the array is empty if all the numbers were duplicated.
/v1/accounts/ACCOUNT_ID/contactLists/CONTACT_LIST_ID/numbers
curl -X POST 'https://api.sipcaller.com/v1/accounts/ACCOUNT_ID/contactLists/CONTACT_LIST_ID/numbers?varNames=%5B%22Customer%20Name%22%2C%22Due%20Balance%22%5D' \
-H 'Authorization: Bearer API_KEY_TOKEN' \
-H 'Content-Type: application/json' \
-d '[
{
"number": "+18005551239",
"varValues": [
"Peter Jackson",
"$367.75"
]
}
]'Response
200 OK
[
{
"id": 10,
"number": "+18005551239",
"varValues": [
"Peter Jackson",
"$367.75"
]
}
]