advertiser_campaign_id_from_network parameter in the API.
Additionally, Signals and Custom Data related to the call can be submitted during the initial call ingestion step. Please note that Signals and Custom Data can also be applied in the future using the Signal API.
Requests may take up to 24 hours to process into the Invoca system.
Requirements
In order to use the Call Ingestion API:- The Call Ingestion feature must be enabled for your network. Your Invoca Customer Success Manager (CSM) can enable this for you.
- A specific “External” campaign must be created on your network. This campaign ID is what you’ll use in the API request.
- Call recordings must be dual-channel/stereo recordings. They must also be in a file format that we support. Invoca cannot process single-channel/mono recordings or unsupported file types. See the Supported Recording Formats section for more details.
- Call recordings must be accessible by Invoca. See Supported Recording Access Options for more details.
Endpoint
Request Parameters
Passed inapplication/json format.
Call Parameters
These are the call details used when creating the call in the Invoca platform. Required
Optional
Supported Language Codes
Signal Parameters
Used to create the fields of a signal. The Signal name provided in a request must already exist in your Signal AI configuration. Required
Optional
Custom Data Parameters
Apply Custom Data values to a call based on your Custom Data configuration. Custom Data can be any alpha-numeric value (e.g. account type, customer quality score, etc). The Custom Data Fields provided in a request must already exist in your Custom Data Configuration. RequiredAdditional Parameters
RequiredExamples
All of these examples usePOST requests, but PUT requests with the same request format are also accepted.
POST /calls — Create a new call
Endpoint:POST /calls — Create a call with signals and custom data
Endpoint:Response Codes
Remember to check the HTTP status code returned. This helps greatly when debugging.Timestamp Formats
The following formats are supported for thestart_time parameter.
All examples below correspond to a date time of 11 April 2016 at 1 PM Pacific Time.
Epoch: 10 digit timestamp in UTC seconds since 1/1/70, also known as Unix time_t. UTC milliseconds since 1/1/70 (which is the default in Javascript) are also supported, i.e. a 13 digit start time.
- Example (10 digits):
1460404800 - Example (13 digits):
1460404800000
- Format:
YYYYMMDDHHMMSSsss - Example:
20160411130000000
- Format:
YYYY/MM/DDTHH:MM:SS.sss+hh:mm - Example (UTC offset of +3 hours):
2016/04/11T23:00:00.000+03:00 - Example (UTC offset of -7 hours):
2016/04/11T13:00:00.000-07:00 - Example (UTC):
2016/04/11T20:00:00.000Z - Example (no milliseconds):
2016/04/11T13:00:00-07:00
- Format:
YYYY/MM/DD HH:MM:SS.sss AM/PM - Example:
2016/04/11 13:00:00.000 PM - Example (no milliseconds):
2016/04/11 13:00:00 PM
Recommendations on Phone Number Fields
For all calls submitted via the Call Ingestion API, regardless of whether the call is inbound or outbound, we recommend the customer’s phone number is always set as the calling_phone_number, and the business or agent’s phone number should always be set as the destination_phone_number. This standardization ensures that all calls match the Invoca recording channel layout and enables consistency across reporting and features in the Invoca platform. For example:- If a customer calls a business (inbound), the customer’s number is the calling_phone_number and the business’s number is the destination_phone_number.
- If a business calls a customer (outbound), the customer’s number is still the calling_phone_number and the business’s number is still the destination_phone_number.
Example POST Request Using cURL
You can send call results to Invoca servers in the form of an HTTP POST or PUT. cURL is recommended because it is simple and preinstalled on most machines. Below is an example of a cURL request:Errors
The Call Ingestion API clearly identifies errors when a request cannot be processed.Invalid Inputs
If invalid parameters are passed, an error will be returned with a 403 response code. For example, if acall or parameters within the call are not passed in the request, the following error will be returned. If there are multiple issues with the request, we will do our best to package all of the issues together in one response message.
Response (403 Forbidden):
Permission Errors
If you do not have access to the Call Ingestion API, the following error will be returned with a 403 response code.The Call Ingestion API is enabled per network. Please submit a case via the Community Case Portal for setup assistance.
Authorization Errors
If you do not have access to theadvertiser_campaign_id_from_network, an error will be returned with a 403 response code. For example, if you pass an advertiser_campaign_id_from_network that you do not have access to, the following error will be returned.
Response (403 Forbidden):
Campaign Configuration Related Errors
In order to fully utilize the Call Ingestion API, there are some configuration requirements for the campaign that the call is being submitted under:- Campaigns must be setup with a campaign type of ExternalOnly.
- Campaigns need to have either the Signal AI product feature or at least one Voice Signal enabled. This will enable transcription service on the submitted call.
If any of these settings are misconfigured you’ll see error messages similar to the examples below. Please submit a case via the Community Case Portal for setup assistance.
Supported Recording Formats
The Call Ingestion API supports the following file formats: Please note that after ingestion, the Invoca Audio Processing system will upsample or downsample accordingly into our default call recording format, which is MP3 with an 8 kHz sample rate. All call recordings are required to be in dual-channel or stereo format. The call recording of an inbound call on the Invoca platform has the caller channel on channel 0 and the agent audio on channel 1. For all calls submitted via the Call Ingestion API, we will normalize the channels to match the Invoca call record channel layout. Thecall_direction field will determine how the recording is normalized:
If the Invoca Audio Processing system finds any call recording format problems, a message will be sent via email notifying your Invoca Customer Success Manager (CSM) who will then reach out to help resolve any issues. See Call Processing Error Notifications for more details.
Supported Recording Access Options
Call Recordings must be accessible to the Invoca system. There are a few ways to configure your recordings to support this requirement: Public URL — Provide arecording_url for the call recording that can be downloaded without access credentials or API keys. Requesting this URL should directly download the recording.
Presigned URL — If the call recording is hosted in AWS S3, you can use presigned URLs. Provide a recording_url with a presigned URL that grants access for a predefined period of time. The presigned URL must be live for more than 24 hours to give Invoca enough time to process the recording.
Direct Recording Access to S3/Azure/SFTP — Provide Invoca with credentials to access recordings in Amazon S3, Microsoft Azure Blob Storage, or via SFTP. Then provide a recording_filename with a path to the recording. If your recording filename exactly matches the external_call_unique_id, you can omit this field entirely. Your Invoca Customer Success Manager (CSM) can assist with setting this up.
Secure Recording URL — If accessing your call recordings requires an API token, you can set an Auth Configuration with Invoca support. After setup, Invoca will provide you with the corresponding Auth Configuration ID. When passed as the recording_auth_config_id parameter in your API request, the Invoca Audio Processing system can access the recording. Supported authentication methods:
After a new call is successfully submitted via the API, a message is sent to notify the Invoca Audio Processing system to download the recording and begin processing. The audio processing system attempts to download the recording via a standard network request using wget or curl.
If the Invoca Audio Processing system is unable to successfully download and process the call recording, a message will be sent via email notifying your Invoca Customer Success Manager (CSM) who will then reach out to help resolve any issues. See Call Processing Error Notifications for more details.