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.Property | Type | Value |
|---|---|---|
id | integer (read-only) | The internal Invoca id of the promo number. |
id_from_network | string | Network specific id of the promo number. |
description | string (required) | Arbitrary description |
media_type | string (required) | one of: “Online: Content / Review Site” “Online: Discount / Coupon Site” “Online: Display” “Online: Email” “Online: Rewards / Incentive” “Online: Lead Form / Co Reg” “Online: Search” “Online: Social Media” “Online: Software” “Online: Other” “Mobile: Apps” “Mobile: Display” “Mobile: Search” “Mobile: SMS” “Mobile: Other” “Offline: Business Publication” “Offline: Call Center” “Offline: Direct Mail” “Offline: Directory” “Offline: Newspaper” “Offline: InCall Ad” “Offline: Magazine” “Offline: Outdoor” “Offline: Radio” “Offline: TV” “Offline: Other” |
object_url | string (read-only) | URL for reaching the promo number in the UI. |
local_center | hash | Requires one of the following City & State required together A filled field determines the center to start looking for local numbers at. “tn_prefix”: an npa “zipcode”: a valid zipcode “city”: a valid city “state”: a valid state |
local_number_preferences | hash | Both are optional “search_radius_miles”: An integer, greater than or equal to 0. Default is 240. Represents the number of miles from the location to search. “restrict_search_to_state”: A boolean. Default: True. Used to restrict search to be within state boundaries. |
tn_prefix_whitelist | array of strings | an array of stringified limiters on the boundaries of where to look for local numbers given as npas (ex. [“805”, “212”]) |
promo_type | string (optional) | For international campaigns that support local or mobile numbers. If not passed then promo numbers will default to the organizational default. (US/CA campaigns will continue to use local_center for local numbers) “Local” “Mobile” |
adwords_account_id | string (optional) | The ID of the AdWords client account to be associated with this promo number. Requires media type to be set to ‘Google Call Extension’. (ex. “627-345-9815”) |
destination_advertiser_id_from_network | string (optional) | The ID of the advertiser in which the promo number is intended to be moved to. If this field is used, destination_advertiser_campaign_id_from_network also must be included.
|
destination_advertiser_campaign_id_from_network | string (optional) | The ID of the advertiser campaign in which the promo number is intended to be moved to. If this field is used, destination_advertiser_id_from_network also must be included.
|
destination_affiliate_id_from_network | string (optional) | The ID of the affiliate in which the promo number is intended to be moved to. Only to be used when moving promo numbers between affiliate campaigns. If this field is used, both destination_advertiser_campaign_id_from_network and destination_advertiser_id_from_network also must be included.
|
hours_of_operation | hash (optional) | Configures when the destination is available to receive calls. If not provided, the campaign’s hours of operation settings will apply. Requirements: This field is only available for promo numbers that belong to an advertiser campaign (not affiliate campaigns). “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:
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 parametercustom_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”.
API Endpoints
The following endpoints are for use when you have your own ID’s (id_from_network) and wish to use that as the identifier.https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id/<promo_number_id_from_network>.json
Get all Promo Numbers
Get all Promo Numbers
Examples
Read all Advertiser Campaign Promo Numbers as an arrayEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id.jsonFormat: application/jsonResponse Code: 200Response Body:Read all Affiliate Campaign Promo Numbers as an arrayEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id.jsonFormat: application/jsonResponse Code: 200Response Body:Read a Promo Number
Read a Promo Number
Examples
Read a specific Advertiser Campaign Promo NumberEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id/<promo_number_id_from_network>.jsonFormat: application/jsonResponse Code: 200Response Body:Read a specific Affiliate Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id/<promo_number_id_from_network>.jsonFormat: application/jsonResponse Code: 200Response Body:Create an Advertiser/Affiliate Promo Number
Create an Advertiser/Affiliate Promo Number
Examples
Create an Advertiser Campaign Promo NumberEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id.jsonFormat: application/jsonRequest Body:Create an Advertiser Campaign Local Promo Number with tn_prefixEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id.jsonFormat: application/jsonRequest Body:Create an Advertiser Campaign Local Promo Number with city/stateEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id.jsonFormat: application/jsonRequest Body:Create an Affiliate Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id.jsonFormat: application/jsonRequest Body:Create a Google Call Extension Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id.jsonFormat: application/jsonRequest Body:Update a Campaign Promo Number
Update a Campaign Promo Number
Examples
Update an Advertiser Campaign Promo NumberEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id/<promo_number_id_from_network>.jsonFormat: application/jsonRequest Body:Update Affiliate Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id/<promo_number_id_from_network>.jsonFormat: application/jsonRequest Body:Moving an Advertiser Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id/<promo_number_id_from_network>.jsonFormat: application/jsonRequest Body:Moving an Affiliate Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id/<promo_number_id_from_network>.jsonFormat: application/jsonRequest Body:Delete a Campaign Promo Number
Delete a Campaign Promo Number
Examples
Delete an Advertiser Campaign Promo NumberEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers_by_id/<promo_number_id_from_network>.jsonFormat: application/jsonResponse Code: 200Response Body:Delete an Affiliate Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers_by_id/<promo_number_id_from_network>.jsonFormat: application/jsonResponse Code: 200Response Body:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.json
Get all Promo Numbers
Get all Promo Numbers
Examples
Read all Advertiser Campaign Promo Numbers as an arrayEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.jsonFormat: application/jsonResponse Code: 200Response Body:Read all Affiliate Campaign Promo Numbers as an arrayEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers.jsonFormat: application/jsonResponse Code: 200Response Body:Read a Promo Number
Read a Promo Number
Examples
Read a specific Advertiser Campaign Promo NumberEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.jsonFormat: application/jsonResponse Code: 200Response Body:Read a specific Affiliate Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers/<promo_number>.jsonFormat: application/jsonResponse Code: 200Response Body:Create an Advertiser/Affiliate Promo Number
Create an Advertiser/Affiliate Promo Number
Examples
Create an Advertiser Campaign Promo NumberEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.jsonFormat: application/jsonRequest Body:Create an Advertiser Campaign Local Promo Number with tn_prefixEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.jsonFormat: application/jsonRequest Body:Create an Advertiser Campaign Local Promo Number with city/stateEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.jsonFormat: application/jsonRequest Body:Create an Affiliate Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers.jsonFormat: application/jsonRequest Body:Create a Google Call Extension Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.jsonFormat: application/jsonRequest Body:Create an Advertiser Campaign Promo Number with Hours of OperationEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers.jsonFormat: application/jsonRequest Body:Update a Campaign Promo Number
Update a Campaign Promo Number
Examples
Update an Advertiser Campaign Promo NumberEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.jsonFormat: application/jsonRequest Body:Update Affiliate Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers/<promo_number>.jsonFormat: application/jsonRequest Body:Moving an Advertiser Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.jsonFormat: application/jsonRequest Body:Moving an Affiliate Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers/<promo_number>.jsonFormat: application/jsonRequest Body:Delete a Campaign Promo Number
Delete a Campaign Promo Number
Examples
Delete an Advertiser Campaign Promo NumberEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/<promo_number>.jsonFormat: application/jsonResponse Code: 200Response Body:Delete an Affiliate Campaign Promo NumberEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/affiliates/<affiliate_id_from_network>/affiliate_campaigns/promo_numbers/<promo_number>.jsonFormat: application/jsonResponse Code: 200Response Body:UK local number orders
Orders UK local promo numbers for one location on one advertiser campaign. Only UK campaigns are supported. This call doesn’t return the phone number.https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/orders.json
Order UK local promo numbers for one location on an advertiser campaign
Order UK local promo numbers for one location on an advertiser campaign
city or area_code, plus count.A successful order returns the fields under Response (HTTP 200). This call doesn’t return the phone number. The number appears on the campaign once carrier provisioning completes.Rejection messages lists validation failures, the affiliate and locale rejections, and the order in which those checks run.Request parameters
Property | Type | Value |
|---|---|---|
description | string (optional) | Description applied to the allocation request. |
media_type | string (optional) | Media type applied to the allocation request. Same values as the promo number |
adwords_account_id | string (optional) | The ID of the AdWords client account to associate with this promo number. Requires |
city | string (conditional) | Exactly one of |
area_code | integer or numeric string (conditional) | Exactly one of The response |
count | integer or numeric string (required) | How many local numbers to order for this location. Accepted values and the over-100 rejection are under Rejection messages. |
Response (HTTP 200)
Property | Type | Value |
|---|---|---|
city | string | For a city order, the city string from the request. For an area-code order, the city that area code maps to in the UK area-code data. |
area_code | string | Present only for an area-code order. The matched UK dial-code string from the UK area-code data. Integer |
requested_count | integer | The |
allocated_count | integer | Quantity saved on this call: the sum of the allocation-request quantities. Compare it with Retrying only the shortfall is not idempotent. Each call creates new allocation requests, so a retry orders more numbers instead of returning the requests already created. Account for this in your client. |
allocation_request_ids | array of integers | IDs of the allocation requests created for this call. One call can have more than one ID. This call doesn’t return the phone number. |
Rejection messages
HTTP 422 rejections use the body shape{ "errors": { "<key>": ["<message>"] } }.Checks run in this order. The first failure is the only one returned.- Authentication. An unauthenticated caller receives HTTP 401, the shared Network Integration API challenge, before any of the checks below.
- The advertiser and advertiser campaign in the URL must exist. A missing one returns HTTP 404 with the body
{"errors":{"class":"RecordNotFound","invalid_data":"<message>"}}. - Authorization. The caller must be allowed to add promo numbers on the campaign. This runs before the affiliate and locale rejections. A paused, not-live, suspended, or otherwise unauthorized campaign returns HTTP 403 even when the locale is not UK or the request includes
affiliate_id_from_network. The 403 messages are in the status table. affiliate_id_from_network, when present, returns HTTP 422promo number orders are only available for the advertiser campaign. This route orders for the advertiser campaign only.- A campaign whose locale is not UK, including a locale with no country code, returns HTTP 422 on
errors.localewithpromo number orders are only available for UK campaigns. No city or area code is looked up. - Location shape, then
count, then the UK area-code lookup, then allocation. Inside allocation, Invoca checks the network promo number limit first, then the AdWords and Google Call Extension rules.
affiliate_id_from_network:promo number orders are only available for the advertiser campaignlocale:promo number orders are only available for UK campaignscity:city must be a stringarea_code:area_code must be an integer or a numeric string. This includes a whitespace-onlyarea_code. An empty string is treated as absent, not invalid.city:Specify exactly one of 'city' or 'area_code', not bothcity:Specify exactly one of 'city' or 'area_code'count:Total requested count (N) exceeds maximum of 100. Returned for an integer over 100, before lookup.count:count must be between 1 and 100. Returned for anything else that is not an integer from 1 to 100. A numeric string such as"5"is accepted.city:City '<city>' not found in UK area code databasearea_code:Area code '<area_code>' not found in UK area code database. The message quotes the submitted value.cityorarea_code:Your network has reached its promo number limit based on its current allocation. To request more promo numbers, please contact us.The last words are the network’s contact-support text, or a link to it. Allocation returns this oncitywhen the request did not send an area code, otherwise onarea_code.cityorarea_code:Number allocation failedcityorarea_code:Number allocation did not produce an allocation requestadwords_account_id: Returned when the campaign owner is AdWords-integrated and the account isn’t in the owner’s AdWords integration. The message containsmust exist as an account in your AdWords integration.media_type: Returned when the campaign owner is AdWords-integrated, the request sendsGoogle Call Extension, and there is no account. No account means none was sent and there is no default. The message containsrequires a Google Ads account be set.media_type: Returned when the campaign owner isn’t AdWords-integrated and the request sendsGoogle Call Extensionor anadwords_account_id. The message containscannot be Google Call Extension unless you are integrated with AdWords.adwords_account_id: Returned when the campaign owner is AdWords-integrated and the request sends an account with amedia_typeother thanGoogle Call Extension. An omittedmedia_typecounts as notGoogle Call Extension. The message containscan only be set when media type is 'Google Call Extension'.
HTTP status codes
Status | Meaning |
|---|---|
200 | The location was ordered. The body is one object: |
401 | The caller is not authenticated. This is the shared Network Integration API challenge (HTTP Basic), not the |
403 | Checked after authentication and before the 422 affiliate and locale rejections. The campaign cannot add promo numbers.
|
404 | The advertiser or advertiser campaign in the URL was not found. The body is |
422 | One rejection from Rejection messages: affiliate ID, non-UK locale, location shape, count, unknown location, allocation failure, the network promo-number limit, or a Google Call Extension or AdWords account rejection. |
Examples
Order local promo numbers by cityEndpoint:https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/orders.jsonFormat: application/jsonRequest Body:Order local promo numbers by area codeEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/orders.jsonFormat: application/jsonRequest Body:Count over 100 (HTTP 422)A count over 100 is rejected before lookup or allocation. To order more than 100 numbers, send another request.Endpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/orders.jsonFormat: application/jsonRequest Body:Unknown city (HTTP 422)Endpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/orders.jsonFormat: application/jsonRequest Body:Order with an AdWords accountEndpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/orders.jsonFormat: application/jsonRequest Body:AdWords account not in the integration (HTTP 422)Endpoint:
https://invoca.net/api/2026-02-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/promo_numbers/orders.jsonFormat: application/jsonRequest Body: