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-KEYheader. - 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 /api/public/aegis/recordSet/search?name=EBR&phone=5555551212&api-key=YOUR_API_KEY
or with the API key in the header:
GET /api/public/aegis/recordSet/search?name=EBR&phone=5555551212
Headers:
X-API-KEY: YOUR_API_KEY
2. Add Records from Array
Endpoint: POST /api/public/aegis/recordSet/add
Description: Add one or more records to a specific record set from an array of objects.
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 /api/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. Add Records from File
Endpoint: POST /api/public/aegis/recordSet/addFromFile
Content Type: multi-part/form-data
Description: Add one or more records to a specific record set from a file.
Form Fields:
name(required): The name of the record set.file(required): CSV File containing records. The file must contain a column header for aphonekey, with all other headers corresponding to anattribute. The attribute names must match the values attributes established during the creation of the Record Set.
Example Request:
POST /api/public/aegis/recordSet/addFromFile
Headers:
X-API-KEY: YOUR_API_KEY
Content-Type: multipart/form-data
Example CSV File Format:
| phone | first | last | zip | |
| 5555551213 | Jane | Doe | janedoe@example.com | 12345 |
| 1234567890 | John | Doe | johndoe@example.com | 90210 |
[Hint - you can access a sample CSV file from within your RecordSet edit screen within Pure CallerID Admin]
4. Remove Records from Array
Endpoint: POST /api/public/aegis/recordSet/delete
Description: Remove one or more records from a specific record set from an array.
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 /api/public/aegis/recordSet/delete?name=EBR
Headers:
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
[
"5555551212",
"5555551213"
]
5. Remove Records from File
Endpoint: POST /api/public/aegis/recordSet/deleteFromFile
Content Type: multi-part/form-data
Description: Remove one or more records from a specific record set from a file.
Form Fields:
name(required): The name of the record set.file(required): CSV File containing records. Each new line represents a phone number to be removed.
Example Request:
POST /api/public/aegis/recordSet/deleteFromFile
Headers:
X-API-KEY: YOUR_API_KEY
Content-Type: multipart/form-data
Example CSV File Format:
| 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.