Open an inbox
const url = 'https://api.facteur.eu/v1/workspaces/example/inboxes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.facteur.eu/v1/workspaces/example/inboxes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example" }'The response carries domain: the address mail for this inbox is sent
to. It is derived from the inbox id, and neither ever changes.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The workspace slug.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "name": "example", "description": "example"}Responses
Section titled “Responses”The inbox, and the address it receives at.
object
Send mail here.
object
Examplegenerated
{ "id": "example", "name": "example", "description": "example", "domain": "example", "retentionDays": 1, "workspace": { "slug": "example", "name": "example" }}NAME_REQUIRED, DESCRIPTION_INVALID, or INVALID_JSON.
Every failure has this shape. Branch on error.code; error.message is
written for a human and is in French today.
object
object
The stable, machine-readable reason.
A sentence for whoever is reading the failure. Not part of the contract.
Example
{ "error": { "code": "SCOPE_INSUFFICIENT" }}No usable credential. UNAUTHENTICATED when none was presented,
KEY_UNKNOWN, KEY_REVOKED or KEY_EXPIRED when a key was — kept
distinct on purpose, because “mint a new one” and “somebody took this
away from you” are different facts to whoever is reading a red pipeline.
Every failure has this shape. Branch on error.code; error.message is
written for a human and is in French today.
object
object
The stable, machine-readable reason.
A sentence for whoever is reading the failure. Not part of the contract.
Example
{ "error": { "code": "SCOPE_INSUFFICIENT" }}INBOX_LIMIT_REACHED — the plan includes fewer inboxes than this would make. Counted for the organization, not for the workspace.
A refusal that a different plan would not produce. Carries what to change.
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "currentPlan": "example", "requiredPlan": "example" }}SCOPE_INSUFFICIENT (the message names the scope this request wanted and
the ones the key holds), KEY_CANNOT_REACH (no scope opens this route to
a key at all), FORBIDDEN, or one of the stated refusals listed under
x-api-key-refusals.
Every failure has this shape. Branch on error.code; error.message is
written for a human and is in French today.
object
object
The stable, machine-readable reason.
A sentence for whoever is reading the failure. Not part of the contract.
Example
{ "error": { "code": "SCOPE_INSUFFICIENT" }}WORKSPACE_NOT_FOUND.
Every failure has this shape. Branch on error.code; error.message is
written for a human and is in French today.
object
object
The stable, machine-readable reason.
A sentence for whoever is reading the failure. Not part of the contract.
Example
{ "error": { "code": "SCOPE_INSUFFICIENT" }}