Create Record
This operation is part of the Outbound API section of the Web Services API.
Overview
Creates the specified outbound record.
Request URL | /api/v2/me/outbound-records |
---|---|
HTTP Method | POST |
Required Features | api-voice-outbound |
Parameters
Parameter | Type | Value | Required |
---|---|---|---|
operationName | String | AddRecord | Yes |
chainId | Integer | The unique identifier of the chain. This is added to the existing chain if specified; otherwise, Web Services creates a new chain. | No |
applicationId | Integer | The unique identifier of the OCS application. | Yes |
campaignName | String | Name of outbound campaign which will be used for this operation. | Yes |
callingList | String | The name of the outbound calling list used for this operation. | Yes |
phoneNumber | String | The phone number of the record that is being created. | Yes |
timeZone | String | Time zone information. | Yes |
phoneType | String | Possible values:
|
Yes |
from | Integer | The record is available from this time. | Yes |
until | Integer | The record is available until this time. | Yes |
otherFields | Map | A map that contains user data, which will be attached to request. | No |
devicePath | String | The relative path to device used for sending the TLib request. | Yes |
referenceId | String | A unique identifier used to map the API call to the CometD response. If the request contains a referenceId, Web Services sends an acknowledgement or other event with the same reference ID via CometD. | No |
Samples
Request
POST /api/v2/me/outbound-records
{
'chainId': 2,
'from': 0,
'devicePath': '/devices/4d72a6b5-ee96-4e1f-b09b-5c3f979d82b7',
'operationName': 'AddRecord',
'phoneNumber': '12345',
'phoneType': 'InstantMessaging',
'campaignName': 'Campaign1',
'timeZone': 'GMT',
'callingList': 'CallingList1',
'applicationId': 134,
'until': 86339,
'referenceId': '123456789'
}
HTTP Response
{
"statusCode": 0
}
CometD Response
[
{
'data':
{
'record':
{
'devicePath': '/devices/4d72a6b5-ee96-4e1f-b09b-5c3f979d82b7',
'callingList': 'CallingList1',
'applicationId': 134,
'campaignName': 'Campaign1'
},
'notificationType': 'AddRecordAcknowledge',
'messageType': 'OutboundRecordMessage',
'referenceId': '123456789'
},
'channel': '/v2/me/outbound'
},
{
'data':
{
'metrics':
{
'eventProcessing':
{
'serverGenerationTimestamp': 1433915479448,
'nodeProcessingTimeNanos': 4615078,
'serverProcessingTimeTotalMs': 4
}
},
'userData':
{
'GSW_APPLICATION_ID': 134,
'GSW_USER_EVENT': 'AddRecordAcknowledge',
'GSW_CALLING_LIST': 'CallingList1',
'GSW_PHONE': '12345',
'GSW_CAMPAIGN_NAME': 'Campaign1',
'GSW_CHAIN_N': 0,
'GSW_CHAIN_ID': 2
},
'deviceId': '4d72a6b5-ee96-4e1f-b09b-5c3f979d82b7',
'messageType': 'DeviceUserEventMessage'
},
'channel': '/me/internal'
},
{
'successful': True,
'advice':
{
'interval': 0,
'timeout': 30000,
'reconnect': 'retry'
},
'id': '14',
'channel': '/meta/connect'
}
]
This page was last edited on May 25, 2017, at 23:23.
Comments or questions about this documentation? Contact us for support!