16Labs API Workbench REST API
Version 1.0. Create a token with a free account, then call the API from scripts or CI.
Read your workspace's collections, environments, inbound endpoints and history, start collection runs from CI, and execute saved requests.
Authentication. Create a token under Test Tokens with an api:* scope and send it as Authorization: Bearer awk_…. A token belongs to one workspace; every call is scoped to it, and ids from other workspaces answer 404.
Scopes. api:read for every GET; api:run to start runs and execute requests (and to poll runs). 16Labs AEP Lab (/adobe/*): adobe:read for every GET; adobe:run to verify connections and start suite and loop-test runs (and to poll them). 16Labs Test Inboxes (/inboxes, /messages): inbox:read to list inboxes and read or wait for messages; inbox:write to create and delete inboxes; inbox:send to send from an inbox (replies to authenticated senders of mail it received, and mail to the organization's verified domains).
Waiting for an email in a test. Create an inbox (POST /inboxes), use its address in the flow under test, then call GET /inboxes/{id}/messages/wait?subject_contains=Confirm&timeout=30. It answers with the first matching message as soon as it arrives (its links hold every URL in the email), or 204 after the timeout. Pass after=<id of the last message you handled> to wait for the next one.
16Labs AEP Lab completion webhook. When a workspace has a 16Labs AEP Lab webhook, every finished suite run and loop-test run is POSTed to it as JSON: {"event": "adobe.suite_run.finished" or "adobe.loop_run.finished", "workspace": {...}, "run": {...}}, where run has the same shape as GET /adobe/suite-runs/{id} or GET /adobe/loop-test-runs/{id}. The request is signed with the workspace's HMAC credential from the vault. With the credential's defaults that is X-Timestamp: <unix seconds> and X-Signature: hex(HMAC-SHA256(secret, "<X-Timestamp>.<raw body>")); the header names, algorithm, encoding and string to sign follow the credential's settings. Recompute the HMAC over the raw body with your copy of the secret, compare in constant time, and reject timestamps older than a few minutes.
Pagination. List endpoints return {"data": [...], "next_cursor": "…", "limit": 25}, newest first. Pass cursor=<next_cursor> for the next page; limit is 1–100.
Errors use RFC 7807 application/problem+json. Requests are limited to 120 per minute per token (X-RateLimit-* headers; 429 with Retry-After when exceeded).
Example: curl -H "Authorization: Bearer $AWK_TOKEN" https://www.16labs.ca/api/v1/collections
Workspace
/api/v1/workspaces
The token's workspace
Responses: 200 401 403
Collections
/api/v1/collections
List collections
| Parameter | In | Description |
|---|---|---|
cursor | query | next_cursor from the previous page |
limit | query |
Responses: 200 400 401 403
/api/v1/collections/{id}
Get a collection
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
/api/v1/requests
List saved requests
| Parameter | In | Description |
|---|---|---|
cursor | query | next_cursor from the previous page |
limit | query | |
collection | query | Only requests in this collection |
Responses: 200 404
/api/v1/requests/{id}
Get a saved request (with headers, body, tests)
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
Runs
/api/v1/collections/{id}/runs
Start a collection run
Runs of up to 25 requests finish before the response (201). Larger runs are queued (202); poll the Location URL.
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Accepts a JSON body — see openapi.json for the schema.
Responses: 201 202 403 404 409 422
/api/v1/runs/{id}
Run status and results
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
/api/v1/requests/{id}/execute
Execute a saved request
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Accepts a JSON body — see openapi.json for the schema.
Responses: 200 403 404 409 422 429
Environments
/api/v1/environments
List environments (secret values are never returned)
| Parameter | In | Description |
|---|---|---|
cursor | query | next_cursor from the previous page |
limit | query |
Responses: 200
/api/v1/environments/{id}
Get an environment
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
Inbound
/api/v1/endpoints
List inbound endpoints
| Parameter | In | Description |
|---|---|---|
cursor | query | next_cursor from the previous page |
limit | query |
Responses: 200
/api/v1/endpoints/{id}
Get an inbound endpoint
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
/api/v1/inbound-requests
List captured requests
| Parameter | In | Description |
|---|---|---|
cursor | query | next_cursor from the previous page |
limit | query | |
endpoint | query | Only captures of this endpoint |
Responses: 200 404
/api/v1/inbound-requests/{id}
Get a captured request (headers and body)
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
History
/api/v1/executions
List outbound executions (history)
| Parameter | In | Description |
|---|---|---|
cursor | query | next_cursor from the previous page |
limit | query |
Responses: 200
/api/v1/executions/{id}
Get an execution (masked headers, body, test results)
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
16Labs AEP Lab
/api/v1/adobe/connections
List Adobe connections (no secrets)
| Parameter | In | Description |
|---|---|---|
cursor | query | next_cursor from the previous page |
limit | query |
Responses: 200 401 403
/api/v1/adobe/connections/{id}
Get an Adobe connection with its verification state
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
/api/v1/adobe/connections/{id}/verify
Verify the connection's sandbox now (development and not default only)
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 403 404
/api/v1/adobe/suites
List AEP Lab suites
| Parameter | In | Description |
|---|---|---|
cursor | query | next_cursor from the previous page |
limit | query |
Responses: 200 403
/api/v1/adobe/suites/{id}
Get an AEP Lab suite
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
/api/v1/adobe/suites/{id}/runs
Start a suite run
Suite runs are always queued. Poll the Location URL until `finished` is true.
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 202 403 404 409
/api/v1/adobe/suite-runs/{id}
Get a suite run with its steps
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
/api/v1/adobe/loop-tests
List loop tests
| Parameter | In | Description |
|---|---|---|
cursor | query | next_cursor from the previous page |
limit | query |
Responses: 200 403
/api/v1/adobe/loop-tests/{id}/runs
Start a loop-test run
Sends the AJO event and returns the run, WAITING for the journey's custom action or, for an email loop test, for the email to the profile's test inbox (or already finished when the event was blocked or rejected). Poll the Location URL.
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 202 403 404 409
/api/v1/adobe/loop-test-runs/{id}
Get a loop-test run
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
Test Inboxes
/api/v1/inboxes
List test inboxes
| Parameter | In | Description |
|---|---|---|
cursor | query | next_cursor from the previous page |
limit | query |
Responses: 200 401 403
/api/v1/inboxes
Create a test inbox with a new random address
Accepts a JSON body — see openapi.json for the schema.
Responses: 201 403 409 422
/api/v1/inboxes/{id}
Get a test inbox
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
/api/v1/inboxes/{id}
Delete a test inbox and its messages (the address is never reused)
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 204 403 404
/api/v1/inboxes/{id}/send
Send from a test inbox (reply, or mail to a verified domain)
From is the inbox's address (a reply uses the exact address the original arrived at, with its +tag). Each recipient must be at one of the organization's verified sending domains, or, for a reply, an address whose domain the receiving server authenticated for the original (SPF or DKIM pass). At most 5 recipients; the organization's daily limit depends on the plan. The sent message is stored in the inbox with direction "out".
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Accepts a JSON body — see openapi.json for the schema.
Responses: 201 403 404 409 422 429 502 503
/api/v1/inboxes/{id}/messages
List messages (received and sent), newest first
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
cursor | query | next_cursor from the previous page |
limit | query | |
since | query | Only messages received at or after this time (ISO 8601) |
plus_tag | query | Only messages sent to address+tag |
subject_contains | query | Case-insensitive substring of the subject |
from_contains | query | Case-insensitive substring of the From address or name |
direction | query | in = received, out = sent from the inbox |
Responses: 200 400 404
/api/v1/inboxes/{id}/messages/wait
Wait for a message (long poll)
Returns the oldest received message matching the filters as soon as one exists, or 204 when none arrived within `timeout` seconds. Messages sent from the inbox never match.
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
timeout | query | |
after | query | Only messages received after this message (an id in the same inbox) |
since | query | Only messages received at or after this time (ISO 8601) |
plus_tag | query | Only messages sent to address+tag |
subject_contains | query | Case-insensitive substring of the subject |
from_contains | query | Case-insensitive substring of the From address or name |
Responses: 200 204 400 404
/api/v1/messages/{id}
Get a message, including its HTML body
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404
/api/v1/messages/{id}/raw
Download the raw message source (.eml)
| Parameter | In | Description |
|---|---|---|
id * | path | ULID |
Responses: 200 404