Skip to content

Create or update an account

Accounts
POSThttps://api.dcdial.com/api/type=add_account
Changes dataToken

Creates an account with its phone numbers and email addresses, or updates it if an account with the same accountid already exists.

Fields are nested: send them as account[first_name], phones[0][phone_number] and so on, or as a JSON body with Content-Type: application/json.

Parameters

Send as application/x-www-form-urlencoded.

Notes

This endpoint returns its data without the response wrapper. Use Add an account to a campaign instead if you want the account placed straight into a campaign.

Terminal window
curl https://api.dcdial.com/api/ \
-d type=add_account \
-d token="$DCDIAL_TOKEN" \
-d account[company_id]=101 \
-d account[accountid]=ACC-10045 \
-d account[first_name]=Jane \
-d account[last_name]=Doe \
-d account[balance]=1250.5 \
-d accounts_leads[list_id]=2048 \
-d phones[0][phone_number]=5550100123 \
-d phones[0][phone_type]=MOBILE \
-d emails[0][email protected]
Response · 200 OK
{
"accounts_id": 55120,
"accountid": "ACC-10045",
"success": 1
}

Try it

Environment