Automations_archive
const url = 'http://localhost:3000/api/automations/example/archive';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/automations/example/archive \ --header 'Authorization: Bearer <token>'Archive an automation: it leaves the list, enrolls nobody and keeps its enrollments, and can be restored. Refused with 409 while it has active enrollments (usedBy carries their count).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A primary key, written as a decimal string so JavaScript never rounds it. The format makes the Go servers parse it into an int64: a malformed id is refused as a 400 before a handler runs. The pattern says the same in the contract, so a client (or a fuzzer) can tell a malformed id from a valid one without trying it. Eighteen digits is the most a key reaches, so every id the schema admits fits an int64.
Unique identifier
Responses
Section titled “Responses”The request has succeeded.
An Automation: an event-triggered, ordered sequence of steps. Created automations are always draft; activating is a separate, send-class operation.
object
Unique identifier
Automation name
Lifecycle status
Event action that enrolls a contact (e.g. “contact.created”, “email.opened”)
The automation’s ordered, linear steps
One node in an automation’s ordered, linear sequence. A flat shape: email steps carry subject/body, wait steps carry seconds, tag steps carry the tag name.
object
Step kind
Email subject (email steps)
Email body as HTML (email steps), or the Liquid JSON request body (HTTP steps: Contact bindings only, strings JSON-escaped, up to 64 KiB, must render to valid JSON)
The editor’s JSON document an email step’s body was built from, an opaque object checked by the
server against the schema email_schema returns. Write it instead of body (both is a 422): the
server renders the body from it in the same save, and a document that cannot be rendered refuses
the whole save, naming the step. Writing only a body clears the step’s document.
object
Version of the editor that rendered the document (email steps, read only)
Delay before the next step, in seconds (wait steps)
Tag name to apply to or remove from the enrolled contact (apply_tag and remove_tag steps)
Step id (HTTP steps). Assigned on save; send it back on edit so the step keeps its secrets.
Hook URL to POST to (HTTP steps). A secret: never returned. Omit it when editing to keep the stored URL. Up to 2 KiB, http or https.
Up to 5 request headers (HTTP steps). On read, only the names are returned.
One request header of an HTTP step. The value is a secret: it is never returned.
object
Header name. Content-Type, Content-Length, Host and the webhook-* headers are set by sphericon.
Header value. Omit it when editing to keep the stored value of the header with this name.
Signing secret (HTTP steps): when set, the request is signed with Standard Webhooks. Never returned. Omit it when editing to keep the stored secret.
Remove the signing secret on save (HTTP steps)
Whether a signing secret is stored (HTTP steps, read only)
When the automation was archived; null while it is kept
Creation timestamp
Last update timestamp
Example
{ "status": "draft", "steps": [ { "type": "email" } ]}RFC 7807 bad request response
RFC 7807 Problem Details
object
Why the request was refused, when the client should act on it
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence
Validation errors grouped by field
object
Form-level validation error
Field validation errors
object
Seconds to wait before retrying; set on a 429 so a client that only sees the body can show the wait
Why a 500 happened, sent only by a development server (SPHERICON_ENV=development)
object
The error that failed the request, or the panic value
The goroutine stack of a panic; absent for an error a handler returned
The request id the server log carries for this request
The HTTP method of the failed request
The path of the failed request
Example
{ "code": "second_factor_required"}RFC 7807 unauthorized response
RFC 7807 Problem Details
object
Why the request was refused, when the client should act on it
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence
Validation errors grouped by field
object
Form-level validation error
Field validation errors
object
Seconds to wait before retrying; set on a 429 so a client that only sees the body can show the wait
Why a 500 happened, sent only by a development server (SPHERICON_ENV=development)
object
The error that failed the request, or the panic value
The goroutine stack of a panic; absent for an error a handler returned
The request id the server log carries for this request
The HTTP method of the failed request
The path of the failed request
Example
{ "code": "second_factor_required"}RFC 7807 not found response
RFC 7807 Problem Details
object
Why the request was refused, when the client should act on it
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence
Validation errors grouped by field
object
Form-level validation error
Field validation errors
object
Seconds to wait before retrying; set on a 429 so a client that only sees the body can show the wait
Why a 500 happened, sent only by a development server (SPHERICON_ENV=development)
object
The error that failed the request, or the panic value
The goroutine stack of a panic; absent for an error a handler returned
The request id the server log carries for this request
The HTTP method of the failed request
The path of the failed request
Example
{ "code": "second_factor_required"}RFC 7807 conflict response for a removal refused because live work still uses the row
(ADR 0049): 409 with usedBy naming the users. Every refused removal of a Segment, Tag,
Integration, Sending domain or Automation answers it.
The body of a refused removal (ADR 0049): ProblemDetails plus the rows that use it
object
Why the request was refused, when the client should act on it
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence
Validation errors grouped by field
object
Form-level validation error
Field validation errors
object
Seconds to wait before retrying; set on a 429 so a client that only sees the body can show the wait
Why a 500 happened, sent only by a development server (SPHERICON_ENV=development)
object
The error that failed the request, or the panic value
The goroutine stack of a panic; absent for an error a handler returned
The request id the server log carries for this request
The HTTP method of the failed request
The path of the failed request
The live rows that use the one a removal was refused for, never empty
A row that uses the one a removal was refused for: what a client shows to say what to change first
object
What kind of row it is
Its id
Its name
How many rows the entry stands for; absent means one. An enrollment entry names the
Automation (id, name) and counts its Enrollments.
Example
{ "code": "second_factor_required", "usedBy": [ { "kind": "broadcast" } ]}RFC 7807 too many requests response: a rate limit was exceeded (ADR 0025)
RFC 7807 Problem Details
object
Why the request was refused, when the client should act on it
A URI reference that identifies the problem type
A short, human-readable summary of the problem type
HTTP status code
A human-readable explanation specific to this occurrence
A URI reference that identifies the specific occurrence
Validation errors grouped by field
object
Form-level validation error
Field validation errors
object
Seconds to wait before retrying; set on a 429 so a client that only sees the body can show the wait
Why a 500 happened, sent only by a development server (SPHERICON_ENV=development)
object
The error that failed the request, or the panic value
The goroutine stack of a panic; absent for an error a handler returned
The request id the server log carries for this request
The HTTP method of the failed request
The path of the failed request
Example
{ "code": "second_factor_required"}Headers
Section titled “Headers”Seconds to wait before retrying
The request budget of the window that was exceeded
Requests left in the current window
Unix time at which the window resets