Call Scheduling and Pacing API

- 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.

IMPORTANT: Development on this API is ongoing – please bear in mind that additional, unforeseen changes may occur between the time of this writing and product release.

Overview

The Outbound Call Scheduling and Pacing API allows you to create outbound calling campaigns as well as reusable resources to define schedules and call pacing for each campaign. This API consists of three main resources:

  • Schedules: Sets the days of the week that your campaign will run. Once created, a schedule can be reused across one or more campaigns.

  • Profiles: Sets call pacing for your campaign. Once created, a profile can be reused across one or more campaigns. One or multiple profiles can be used in a single campaign if desired.

  • Campaigns: Creates outbound calling campaigns linked to your chosen VXML application. Also controls existing campaign activity. Existing schedules and profiles are linked to campaigns during campaign creation.

This API contains the following endpoints (6 total):

  • https://scheduler.plumvoice.com/api/schedules

  • https://scheduler.plumvoice.com/api/profiles

  • https://scheduler.plumvoice.com/api/campaigns

  • https://scheduler.plumvoice.com/api/campaigns/start

  • https://scheduler.plumvoice.com/api/campaigns/stop

  • https://scheduler.plumvoice.com/api/campaigns/add-calls

Authentication

API requests are authenticated using a bearer token. Currently, this token will be generated for you. In the future, users will be able to generate their own bearer tokens as needed.

List of methods

NOTE: In each of the following methods, you can view an example request and success response by expanding the Responses section and viewing the 200: OK response.

NOTE: The example cURL commands in each API method below use a back slash (\) as a line continuation character. The back slash may be removed or replaced based on your operating system (e.g., replace with (^) for Windows cmd, (`) for Powershell).

Create Schedule

POST https://scheduler.plumvoice.com/api/schedules

Creates a rule set that controls which day(s) in a week a campaign will be active. A schedule can be reused across one or more campaigns.

To affect a campaign, an existing schedule must be added when the campaign is created.

Request Body

{
    "nickname": [
        "The nickname has already been taken."
    ]
}

Get Schedules

GET https://scheduler.plumvoice.com/api/schedules

Returns all existing schedules created by you.

Headers

Example Request

This request returns all existing schedules that you have created and their associated parameters.

curl --location --request GET 'https://scheduler.plumvoice.com/api/schedules' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812' code

Success Response

[
    {
        "schedule_id": 6,
        "nickname": "3wkdays",
        "days": [
            "mon",
            "wed",
            "fri"
        ]
    }
]

Update Schedule

PATCH https://scheduler.plumvoice.com/api/schedules/{id}

Update one or more specific parameters for the selected schedule.

Note: The API is designed to accept this request with either the PATCH or PUT method and produce the same results. Only parameters specified in the request will be updated.

Path Parameters

Query Parameters

Example Request

This request updates the days parameter to Mondays and Wednesdays for the schedule with id 15.

curl --location -g --request PATCH 'https://scheduler.plumvoice.com/api/schedules/15?days=["mon","wed"]' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812'

Success Response

{
    "status": "success",
    "response": {
        "id": 15,
        "days": "[\"mon\",\"wed\"]",
        "nickname": "MonWedOnly"
    }
}

Delete Schedule

DELETE https://scheduler.plumvoice.com/api/schedules/{id}

Removes an existing schedule using the id number entered.

Note: A schedule cannot be deleted while applied to a campaign.

Path Parameters

Example Request

This request deletes the schedule associated with id 4.

curl --location --request DELETE 'https://scheduler.plumvoice.com/api/schedules/4' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812'

Success Response

{
    "status": "success"
}

Create Profile

POST https://scheduler.plumvoice.com/api/profiles

Creates a rule set that controls call pacing for campaigns. A profile can be reused across one or more campaigns.

To affect a campaign, an existing profile must be added when the campaign is created.

Request Body

Example Request

This request creates a profile named MorningPace. If this profile were applied to a new campaign, that campaign would run for 30 minutes at a time (period), make 100 calls during that time (amount_per_period), and have 10 minutes of downtime between each 30 minute period (time_between_periods).

curl --location --request POST 'https://scheduler.plumvoice.com/api/profiles' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812' \
--form 'period="30"' \
--form 'amount_per_period="100"' \
--form 'nickname="MorningPace"' \
--form 'time_between_periods="10"'

Success Response

{
    "status": "success",
    "response": {
        "id": 6,
        "nickname": "3wkdays"
    }
}

Get Profiles

GET https://scheduler.plumvoice.com/api/profiles

Returns all existing profiles created by you.

Headers

Example Request

This request returns all existing profiles that you have created and their associated parameters.

curl --location --request GET 'https://scheduler.plumvoice.com/api/profiles' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812'

Success Response

[
    {
        "profile_id": 5,
        "nickname": "MorningPace"
    },
    {
        "profile_id": 6,
        "nickname": "MorningCalls"
    }
]

Update Profile

PATCH https://scheduler.plumvoice.com/api/profiles/{id}

Update one or more specific parameters for the selected profile.

Note: The API is designed to accept this request with either the PATCH or PUT method and produce the same results. Only parameters specified in the request will be updated.

Path Parameters

Query Parameters

Example Request

This request updates all parameters available for the profile with id 17.

Note that the response only returns the profile's id and nickname. To confirm all specified parameters have the desired values, use the Get Profiles endpoint and review the updated profile in the response.

curl --location --request PATCH 'https://scheduler.plumvoice.com/api/profiles/17?period=31&amount_per_period=101&time_between_periods=11&nickname=30-100-10' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812'

Success Response

{
    "status": "success",
    "response": {
        "id": 17,
        "nickname": "30-100-10"
    }
}

Delete Profile

DELETE https://scheduler.plumvoice.com/api/profiles/{id}

Removes an existing profile using the id number entered.

Note: A profile cannot be deleted while applied to a campaign.

Path Parameters

Example Request

This request deletes the profile associated with id 7.

curl --location --request DELETE 'https://scheduler.plumvoice.com/api/profiles/7' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812'

Success Response

{
    "status": "success"
}

Create Campaign

POST https://scheduler.plumvoice.com/api/campaigns

Creates a new campaign.

Headers

Request Body

Example Request

This request creates a campaign that will run from January 1, 2022 (start_date) to January 5, 2022 (end_date). The campaign will run on the days set in the schedule associated with the schedule_id 6. On each scheduled day, the campaign will begin running at 8:00 A.M. and stop running at 11:00 A.M. (Eastern) using the call-pacing profile MorningPace. Each call will use the VXML application linked in start_url and post-call processing linked in result_url.

curl --location --request POST 'https://scheduler.plumvoice.com/api/campaigns' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812' \
--form 'start_date="2022-01-01"' \
--form 'end_date="2022-01-05"' \
--form 'phone_numbers=@"/C:/Users/jrobe/Desktop/api-test-1.csv"' \
--form 'profiles="[{\"profile\":\"MorningPace\",\"start_time\":\"08:00\",\"end_time\":\"11:00\"}]"' \
--form 'schedule_id="6"' \
--form 'start_url="http://charles.plumgroup.com/~schan/src/charles/vxml/start.php"' \
--form 'result_url="http://myserver.com/storesmsresults.php"'

Success Response

{
    "status": "success",
    "response": {
        "id": 2,
    }
}

Get Campaigns

GET https://scheduler.plumvoice.com/api/campaigns

Returns all existing campaigns created by you.

Headers

Example Request

This request returns all existing campaigns that you have created and their associated parameters.

curl --location --request GET 'https://scheduler.plumvoice.com/api/campaigns' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812'

Success Response

[
      {
        "campaign_id": 12,
        "start_date": "2022-01-01 00:00:00",
        "end_date": "2022-01-05 00:00:00",
        "start_url": "http://charles.plumgroup.com/~schan/src/charles/vxml/start.php",
        "result_url": "http://myserver.com/storesmsresults.php",
        "schedule_nickname": "3wkdays",
        "profiles": [
            {
                "profile_id": 5,
                "nickname": "MorningPace",
                "start_time": "08:00",
                "end_time": "23:00"
            }
        ]
    }
]

Start Campaign

POST https://scheduler.plumvoice.com/api/campaigns/start

Starts an existing campaign.

Request Body

Example Request

This request starts the campaign associated with campaign_id 6.

curl --location --request POST 'https://scheduler.plumvoice.com/api/campaigns/start' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812' \
--form 'campaign_id="6"'

Success Response

{
    "status": "success"
}

Stop Campaign

POST https://scheduler.plumvoice.com/api/campaigns/stop

Stops an active campaign.

Request Body

Example Request

This request stops the campaign associated with campaign_id 2.

curl --location --request POST 'https://scheduler.plumvoice.com/api/campaigns/stop' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812' \
--form 'campaign_id="2"'

Success Response

{
    "status": "success"
}

Add Calls

POST https://scheduler.plumvoice.com/api/campaigns/add-calls

Appends additional phone numbers to an existing campaign.

If the campaign is already running, the new phone numbers will be added to the end of the queue.

Request Body

Example Request

This request adds the submitted phone numbers to the campaign associated with campaign_id 2.

curl --location --request POST 'https://scheduler.plumvoice.com/api/campaigns/add-calls' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812' \
--form 'phone_numbers="[\"tel:+12223334444;ani=7778889999\",\"tel:+14443332222;ani=9998887777\"]"' \
--form 'campaign_id="2"'

Success Response

{
    "status": "success"
}

Update Campaign

PATCH https://scheduler.plumvoice.com/api/campaigns/{id}

Update one or more specific parameters for the selected campaign.

Notes:

The API is designed to accept this request with either the PATCH or PUT method and produce the same results. Only parameters specified in the request will be updated.

A campaign's phone numbers cannot be updated through this method. Use the Add Calls method for this instead.

Path Parameters

Query Parameters

Example Request

This request updates the applied schedule, starting date, ending date, and applied profile for the campaign with id 26.

Note that the response only returns the campaign's id. To confirm all specified parameters have the desired values, use the Get Campaigns endpoint and review the updated campaign in the response.

curl --location -g --request PATCH 'https://scheduler.plumvoice.com/api/campaigns/26?schedule=11&start_date=2022-04-15&end_date=2022-04-30&profiles=[{"profile":"MorningPace","start_time":"08:00","end_time":"23:00"}]' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812'

Success Response

{
    "status": "success",
    "response": {
        "id": 26
    }
}

Delete Campaign

DELETE https://scheduler.plumvoice.com/api/campaigns/{id}

Removes an existing campaign using the id number entered.

Note: Deleting a campaign will not delete any schedule or profile(s) applied to that campaign.

Path Parameters

Example Request

This request deletes the campaign associated with id 11.

curl --location --request DELETE 'https://scheduler.plumvoice.com/api/campaigns/11' \
--header 'Authorization: Bearer 3cbde128-32b6-47aa-9e62-6353f8b06812'

Success Response

{
    "status": "success"
}

Last updated