Service Guide
ENGAGE® Real-Time API Service Guide
Prerequisites
Before using the Real-Time Push Service, the following items must be configured in the Branded Communication Content Portal:
Assets – graphics that display on a device during an incoming call
Program Content – associated content that will be displayed on a device when a call is received
aNumbers – any originating or outgoing numbers used for calling that must be configured in the Content Portal before any branded communication content may be delivered
U.S. Base URL
International Base URL
Open Endpoints
Open endpoints do not require authentication.
Get Token
POST
/federated/content/v2/token
Endpoints Requiring Authentication
Endpoints for checking health of previously granted Access Token:
Check Token Health
GET
/federated/content/v2/token/health
Endpoints for pushing ENGAGE content in Real-Time to enabled device:
Push ENGAGE Content
POST
/federated/outbound/v2/realtime
Endpoint Details
Get Token
Get Token returns an access token to be used as Authorization header for all Metrics service requests. This request should be the prerequisite for subsequent service requests.
Tokens are valid for 15 minutes. When the token expires, it should be refreshed using the Get Token endpoint
Prerequisities
Client ID & Client Secret: generated and delivered to integration customers by First Orion
Request
URL
/federated/content/v2/token
Method
POST
Headers
- Content-type: application/json
- X-Federated-Purpose: inform
Body
{
"clientId":<clientId>",
"clientSecret":"<clientSecret>"
}
Field | Type | Required | Description |
---|---|---|---|
clientId | String | Yes | Federated client identifier provided by First Orion |
clientSecret | String | Yes | Secret code for federated client provided by First Orion and used in the request to retrieve a valid Access Token Recommendation: Protect this value in the same manner as a password |
Response
Success
- Return code: 200 OK
- Response body:
{
"accessToken": "eyJraWQiOiJzVkM5eXczZ2Vtckwzb2ZpbXZCM1BSWGNWc1JhcXJsR0lQSWN0TDhUcXBrPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiJrdjQ4NmhxYWxsYml2c2t2NnE2M3Zhc2NwIiwidG9rZW5fdXNlIjoiYWNjZXNzIiwic2NvcGUiOiJjb20uZmlyc3Rvcmlvbi5lbmdhZ2UuZmVkZXJhdGlvblwvZmVkZXJhdGVkaW5mb3JtIiwiYXV0aF90aW1lIjoxNTYwMzUyNDc1LCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMtZWFzdC0xLmFtYXpvbmF3cy5jb21cL3VzLWVhc3QtMV80WlZGZDBKbXEiLCJleHAiOjE1NjAzNTYwNzUsImlhdCI6MTU2MDM1MjQ3NSwidmVyc2lvbiI6MiwianRpIjoiNzRiZTczOTktZTZmYi00Njk4LWIwMzUtMjdkMzE0YTI4MTdmIiwiY2xpZW50X2lkIjoia3Y0ODZocWFsbGJpdnNrdjZxNjN2YXNjcCJ9.Od3JH7qUV15B7LisXP6oj6elwRn8omZJJbmtWu-X9tVHN9P846nVRQSaWyOqt6a91afdkd5sM7Hs4UoNeWqcIvAio93lAesSEEYxDQrHsi4LpxQ_Fb4nF_9Mk_kPrgfnqmSdRzWhRrkdLhuvrAvbFL6wm14TSKeHX-mYVBe4LqnYA8Ok297YYSVLgBk4lUw1Vb2brUWwpT71ddLE0nUE7rNL69HE1qX9N5zc3uzpsVdU8IqscyZFbwZOCfRaTX7MYAtzj9mFxyumYKVRM5lZcn87i4RETjh4pTtj-8I4l3TrNyu4MGO7EpslgmnPvk04liV6s77JMh3fe1Q3wQNzdQ",
"message": "Success",
"errorCode": 0,
"requestId": "12ab005b-1522-406b-82c9-a2ab9a1ff49
}
Field | Type | Description |
---|---|---|
accessToken | String | Access token used for Authentication in subsequent service requests, i.e., (Authorization: Bearer '') |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Error 500 - Failed to Grant accessToken Error (missing clientId)
- Return code: 500 Internal Server Error
- Response body:
{
"accessToken": null,
"message": "Failed to grant access token",
"errorCode": 500,
"requestId": "5cf3ad7e-0428-491f-a85f-c444487d1523"
}
Field | Type | Description |
---|---|---|
accessToken | String | Null value returned for missing token |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Check Token Health
Returns health of access token used as Authentication header. Tokens should be refreshed after the current Token has expired.
A healthy token will return a 200 OK response and token details in the response body
An expired token will return a 401 Unauthorized response and should be refreshed
Prerequisites
The value for the header Authorization: Bearer Token will be returned by the Get Token service request
Request
URL
/federated/content/v2/token/health
Method
GET
Headers
- Content-type: application/json
- Authorization: Bearer Token
Response
Success
- Return code: 200 OK
- Response body:
{
"accessToken": null,
"message": "Healthy",
"errorCode": "",
"requestId": "5c79f9a0-447e-4093-87d8-05bdd25e9200"
}
Field | Type | Description |
---|---|---|
accessToken | String | Access token used for Authentication in subsequent service requests, i.e., (Authorization: Bearer accessToken) |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Error 401 - accessToken Invalid or Expired Error
- Return code: 401 Unauthorized
- Response body: None
ENGAGE Push Content: aNumber List
Delivers content to specific ENGAGE-enabled devices by providing a list of aNumbers.
Prerequisites
Authorization Token : the value for the header Authorization: Bearer Token will be returned by the Get Token service request
Program Content UUID : the associated ENGAGE Program to be delivered as an enhanced experience to ENGAGE-enabled handsets. Programs are setup and configured in the Content Portal – where the Program Content UUID can be found
Request
URL
/federated/outbound/v2/realtime?programContentUuid= {programContentUuid}
Method
POST
Headers
- Authorization: Bearer accessToken from Get Token request;
- Content-type : application/json
Query Parameters
- programContentUuid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
- 3e1b9b27-d1f9-4c8d-800f-bb534d6928d6
Field | Type | Required | Description |
---|---|---|---|
programContentUuid | String | Yes | UUID associated to an ENGAGE program being delivered to device |
Body - With List of Numbers
{
"bNumber": "+5014003209",
"customData": {
"MY_VAR": "Hello There"
},
"customTrackingId": "custom-tracking-1",
"ttlSeconds": 3200,
"keepAfterCall": false,
"maxWaitDuration": 90,
"aNumbers": [
"+5014008029",
"+5013509988"
]
}
Field | Type | Required | Description |
---|---|---|---|
bNumber | String | Yes | Device number that will display program content when a call is received after a successful push Must be in E.164 format |
customData | Object | No | Object for custom data fields |
customData[x] .MY_VAR | String | No | Custom text sent to a bNumber and displayed during call |
customTrackingId | String | No | Optional ID for client-side tracking |
ttlSeconds | Integer | No | Duration, in seconds, for content to live on the device following successful content push Default is 3600 Recommended value: 960 seconds First Orion best practice: set the TTL to 16 minutes |
keepAfterCall | Boolean | No | Set if content should be kept on device after call Default is false Recommended value: false First Orion best practice: do not keep content on the device after a call or successful push |
maxWaitDuration | Integer | No | Max wait time, in seconds, for a response from the device, to the handset, to pushing content Recommended value: 10 seconds |
aNumbers | Array | Yes Cannot send aNumber Group ID | Originating numbers calling a bNumber. aNumber must be previously uploaded in the Branded Communication Content Portal List of up to 5,000 aNumbers in E.164 format Cannot send UUID |
ENGAGE Push Content: aNumber Group UUID
Delivers content to specific ENGAGE-enabled devices by providing an aNumber Group UUID – configured and located in the Content Portal.
Prerequisites
Authorization Token : the value for the header Authorization: Bearer Token will be returned by the Get Token service request
Program Content UUID : the associated ENGAGE Program to be delivered as an enhanced experience to ENGAGE-enabled handsets. Programs are set up and configured in the Content Portal, where the Program Content UUID can be found
aNumber Group UUID : pushing content using an aNumber Group UUID configured in the Content Portal. The UUID can be identified in the Outbound Calling Numbers Grouping Numbers section
Request
URL
/federated/outbound/v2/realtime?programContentUuid= {programContentUuid}
Method
POST
Headers
- Authorization: Bearer accessToken from Get Token request
- Content-type: application/json
Query Parameters
- programContentUuid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
- 3e1b9b27-d1f9-4c8d-800f-bb534d6928d6
Field | Type | Required | Des |
---|---|---|---|
programContentUuid | String | Yes | UUID associated to ENGAGE program being delivered to device |
Body – aNumber Group
{
"bNumber": "+5014003209",
"customData": {
"MY_VAR": "Hello There"
},
"customTrackingId": "custom-tracking-1",
"ttlSeconds": 3200,
"keepAfterCall": false,
"maxWaitDuration": 90,
"aNumberGroupId": "64ec8a2e-9946-4b2e-bbf4-508870205506"
}
Field | Type | Required | Description |
---|---|---|---|
bNumber | String | Yes | Device number that will display program content when a call is received after a successful push Must be E.164 format |
customData | Object | No | Object for custom data fields |
customData[x] .MY_VAR | String | No | Custom text sent to bNumber and displayed during phone call Recommended value: 20 First Orion best practice: maximum of 20 characters as messages over 20 characters may not display correctly on all devices |
customTrackingId | String | No | Optional ID for client-side tracking |
ttlSeconds | Integer | No | Duration, in seconds, for content to live on the device following a successful content push Default is 3600 Recommended value: 960 seconds First Orion best practice: set the TTL to 16 minutes |
keepAfterCall | Boolean | No | Set if content should be kept on device after call Default is false Recommended value: false First Orion best practice: do not keep content on the device after a call or successful push |
maxWaitDuration | Integer | No | Max wait time, in seconds, for response from the device - to the handset - to pushing content Recommended value: 10 seconds |
aNumberGroupId | String (UUID) | Yes Cannot send aNumber | aNumber Group ID representing a group of aNumbers that will be placing calls. aNumbers must be previously uploaded in the Branded Communication Content Portal |
Response
Success
- Return code: 200 OK
- Response body:
{
"response": "HandsetReceivedContent",
"message": "Success",
"errorCode": "",
"requestId": "3448a679-29b2-49a9-8c1b-759bb221cbfd"
}
Field | Type | Description |
---|---|---|
response | Object | Response object from server |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Response 200 - Attempted
Content Push was successfully attempted but bNumber is not an ENGAGE-enabled device: Device did NOT receive content
- Return code: 200
- OK
- Response body:
{
"response": "BNumberNotActive",
"message": "BNumber is not active in the system.",
"errorCode": "",
"requestId": "989a89a5-7626-4251-bf41-36fe4d1c2081"
}
Field | Type | Description |
---|---|---|
response | Object | Response object from server |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Response 202 - Handset failed to respond within timeout
- Return code: 202
- Accepted
- Response body:
{
"response": "MaxWaitDurationExceeded",
"message": "Handset did not respond within the timeout for this request.",
"errorCode": 0,
"requestId": "d5104cdc-e415-42ab-9375-eecc98929c37"
}
Field | Type | Description |
---|---|---|
response | Object | Response object from server |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Response 202 - Device (bNumber) is unresponsive or has encountered a client error
- Return code: 202
- Accepted
- Response body:
{
"response": "BNumberNotActive",
"message": "BNumber is not active in the system.",
"errorCode": 0,
"requestId": "989a89a5-7626-4251-bf41-36fe4d1c2081"
}
Field | Type | Description |
---|---|---|
response | Object | Response object from server |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Error 400 - Program being used is not correctly configured or request is missing programContentUuid
- Return code: 400
- Bad Request
- Response body:
{
"response": "Invalid program setup on this program",
"message": "Invalid request",
"errorCode": 400,
"requestId": "1bc6cdd7-f684-4dd3-a672-65164bf1cb9d"
}
Field | Type | Description |
---|---|---|
response | Object | Response object from server |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Error 400 - Missing aNumber or aNumber GroupID field or field value
- Return code: 400
- Bad Request
- Response body:
{
"response": "Must send aNumbers or a valid ANumberGroupId.",
"message": "Invalid request",
"errorCode": 400,
"requestId": "31dbfcda-35f1-4f8d-8e44-435b682b92e0"
}
Field | Type | Description |
---|---|---|
response | Object | Response object from server |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Error 400 - aNumberGroupId Field not in correct format or not in system
- Return code: 400
- Bad Request
- Response body:
{
"response": [
{
"field": "aNumberGroupId",
"messages": [
""
]
}
],
"message": "Invalid request",
"errorCode": 400,
"requestId": "84418368-faa7-40df-a31f-7c9b4220c350"
}
Field | Type | Description |
---|---|---|
response | Object | Response object from server |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Error 400 - bNumber field missing from request
- Return code: 400
- Bad Request
- Response body:
{
"response": [
{
"field": "aNumberGroupId",
"messages": [
""
]
}
],
"message": "Invalid request",
"errorCode": 400,
"requestId": "84418368-faa7-40df-a31f-7c9b4220c350"
}
Field | Type | Description |
---|---|---|
response | Object | Response object from server |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Error 401 -Bearer token used for Authorization header is invalid
- Return code: 401
- Unauthorized
- Response body: None
Error 403 - One or more aNumbers being sent are not associated with the Service Provider making request
- Return code: 403
- Forbidden
- Response body:
{
"response": "Not allowed to use one or more anumbers.",
"message": "NotAllowedToUseANumber",
"errorCode": 403,
"requestId": "4153b83b-fdfa-4ab6-a386-6f4bdb09e420"
}
Field | Type | Description |
---|---|---|
response | Object | Response object from server |
message | String | Message returned from server |
errorCode | String | Error code returned from server |
requestId | String | Unique HTTP request made to server |
Updated 12 months ago