Inbox API
The Inbox API allows you to create, retrieve, and update inboxes for your organization. Each inbox can be optionally associated with a test.
POST
https://api.octal.email/v1/inboxCreates a new inbox
Parameters
prefixstringCustom prefix for the inbox address. Can only contain letters, numbers, and hyphens. Cannot start or end with a hyphen. Must be 15 characters or less.
test_idstringTest ID to associate with the inbox.
Responses
200Inbox created successfully
{
"inbox": {
"id": "cuid",
"full_address": "custom.abc123.orgslug@emailoctal.com",
"domain": "emailoctal.com",
"test_id": "cuid",
"emails": []
}
}
400Invalid custom prefix or test ID
401API key required or invalid/expired API key
403Maximum inbox limit reached
500Internal server error
GET
https://api.octal.email/v1/inbox/:addressRetrieves an inbox by address
Parameters
addressstringFull inbox address.
Responses
200Inbox retrieved successfully
{
"inbox": {
"id": "cuid",
"full_address": "custom.abc123.orgslug@emailoctal.com",
"domain": "emailoctal.com",
"test_id": "cuid",
"emails": []
}
}
400Missing or invalid address
401API key required or invalid/expired API key
404Inbox not found
500Internal server error
PATCH
https://api.octal.email/v1/inbox/:addressUpdates an inbox's test ID
Parameters
addressstringFull inbox address.
test_idstringNew test ID to associate.
Responses
200Inbox updated successfully
{
"inbox": {
"id": "cuid",
"full_address": "custom.abc123.orgslug@emailoctal.com",
"domain": "emailoctal.com",
"test_id": "cuid",
"emails": []
}
}
400Missing or invalid address, or invalid test ID
401API key required or invalid/expired API key
404Inbox not found
500Internal server error
Request Examples
const axios = require('axios');
const response = await axios({
method: 'post',
url: 'https://api.octal.email/v1/inbox',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
data: {
prefix: 'custom',
test_id: 'YOUR_TEST_ID'
}
});
console.log(response.data);