API Reference

MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

Endpoints

OPTIONS api/v1/events

Example request:
curl --request OPTIONS \
    "http://localhost:8403/api/v1/events" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8403/api/v1/events"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "OPTIONS",
    headers,
}).then(response => response.json());

Request      

OPTIONS api/v1/events

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Ingest an event and trigger deliveries.

Example request:
curl --request POST \
    "http://localhost:8403/api/v1/events" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8403/api/v1/events"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/events

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get a message record.

Example request:
curl --request GET \
    --get "http://localhost:8403/api/v1/messages/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8403/api/v1/messages/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "error": {
        "code": "unauthorized",
        "message": "Missing or invalid Authorization header",
        "request_id": "unknown"
    }
}
 

Request      

GET api/v1/messages/{messageId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

messageId   string     

Example: architecto

Get delivery runs and attempts for a message.

Example request:
curl --request GET \
    --get "http://localhost:8403/api/v1/messages/architecto/deliveries" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8403/api/v1/messages/architecto/deliveries"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "error": {
        "code": "unauthorized",
        "message": "Missing or invalid Authorization header",
        "request_id": "unknown"
    }
}
 

Request      

GET api/v1/messages/{messageId}/deliveries

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

messageId   string     

Example: architecto

Replay a message with current active templates.

Creates new delivery runs for the message using current active templates. Replay is immediate (does not preserve original delay).

Example request:
curl --request POST \
    "http://localhost:8403/api/v1/messages/architecto/replay" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8403/api/v1/messages/architecto/replay"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/messages/{messageId}/replay

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

messageId   string     

Example: architecto

Cancel a scheduled delivery run.

Only allowed for runs in scheduled state. Creates an attempt record with error_code=scheduled_cancelled for auditability.

Example request:
curl --request POST \
    "http://localhost:8403/api/v1/delivery-runs/architecto/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8403/api/v1/delivery-runs/architecto/cancel"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/delivery-runs/{deliveryRunId}/cancel

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

deliveryRunId   string     

Example: architecto

Get current usage for the authenticated environment's tenant.

Example request:
curl --request GET \
    --get "http://localhost:8403/api/v1/usage/current" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8403/api/v1/usage/current"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "error": {
        "code": "unauthorized",
        "message": "Missing or invalid Authorization header",
        "request_id": "unknown"
    }
}
 

Request      

GET api/v1/usage/current

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get plan limits and entitlements for the authenticated environment's tenant.

Example request:
curl --request GET \
    --get "http://localhost:8403/api/v1/limits" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8403/api/v1/limits"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "error": {
        "code": "unauthorized",
        "message": "Missing or invalid Authorization header",
        "request_id": "unknown"
    }
}
 

Request      

GET api/v1/limits

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json