Skip to main content
PUT
Upsert subscription

Authorizations

Authorization
string
header
required

API token from cargo-ai login. Send as Authorization: Bearer <token>.

Scopes

openid

OpenID Connect identity.

profile

Name and profile claims.

email

Email address.

offline_access

Refresh token.

Headers

Idempotency-Key
string

Client-generated key that makes this write safe to retry. Reusing the same key with the same request returns the original response instead of creating a second record. Reusing it with a different request returns 422. A concurrent retry while the first request is still running returns 409. Keys expire after 24 hours. Not accepted on multipart file uploads. Optional: a request without one is processed as it always was.

Maximum string length: 255
Example:

"8e03978e-40d5-43e8-bc93-6894a57f9324"

Body

application/json

Request body schema.

templateSlug
enum<string>
required

Template that composes the mail: http calls a URL that answers with it.

Available options:
http
config
Config · object
required

Config the template composes with, e.g. { "url": "https://app.example.com/notification" } for http.

timeZone
string
required

IANA time zone the schedule is computed in, e.g. Europe/Paris.

Minimum string length: 1
isEnabled
boolean
required

Whether the mail is sent.

stateUuid
string<uuid> | null

Project (deploy state) the subscription covers. Null or left out covers the whole workspace.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Response

Upsert subscription

subscription
Subscription · object
required

The subscription after the change.