Campaigns


GEThttps://api.voxo.co/v2/call-campaigns?tenantId={tenantId}

List Campaigns

List all campaigns for the provided account id

Parameters

  • Name
    tenantId*
    Type
    integer
    Description
    1234

Header

  • Name
    Authorization*
    Type
    string
    Description

    Bearer {accessToken}

  • Name
    Content-Type*
    Type
    string
    Description
    application/json

Request

GET
/call-campaigns?tenantId={tenantId}
curl --location -g --request GET 'https://api.voxo.co/v2/call-campaigns?tenantId={tenantId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

[
  {
    "id": 11111111111,
    "tenantId": 1234,
    "name": "fdafd",
    "type": "SCHEDULED",
    "dateStart": "2022-02-16",
    "dateEnd": "2022-02-17",
    "callerId": "6013151002",
    "callDelay": 5000,
    "state": "PAUSED",
    "lastrun": "2022-02-16 14:33:45",
    "dialtimeout": 0,
    "tech": "SMS",
    "message": "ghe",
    "timeStart": "00:00",
    "timeEnd": "00:00",
    "timezone": "America/Chicago",
    "callFrequency": 10,
    "callHoursStart": null,
    "callHoursEnd": null,
    "recording": "no"
  }, 
  ...
],

GEThttps://api.voxo.co/v2/call-campaigns/:campaignId

Get Campaign By ID

Retrieve the campaign details for the provided campaign id

Header

  • Name
    Content-Type*
    Type
    string
    Description
    application/json
  • Name
    Authorization*
    Type
    string
    Description
    Bearer {accessToken}

Request

GET
/call-campaigns/:campaignId
curl --location -g --request GET 'https://api.voxo.co/v2/call-campaigns/:campaignId' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
    "id": 111111,
    "tenantId": 1234,
    "name": "fdafd",
    "type": "SCHEDULED",
    "dateStart": "2022-02-16",
    "dateEnd": "2022-02-17",
    "callerId": "6013151002",
    "callDelay": 5000,
    "state": "PAUSED",
    "lastrun": "2022-02-16 14:33:45",
    "dialtimeout": 0,
    "tech": "SMS",
    "message": "ghe",
    "timeStart": "00:00",
    "timeEnd": "00:00",
    "timezone": "America/Chicago",
    "callFrequency": 10,
    "callHoursStart": null,
    "callHoursEnd": null,
    "recording": "no",
    "numbers": [],
    "destinations": [],
    "enableVMDetect": false,
    "matchDestinations": [],
    "notMatchDestinations": []
}

POSThttps://api.voxo.co/v2/call-campaigns/addNumbers

Add Numbers to Campaign

Add numbers to a campaign

Post Parameters

  • Name
    campaignId*
    Type
    number
    Description
    Campaign record id
  • Name
    numbers
    Type
    array
    Description
    Array of objects containing number and description

Header

  • Name
    Content-Type*
    Type
    string
    Description
    application/json
  • Name
    Authorization*
    Type
    string
    Description
    Bearer {accessToken}

Request

POST
/call-campaigns/addNumbers
curl --location -g --request POST 'https://api.voxo.co/v2/call-campaigns/addNumbers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
  "status": "success",
  "message": "Numbers successfully added to campaign",
  "campaignId": 1111,
  "campaign": "fdafd",
  "numbers": [
      {
          "number": "6015555567",
          "description": "A new number"
      },
      {
          "number": "6015515455",
          "description": "Another number"
      }
  ]
}

POSThttps://api.voxo.co/v2/call-campaigns/removeNumbers

Remove Number From Campaign

Remove or purge all numbers from a campaign

Post Parameters

  • Name
    campaignId*
    Type
    number
    Description
    Campaign record id
  • Name
    numbers*
    Type
    array
    Description
    Array of number strings. May pass empty array if purge is true
  • Name
    purge
    Type
    boolean
    Description
    Pass true to purge all campaign numbers

Header

  • Name
    Content-Type*
    Type
    string
    Description
    application/json
  • Name
    Authorization*
    Type
    string
    Description
    Bearer {accessToken}

Request

POST
/call-campaigns/removeNumbers
curl --location -g --request POST 'https://api.voxo.co/v2/call-campaigns/removeNumbers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
    "status": "success",
    "message": "Numbers successfully removed from campaign: 149",
    "campaignId": 149,
    "campaign": "fdafd",
    "numbers": [
        "6015515455",
        "6015555567"
    ]
}

POSThttps://api.voxo.co/v2/call-campaigns/schedule

Set Campaign Ready

Sets a campaign to the ready state

Post Parameters

  • Name
    campaignId*
    Type
    number
    Description
    Campaign record id

Header

  • Name
    Content-Type*
    Type
    string
    Description
    application/json
  • Name
    Authorization*
    Type
    string
    Description
    Bearer {accessToken}

Request

POST
/call-campaigns/schedule
curl --location -g --request POST 'https://api.voxo.co/v2/call-campaigns/schedule' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

  {
      "status": "success",
      "message": "Campaign is now ready",
      "campaignId": 149,
      "campaign": "fdafd"
  }

POSThttps://api.voxo.co/v2/call-campaigns/pause

Pause Campaign

Sets a campaign to the paused state

Post Parameters

  • Name
    campaignId*
    Type
    number
    Description
    Campaign record id

Header

  • Name
    Content-Type*
    Type
    string
    Description
    application/json
  • Name
    Authorization*
    Type
    string
    Description
    Bearer {accessToken}

Request

POST
/call-campaigns/pause
curl --location -g --request POST 'https://api.voxo.co/v2/call-campaigns/pause' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
    "status": "success",
    "message": "Campaign is now paused",
    "campaignId": 149,
    "campaign": "fdafd"
}

POSThttps://api.voxo.co/v2/call-campaigns/remove

Remove A Campaign

Remove a campaign

Post Parameters

  • Name
    campaignId*
    Type
    number
    Description
    Campaign record id

Header

  • Name
    Content-Type*
    Type
    string
    Description
    application/json
  • Name
    Authorization*
    Type
    string
    Description
    Bearer {accessToken}

Request

POST
/call-campaigns/remove
curl --location -g --request POST 'https://api.voxo.co/v2/call-campaigns/remove' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
    "id": 149,
    "tenantId": 875,
    "name": "fdafd",
    "type": "SCHEDULED",
    "dateStart": "2022-02-16",
    "dateEnd": "2022-02-17",
    "callerId": "6013151002",
    "callDelay": 5000,
    "state": "PAUSED",
    "lastrun": "2022-02-16 14:33:45",
    "dialtimeout": 0,
    "tech": "SMS",
    "message": "ghe",
    "timeStart": "00:00",
    "timeEnd": "00:00",
    "timezone": "America/Chicago",
    "callFrequency": 10,
    "callHoursStart": null,
    "callHoursEnd": null,
    "recording": "no"
}

POSThttps://api.voxo.co/v2/call-campaigns

Create A Campaign

Create a new campaignAbout destinations

Destinations are the routing specifiers when certain events happen. In this case when a campaign connect and, if applicable, a human or voicemail is detected. See the destinations documentation for listing the available destination types. After determining the type, you will determine the appropriate entity id to route to.

The example shows destinations that route to an extension with the id 1319. Note that obtaining entity ids may need to occur using v1 apis as v2 is under development

  • Name
    tenantId*
    Type
    number
    Description
    1234
  • Name
    name*
    Type
    number
    Description
    Name of the campaign
  • Name
    tech*
    Type
    string
    Description
    VOICE
  • Name
    state
    Type
    enum
    Description
    READY or PAUSED. Default is READY
  • Name
    dateStart*
    Type
    date
    Description
    Start date of the campaign format YYYY-MM-DD
  • Name
    dateEnd*
    Type
    date
    Description
    End date of the campaign. Format YYYY-MM-DD
  • Name
    timeStart*
    Type
    time
    Description
    Start time for campaign. Format is HH:mm (24 hour)
  • Name
    timeEnd*
    Type
    time
    Description
    End time for campaign. Format is HH:mm (24 hour)
  • Name
    callerId*
    Type
    string
    Description
    The outbound caller id for the campaign
  • Name
    recording*
    Type
    enum
    Description
    Enable recording for call from this campaign. 'yes' or 'no'
  • Name
    timezone*
    Type
    string
    Description
    Operating time zone for the campaign. Ex. "America/Chicago"
  • Name
    numbers*
    Type
    array
    Description
    Array of objects including number and description of numbers to dial
  • Name
    callFrequency*
    Type
    number
    Description
    Number of seconds to wait between dialing numbers
  • Name
    destinations*
    Type
    array
    Description
    Destinations when a campaign call connects. This applies when enableVmDetect is false Can be empty array.
  • Name
    enableVMDetect*
    Type
    boolean
    Description
    Attempt to detect if a voicemail or human connected
  • Name
    matchDestinations*
    Type
    array
    Description
    If enableVMDetect is true, the destinations to follow if a voicemail is detected. Can be empty array.
  • Name
    notMatchDestinations*
    Type
    array
    Description
    If enableVMDetect is true, the destinations to follow if a person is detected. Can be empty array.
  • Name
    callHoursStart*
    Type
    time
    Description
    Start of campaign calling hours. Format is HH:mm (24 hour)
  • Name
    callHoursEnd*
    Type
    time
    Description
    End of campaign calling hours. Format is HH:mm (24 hour)

Header

  • Name
    Content-Type*
    Type
    string
    Description
    application/json
  • Name
    Authorization*
    Type
    string
    Description
    Bearer {accessToken}

Request

POST
/call-campaigns
curl --location -g --request POST 'https://api.voxo.co/v2/call-campaigns' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
    "id": 725,
    "tenantId": 37,
    "name": "The Simpsons",
    "type": "SCHEDULED",
    "dateStart": "2023-04-21",
    "dateEnd": "2023-05-20",
    "coId": 0,
    "maxChannels": 3,
    "maxAttempts": 3,
    "callerId": "9853848109",
    "callDelay": 5000,
    "state": "READY",
    "lastrun": "2023-04-06 09:29:36",
    "dialtimeout": 0,
    "hosted": "",
    "tech": "VOICE",
    "message": "Hello, how are you",
    "recording": "yes",
    "crId": 0,
    "quId": 0,
    "minFreeAgents": 0,
    "timeStart": "00:00",
    "timeEnd": "00:00",
    "timezone": "America/Chicago",
    "callFrequency": 10,
    "callHoursStart": "21:45",
    "callHoursEnd": "23:10"
}

POSThttps://api.voxo.co/v2/call-campaigns/update

Update A Campaign

Update an existing campaign
This endpoint enables sparse updating for an existing campaign
  • Name
    campaignId*
    Type
    number
    Description
    1234
  • Name
    name
    Type
    number
    Description
    Name of the campaign
  • Name
    tech
    Type
    string
    Description
    VOICE
  • Name
    state
    Type
    enum
    Description
    READY or PAUSED. Default is READY
  • Name
    dateStart
    Type
    date
    Description
    Start date of the campaign format YYYY-MM-DD
  • Name
    dateEnd
    Type
    date
    Description
    End date of the campaign. Format YYYY-MM-DD
  • Name
    timeStart
    Type
    time
    Description
    Start time for campaign. Format is HH:mm (24 hour)
  • Name
    timeEnd
    Type
    time
    Description
    End time for campaign. Format is HH:mm (24 hour)
  • Name
    callerId
    Type
    string
    Description
    The outbound caller id for the campaign
  • Name
    recording
    Type
    enum
    Description
    Enable recording for call from this campaign. 'yes' or 'no'
  • Name
    timezone
    Type
    string
    Description
    Operating time zone for the campaign. Ex. "America/Chicago"
  • Name
    numbers
    Type
    array
    Description
    Array of objects including number and description of numbers to dial
  • Name
    callFrequency
    Type
    number
    Description
    Number of seconds to wait between dialing numbers
  • Name
    destinations
    Type
    array
    Description
    Destinations when a campaign call connects. This applies when enableVmDetect is false Can be empty array.
  • Name
    enableVMDetect
    Type
    boolean
    Description
    Attempt to detect if a voicemail or human connected
  • Name
    matchDestinations
    Type
    array
    Description
    If enableVMDetect is true, the destinations to follow if a voicemail is detected. Can be empty array.
  • Name
    notMatchDestinations
    Type
    array
    Description
    If enableVMDetect is true, the destinations to follow if a person is detected. Can be empty array.
  • Name
    callHoursStart
    Type
    time
    Description
    Start of campaign calling hours. Format is HH:mm (24 hour)
  • Name
    callHoursEnd
    Type
    time
    Description
    End of campaign calling hours. Format is HH:mm (24 hour)

Header

  • Name
    Content-Type*
    Type
    string
    Description
    application/json
  • Name
    Authorization*
    Type
    string
    Description
    Bearer {accessToken}

Request

POST
/call-campaigns/update
curl --location -g --request POST 'https://api.voxo.co/v2/call-campaigns/update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
    "campaignId": 717,
    "tenantId": 37,
    "name": "The Simpsons Edited Sparse Again",
    "state": "PAUSED",
    "dateStart": "2022-11-14",
    "dateEnd": "2022-11-14",
    "callerId": "2513843007",
    "tech": "VOICE",
    "message": "",
    "recording": "no",
    "timeStart": "00:00",
    "timeEnd": "00:00",
    "timezone": "America/Chicago",
    "callFrequency": 23,
    "callHoursStart": "00:00",
    "callHoursEnd": "00:45"
}