Integrations_create
const url = 'http://localhost:3000/api/integrations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","enabled":true,"isDefault":true,"maxPerSecond":1,"maxPerDay":1,"config":{"kind":"smtp","host":"example","port":1,"username":"example","password":"example","from":"hello@example.com","fromName":"example"},"preset":"example","params":{"additionalProperty":"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 http://localhost:3000/api/integrations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "enabled": true, "isDefault": true, "maxPerSecond": 1, "maxPerDay": 1, "config": { "kind": "smtp", "host": "example", "port": 1, "username": "example", "password": "example", "from": "hello@example.com", "fromName": "example" }, "preset": "example", "params": { "additionalProperty": "example" } }'Create a resource
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Create an Integration. The provider and channel are derived from config.kind.
object
Most messages per second (1 to 10 000); omit or null for no limit
Most messages per rolling 24 hours (1 to 100 000 000); omit or null for no limit
SMTP credentials
object
SES credentials
object
Custom SES-compatible API endpoint (e.g. Yandex Cloud Postbox); empty for AWS
Name of a Preset from presets_list to read provider callbacks (bounces, complaints) with
The Preset’s params, validated against its paramsSchema: read the schema first
object
Responses
Section titled “Responses”The request has succeeded and a new resource has been created as a result.
A sending-provider Integration. Credentials are write-only: the config is returned with secrets redacted.
object
Unique identifier
Human-readable label
Delivery channel
Concrete provider
Whether this integration may be used for sending
Whether this is the default provider for its channel
Send rate limit set on the Integration: most messages per second; null means none
Send rate limit set on the Integration: most messages per rolling 24 hours; null means none
The Send rate limit as enforced and 24-hour usage
object
Most messages per second
object
The ceiling in messages; null means this window is not limited
Where the ceiling comes from; null when there is none
Most messages per rolling 24 hours
object
The ceiling in messages; null means this window is not limited
Where the ceiling comes from; null when there is none
Messages the provider accepted from this Integration in the last 24 hours
Reasons to review the limit; empty when there is nothing to flag
Provider config (secrets redacted)
object
SMTP config without the password
object
SES config without the secret access key
object
Custom SES-compatible API endpoint (e.g. Yandex Cloud Postbox); empty for AWS
Last 4 chars of the access key id, for recognition
The Preset this Integration’s provider callbacks are read with; null when it receives none
The Preset’s params as saved. A secret param (writeOnly in the Preset’s schema) is shown as ********, never its value
object
Names of the secret params that are rotating: a retiring value is still accepted beside the current one
Where the provider posts this Integration’s callbacks: paste it into the provider. The key in it is an address, not the authentication (the Preset’s signature or secret is)
Creation timestamp
Last update timestamp
Example
{ "channel": "email", "provider": "smtp", "sendLimit": { "perSecond": { "source": "manual" }, "perDay": { "source": "manual" }, "warnings": [ "unlimited" ] }, "config": { "kind": "smtp" }}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 conflict 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 validation 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 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