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/inbox
Creates a new inbox
Parameters
prefix
stringCustom 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_id
stringTest 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/:address
Retrieves an inbox by address
Parameters
address
stringFull 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/:address
Updates an inbox's test ID
Parameters
address
stringFull inbox address.
test_id
stringNew 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);