The Aegis service provides dynamic compliance workflows to ensure that phone calls or text messages to individuals comply with legal and company policy requirements. This API allows you to execute an Aegis workflow to determine whether a call or text message should be allowed. The authentication scheme is the same as for other endpoints, using an API key passed either as an HTTP header or a URI parameter.
API Key Authentication
You need an API key to access the endpoint. You can pass this key in two ways:
-
HTTP Header: Include your API key in the
X-API-KEY
header. -
URI Parameter: Append your API key as a parameter (
api-key
) to the endpoint URL.
Endpoint Overview
The production endpoint for the Aegis Execution API services is:
https://aegis.purecallerid.app/
Invoke Aegis Workflow
Endpoint: GET /api/public/aegis
Description: Execute an Aegis workflow to determine if a call or text message should be allowed.
Parameters:
-
to
(required): The phone number being called or text messaged. -
from
(required): The caller ID or sender of the text message. -
zip
(optional): The zip code of the individual being called. Suggested but not required. -
workflow-id
(required): The Aegis workflow ID, available in the Pure CallerID admin portal. -
format
(required): The response format, which can be one of"boolean"
,"text"
, or"json"
. - Additional URI parameters: Any number of optional additional parameters can be included, as long as they don't conflict with the previous fields. These parameters will be included in the metadata of the Aegis workflow transaction and can be used in decision nodes.
Example Request:
GET /public/aegis?to=5555551212&from=5555551213&zip=12866&workflow-id=660d6866751b6c2521ea0805&format=json&customParam1=value1&customParam2=value2&api-key=YOUR_API_KEY
or with the API key in the header:
GET /public/aegis?to=5555551212&from=5555551213&zip=12866&workflow-id=660d6866751b6c2521ea0805&format=json&customParam1=value1&customParam2=value2
Headers:
X-API-KEY: YOUR_API_KEY
Response Formats
The response format varies based on the format
parameter:
-
Boolean Format:
- Returns
true
orfalse
indicating whether the call or SMS should be allowed. - Content-Type:
text/plain
Example Response:
true
- Returns
-
Text Format:
- Returns a message in the format
[Accepted|Rejected]|[Response message]
. - Content-Type:
text/plain
Example Response:
Rejected|3 calls since May 14, 2024 at 10:08 AM EDT
- Returns a message in the format
-
JSON Format:
- Returns a full JSON object with detailed information about the workflow execution.
- Content-Type:
application/json
Example Response:
{ "interactionId": "6644c1f14a1430662f5165c8", "workflowId": "660d6866751b6c2521ea0805", "from": "+15555551212", "to": "+15555551213", "pcidFromNumber": "+15186169099", "timestamp": "2024-05-15T14:08:49.278Z", "result": "[Rejected]", "reason": "3 calls since May 14, 2024 at 10:08 AM EDT", "executionTime": 1.664 }
By following these instructions, you can effectively execute Aegis workflows to ensure compliance with legal and company policies for your calls and text messages. Remember to secure your API key and keep it confidential. If you have any questions or need further assistance, please contact our support team.
Comments
0 comments
Please sign in to leave a comment.