Skip to main content

Promo Numbers

Advertiser Campaign and Affiliate Campaign Promo Numbers

The API provides the ability to manage promo numbers for a given campaign. Promo numbers are uniquely identified by the phone number itself and these numbers are always generated by the Invoca platform. Therefore, the operations on the promo numbers interface are not idempotent. When you POST a promo number, we return the promo_number in the response body. This capability is JSON‐only.

Properties

Hours of Operation Fields

“open_24_7”: boolean. When true, the destination is always available. When false, schedules must be provided. “time_zone”: string (required). Rails ActiveSupport timezone name (e.g., “Pacific Time (US & Canada)”, “Eastern Time (US & Canada)”, “Central Time (US & Canada)”, “Mountain Time (US & Canada)”, “Arizona”). See https://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html for full list. “schedules”: array of hashes (required when open_24_7 is false). Each schedule contains:
  • “day_of_week”: string. Day of the week: “Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, or “Saturday”.
  • “open_time”: string. Opening time in HH:MM format (15-minute increments, e.g., “09:00”).
  • “close_time”: string. Closing time in HH:MM format (15-minute increments, e.g., “17:00”).
Schedules cannot overlap. To remove hours of operation, pass null, empty string, empty array, or empty hash.

Custom Data

Promo numbers may have Custom Data Fields applied to them, which will be applied to calls originating through the promo number. To apply Custom Data Values to a promo number, the top level parameter custom_data should be assigned a hash with each pair’s key corresponding to a partner name. The value of the pair should be the value to be applied. For the following example, we would apply the value “Offline newspaper” to the Custom Data Field “channel”.

Endpoints Using id_from_network

The following endpoints are for use when you have your own IDs (id_from_network) and wish to use that as the identifier.

GET /promo_numbers_by_id

Get all Promo Numbers (using id_from_network)

Examples

Read all Advertiser Campaign Promo Numbers as an array Endpoint:
Format: application/json Response Code: 200 Response Body:

Read all Affiliate Campaign Promo Numbers as an array Endpoint:
Format: application/json Response Code: 200 Response Body:

GET /promo_numbers_by_id/<promo_number_id>

Read a Promo Number (using id_from_network)

Examples

Read a specific Advertiser Campaign Promo Number Endpoint:
Format: application/json Response Code: 200 Response Body:

Read a specific Affiliate Campaign Promo Number Endpoint:
Format: application/json Response Code: 200 Response Body:

POST /promo_numbers_by_id

Create an Advertiser/Affiliate Promo Number (using id_from_network)

Examples

Create an Advertiser Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

Create an Advertiser Campaign Local Promo Number with tn_prefix Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

Create an Advertiser Campaign Local Promo Number with city/state Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

Create an Affiliate Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

Create a Google Call Extension Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

PUT /promo_numbers_by_id/<promo_number_id>

Update a Campaign Promo Number (using id_from_network)

Examples

Update an Advertiser Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 200 Response Body: Same as a GET response, includes all the promo number properties.
Update Affiliate Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 200 Response Body: Same as a GET response, includes all the promo number properties.
Moving an Advertiser Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 200 Response Body: Same as a GET response, includes all the promo number properties.
Moving an Affiliate Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 200 Response Body: Same as a GET response, includes all the promo number properties.

DELETE /promo_numbers_by_id/<promo_number_id>

Delete a Campaign Promo Number (using id_from_network)

Examples

Delete an Advertiser Campaign Promo Number Endpoint:
Format: application/json Response Code: 200 Response Body:

Delete an Affiliate Campaign Promo Number Endpoint:
Format: application/json Response Code: 200 Response Body:

Endpoints Using Phone Number as Identifier

The following endpoints are for use when you do not have your own IDs (id_from_network) and you treat the phone number as the identifier.

GET /promo_numbers

Get all Promo Numbers (using phone number)

Examples

Read all Advertiser Campaign Promo Numbers as an array Endpoint:
Format: application/json Response Code: 200 Response Body:

Read all Affiliate Campaign Promo Numbers as an array Endpoint:
Format: application/json Response Code: 200 Response Body:

GET /promo_numbers/<promo_number>

Read a Promo Number (using phone number)

Examples

Read a specific Advertiser Campaign Promo Number Endpoint:
Format: application/json Response Code: 200 Response Body:

Read a specific Affiliate Campaign Promo Number Endpoint:
Format: application/json Response Code: 200 Response Body:

POST /promo_numbers.json

Create an Advertiser/Affiliate Promo Number (using phone number)

Examples

Create an Advertiser Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

Create an Advertiser Campaign Local Promo Number with tn_prefix Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

Create an Advertiser Campaign Local Promo Number with city/state Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

Create an Affiliate Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

Create a Google Call Extension Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

Create an Advertiser Campaign Promo Number with Hours of Operation Endpoint:
Format: application/json Request Body:
Response Code: 201 Response Body:

PUT /promo_numbers/<promo_number>

Update a Campaign Promo Number (using phone number)

Examples

Update an Advertiser Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 200 Response Body: Same as a GET response, includes all the promo number properties.
Update Affiliate Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 200 Response Body: Same as a GET response, includes all the promo number properties.
Moving an Advertiser Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 200 Response Body: Same as a GET response, includes all the promo number properties.
Moving an Affiliate Campaign Promo Number Endpoint:
Format: application/json Request Body:
Response Code: 200 Response Body: Same as a GET response, includes all the promo number properties.

DELETE /promo_numbers/<promo_number>

Delete a Campaign Promo Number (using phone number)

Examples

Delete an Advertiser Campaign Promo Number Endpoint:
Format: application/json Response Code: 200 Response Body:

Delete an Affiliate Campaign Promo Number Endpoint:
Format: application/json Response Code: 200 Response Body:
Last modified on August 18, 2026