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.

POSThttps://api.octal.email/v1/test

Creates a new test

Parameters

namestring
required

Name of the test (3-100 characters).

descriptionstring

Description 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
GEThttps://api.octal.email/v1/test/:id

Retrieves a test by ID

Parameters

idstring
required

ID 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
DELETEhttps://api.octal.email/v1/test/:id

Deletes a test and disassociates its email addresses

Parameters

idstring
required

ID 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);