The Record Sets module of Aegis allows you to create and manage dynamic databases. Each record set is keyed by a phone number, with attributes that can vary for each record set. Below, you'll find detailed instructions on how to use the REST API to interact with your record sets. Our API is secured using an API key, which you can include either as an HTTP header or as a URI parameter.
API Key Authentication
You need an API key to access the endpoints. 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.
Endpoints Overview:
The production endpoint for the Aegis API services is:
https://api.purecallerid.app/
1. Search Records
Endpoint: GET /api/public/aegis/recordSet/search
Description: Search for a record in a specific record set by phone number.
Parameters:
-
name
(required): The name of the record set. -
phone
(required): The phone number to search for.
Example Request:
GET /public/aegis/recordSet/search?name=EBR&phone=5555551212&api-key=YOUR_API_KEY
or with the API key in the header:
GET /public/aegis/recordSet/search?name=EBR&phone=5555551212
Headers:
X-API-KEY: YOUR_API_KEY
2. Add Records
Endpoint: POST /api/public/aegis/recordSet/add
Description: Add one or more records to a specific record set.
Parameters:
-
name
(required): The name of the record set.
Request Body: An array of objects, each representing a record. Each record must include a phone
key and an attributes
object with dynamic key-value pairs. The attribute names must match the values attributes established during the creation of the Record Set.
Example Request:
POST /public/aegis/recordSet/add?name=EBR
Headers:
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
[
{
"phone": "5555551213",
"attributes": {
"First": "Jane",
"Last": "Doe",
"Email": "janedoe@example.com",
"Zip": "12345"
}
},
{
"phone": "1234567890",
"attributes": {
"First": "John",
"Last": "Doe",
"Email": "johndoe@example.com",
"Zip": "90210"
}
}
]
3. Remove Records
Endpoint: POST /api/public/aegis/recordSet/delete
Description: Remove one or more records from a specific record set.
Parameters:
-
name
(required): The name of the record set.
Request Body: An array of strings, each representing a phone number to be removed.
Example Request:
POST /public/aegis/recordSet/delete?name=EBR
Headers:
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
[
"5555551212",
"5555551213"
]
By following these instructions, you can effectively manage your record sets using our REST API. 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
Article is closed for comments.