Queue Call

API for queuing a single outbound call

- NEW! - Interactive API docs, now live!

Visit api-docs.plumvoice.com to read Plum API documentation, build and test requests in our interactive API sandbox, review the responses, and share it all with your team.

If you plan to queue more than one call at a time, use the Queue Multiple Calls API Method. Looping the Single Call API for individual calls can cause DDoS, which will result in all calls failing.

Queuing An Outbound Call

POST https://fuse.plumvoice.com/api/apps/{application_id}/{deployment_id}/queue

Queue an outbound call

Path Parameters

Headers

Request Body

Possible Response Codes

  • 200: success, call successfully queued.

  • 400: supplied data improperly formatted or invalid

  • 401: authentication headers invalid or the account is inactive

  • 403: the user attempting to queue the outbound call does not have appropriate permissions

  • 404: deployment not found

  • 405: invalid HTTP method supplied (only POST allowed)

  • 409: user, deployment, or application previously deleted

  • 500: database error

The return structure will contain the following item(s):

Note: The returned 'Link' header provides the URI for checking the status of the most recent outbound call attempt.

Sample Code

This sample PHP code makes a request to queue a new outbound call. This triggers an outbound call that goes out immediately and makes a single attempt to connect:

<?php
// account and application settings
$email = '<your_email_address>';
$developer_key = '<your_developer_key>';
$application_id = '<your_application_id>';
$deployment_id = '<your_deployment_id>';
$phone_number = '<phone_number_to_dial>';

// build the URL and POST parameters
$url = 'https://fuse.plumvoice.com/api/apps/'.$application_id.'/'.$deployment_id.'/queue';
$params = array('phone_number'=>$phone_number);

$ch = curl_init();
curl_setopt($ch, CURLOPT_USERPWD, $email.':'.$developer_key);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json", "Content-type: application/x-www-form-urlencoded"));
$result = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
var_dump($result);
var_dump($http_code);

Last updated