Tests API
The Tests API allows you to create, retrieve, manage, and delete tests for your organization. Each test can be associated with multiple inboxes.
POST
https://api.octal.email/v1/testCreates a new test
Parameters
namestringName of the test (3-100 characters).
descriptionstringDescription of the test (max 100 characters).
Responses
200Test created successfully
{
"test": {
"id": "cuid",
"name": "api-test",
"description": "testing the api!",
"inboxes": []
}
}
400Invalid request body (name/description validation failed)
401API key required or invalid/expired API key
500Internal server error
GET
https://api.octal.email/v1/test/:idRetrieves a test by ID
Parameters
idstringID of the test to retrieve.
Responses
200Test retrieved successfully
{
"test": {
"id": "cm7jw9f1s000dumc4zwph249k",
"name": "api-test",
"description": "testing the api!",
"inboxes": [
{
"id": "cuid",
"domain": "emailoctal.com",
"full_address": "custom.abc123.orgslug@emailoctal.com"
}
]
}
}
400Missing test ID
401API key required or invalid/expired API key
404Test not found
500Internal server error
DELETE
https://api.octal.email/v1/test/:idDeletes a test and disassociates its email addresses
Parameters
idstringID of the test to delete.
Responses
200Test deleted successfully
{
"success": true
}
400Missing test ID
401API key required or invalid/expired API key
404Test not found
500Internal server error
Request Examples
const axios = require('axios');
const response = await axios({
method: 'post',
url: 'https://api.octal.email/v1/test',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
data: {
name: 'api-test',
description: 'testing the api!'
}
});
console.log(response.data);