Skip to content

Quickstart

You need a DCDial user with API access. Ask your DCDial administrator if you don’t have one.

  1. Get a token. Send your username and password with type=login_user.

    Terminal window
    curl https://api.dcdial.com/api/ \
    -d type=login_user \
    -d user=jane.doe \
    -d pass="$DCDIAL_PASSWORD"

    The response contains your token:

    { "response": { "success": 1, "token": "3f0c2b9e…", "full_name": "Jane", "email": "[email protected]" } }
  2. List your campaigns. Send the token with type=get_campaigns.

    Terminal window
    curl https://api.dcdial.com/api/ -d type=get_campaigns -d token="$DCDIAL_TOKEN"
    {
    "response": {
    "success": "1",
    "campaigns_list": [
    { "campaign_id": "1024", "campaign_name": "Payment reminders", "display_status": "STOP", "active": "N" }
    ]
    }
    }
  3. Start a campaign. Pass its ID with type=play_campaign. Outbound dialing starts right away.

    Terminal window
    curl https://api.dcdial.com/api/ -d type=play_campaign -d token="$DCDIAL_TOKEN" -d campaign_id=1024
  4. Check for errors. The API answers with HTTP 200 even when a request fails, so always check success:

    { "response": { "success": "0", "error": "Your token seems expired, please login again", "tech_msg": "invalid_user" } }

    See Errors and status codes.