{"openapi":"3.1.0","info":{"title":"Kula API","description":"Send emails and manage contacts, campaigns and domains. Documentation: https://kulamail.com/docs/api/introduction","version":"1"},"servers":[{"url":"https://api.kulamail.com"}],"security":[{"apiKey":[]}],"tags":[{"name":"Account","description":"The key making the request"},{"name":"Images","description":"Images hosted by Kula, to use in email content"},{"name":"Webhooks","description":"Endpoints notified of events (Mailler-Signature: t=<timestamp>,v1=<HMAC-SHA256 of \"<timestamp>.<body>\">). Event types: contact.subscribed, contact.unsubscribed, email.sent, email.delivered, email.bounced, email.complained, email.opened, email.clicked, campaign.failed."},{"name":"Domains","description":"Sending domains of the space: DNS records to publish, checks and warmup"},{"name":"Flows","description":"Automated sequences: a trigger (list subscription or event) and a tree of email, wait, condition, yes/no split and end steps; both branches of a split rejoin after it"},{"name":"Account webhooks","description":"Endpoints notified of the events of every space of the account, in the mode of the key: a live key manages the endpoints of live spaces, a test key (ml_test_) those of test spaces. The space of each event is in space_id. Requires an account key. Same signature, event types, retries and payload as the space webhooks."},{"name":"Signup forms","description":"Forms that subscribe visitors to lists. Each one is hosted on the tracking domain of the space, takes submissions from any page and can be embedded with a script."},{"name":"Campaigns","description":"Marketing emails to a list, optionally narrowed by a segment"},{"name":"Segments","description":"Saved filters on contacts: `{\"match\": \"all\"|\"any\", \"conditions\": [...]}`. A segment narrows the list of a campaign."},{"name":"Spaces","description":"Spaces of the account. Requires an account key (not a space key)."},{"name":"Contacts","description":"Contacts of the space, their subscriptions, bulk imports and events"},{"name":"Lists","description":"Subscription topics. A campaign goes to one list; unsubscribing works per list."},{"name":"Emails","description":"Transactional emails: one recipient each, never held by a marketing pause"},{"name":"Templates","description":"Transactional templates, sent by id or alias with POST /v1/emails. Each has a draft (what you edit) and a published version (what is sent); publishing copies the draft over the published version."},{"name":"Checks","description":"Pre-send checks of an email: variables, size, images, links"},{"name":"Suppressions","description":"Addresses that receive nothing: hard bounces (every space, every email), complaints and manual entries (this space, marketing emails)."}],"paths":{"/v1/flows/{flowId}/steps/{stepId}/position":{"put":{"tags":["Flows"],"summary":"Move a step","description":"Moves a step to the root (no parentStepId) or to the YES or NO branch of a SPLIT step, at a 0-based position (at the end when absent). A SPLIT takes its branches along and never moves into them. Nothing goes after an END step, and splits nest 3 levels deep at most. Runs on the step follow it. Conditions on flow emails are checked on activation (see problems). Only while the flow is not active.","operationId":"moveFlowStep","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveFlowStepRequest"}}},"required":true},"responses":{"200":{"description":"The flow with the step moved","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}},"400":{"description":"Invalid placement","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The flow is active: pause it first","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/flows/{flowId}/steps/order":{"put":{"tags":["Flows"],"summary":"Reorder steps","description":"stepIds lists every step of the root, or of one branch of a SPLIT, in the new order. To take a step to another branch, use PUT /v1/flows/{flowId}/steps/{stepId}/position. Only while the flow is not active.","operationId":"reorderFlowSteps","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderFlowStepsRequest"}}},"required":true},"responses":{"200":{"description":"The reordered flow","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}},"400":{"description":"The list does not match one sequence of the flow","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The flow is active: pause it first","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","operationId":"listWebhooks","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such endpoint in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The endpoints","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointDto"}}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook endpoint","description":"A public https URL. The signing secret (whsec_...) is returned once, here.","operationId":"createWebhook","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointRequest"}}},"required":true},"responses":{"201":{"description":"Endpoint created, with its secret","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookEndpointSecretDto"}}}},"400":{"description":"Invalid URL or event type","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such endpoint in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/templates":{"get":{"tags":["Templates"],"summary":"List templates","description":"Newest first, with their sending stats over the last 30 days.","operationId":"listTemplates","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such template in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The templates","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransactionalTemplateDto"}}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Templates"],"summary":"Create a template","description":"The template starts as a draft and cannot be sent until POST /v1/templates/{template}/publish.","operationId":"createTemplate","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransactionalTemplateRequest"}}},"required":true},"responses":{"201":{"description":"Template created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TransactionalTemplateDto"}}}},"400":{"description":"Invalid request or sender","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Alias already used","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such template in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/templates/{template}/publish":{"post":{"tags":["Templates"],"summary":"Publish the draft of a template","description":"Copies the draft over the published version: the next emails sent with the template use it. A template is sendable only once published. Requires a full access key.","operationId":"publishTemplate","parameters":[{"name":"template","in":"path","description":"Template id or alias","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The published template","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TransactionalTemplateDto"}}}},"400":{"description":"Empty content, or sender no longer on a verified domain","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"No unpublished changes (`nothing_to_publish`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such template in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/templates/{template}/discard":{"post":{"tags":["Templates"],"summary":"Discard the draft of a template","description":"Puts the published version back in the draft.","operationId":"discardTemplateDraft","parameters":[{"name":"template","in":"path","description":"Template id or alias","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The template, draft equal to the published version","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TransactionalTemplateDto"}}}},"409":{"description":"Never published (`template_not_published`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such template in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/suppressions":{"get":{"tags":["Suppressions"],"summary":"List suppressions","description":"Newest first. With a complete address as search, its global hard bounce comes first.","operationId":"listSuppressions","parameters":[{"name":"search","in":"query","description":"Part of an address","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"0-based","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"A page of suppressions","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedSuppressionsDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Suppressions"],"summary":"Suppress an address","description":"Adds a MANUAL suppression: the address receives no more marketing email from this space.","operationId":"createSuppression","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateSuppressionRequest"}}},"required":true},"responses":{"201":{"description":"Address suppressed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SuppressionDto"}}}},"400":{"description":"Invalid address","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/spaces":{"get":{"tags":["Spaces"],"summary":"List spaces","description":"Every space of the account in the mode of the key, oldest first: test spaces with a test key (ml_test_), live spaces otherwise.","operationId":"listSpaces","responses":{"401":{"description":"Missing, unknown or revoked API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The spaces","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicSpaceDto"}}}}}}},"post":{"tags":["Spaces"],"summary":"Create a space","description":"Creates a space, a test space with a test key (ml_test_). Idempotent on externalId: when a space of the account in the same mode already has it, that space is returned unchanged with 200 instead of 201.","operationId":"createSpace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePublicSpaceRequest"}}},"required":true},"responses":{"201":{"description":"Space created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSpaceDto"}}}},"200":{"description":"A space with this externalId already exists: returned as is","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSpaceDto"}}}},"400":{"description":"Invalid request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/spaces/{spaceId}/marketing/resume":{"post":{"tags":["Spaces"],"summary":"Resume marketing","description":"Lifts a pause made by the account (reason ACCOUNT). A pause by Kula answers 409 paused_by_kula: contact Kula support.","operationId":"resumeSpaceMarketing","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Marketing flows again","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicMarketingDto"}}}},"404":{"description":"No such space in the account","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Marketing is not paused, or Kula paused it","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/spaces/{spaceId}/marketing/pause":{"post":{"tags":["Spaces"],"summary":"Pause marketing","description":"Campaigns and flows of the space wait, nothing is lost; transactional emails keep flowing. Resume with /marketing/resume.","operationId":"pauseSpaceMarketing","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseMarketingRequest"}}}},"responses":{"200":{"description":"Marketing is paused","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicMarketingDto"}}}},"404":{"description":"No such space in the account","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Marketing is already paused","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/segments":{"get":{"tags":["Segments"],"summary":"List segments","operationId":"listSegments","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such segment in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The segments","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SegmentDto"}}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Segments"],"summary":"Create a segment","operationId":"createSegment","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSegmentRequest"}}},"required":true},"responses":{"201":{"description":"Segment created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SegmentDto"}}}},"400":{"description":"Invalid definition","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such segment in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/lists":{"get":{"tags":["Lists"],"summary":"List lists","description":"Every list of the space with its member counts.","operationId":"listLists","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The lists","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MailingListDto"}}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Lists"],"summary":"Create a list","description":"`fromEmail` and `fromName` set the sender of the double opt-in confirmation for this list; `fromEmail` must be on a verified domain of the space.","operationId":"createList","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListRequest"}}},"required":true},"responses":{"201":{"description":"List created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MailingListDto"}}}},"400":{"description":"Invalid request, or `fromEmail` not on a verified domain of the space (`domain_not_verified`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/imports":{"get":{"tags":["Contacts"],"summary":"List imports","description":"The last 100 imports of the space, newest first.","operationId":"listImports","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The imports","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImportDto"}}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Contacts"],"summary":"Import contacts","description":"Queues up to 10000 contacts for the list and returns at once; follow the import with GET /v1/imports/{importId}. Same rules as a CSV import in the dashboard: invalid, role, duplicate and suppressed addresses are skipped, an unsubscribed contact is never subscribed again, and no flow or welcome email is triggered.","operationId":"importContacts","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicImportRequest"}}},"required":true},"responses":{"202":{"description":"Import queued","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImportDto"}}}},"400":{"description":"Invalid request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/imports/csv":{"post":{"tags":["Contacts"],"summary":"Import a CSV file","description":"The CSV is the request body (50 MB at most, header row required, `,` `;` or tab). Without `mapping`, columns are recognized by their header (email, first name, last name; other columns become attributes). Same rules as POST /v1/imports.","operationId":"importContactsCsv","parameters":[{"name":"listId","in":"query","required":true,"schema":{"type":"string"}},{"name":"mapping","in":"query","description":"JSON object, column name to `email`, `first_name`, `last_name`, `attributes.<key>` or `ignore`","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"text/csv":{"schema":{"type":"string","format":"byte"}},"text/plain":{"schema":{"type":"string","format":"byte"}},"application/octet-stream":{"schema":{"type":"string","format":"byte"}}}},"responses":{"202":{"description":"Import queued","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImportDto"}}}},"400":{"description":"Invalid file or mapping","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/images":{"get":{"tags":["Images"],"summary":"List images","description":"Every image of the space, newest first, with the storage used by the account and its quota.","operationId":"listImages","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The images","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImagesDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Images"],"summary":"Upload an image","description":"Multipart part `file`: JPEG, PNG, GIF (animation kept) or WebP (stored as PNG), 5 MB at most. An image wider than 1200 px is scaled down to 1200 px. Returns its permanent url, to use in email content.","operationId":"uploadImage","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":"Image uploaded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImageDto"}}}},"400":{"description":"No file (`file_required`), not a supported image (`unsupported_image`) or over 5 MB (`image_too_large`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The account's images reached their 1 GB quota (`quota_exceeded`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/forms":{"get":{"tags":["Signup forms"],"summary":"List signup forms","description":"Every signup form of the space, oldest first.","operationId":"listSignupForms","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such form in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The forms","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicSignupFormDto"}}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Signup forms"],"summary":"Create a signup form","description":"The form subscribes to at least one list of the space. It is published at once unless status is DRAFT: outside the Growth plan, an account publishes 3 forms and 1 landing page at most. kind PAGE makes a landing page, served at https://<tracking domain>/<slug>. content is the document (sections > columns > blocks with a form block); templateId starts from a model of the gallery.","operationId":"createSignupForm","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignupFormRequest"}}},"required":true},"responses":{"201":{"description":"Form created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSignupFormDto"}}}},"400":{"description":"Invalid request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The plan publishes no more forms (`capture_limit_reached`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such form in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/forms/{formId}/publish":{"post":{"tags":["Signup forms"],"summary":"Publish a signup form","description":"A published form takes signups on the tracking domain; a draft answers 404. Outside the Growth plan, an account publishes 3 forms and 1 landing page at most, every space included. Publishing a published form changes nothing.","operationId":"publishSignupForm","parameters":[{"name":"formId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The published form","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSignupFormDto"}}}},"409":{"description":"The plan publishes no more forms (`capture_limit_reached`), or a link is dangerous (`content_blocked`, `link_blocked`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such form in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/forms/{formId}/incentive-file":{"post":{"tags":["Signup forms"],"summary":"Upload the file a signup form offers","description":"Multipart part `file`: PDF, EPUB, DOCX, XLSX, PPTX, PNG, JPEG, ZIP, MP3 or MP4, recognized from its content (an archive containing a program is refused). 10 MB at most, 100 MB on the Growth plan once the account is approved; it counts in the storage quota of the images. Optional part `name`: the name of the resource. Replaces the previous file or link of the form: the links already sent give the new file. Whoever signs up gets it by email, never on the page.","operationId":"uploadSignupFormIncentiveFile","parameters":[{"name":"formId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"The form with its file","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSignupFormDto"}}}},"400":{"description":"No file (`file_required`), not a supported type (`unsupported_file`) or too large for the plan (`file_too_large`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The storage quota of the account is reached (`quota_exceeded`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such form in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Signup forms"],"summary":"Remove the document of a signup form","description":"File or link: the download links already sent answer 410.","operationId":"deleteSignupFormIncentiveFile","parameters":[{"name":"formId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such form in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The form without its document","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSignupFormDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/flows":{"get":{"tags":["Flows"],"summary":"List flows","description":"Newest first.","operationId":"listFlows","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The flows","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FlowSummaryDto"}}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Flows"],"summary":"Create a flow","description":"Creates a draft flow with its trigger: LIST_SUBSCRIBED (triggerListId), EVENT (triggerEventName) or FORM_JOINED (triggerFormId: a visitor joined that signup form, its first list becoming the flow's list by default). An EVENT flow may also take a triggerListId: only that list's subscribers enter it, and the unsubscribe link of its marketing emails leaves that list only (without a list, it leaves every list). Add steps with POST /v1/flows/{flowId}/steps, then activate it.","operationId":"createFlow","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowRequest"}}},"required":true},"responses":{"201":{"description":"Flow created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}},"400":{"description":"Invalid request, list, event name, goal events or send window","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/flows/{flowId}/steps":{"post":{"tags":["Flows"],"summary":"Add a step","description":"Adds an EMAIL, WAIT, CONDITION, SPLIT or END step to the root, or to the YES or NO branch of a SPLIT step (parentStepId and branch), at a 0-based position (at the end when absent). Both branches of a SPLIT rejoin at the step after it; an END step completes the run and is the last step of its sequence. Only while the flow is not active.","operationId":"createFlowStep","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowStepRequest"}}},"required":true},"responses":{"201":{"description":"The flow with the new step","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}},"400":{"description":"Invalid step, placement or condition","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The flow is active: pause it first","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/flows/{flowId}/pause":{"post":{"tags":["Flows"],"summary":"Pause a flow","description":"Stops enrolling and running contacts; runs resume where they were on activation.","operationId":"pauseFlow","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The paused flow","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}},"409":{"description":"The flow is not active","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/flows/{flowId}/activate":{"post":{"tags":["Flows"],"summary":"Activate a flow","description":"Checks the trigger and every step (subject, content, sender on a verified domain, waits, conditions), runs the pre-send checks of every email, then starts enrolling contacts. Each email step carries its checks in the response. Before the account review, flows send within a small daily budget; while marketing is paused for the space, runs wait.","operationId":"activateFlow","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The active flow","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}},"400":{"description":"The flow is not ready: the message names the step","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"content_blocked: an email links to a page flagged as dangerous","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/events":{"post":{"tags":["Contacts","Events"],"summary":"Record an event","description":"Records an event (signed_up, purchased...) for a contact, created when unknown. Events start the flows triggered by their name and can filter segments. With an Idempotency-Key, sending again with the same key returns the event recorded the first time (200, Idempotent-Replayed: true) instead of recording it twice. Allowed with a sending access key.","operationId":"createEvent","parameters":[{"name":"Idempotency-Key","in":"header","description":"Makes the request safe to retry, 200 characters at most","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateEventRequest"}}},"required":true},"responses":{"201":{"description":"Event recorded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicEventDto"}}}},"200":{"description":"Replay of an earlier request with the same Idempotency-Key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicEventDto"}}}},"400":{"description":"Invalid name, properties or address","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown contact and createContact is false","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/emails":{"get":{"tags":["Emails"],"summary":"List emails","description":"Every email of the space (transactional, campaign or flow), newest first, by pages of `size` (100 at most). openedAt and clickedAt are the first opens and clicks made by a person, not by a proxy or a link scanner. Requires a full access key.","operationId":"listEmails","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["QUEUED","SENDING","SENT","DELIVERED","BOUNCED","COMPLAINED","FAILED","SUPPRESSED","CANCELLED"]}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["CAMPAIGN","FLOW","TRANSACTIONAL","TEST","CONFIRMATION","INCENTIVE"]}},{"name":"stream","in":"query","required":false,"schema":{"type":"string","enum":["MARKETING","TRANSACTIONAL"]}},{"name":"email","in":"query","description":"Exact recipient address","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string"}},{"name":"listId","in":"query","description":"Emails of the campaigns sent to this list, including through a segment of it. Not flow or transactional emails; based on the campaign's list, not on the recipient's current subscriptions","required":false,"schema":{"type":"string"}},{"name":"flowId","in":"query","required":false,"schema":{"type":"string"}},{"name":"templateId","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","description":"`2026-10-01` or an ISO instant, inclusive","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","description":"`2026-10-01` (the whole day) or an ISO instant, exclusive","required":false,"schema":{"type":"string"}},{"name":"tag","in":"query","description":"`key:value`, split on the first `:`, repeatable: the email must carry every tag given","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"page","in":"query","description":"0-based","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"A page of emails","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedMessagesDto"}}}},"400":{"description":"Invalid filter","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Emails"],"summary":"Send an email","description":"Queues one transactional email. With an Idempotency-Key, sending again with the same key returns the email created the first time (200, Idempotent-Replayed: true) instead of sending twice. A template sends its published version, never its draft. Allowed with a sending access key.","operationId":"sendEmail","parameters":[{"name":"Idempotency-Key","in":"header","description":"Makes the request safe to retry, 200 characters at most","required":false,"schema":{"type":"string"}},{"name":"Kula-Submitted-Via","in":"header","description":"`smtp` when sent by the Kula SMTP relay","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSendEmailRequest"}}},"required":true},"responses":{"201":{"description":"Email queued (or SUPPRESSED: the address is on the suppression list)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicEmailDto"}}}},"200":{"description":"Replay of an earlier request with the same Idempotency-Key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicEmailDto"}}}},"400":{"description":"Invalid request, sender not on a verified domain","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly quota of the plan reached","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Template not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Template never published (`template_not_published`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/emails/batch":{"post":{"tags":["Emails"],"summary":"Send a batch of emails","description":"Up to 100 emails, each accepted or refused on its own: the results come back in the request order. With an Idempotency-Key header, email number i uses the key `<key>-<i>` unless it carries its own idempotencyKey. Allowed with a sending access key.","operationId":"sendEmailBatch","parameters":[{"name":"Idempotency-Key","in":"header","description":"Makes the batch safe to retry","required":false,"schema":{"type":"string"}},{"name":"Kula-Submitted-Via","in":"header","description":"`smtp` when sent by the Kula SMTP relay","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicSendEmailRequest"}}}},"required":true},"responses":{"200":{"description":"One result per email","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicBatchResultDto"}}}},"400":{"description":"Empty batch or more than 100 emails","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/domains":{"get":{"tags":["Domains"],"summary":"List domains","description":"Every sending domain of the space, oldest first.","operationId":"listDomains","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The domains","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SendingDomainDto"}}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Domains"],"summary":"Add a domain","description":"Adds a domain and returns the DNS records to publish: DKIM, the bounce domain (MX + SPF), DMARC and the tracking domain.","operationId":"createDomain","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSendingDomainRequest"}}},"required":true},"responses":{"201":{"description":"Domain added","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SendingDomainDto"}}}},"400":{"description":"Invalid domain","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Domain already used","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/domains/{domainId}/verify":{"post":{"tags":["Domains"],"summary":"Verify a domain","description":"Checks the DNS records now instead of waiting for the next automatic check.","operationId":"verifyDomain","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The domain with the result of the checks","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SendingDomainDto"}}}},"404":{"description":"No such domain in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contacts":{"get":{"tags":["Contacts"],"summary":"List contacts","description":"Newest first, by pages of `size` (200 at most).","operationId":"listContacts","parameters":[{"name":"search","in":"query","description":"Part of the address or of the name","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["UNCONFIRMED","ACTIVE","UNSUBSCRIBED","BOUNCED","COMPLAINED"]}},{"name":"listId","in":"query","description":"Members of this list (subscribed or pending). Each contact then carries its `subscription` to the list","required":false,"schema":{"type":"string"}},{"name":"subscriptionStatus","in":"query","description":"With listId: one subscription status","required":false,"schema":{"type":"string","enum":["PENDING","SUBSCRIBED","UNSUBSCRIBED"]}},{"name":"segmentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"0-based","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"A page of contacts","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedContactsDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Contacts"],"summary":"Create or update a contact","description":"Upsert on the email address. Names left out stay as they are, attributes are merged. The domain of a new address must be able to receive mail. With doubleOptIn, confirmationRedirectUrl sends the contact to your page once the confirmation is recorded.","operationId":"upsertContact","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpsertContactRequest"}}},"required":true},"responses":{"201":{"description":"Contact created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContactDto"}}}},"200":{"description":"Existing contact updated","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContactDto"}}}},"400":{"description":"Invalid address, attributes, domain or confirmationRedirectUrl","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"A list does not exist","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The address bounced or complained: it cannot be subscribed again","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contacts/{contact}/unsubscribe":{"post":{"tags":["Contacts"],"summary":"Unsubscribe a contact from everything","description":"Leaves every list: the contact becomes UNSUBSCRIBED.","operationId":"unsubscribeContact","parameters":[{"name":"contact","in":"path","description":"Contact id or email address","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The contact","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContactDto"}}}},"404":{"description":"No such contact in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contacts/{contact}/subscriptions":{"post":{"tags":["Contacts"],"summary":"Subscribe a contact to a list","description":"Brings back a contact who unsubscribed, as an explicit subscription.","operationId":"subscribeContact","parameters":[{"name":"contact","in":"path","description":"Contact id or email address","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSubscribeRequest"}}},"required":true},"responses":{"200":{"description":"The subscription (PENDING with double opt-in)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContactSubscriptionDto"}}}},"400":{"description":"Invalid confirmationRedirectUrl, or one without doubleOptIn","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such contact or list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The address bounced or complained","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contacts/batch":{"post":{"tags":["Contacts"],"summary":"Create or update a batch of contacts","description":"Up to 100 contacts, each accepted or refused on its own: the results come back in the request order, and count as one request for the rate limits. Same rules as POST /v1/contacts, except that a batch never subscribes again a contact or a subscription that is unsubscribed: such lists are reported in `skipped`, the other fields are updated. unsubscribeListIds and unsubscribed propagate unsubscribes.","operationId":"upsertContactBatch","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicBatchContactRequest"}}}},"required":true},"responses":{"200":{"description":"One result per contact","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicContactBatchResultDto"}}}},"400":{"description":"Empty batch or more than 100 contacts","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/checks":{"post":{"tags":["Checks"],"summary":"Check an email","description":"Runs the pre-send checks on a subject and a content, as Kula does when a campaign is scheduled, a flow activated or a template published. Nothing is created or sent. Findings are warnings, except blocklisted_link (a link Google flags as dangerous), which stops scheduling. With a listId, missing_variable_data counts the contacts of the list (narrowed by segmentId) without the values the email uses. Links are checked for being broken (30 at most, results kept an hour): the call can take a few seconds.","operationId":"checkContent","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckContentRequest"}}},"required":true},"responses":{"200":{"description":"The findings, empty when everything looks right","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContentChecksDto"}}}},"400":{"description":"No content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such list or segment in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/campaigns":{"get":{"tags":["Campaigns"],"summary":"List campaigns","description":"Newest first, 25 per page, with their stats.","operationId":"listCampaigns","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["DRAFT","PENDING_APPROVAL","SCHEDULED","SENDING","SENT","CANCELLED","FAILED"]}},{"name":"page","in":"query","description":"0-based","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such campaign in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"A page of campaigns","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedCampaignsDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Campaigns"],"summary":"Create a campaign","description":"Creates a draft. Content is markdown (wrapped in the space design) or raw HTML. Schedule it with POST /v1/campaigns/{campaignId}/schedule.","operationId":"createCampaign","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignRequest"}}},"required":true},"responses":{"201":{"description":"Draft created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CampaignDto"}}}},"400":{"description":"Invalid request, list, segment or sender","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such campaign in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/campaigns/{campaignId}/schedule":{"post":{"tags":["Campaigns"],"summary":"Schedule a campaign","description":"Schedules the campaign at scheduledAt, or right away without a body. The campaign needs a subject, content, a list and a sender on a verified domain, and the account must be approved (account review). Warnings tell when marketing is paused for the space.","operationId":"scheduleCampaign","parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCampaignRequest"}}}},"responses":{"200":{"description":"The scheduled campaign and warnings","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ScheduledCampaignDto"}}}},"400":{"description":"The campaign is not ready or the date is in the past","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The campaign already left or was cancelled, or account_review_required: the account must be approved before it sends campaigns (questionnaire in the dashboard, Settings > Account review)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such campaign in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/campaigns/{campaignId}/cancel":{"post":{"tags":["Campaigns"],"summary":"Cancel a campaign","description":"Stops a scheduled campaign, or a sending one: emails still waiting are cancelled, those already sent stay sent.","operationId":"cancelCampaign","parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The cancelled campaign","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CampaignDto"}}}},"409":{"description":"The campaign is not scheduled nor sending","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such campaign in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/webhooks":{"get":{"tags":["Account webhooks"],"summary":"List account webhook endpoints","operationId":"listAccountWebhooks","responses":{"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such account endpoint in the mode of the key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The endpoints","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointDto"}}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Account webhooks"],"summary":"Create an account webhook endpoint","description":"A public https URL, in the mode of the key. The signing secret (whsec_...) is returned once, here.","operationId":"createAccountWebhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointRequest"}}},"required":true},"responses":{"201":{"description":"Endpoint created, with its secret","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookEndpointSecretDto"}}}},"400":{"description":"Invalid URL or event type, or 20 account endpoints already","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such account endpoint in the mode of the key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/webhooks/{endpointId}":{"get":{"tags":["Webhooks"],"summary":"Get a webhook endpoint","operationId":"getWebhook","parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such endpoint in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The endpoint","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookEndpointDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook endpoint","operationId":"deleteWebhook","parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such endpoint in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Endpoint deleted"},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Webhooks"],"summary":"Update a webhook endpoint","description":"Fields left out are not changed. Enabling again resets the failure streak.","operationId":"updateWebhook","parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointRequest"}}},"required":true},"responses":{"200":{"description":"The updated endpoint","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookEndpointDto"}}}},"400":{"description":"Invalid URL or event type","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such endpoint in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/templates/{template}":{"get":{"tags":["Templates"],"summary":"Get a template","operationId":"getTemplate","parameters":[{"name":"template","in":"path","description":"Template id or alias","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such template in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The template","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TransactionalTemplateDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Templates"],"summary":"Delete a template","operationId":"deleteTemplate","parameters":[{"name":"template","in":"path","description":"Template id or alias","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such template in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Template deleted"},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Templates"],"summary":"Update the draft of a template","description":"Writes the draft: the emails keep using the published version until POST /v1/templates/{template}/publish. The name and the alias are not versioned and change right away (a new alias breaks the calls using the old one). Fields left out are not changed; a blank optional field is cleared.","operationId":"updateTemplate","parameters":[{"name":"template","in":"path","description":"Template id or alias","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTransactionalTemplateRequest"}}},"required":true},"responses":{"200":{"description":"The updated template","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TransactionalTemplateDto"}}}},"400":{"description":"Invalid request or sender","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Alias already used","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such template in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/spaces/{spaceId}":{"get":{"tags":["Spaces"],"summary":"Get a space","operationId":"getSpace","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSpaceDto"}}}},"404":{"description":"No such space in the account","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Spaces"],"summary":"Delete a space","description":"Deletes the space and everything in it: domains, contacts, lists, campaigns, flows, keys. An account keeps at least one space.","operationId":"deleteSpace","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Space deleted"},"400":{"description":"The last space of an account cannot be deleted","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such space in the account","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Spaces"],"summary":"Update a space","description":"Changes the fields sent; the others stay as they are. brandColor and logoUrl brand the emails and the hosted pages (unsubscribe, preferences, confirmation).","operationId":"updateSpace","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePublicSpaceRequest"}}},"required":true},"responses":{"200":{"description":"The updated space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSpaceDto"}}}},"400":{"description":"Invalid request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such space in the account","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/segments/{segmentId}":{"get":{"tags":["Segments"],"summary":"Get a segment","operationId":"getSegment","parameters":[{"name":"segmentId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such segment in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The segment","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SegmentDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Segments"],"summary":"Delete a segment","operationId":"deleteSegment","parameters":[{"name":"segmentId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"204":{"description":"Segment deleted"},"409":{"description":"The segment is still used","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such segment in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Segments"],"summary":"Update a segment","description":"Fields left out are not changed.","operationId":"updateSegment","parameters":[{"name":"segmentId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSegmentRequest"}}},"required":true},"responses":{"200":{"description":"The updated segment","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SegmentDto"}}}},"400":{"description":"Invalid definition","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such segment in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/lists/{listId}":{"get":{"tags":["Lists"],"summary":"Get a list","operationId":"getList","parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The list","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MailingListDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Lists"],"summary":"Delete a list","description":"Deletes the list and its subscriptions; the contacts stay.","operationId":"deleteList","parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"List deleted"},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Lists"],"summary":"Update a list","description":"Fields left out are not changed; a blank `fromEmail` or `fromName` clears it.","operationId":"updateList","parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateListRequest"}}},"required":true},"responses":{"200":{"description":"The updated list","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MailingListDto"}}}},"400":{"description":"Invalid request, or `fromEmail` not on a verified domain of the space (`domain_not_verified`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/forms/{formId}":{"get":{"tags":["Signup forms"],"summary":"Get a signup form","operationId":"getSignupForm","parameters":[{"name":"formId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such form in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The form","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSignupFormDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Signup forms"],"summary":"Delete a signup form","description":"The form stops taking submissions; contacts and subscriptions stay.","operationId":"deleteSignupForm","parameters":[{"name":"formId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such form in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Form deleted"},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Signup forms"],"summary":"Update a signup form","description":"Fields left out are not changed. A blank title, description or redirect URL clears it. status PUBLISHED publishes the form, DRAFT unpublishes it.","operationId":"updateSignupForm","parameters":[{"name":"formId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSignupFormRequest"}}},"required":true},"responses":{"200":{"description":"The updated form","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSignupFormDto"}}}},"400":{"description":"Invalid request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The plan publishes no more forms (`capture_limit_reached`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such form in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/flows/{flowId}":{"get":{"tags":["Flows"],"summary":"Get a flow","description":"The flow, its steps as a tree with their stats and last checks, its run counts, and the problems to fix before activating it.","operationId":"getFlow","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The flow","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Flows"],"summary":"Delete a flow","description":"Deletes the flow, its steps and its runs. Emails already sent stay in the history.","operationId":"deleteFlow","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"204":{"description":"Flow deleted"},"409":{"description":"The flow is active: pause it first","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Flows"],"summary":"Update a flow","description":"Fields left out are not changed. Name, description, goal events and send window change at any time; the trigger and the entry rule only while the flow is not active.","operationId":"updateFlow","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFlowRequest"}}},"required":true},"responses":{"200":{"description":"The updated flow","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}},"400":{"description":"Invalid request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The trigger of an active flow changes: pause it first","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/flows/{flowId}/steps/{stepId}":{"delete":{"tags":["Flows"],"summary":"Delete a step","description":"Deletes the step, and the steps of its branches for a SPLIT. Only while the flow is not active; runs waiting on it move on to the next step (after the last step of a branch, the step after its SPLIT).","operationId":"deleteFlowStep","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The flow without the step","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}},"409":{"description":"The flow is active, or a condition of the flow reads this email","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Flows"],"summary":"Update a step","description":"Fields left out are not changed, a blank optional field is cleared; the type never changes. Allowed while the flow is active: running contacts get the new version, and the email passes the pre-send checks first.","operationId":"updateFlowStep","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFlowStepRequest"}}},"required":true},"responses":{"200":{"description":"The updated flow","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowDto"}}}},"400":{"description":"Invalid step","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"content_blocked: the email of an active flow links to a page flagged as dangerous","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contacts/{contact}":{"get":{"tags":["Contacts"],"summary":"Get a contact","description":"The contact, its subscriptions, its activity counts, its last 20 events and emails.","operationId":"getContact","parameters":[{"name":"contact","in":"path","description":"Contact id or email address","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The contact","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContactDetailDto"}}}},"404":{"description":"No such contact in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Contacts"],"summary":"Delete a contact","description":"Deletes the contact, its subscriptions and events, and removes the address from the emails kept in reports. A suppressed address stays suppressed. With erase=true (a data deletion request), its suppressions are removed too, and an email address is erased even when it is not a contact (a transactional recipient).","operationId":"deleteContact","parameters":[{"name":"contact","in":"path","description":"Contact id or email address","required":true,"schema":{"type":"string"}},{"name":"erase","in":"query","description":"Also remove the suppressions of the address: it can then be emailed again","required":false,"schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"204":{"description":"Contact deleted"},"404":{"description":"Nothing to delete for this contact in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Contacts"],"summary":"Update a contact","description":"Fields left out stay as they are, attributes are merged. A new email keeps the contact, its subscriptions, its flows and its history; emails already queued still go to the old address.","operationId":"updateContact","parameters":[{"name":"contact","in":"path","description":"Contact id or email address","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpdateContactRequest"}}},"required":true},"responses":{"200":{"description":"The updated contact","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ContactDto"}}}},"400":{"description":"Invalid email or attributes","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such contact in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The new email belongs to another contact (`email_taken`) or is on the suppression list (`address_suppressed`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/campaigns/{campaignId}":{"get":{"tags":["Campaigns"],"summary":"Get a campaign","description":"The campaign, its stats, and while it is editable, who it would reach.","operationId":"getCampaign","parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such campaign in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The campaign","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CampaignDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Campaigns"],"summary":"Update a campaign","description":"Fields left out are not changed; a blank optional field is cleared. Only before it leaves.","operationId":"updateCampaign","parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignRequest"}}},"required":true},"responses":{"200":{"description":"The updated campaign","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CampaignDto"}}}},"400":{"description":"Invalid request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The campaign can no longer be edited","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such campaign in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/webhooks/{endpointId}":{"get":{"tags":["Account webhooks"],"summary":"Get an account webhook endpoint","operationId":"getAccountWebhook","parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such account endpoint in the mode of the key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The endpoint","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookEndpointDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Account webhooks"],"summary":"Delete an account webhook endpoint","operationId":"deleteAccountWebhook","parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such account endpoint in the mode of the key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Endpoint deleted"},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Account webhooks"],"summary":"Update an account webhook endpoint","description":"Fields left out are not changed. Enabling again resets the failure streak.","operationId":"updateAccountWebhook","parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointRequest"}}},"required":true},"responses":{"200":{"description":"The updated endpoint","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookEndpointDto"}}}},"400":{"description":"Invalid URL or event type","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such account endpoint in the mode of the key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/spaces/{spaceId}/reputation":{"get":{"tags":["Spaces"],"summary":"Get the reputation of a space","description":"Raw numbers of the last 7 days: emails sent, hard bounces, complaints, human opens at Gmail and at the other providers, contacts under review, plus the reputation status and the marketing pause.","operationId":"getSpaceReputation","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The numbers of the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicSpaceReputationDto"}}}},"404":{"description":"No such space in the account","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/spaces/reputation":{"get":{"tags":["Spaces"],"summary":"Get the reputation of every space","description":"The numbers of GET /v1/spaces/{spaceId}/reputation for every space of the account in the mode of the key, oldest space first, over one 7-day window. Not paginated: one call returns every space.","operationId":"getAccountReputation","responses":{"401":{"description":"Missing, unknown or revoked API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not an account key, sending access only, or account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The numbers of each space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicAccountReputationDto"}}}}}}},"/v1/me":{"get":{"tags":["Account"],"summary":"Check a key","description":"Returns the key making the request, its account, and the space it acts on: the key's own space, or the X-Space-Id header with an account key.","operationId":"me","parameters":[{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The key, its account and its space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicMeDto"}}}},"404":{"description":"X-Space-Id is not a space of the account","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Account suspended","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/lists/{listId}/stats":{"get":{"tags":["Lists"],"summary":"Subscriber growth of a list","description":"Subscriptions, unsubscriptions and hard bounces day by day in the time zone of the space, with the subscribers at the end of each day. `from` and `to` default to the last 30 days; a range covers 366 days at most.","operationId":"getListSubscriberGrowth","parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","description":"First day, YYYY-MM-DD","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Last day, YYYY-MM-DD, included","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The growth","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriberGrowthDto"}}}},"400":{"description":"Invalid range","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/lists/stats":{"get":{"tags":["Lists"],"summary":"Subscriber growth of the space","description":"Contacts subscribed to at least one list, day by day in the time zone of the space. A contact on two lists counts once. `from` and `to` default to the last 30 days; a range covers 366 days at most.","operationId":"getSpaceSubscriberGrowth","parameters":[{"name":"from","in":"query","description":"First day, YYYY-MM-DD","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Last day, YYYY-MM-DD, included","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The growth","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubscriberGrowthDto"}}}},"400":{"description":"Invalid range","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/imports/{importId}":{"get":{"tags":["Contacts"],"summary":"Get an import","description":"Progress, counts and the first rejected rows.","operationId":"getImport","parameters":[{"name":"importId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The import","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImportDto"}}}},"404":{"description":"No such import in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/flows/{flowId}/runs":{"get":{"tags":["Flows"],"summary":"List flow runs","description":"One run per contact entry, newest first, 50 per page.","operationId":"listFlowRuns","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["ACTIVE","COMPLETED","EXITED","GOAL_REACHED","FAILED"]}},{"name":"page","in":"query","description":"0-based","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"A page of runs","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedFlowRunsDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/flows/{flowId}/runs/{runId}":{"get":{"tags":["Flows"],"summary":"Get a flow run","description":"The run, the event that triggered it with its properties, and the steps it went through, oldest first: each email with its delivery, open and click, each wait with how it ended, each condition and split with its result.","operationId":"getFlowRun","parameters":[{"name":"flowId","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such flow or step in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The run and its steps","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FlowRunDetailDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/emails/{emailId}":{"get":{"tags":["Emails"],"summary":"Get an email","description":"Status and events (sent, delivered, bounced, opened, clicked...) of any email of the space. Requires a full access key.","operationId":"getEmail","parameters":[{"name":"emailId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The email and its events","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MessageDetailDto"}}}},"404":{"description":"No such email in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/emails/{emailId}/content":{"get":{"tags":["Emails"],"summary":"Get the content of an email","description":"The email as its recipient read it: rebuilt from its campaign, flow step or template, without tracking, unsubscribe links set to `#`, contact data as of today. Transactional emails are kept 30 days; their `data` variables are masked and their raw content withheld unless `reveal=true`, as they may carry sign-in links or codes. Requires a full access key.","operationId":"getEmailContent","parameters":[{"name":"emailId","in":"path","required":true,"schema":{"type":"string"}},{"name":"reveal","in":"query","description":"Show the variables and raw content of a transactional email","required":false,"schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The content, or `available: false` with the reason","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MessageContentDto"}}}},"404":{"description":"No such email in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/emails/stats":{"get":{"tags":["Emails"],"summary":"Get email stats","description":"Counters of the emails of the space matching the filters (created in the period, the last 30 days by default, 366 days at most), optionally split by source, template, campaign, flow or the values of a tag. Opens and clicks are only measured on tracked emails: openTracked and clickTracked count them, and openRate and clickRate are computed over the delivered emails among them. Requires a full access key.","operationId":"getEmailStats","parameters":[{"name":"tag","in":"query","description":"`key:value`, split on the first `:`, repeatable: the email must carry every tag given","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"templateId","in":"query","required":false,"schema":{"type":"string"}},{"name":"campaignId","in":"query","required":false,"schema":{"type":"string"}},{"name":"flowId","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["CAMPAIGN","FLOW","TRANSACTIONAL","TEST","CONFIRMATION","INCENTIVE"]}},{"name":"stream","in":"query","required":false,"schema":{"type":"string","enum":["MARKETING","TRANSACTIONAL"]}},{"name":"from","in":"query","description":"`2026-10-01` or an ISO instant, inclusive. Default: 30 days before `to`","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","description":"`2026-10-01` (the whole day) or an ISO instant, exclusive. Default: now","required":false,"schema":{"type":"string"}},{"name":"groupBy","in":"query","description":"`source`, `template`, `campaign`, `flow` or `tag:<key>`","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The stats","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmailStatsReportDto"}}}},"400":{"description":"Invalid filter, groupBy, or period over 366 days","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/domains/{domainId}":{"get":{"tags":["Domains"],"summary":"Get a domain","operationId":"getDomain","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The domain","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SendingDomainDto"}}}},"404":{"description":"No such domain in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Domains"],"summary":"Delete a domain","operationId":"deleteDomain","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"204":{"description":"Domain deleted"},"404":{"description":"No such domain in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contacts/{contact}/preferences-url":{"get":{"tags":["Contacts"],"summary":"Get a preferences link","description":"A link to the preferences page of the contact, where they choose their lists or unsubscribe, to show in your app's settings. Anyone holding it manages the contact's subscriptions: it expires after 7 days, so ask for a new one each time you show it.","operationId":"getPreferencesUrl","parameters":[{"name":"contact","in":"path","description":"Contact id or email address","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"200":{"description":"The link and its expiry","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicPreferencesUrlDto"}}}},"404":{"description":"No such contact in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"No verified sending domain (`no_verified_domain`)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/campaigns/{campaignId}/stats":{"get":{"tags":["Campaigns"],"summary":"Get campaign stats","description":"Stats, top links, stats per mailbox provider and opens over the first 48 hours.","operationId":"getCampaignStats","parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"404":{"description":"No such campaign in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"The report","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CampaignReportDto"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/suppressions/{suppressionId}":{"delete":{"tags":["Suppressions"],"summary":"Remove a suppression","description":"A global hard bounce cannot be removed.","operationId":"deleteSuppression","parameters":[{"name":"suppressionId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"204":{"description":"Suppression removed"},"404":{"description":"No such suppression in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/images/{imageId}":{"delete":{"tags":["Images"],"summary":"Delete an image","description":"The image disappears from the emails already sent.","operationId":"deleteImage","parameters":[{"name":"imageId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"204":{"description":"Image deleted"},"404":{"description":"No such image in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/contacts/{contact}/subscriptions/{listId}":{"delete":{"tags":["Contacts"],"summary":"Unsubscribe a contact from a list","operationId":"unsubscribeContactFromList","parameters":[{"name":"contact","in":"path","description":"Contact id or email address","required":true,"schema":{"type":"string"}},{"name":"listId","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/SpaceIdHeader"}],"responses":{"204":{"description":"Unsubscribed (or was not subscribed)"},"404":{"description":"No such contact or list in the space","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Sending access key on a full access route, space key on another space, or account suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit reached: 20 per second and 10,000 per day per key, per space for an account key (100 per second and 200,000 per day overall). See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"MoveFlowStepRequest":{"type":"object","properties":{"parentStepId":{"type":"string","maxLength":36,"minLength":0},"branch":{"type":"string","enum":["YES","NO"]},"position":{"type":"integer","format":"int32","minimum":0}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer","format":"int32"},"fields":{"type":"object","additionalProperties":{"type":"string"}}},"required":["error","message","status"]},"ContentCheckDto":{"type":"object","description":"One finding of the pre-send checks","properties":{"code":{"type":"string","description":"Stable code: missing_variable_data, unknown_variable, broken_tag, gmail_clipping, image_only, missing_alt, subject_missing, subject_long, subject_caps, subject_punctuation, broken_link, link_shortener, ip_link, misleading_link, insecure_link, blocklisted_link, render_failed, undeclared_variable, image_missing_alt, low_contrast, no_reply_sender"},"level":{"type":"string","description":"WARNING: the email can still be sent. BLOCK: it cannot (a link flagged as dangerous)"},"message":{"type":"string","description":"What is wrong and what to do, in English, for a person"},"detail":{"type":"object","additionalProperties":{},"description":"Depends on the code: url, variable, missing, total, bytes, count..."}},"required":["code","detail","level","message"]},"ContentChecksDto":{"type":"object","description":"Result of the pre-send checks of a content","properties":{"checks":{"type":"array","items":{"$ref":"#/components/schemas/ContentCheckDto"}},"checkedAt":{"type":"string","format":"date-time"},"warnings":{"type":"integer","format":"int32","description":"Number of WARNING findings"},"blocked":{"type":"boolean","description":"A BLOCK finding: the content cannot be scheduled, activated or published"},"linksNotChecked":{"type":"integer","format":"int32","description":"Links that could not be checked for being broken (over 30, no answer, a site refusing robots)"}},"required":["blocked","checkedAt","checks","linksNotChecked","warnings"]},"EmailStatsDto":{"type":"object","properties":{"recipients":{"type":"integer","format":"int64"},"queued":{"type":"integer","format":"int64"},"sent":{"type":"integer","format":"int64"},"delivered":{"type":"integer","format":"int64"},"bounced":{"type":"integer","format":"int64"},"complained":{"type":"integer","format":"int64"},"opened":{"type":"integer","format":"int64"},"clicked":{"type":"integer","format":"int64"},"unsubscribed":{"type":"integer","format":"int64"},"failed":{"type":"integer","format":"int64"},"suppressed":{"type":"integer","format":"int64"},"cancelled":{"type":"integer","format":"int64"},"openTracked":{"type":"integer","format":"int64"},"clickTracked":{"type":"integer","format":"int64"},"deliveryRate":{"type":"number","format":"double"},"bounceRate":{"type":"number","format":"double"},"complaintRate":{"type":"number","format":"double"},"openRate":{"type":"number","format":"double"},"clickRate":{"type":"number","format":"double"},"unsubscribeRate":{"type":"number","format":"double"}},"required":["bounceRate","bounced","cancelled","clickRate","clickTracked","clicked","complained","complaintRate","delivered","deliveryRate","failed","openRate","openTracked","opened","queued","recipients","sent","suppressed","unsubscribeRate","unsubscribed"]},"FlowDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED"]},"triggerType":{"type":"string","enum":["LIST_SUBSCRIBED","EVENT","FORM_JOINED"]},"triggerListId":{"type":"string"},"triggerEventName":{"type":"string"},"triggerFormId":{"type":"string"},"entryRule":{"type":"string","enum":["ONCE","EVERY_TIME"]},"goalEventNames":{"type":"array","items":{"type":"string"}},"sendWindow":{"$ref":"#/components/schemas/FlowSendWindowDto"},"createdVia":{"type":"string","enum":["DASHBOARD","API","MCP"]},"activationRequestedAt":{"type":"string","format":"date-time"},"activatedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepDto"}},"runs":{"$ref":"#/components/schemas/FlowRunCountsDto"},"problems":{"type":"array","items":{"$ref":"#/components/schemas/FlowProblemDto"}},"triggerListWarning":{"type":"string"}},"required":["createdAt","createdVia","entryRule","goalEventNames","id","name","problems","runs","status","steps","triggerType","updatedAt"]},"FlowProblemDto":{"type":"object","properties":{"stepId":{"type":"string","description":"The step to fix; null for the trigger or the flow as a whole"},"message":{"type":"string"},"code":{"type":"string","description":"Error code of the activation when there is a specific one (template_not_published, missing_variables, no_verified_sender...)"}},"required":["message"]},"FlowRunCountsDto":{"type":"object","properties":{"active":{"type":"integer","format":"int64"},"completed":{"type":"integer","format":"int64"},"exited":{"type":"integer","format":"int64"},"goalReached":{"type":"integer","format":"int64"},"failed":{"type":"integer","format":"int64"}},"required":["active","completed","exited","failed","goalReached"]},"FlowSendWindowDto":{"type":"object","properties":{"days":{"type":"array","items":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]}},"start":{"type":"string"},"end":{"type":"string"}},"required":["days","end","start"]},"FlowStepDto":{"type":"object","properties":{"id":{"type":"string"},"parentStepId":{"type":"string"},"branch":{"type":"string","enum":["YES","NO"]},"position":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["EMAIL","WAIT","CONDITION","SPLIT","END","ADD_TO_LIST","REMOVE_FROM_LIST","SET_ATTRIBUTE","UNSUBSCRIBE","WEBHOOK"]},"waitMode":{"type":"string","enum":["DURATION","EVENT","UNTIL"]},"waitMinutes":{"type":"integer","format":"int32"},"waitEventName":{"type":"string"},"waitDays":{"type":"array","items":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]}},"waitTime":{"type":"string"},"subject":{"type":"string"},"preheader":{"type":"string"},"fromName":{"type":"string"},"fromEmail":{"type":"string"},"replyTo":{"type":"string"},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string"},"text":{"type":"string"},"templateId":{"type":"string"},"template":{"$ref":"#/components/schemas/FlowStepTemplateDto"},"transactional":{"type":"boolean"},"condition":{"type":"object","additionalProperties":{}},"listId":{"type":"string"},"attributeKey":{"type":"string"},"attributeOperation":{"type":"string","enum":["SET","TODAY","REMOVE"]},"attributeValue":{"description":"SET_ATTRIBUTE SET: a string, a number or a boolean"},"webhookUrl":{"type":"string"},"webhookName":{"type":"string"},"webhookStats":{"$ref":"#/components/schemas/FlowWebhookStatsDto"},"webhookFailing":{"type":"boolean"},"stats":{"$ref":"#/components/schemas/EmailStatsDto"},"yesCount":{"type":"integer","format":"int64"},"noCount":{"type":"integer","format":"int64"},"waitingCount":{"type":"integer","format":"int64"},"yes":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepDto"}},"no":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepDto"}},"checks":{"$ref":"#/components/schemas/ContentChecksDto"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","position","type","updatedAt","waitingCount"]},"FlowStepTemplateDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"alias":{"type":"string"},"subject":{"type":"string","description":"Subject of the version the step sends: the published one, or the draft if never published"},"published":{"type":"boolean","description":"False until the template is published: the flow cannot be activated"},"publishedAt":{"type":"string","format":"date-time"}},"required":["alias","id","name","published","subject"]},"FlowWebhookStatsDto":{"type":"object","properties":{"succeeded":{"type":"integer","format":"int64"},"pending":{"type":"integer","format":"int64","description":"Waiting for their first attempt or retrying after a failed one"},"failed":{"type":"integer","format":"int64","description":"Failed after every retry"}},"required":["failed","pending","succeeded"]},"ReorderFlowStepsRequest":{"type":"object","properties":{"stepIds":{"type":"array","items":{"type":"string"}}},"required":["stepIds"]},"CreateWebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"minLength":0},"description":{"type":"string","maxLength":200,"minLength":0},"eventTypes":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["eventTypes","url"]},"WebhookEndpointDto":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"test":{"type":"boolean"},"url":{"type":"string"},"description":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"consecutiveFailures":{"type":"integer","format":"int32"},"disabledReason":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["consecutiveFailures","createdAt","enabled","eventTypes","id","test","updatedAt","url"]},"WebhookEndpointSecretDto":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpointDto"},"secret":{"type":"string"}},"required":["endpoint","secret"]},"CreateTransactionalTemplateRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"alias":{"type":"string","maxLength":100,"minLength":0},"subject":{"type":"string","maxLength":500,"minLength":0},"preheader":{"type":"string","maxLength":500,"minLength":0},"fromName":{"type":"string","maxLength":120,"minLength":0},"fromEmail":{"type":"string","maxLength":320,"minLength":0},"replyTo":{"type":"string","maxLength":320,"minLength":0},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string","maxLength":1000000,"minLength":0},"text":{"type":"string","maxLength":1000000,"minLength":0},"variables":{"type":"array","items":{"$ref":"#/components/schemas/TemplateVariableDto"},"maxItems":50,"minItems":0}},"required":["alias","name","subject"]},"TemplateVariableDto":{"type":"object","description":"A data.* variable the template expects","properties":{"name":{"type":"string","description":"Path under data, such as reset_url or order.total","maxLength":260,"minLength":0},"required":{"type":"boolean","description":"POST /v1/emails without it is refused (400 missing_variables); a flow run without it fails"},"example":{"type":"string","description":"Sample value, used by previews and test emails","maxLength":500,"minLength":0}},"required":["name","required"]},"TemplateFlowUsageDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"TemplatePublicationRequestDto":{"type":"object","description":"An AI assistant asks a member to publish the draft","properties":{"requestedAt":{"type":"string","format":"date-time"},"requestedBy":{"type":"string"},"note":{"type":"string"}},"required":["requestedAt","requestedBy"]},"TemplateStatsDto":{"type":"object","properties":{"sent":{"type":"integer","format":"int64"},"delivered":{"type":"integer","format":"int64"},"opened":{"type":"integer","format":"int64"},"bounced":{"type":"integer","format":"int64"},"openTracked":{"type":"integer","format":"int64"}},"required":["bounced","delivered","openTracked","opened","sent"]},"TemplateUsageDto":{"type":"object","description":"Where a template is used, besides POST /v1/emails","properties":{"flows":{"type":"array","description":"Flows with an email step linked to the template","items":{"$ref":"#/components/schemas/TemplateFlowUsageDto"}}},"required":["flows"]},"TemplateVersionDto":{"type":"object","description":"The version of a template that POST /v1/emails sends","properties":{"subject":{"type":"string"},"preheader":{"type":"string"},"fromName":{"type":"string"},"fromEmail":{"type":"string"},"replyTo":{"type":"string"},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string"},"text":{"type":"string","description":"Plain-text version; null when it is derived from the content"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/TemplateVariableDto"}}},"required":["content","contentFormat","subject","variables"]},"TransactionalTemplateDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"alias":{"type":"string"},"subject":{"type":"string","description":"Draft subject"},"preheader":{"type":"string"},"fromName":{"type":"string"},"fromEmail":{"type":"string"},"replyTo":{"type":"string"},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string","description":"Draft content"},"text":{"type":"string","description":"Draft plain-text version; null when it is derived from the content"},"variables":{"type":"array","description":"Draft data.* variables","items":{"$ref":"#/components/schemas/TemplateVariableDto"}},"status":{"type":"string","enum":["NEVER_PUBLISHED","PUBLISHED","UNPUBLISHED_CHANGES"]},"changedFields":{"type":"array","description":"Draft fields that differ from the published version: subject, preheader, fromName, fromEmail, replyTo, contentFormat, content, text, variables","items":{"type":"string"}},"published":{"$ref":"#/components/schemas/TemplateVersionDto","description":"The version sent by POST /v1/emails; null until the first publication"},"publishedAt":{"type":"string","format":"date-time"},"publishedBy":{"type":"string"},"publicationRequest":{"$ref":"#/components/schemas/TemplatePublicationRequestDto"},"createdVia":{"type":"string","enum":["DASHBOARD","API","MCP"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"stats":{"$ref":"#/components/schemas/TemplateStatsDto"},"usage":{"$ref":"#/components/schemas/TemplateUsageDto"},"checks":{"$ref":"#/components/schemas/ContentChecksDto","description":"Last pre-send checks of the draft; null when never checked or the draft changed since"}},"required":["alias","changedFields","content","contentFormat","createdAt","createdVia","id","name","stats","status","subject","updatedAt","usage","variables"]},"PublicCreateSuppressionRequest":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"minLength":0}},"required":["email"]},"SuppressionDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"reason":{"type":"string"},"detail":{"type":"string"},"global":{"type":"boolean"},"sourceMessageId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["createdAt","email","global","id","reason"]},"CreatePublicSpaceRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"externalId":{"type":"string","description":"Your own reference. Creating again with the same externalId returns the existing space.","maxLength":120,"minLength":0},"brandColor":{"type":"string","description":"Color of buttons and links, #rrggbb. Email buttons can take their own colors: buttonColor, buttonTextColor.","maxLength":20,"minLength":0},"logoUrl":{"type":"string","description":"Public https URL of a PNG or JPG logo. A blank value removes it.","maxLength":1000,"minLength":0}},"required":["name"]},"EmailThemeSettings":{"type":"object","properties":{"textColor":{"type":"string"},"headingColor":{"type":"string"},"linkColor":{"type":"string"},"backgroundColor":{"type":"string"},"contentBackgroundColor":{"type":"string"},"mutedColor":{"type":"string"},"fontFamily":{"type":"string"},"headingFontFamily":{"type":"string"},"fontSize":{"type":"integer","format":"int32"},"width":{"type":"integer","format":"int32"},"contentStyle":{"type":"string"},"contentRadius":{"type":"integer","format":"int32"},"buttonRadius":{"type":"string"},"buttonSize":{"type":"string"},"logoWidth":{"type":"integer","format":"int32"},"logoAlign":{"type":"string"},"showHeader":{"type":"boolean"},"socialLinks":{"type":"array","items":{"$ref":"#/components/schemas/SocialLink"}}}},"PublicSpaceDto":{"type":"object","description":"A space: one brand or product, with its own domains, contacts, lists and reputation","properties":{"id":{"type":"string"},"name":{"type":"string"},"externalId":{"type":"string","description":"Your own reference for this space, unique in the account and the mode (live or test)"},"test":{"type":"boolean","description":"True for a test space: emails are rendered and kept, never delivered; feedback is simulated"},"timezone":{"type":"string"},"language":{"type":"string","description":"Language of the texts Kula adds to your emails and pages: unsubscribe and preferences links, confirmation emails, unsubscribe and preferences pages, runtime texts of forms. Your own content is never translated","enum":["en","fr","es","it","de"]},"defaultFromName":{"type":"string"},"defaultFromEmail":{"type":"string"},"defaultReplyTo":{"type":"string"},"trackOpens":{"type":"boolean"},"trackClicks":{"type":"boolean"},"confirmAddressOnce":{"type":"boolean","description":"True: double opt-in confirms an address once for the space, a contact subscribed to one list joins another without confirming again. False (default): each list confirms on its own"},"brandColor":{"type":"string","description":"Color of buttons and links in emails and hosted pages, #rrggbb"},"buttonColor":{"type":"string","description":"Background of the email buttons, #rrggbb. Null: the brand color"},"buttonTextColor":{"type":"string","description":"Text of the email buttons, #rrggbb. Null: white or dark, whichever reads best"},"logoUrl":{"type":"string","description":"Logo shown above emails and hosted pages (unsubscribe, preferences, confirmation)"},"emailTheme":{"$ref":"#/components/schemas/EmailThemeSettings","description":"Email theme: colors, fonts, width, buttons, header, social links. Null fields take the default"},"reputationStatus":{"type":"string","description":"OK, WATCH or ALERT"},"marketingPaused":{"type":"boolean","description":"True when campaigns and flows are paused; transactional emails keep flowing"},"createdAt":{"type":"string","format":"date-time"}},"required":["brandColor","confirmAddressOnce","createdAt","emailTheme","id","language","marketingPaused","name","reputationStatus","test","timezone","trackClicks","trackOpens"]},"SocialLink":{"type":"object","properties":{"network":{"type":"string"},"url":{"type":"string"}},"required":["network","url"]},"PublicMarketingDto":{"type":"object","description":"Marketing sending of a space: campaigns and flows. Transactional emails never pause.","properties":{"paused":{"type":"boolean"},"pausedAt":{"type":"string","format":"date-time"},"pausedReason":{"type":"string","description":"ACCOUNT: paused by you, you can resume it. REPUTATION, SES_TENANT_PAUSED or MANUAL: paused by Kula, only Kula support resumes it."},"pausedDetail":{"type":"string","description":"Reason given with the pause"}},"required":["paused"]},"PauseMarketingRequest":{"type":"object","properties":{"reason":{"type":"string","description":"Why the marketing is paused, for your team","maxLength":500,"minLength":0}}},"CreateSegmentRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"description":{"type":"string","maxLength":500,"minLength":0},"definition":{"type":"object","additionalProperties":{}}},"required":["definition","name"]},"SegmentDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"definition":{"type":"object","additionalProperties":{}},"contactCount":{"type":"integer","format":"int64"},"activeContactCount":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["activeContactCount","contactCount","createdAt","definition","id","name","updatedAt"]},"CreateListRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"description":{"type":"string","maxLength":500,"minLength":0},"isPublic":{"type":"boolean"},"fromEmail":{"type":"string","maxLength":320,"minLength":0},"fromName":{"type":"string","maxLength":120,"minLength":0}},"required":["isPublic","name"]},"ListCountsDto":{"type":"object","properties":{"subscribed":{"type":"integer","format":"int64"},"active":{"type":"integer","format":"int64"},"inactive":{"type":"integer","format":"int64"},"pending":{"type":"integer","format":"int64"},"unsubscribed":{"type":"integer","format":"int64"}},"required":["active","inactive","pending","subscribed","unsubscribed"]},"MailingListDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"isPublic":{"type":"boolean"},"fromEmail":{"type":"string"},"fromName":{"type":"string"},"counts":{"$ref":"#/components/schemas/ListCountsDto"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["counts","createdAt","id","isPublic","name","updatedAt"]},"PublicImportRequest":{"type":"object","description":"A bulk import. Processed in the background like a CSV uploaded in the dashboard: addresses are checked, suppressed, role and disposable addresses are skipped.","properties":{"listId":{"type":"string","minLength":1},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/PublicImportRow"},"maxItems":10000,"minItems":0}},"required":["contacts","listId"]},"PublicImportRow":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"minLength":0},"firstName":{"type":"string","maxLength":120,"minLength":0},"lastName":{"type":"string","maxLength":120,"minLength":0},"attributes":{"type":"object","additionalProperties":{},"description":"Attribute values keep their JSON type"},"subscribedAt":{"type":"string","description":"When the contact joined the list, ISO 8601, in the past (since 2000). Ignored when the contact is already subscribed; a malformed or future date rejects the row (invalid_subscribed_at).","example":"2026-03-01T09:30:00Z","maxLength":40,"minLength":0},"status":{"type":"string","description":"Subscription status in the tool the contact comes from. unsubscribed: imported, never subscribed to the list. bounced, complained: skipped and suppressed for marketing in this space. unconfirmed: skipped. Absent: subscribed.","enum":["subscribed","unsubscribed","bounced","complained","unconfirmed"]}},"required":["email"]},"ImportDto":{"type":"object","properties":{"id":{"type":"string"},"listId":{"type":"string"},"fileName":{"type":"string"},"status":{"type":"string","enum":["PENDING","PROCESSING","COMPLETED","FAILED"]},"columnMapping":{"type":"object","additionalProperties":{"type":"string"}},"totalRows":{"type":"integer","format":"int32"},"processedRows":{"type":"integer","format":"int32"},"createdCount":{"type":"integer","format":"int32"},"updatedCount":{"type":"integer","format":"int32"},"invalidSyntaxCount":{"type":"integer","format":"int32"},"invalidDomainCount":{"type":"integer","format":"int32"},"duplicateCount":{"type":"integer","format":"int32"},"suppressedCount":{"type":"integer","format":"int32"},"roleCount":{"type":"integer","format":"int32"},"disposableCount":{"type":"integer","format":"int32"},"unsubscribedCount":{"type":"integer","format":"int32"},"bouncedCount":{"type":"integer","format":"int32"},"complainedCount":{"type":"integer","format":"int32"},"unconfirmedCount":{"type":"integer","format":"int32"},"unknownStatusCount":{"type":"integer","format":"int32"},"invalidSubscribedAtCount":{"type":"integer","format":"int32"},"errorSample":{"type":"array","items":{"$ref":"#/components/schemas/ImportErrorDto"}},"errorMessage":{"type":"string"},"createdVia":{"type":"string","enum":["DASHBOARD","API","MCP"]},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"}},"required":["bouncedCount","columnMapping","complainedCount","createdAt","createdCount","createdVia","disposableCount","duplicateCount","errorSample","id","invalidDomainCount","invalidSubscribedAtCount","invalidSyntaxCount","processedRows","roleCount","status","suppressedCount","totalRows","unconfirmedCount","unknownStatusCount","unsubscribedCount","updatedCount"]},"ImportErrorDto":{"type":"object","properties":{"row":{"type":"integer","format":"int32"},"email":{"type":"string"},"reason":{"type":"string"}},"required":["email","reason","row"]},"ImageDto":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"contentType":{"type":"string"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"sizeBytes":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"}},"required":["contentType","createdAt","height","id","sizeBytes","url","width"]},"CaptureAnalyticsDto":{"type":"object","properties":{"plausibleDomain":{"type":"string","description":"The site as declared in Plausible, e.g. example.com"},"fathomSiteId":{"type":"string","description":"Fathom site id, e.g. ABCDEFGH"},"ga4MeasurementId":{"type":"string","description":"Google Analytics 4 measurement id, G-XXXXXXXXXX"},"metaPixelId":{"type":"string","description":"Meta Pixel id, digits"}}},"CaptureDisplayDto":{"type":"object","properties":{"format":{"type":"string","description":"INLINE (default), MODAL, SLIDE_IN or BAR. Formats other than INLINE are saved on any plan and shown on Growth only","enum":["INLINE","MODAL","SLIDE_IN","BAR"]},"delaySeconds":{"type":"integer","format":"int32","description":"Shown this many seconds after the page loads, 0 to 600"},"scrollPercent":{"type":"integer","format":"int32","description":"Shown once this share of the page is scrolled, 1 to 100 (MODAL, SLIDE_IN)"},"exitIntent":{"type":"boolean","description":"MODAL: shown when the mouse leaves the window, on a computer only"},"clickTrigger":{"type":"boolean","description":"MODAL: opened by a click on any element data-kula-form=\"<form id>\" of the page, whatever the frequency"},"position":{"type":"string","description":"SLIDE_IN: BOTTOM_LEFT or BOTTOM_RIGHT (default). BAR: TOP (default) or BOTTOM","enum":["BOTTOM_LEFT","BOTTOM_RIGHT","TOP","BOTTOM"]},"frequencyDays":{"type":"integer","format":"int32","description":"After a visitor closes it, not shown again on that browser for this many days, 0 to 365 (default 7). Never again after a signup"}},"required":["clickTrigger","exitIntent","format","frequencyDays"]},"CaptureSeoDto":{"type":"object","properties":{"title":{"type":"string","maxLength":120,"minLength":0},"description":{"type":"string","maxLength":300,"minLength":0},"imageUrl":{"type":"string","description":"Image shown when the page is shared, http(s) URL","maxLength":1000,"minLength":0},"faviconUrl":{"type":"string","maxLength":1000,"minLength":0},"noindex":{"type":"boolean","description":"Hide the page from search engines"}},"required":["noindex"]},"CaptureStyleDto":{"type":"object","properties":{"fontFamily":{"type":"string","description":"Font of the text: system, georgia, inter, dm-sans, space-grotesk, montserrat, lora, merriweather, playfair-display, source-serif"},"headingFontFamily":{"type":"string","description":"Font of the headings, same list"},"backgroundColor":{"type":"string","description":"Page background, #rrggbb"},"backgroundImage":{"type":"string","description":"Page background image, http(s) URL (media library)"},"backgroundTransparent":{"type":"boolean","description":"No page background: an embedded form takes the background of the site"},"cardColor":{"type":"string","description":"Background of the card holding the content, #rrggbb"},"cardRadius":{"type":"integer","format":"int32","description":"Corner radius of the card, 0 to 32"},"width":{"type":"integer","format":"int32","description":"Largest width of the card in pixels, 320 to 1200 (default 640 for a page, 480 for a form)"},"textColor":{"type":"string"},"headingColor":{"type":"string"},"linkColor":{"type":"string"},"customCss":{"type":"string","description":"Growth only: 20 KB of CSS, no HTML, no @import, url() only to images uploaded to Kula. Classes start with kula-","maxLength":20480,"minLength":0}}},"CreateSignupFormRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"listIds":{"type":"array","items":{"type":"string"}},"doubleOptIn":{"type":"boolean"},"askFirstName":{"type":"boolean","description":"Deprecated: use firstNameField"},"status":{"type":"string","description":"PUBLISHED publishes the form at once, within the limits of the plan. Default: DRAFT in the dashboard, PUBLISHED through the API","enum":["DRAFT","PUBLISHED"]},"kind":{"type":"string","description":"FORM (default) or PAGE","enum":["FORM","PAGE"]},"firstNameField":{"type":"string","enum":["HIDDEN","OPTIONAL","REQUIRED"]},"lastNameField":{"type":"string","enum":["HIDDEN","OPTIONAL","REQUIRED"]},"fields":{"type":"array","items":{"$ref":"#/components/schemas/SignupFormFieldDto"},"maxItems":10,"minItems":0},"hiddenFields":{"type":"object","additionalProperties":{"type":"string"}},"listChoice":{"type":"boolean"},"title":{"type":"string","maxLength":200,"minLength":0},"description":{"type":"string","maxLength":1000,"minLength":0},"buttonLabel":{"type":"string","maxLength":60,"minLength":0},"successMessage":{"type":"string","maxLength":500,"minLength":0},"redirectUrl":{"type":"string","maxLength":1000,"minLength":0},"confirmationRedirectUrl":{"type":"string","maxLength":1000,"minLength":0},"confirmationSubject":{"type":"string","maxLength":200,"minLength":0},"incentive":{"$ref":"#/components/schemas/IncentiveRequest"},"content":{"type":"string","description":"The document of the form or page as JSON: a FORM holds exactly one form block, a PAGE at least one. Blank: the default content","maxLength":524288,"minLength":0},"thanksContent":{"type":"string","description":"PAGE: the thank-you page, same format; blank removes it","maxLength":524288,"minLength":0},"style":{"$ref":"#/components/schemas/CaptureStyleDto","description":"Replaces the style"},"slug":{"type":"string","description":"PAGE: 3 to 60 lowercase letters, digits or hyphens, unique in the space (409 slug_unavailable)","maxLength":60,"minLength":0},"homePage":{"type":"boolean","description":"PAGE: also served at / of the tracking domains (takes the place of the current home page)"},"pageDomainId":{"type":"string","description":"PAGE: id of the sending domain to share; blank takes the first verified one"},"seo":{"$ref":"#/components/schemas/CaptureSeoDto","description":"PAGE: replaces the SEO settings"},"analytics":{"$ref":"#/components/schemas/CaptureAnalyticsDto","description":"PAGE, Growth: replaces the analytics; an empty object removes them"},"display":{"$ref":"#/components/schemas/CaptureDisplayDto","description":"FORM: replaces the display (format, triggers, frequency); formats other than INLINE show on Growth only"},"templateId":{"type":"string","description":"A model of GET /api/spaces/{spaceId}/capture-templates: its kind, content, thank-you page and style where left out"}},"required":["doubleOptIn","listIds","name"]},"IncentiveRequest":{"type":"object","properties":{"type":{"type":"string","description":"NONE removes the document (and its file), LINK offers url. FILE only once a file is uploaded (incentive-file)","enum":["NONE","FILE","LINK"]},"name":{"type":"string","maxLength":120,"minLength":0},"url":{"type":"string","description":"https:// URL, checked by Google Web Risk (409 link_blocked)","maxLength":2000,"minLength":0},"buttonLabel":{"type":"string","maxLength":60,"minLength":0},"emailSubject":{"type":"string","maxLength":200,"minLength":0},"emailPreheader":{"type":"string","maxLength":200,"minLength":0},"emailIntro":{"type":"string","maxLength":2000,"minLength":0},"emailImageUrl":{"type":"string","description":"http(s) URL of an image of the resource, shown at the top of the email; blank removes it","maxLength":1000,"minLength":0}}},"SignupFormFieldDto":{"type":"object","properties":{"key":{"type":"string","description":"Contact attribute the value goes to: 1 to 50 lowercase letters, digits or underscores","maxLength":50,"minLength":0},"label":{"type":"string","maxLength":120,"minLength":0},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","CHECKBOX","SELECT"]},"required":{"type":"boolean"},"options":{"type":"array","description":"SELECT only: the choices, 1 to 30","items":{"type":"string"}}},"required":["key","label","options","required","type"]},"FormPublicationRequestDto":{"type":"object","properties":{"requestedAt":{"type":"string","format":"date-time"},"requestedBy":{"type":"string"},"note":{"type":"string"}},"required":["requestedAt","requestedBy"]},"IncentiveDto":{"type":"object","properties":{"type":{"type":"string","description":"NONE, FILE (uploaded to Kula) or LINK","enum":["NONE","FILE","LINK"]},"name":{"type":"string","description":"Name of the resource: \"Confirm and get {name}\", \"Check your inbox to get {name}\""},"url":{"type":"string","description":"LINK: the https URL the download link leads to"},"fileId":{"type":"string","description":"FILE: id of the uploaded file"},"fileName":{"type":"string","description":"FILE: the name it is downloaded under"},"fileSize":{"type":"integer","format":"int64"},"fileContentType":{"type":"string"},"fileUploadedAt":{"type":"string","format":"date-time"},"buttonLabel":{"type":"string","description":"Label of the email button; null takes the default"},"emailSubject":{"type":"string","description":"Subject of the confirmation or delivery email; null takes the default"},"emailPreheader":{"type":"string","description":"Preheader of the email; null for none"},"emailIntro":{"type":"string","description":"Introduction of the email, plain text; null takes the default"},"emailImageUrl":{"type":"string","description":"Image of the resource at the top of the email (an image of the media library); null for none"},"defaults":{"$ref":"#/components/schemas/IncentiveEmailDefaultsDto","description":"The texts used when the fields above are null, for the form's double opt-in setting"}},"required":["type"]},"IncentiveEmailDefaultsDto":{"type":"object","properties":{"buttonLabel":{"type":"string"},"emailSubject":{"type":"string","description":"Null with double opt-in: the subject of the confirmation email"},"emailIntro":{"type":"string","description":"Null with double opt-in: the text of the confirmation email"}},"required":["buttonLabel"]},"PublicSignupFormDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","description":"FORM (embedded or hosted form) or PAGE (landing page)","enum":["FORM","PAGE"]},"status":{"type":"string","description":"DRAFT forms answer 404 on the tracking domain; PUBLISHED ones take signups","enum":["DRAFT","PUBLISHED"]},"publishedAt":{"type":"string","format":"date-time"},"listIds":{"type":"array","items":{"type":"string"}},"doubleOptIn":{"type":"boolean"},"askFirstName":{"type":"boolean","description":"Deprecated: firstNameField is not HIDDEN"},"firstNameField":{"type":"string","description":"HIDDEN, OPTIONAL or REQUIRED","enum":["HIDDEN","OPTIONAL","REQUIRED"]},"lastNameField":{"type":"string","description":"HIDDEN, OPTIONAL or REQUIRED","enum":["HIDDEN","OPTIONAL","REQUIRED"]},"fields":{"type":"array","description":"Contact attributes asked to the visitor, in order. Submit them as attributes.<key> (form-encoded) or an attributes object (JSON)","items":{"$ref":"#/components/schemas/SignupFormFieldDto"}},"hiddenFields":{"type":"object","additionalProperties":{"type":"string"},"description":"Attributes set to a fixed value on every signup"},"listChoice":{"type":"boolean","description":"The visitor checks the lists to join (field lists) among the public lists of the form; its private lists are always joined"},"title":{"type":"string"},"description":{"type":"string"},"buttonLabel":{"type":"string"},"successMessage":{"type":"string"},"redirectUrl":{"type":"string"},"confirmationRedirectUrl":{"type":"string"},"confirmationSubject":{"type":"string"},"incentive":{"$ref":"#/components/schemas/IncentiveDto","description":"The document offered to whoever signs up, delivered by email. Upload a file with POST /v1/forms/{form}/incentive-file"},"publicationRequest":{"$ref":"#/components/schemas/FormPublicationRequestDto","description":"Set when an AI assistant asked a member to publish the form"},"content":{"type":"string","description":"The document of the form or page as JSON (sections > columns > blocks, with form blocks); the default content when none was saved"},"contentIsDefault":{"type":"boolean","description":"True while the form shows the default content, built from title, description and button label"},"thanksContent":{"type":"string","description":"PAGE: the thank-you page shown after a submission, same format; null for none"},"style":{"$ref":"#/components/schemas/CaptureStyleDto"},"slug":{"type":"string","description":"PAGE: the address on the tracking domain, https://<tracking domain>/<slug>"},"homePage":{"type":"boolean","description":"PAGE: also served at / of the tracking domains of the space"},"pageDomainId":{"type":"string","description":"PAGE: the sending domain whose tracking domain is shared; null takes the first verified one"},"seo":{"$ref":"#/components/schemas/CaptureSeoDto"},"analytics":{"$ref":"#/components/schemas/CaptureAnalyticsDto","description":"Growth: analytics loaded by the page"},"display":{"$ref":"#/components/schemas/SignupFormDisplayDto","description":"FORM: how the embed script shows it (INLINE, MODAL, SLIDE_IN, BAR; triggers, frequency) and the format visitors see (effectiveFormat: INLINE outside Growth)"},"publicUrl":{"type":"string","description":"The address to share: the landing page on its domain (null until a domain is verified), else the hosted form"},"hostedUrl":{"type":"string","description":"Hosted page of the form, and where submissions are posted. Null until the space has a sending domain."},"embedScriptUrl":{"type":"string","description":"Script rendering the form inside any page. Null until the space has a sending domain."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["askFirstName","buttonLabel","confirmationSubject","content","contentIsDefault","createdAt","display","doubleOptIn","fields","firstNameField","hiddenFields","homePage","id","incentive","kind","lastNameField","listChoice","listIds","name","status","style","successMessage","updatedAt"]},"SignupFormDisplayDto":{"type":"object","properties":{"format":{"type":"string","enum":["INLINE","MODAL","SLIDE_IN","BAR"]},"delaySeconds":{"type":"integer","format":"int32"},"scrollPercent":{"type":"integer","format":"int32"},"exitIntent":{"type":"boolean"},"clickTrigger":{"type":"boolean"},"position":{"type":"string","enum":["BOTTOM_LEFT","BOTTOM_RIGHT","TOP","BOTTOM"]},"frequencyDays":{"type":"integer","format":"int32"},"effectiveFormat":{"type":"string","description":"The format visitors see: format on Growth, INLINE otherwise (and always for a PAGE)","enum":["INLINE","MODAL","SLIDE_IN","BAR"]},"growthRequired":{"type":"boolean","description":"True when format is not INLINE but the account is not on Growth: the form shows inline until it is"}},"required":["clickTrigger","effectiveFormat","exitIntent","format","frequencyDays","growthRequired"]},"CreateFlowRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"minLength":0},"description":{"type":"string","maxLength":1000,"minLength":0},"triggerType":{"type":"string","enum":["LIST_SUBSCRIBED","EVENT","FORM_JOINED"]},"triggerListId":{"type":"string","maxLength":36,"minLength":0},"triggerEventName":{"type":"string","maxLength":100,"minLength":0},"triggerFormId":{"type":"string","maxLength":36,"minLength":0},"entryRule":{"type":"string","enum":["ONCE","EVERY_TIME"]},"goalEventNames":{"type":"array","items":{"type":"string"}},"sendWindow":{"$ref":"#/components/schemas/FlowSendWindowRequest"}},"required":["name","triggerType"]},"FlowSendWindowRequest":{"type":"object","properties":{"days":{"type":"array","items":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]}},"start":{"type":"string","maxLength":5,"minLength":0},"end":{"type":"string","maxLength":5,"minLength":0}},"required":["days"]},"CreateFlowStepRequest":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","WAIT","CONDITION","SPLIT","END","ADD_TO_LIST","REMOVE_FROM_LIST","SET_ATTRIBUTE","UNSUBSCRIBE","WEBHOOK"]},"parentStepId":{"type":"string","maxLength":36,"minLength":0},"branch":{"type":"string","enum":["YES","NO"]},"position":{"type":"integer","format":"int32","minimum":0},"waitMode":{"type":"string","enum":["DURATION","EVENT","UNTIL"]},"waitMinutes":{"type":"integer","format":"int32"},"waitEventName":{"type":"string","maxLength":100,"minLength":0},"waitDays":{"type":"array","items":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]}},"waitTime":{"type":"string","maxLength":5,"minLength":0},"subject":{"type":"string","maxLength":500,"minLength":0},"preheader":{"type":"string","maxLength":500,"minLength":0},"fromName":{"type":"string","maxLength":120,"minLength":0},"fromEmail":{"type":"string","maxLength":320,"minLength":0},"replyTo":{"type":"string","maxLength":320,"minLength":0},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string","maxLength":1000000,"minLength":0},"text":{"type":"string","maxLength":1000000,"minLength":0},"templateId":{"type":"string","maxLength":100,"minLength":0},"transactional":{"type":"boolean"},"condition":{"type":"object","additionalProperties":{}},"listId":{"type":"string","maxLength":36,"minLength":0},"attributeKey":{"type":"string","maxLength":50,"minLength":0},"attributeOperation":{"type":"string","enum":["SET","TODAY","REMOVE"]},"attributeValue":{"description":"SET_ATTRIBUTE SET: a string, a number or a boolean"},"webhookUrl":{"type":"string","maxLength":2000,"minLength":0},"webhookName":{"type":"string","maxLength":100,"minLength":0}},"required":["type"]},"PublicCreateEventRequest":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"minLength":0},"name":{"type":"string","description":"1 to 100 letters, digits or _ . : -, e.g. signed_up","example":"signed_up","maxLength":100,"minLength":0},"properties":{"type":"object","additionalProperties":{},"description":"At most 50 properties and 10 KB"},"occurredAt":{"type":"string","format":"date-time","description":"Defaults to now"},"contact":{"$ref":"#/components/schemas/PublicEventContactData"},"createContact":{"type":"boolean","description":"Create the contact when the address is unknown (default). False answers 404 instead."},"idempotencyKey":{"type":"string","description":"Same as the Idempotency-Key header, which wins when both are given","maxLength":200,"minLength":0}},"required":["createContact","email","name"]},"PublicEventContactData":{"type":"object","description":"Contact fields to set on the way, when the event comes with them","properties":{"firstName":{"type":"string","maxLength":120,"minLength":0},"lastName":{"type":"string","maxLength":120,"minLength":0},"attributes":{"type":"object","additionalProperties":{}}}},"PublicEventDto":{"type":"object","properties":{"id":{"type":"string"},"contactId":{"type":"string"},"name":{"type":"string"},"properties":{"type":"object","additionalProperties":{}},"occurredAt":{"type":"string","format":"date-time"}},"required":["contactId","id","name","occurredAt","properties"]},"PublicEmailTrackDto":{"type":"object","description":"Opens and clicks to track on a transactional email","properties":{"opens":{"type":"boolean","description":"Adds the open pixel. Default false"},"clicks":{"type":"boolean","description":"Rewrites the links to count the clicks. Default false"}}},"PublicSendEmailRequest":{"type":"object","description":"A transactional email: a template (with variables), or raw content: markdown or blocks (wrapped in the space theme), or html and/or text sent as given.","properties":{"from":{"type":"string","description":"`Name <address>` or an address on a verified domain of the space. Defaults to the template sender, then to the space default sender.","maxLength":400,"minLength":0},"to":{"type":"string","description":"One recipient: `address` or `Name <address>`","maxLength":400,"minLength":0},"replyTo":{"type":"string","maxLength":320,"minLength":0},"subject":{"type":"string","description":"Required with raw content; overrides the template subject otherwise","maxLength":500,"minLength":0},"html":{"type":"string"},"text":{"type":"string"},"markdown":{"type":"string"},"preheader":{"type":"string","description":"Preview text shown after the subject in inboxes, with raw content only: a template has its own","maxLength":500,"minLength":0},"blocks":{"type":"object","additionalProperties":{"description":"A BLOCKS document (sections, columns and blocks, text in markdown), wrapped in the space theme: {\"version\": 1, \"sections\": [...]}. See the email format in the documentation."},"description":"A BLOCKS document (sections, columns and blocks, text in markdown), wrapped in the space theme: {\"version\": 1, \"sections\": [...]}. See the email format in the documentation."},"template":{"type":"string","description":"Template id or alias"},"variables":{"type":"object","additionalProperties":{},"description":"Values of `{{ data.* }}`, 32 KB at most"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Extra headers, 20 at most. Those Kula manages (From, Reply-To, To, Subject, List-Unsubscribe, Content-Type...) are ignored; X-SES-*, trace and authentication headers (Received, ARC-*, Resent-*...) and the other Content-* are refused with 400 `reserved_header`"},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Free key/value pairs returned in the webhooks, 20 at most"},"track":{"$ref":"#/components/schemas/PublicEmailTrackDto","description":"Tracking of this email, off by default whatever the space settings. Do not track the clicks of an email carrying a sign-in or password reset link: the link would go through the Kula redirect server and be stored."},"idempotencyKey":{"type":"string","description":"Batch only: the idempotency key of this email. A single send takes the Idempotency-Key header.","maxLength":200,"minLength":0}},"required":["to"]},"PublicEmailDto":{"type":"object","description":"An email accepted for sending","properties":{"id":{"type":"string"},"status":{"type":"string","description":"QUEUED, or SUPPRESSED when the address is on the suppression list (nothing is sent)"},"to":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["createdAt","id","status","to"]},"PublicBatchItemDto":{"type":"object","description":"Outcome of one email of a batch, in the order of the request","properties":{"index":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The email, when accepted"},"status":{"type":"string"},"error":{"type":"string","description":"Error code, when refused"},"message":{"type":"string"},"httpStatus":{"type":"integer","format":"int32","description":"When refused: the HTTP status this email would have had as a single send (400, 402, 403, 404, 409, 429...)"}},"required":["index"]},"PublicBatchResultDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicBatchItemDto"}}},"required":["data"]},"CreateSendingDomainRequest":{"type":"object","properties":{"domain":{"type":"string","maxLength":253,"minLength":0}},"required":["domain"]},"DnsRecordDto":{"type":"object","properties":{"purpose":{"type":"string","enum":["DKIM","MAIL_FROM","DMARC","TRACKING","GOOGLE_POSTMASTER"]},"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"},"priority":{"type":"integer","format":"int32"},"status":{"type":"string","enum":["PENDING","OK","FAILED"]},"optional":{"type":"boolean"}},"required":["name","optional","purpose","status","type","value"]},"DomainChecksDto":{"type":"object","properties":{"dkim":{"type":"string","enum":["PENDING","OK","FAILED"]},"mailFrom":{"type":"string","enum":["PENDING","OK","FAILED"]},"dmarc":{"type":"string","enum":["PENDING","OK","FAILED"]},"tracking":{"type":"string","enum":["PENDING","OK","FAILED"]}},"required":["dkim","dmarc","mailFrom","tracking"]},"DomainRampDto":{"type":"object","properties":{"stage":{"type":"integer","format":"int32"},"dailyCap":{"type":"integer","format":"int32"},"sentToday":{"type":"integer","format":"int32"},"uncapped":{"type":"boolean"}},"required":["sentToday","stage","uncapped"]},"SendingDomainDto":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["PENDING","VERIFIED","FAILED"]},"checks":{"$ref":"#/components/schemas/DomainChecksDto"},"records":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecordDto"}},"trackingDomain":{"type":"string"},"mailFromDomain":{"type":"string"},"verifiedAt":{"type":"string","format":"date-time"},"lastCheckedAt":{"type":"string","format":"date-time"},"nextCheckAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"ramp":{"$ref":"#/components/schemas/DomainRampDto"},"postmasterStatus":{"type":"string","enum":["NONE","PENDING","VERIFIED","FAILED"]},"postmasterError":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["checks","createdAt","domain","id","mailFromDomain","postmasterStatus","ramp","records","status","trackingDomain"]},"PublicUpsertContactRequest":{"type":"object","description":"Creates the contact, or updates it when the address already exists in the space","properties":{"email":{"type":"string","maxLength":320,"minLength":0},"firstName":{"type":"string","description":"Left out: unchanged. Blank: cleared.","maxLength":120,"minLength":0},"lastName":{"type":"string","description":"Left out: unchanged. Blank: cleared.","maxLength":120,"minLength":0},"attributes":{"type":"object","additionalProperties":{},"description":"Merged into the stored attributes; a null value removes the attribute. Keys: letters, digits and underscores."},"listIds":{"type":"array","description":"Lists to subscribe the contact to. Consent collected outside Kula is your responsibility.","items":{"type":"string"}},"doubleOptIn":{"type":"boolean","description":"Ask the contact to confirm by email before the subscriptions become active"},"confirmationRedirectUrl":{"type":"string","description":"With doubleOptIn: the page the confirmation link leads to, instead of Kula's confirmation page. Absolute https URL, at most 1000 characters, kept exactly as given.","example":"https://app.example.com/welcome","maxLength":1000}},"required":["doubleOptIn","email"]},"ContactDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"attributes":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["UNCONFIRMED","ACTIVE","UNSUBSCRIBED","BOUNCED","COMPLAINED"]},"source":{"type":"string","enum":["FORM","API","IMPORT","DASHBOARD","MCP","FLOW"]},"sourceFormId":{"type":"string","description":"The signup form the contact came from, set at creation (spec 026)"},"mailboxProvider":{"type":"string","enum":["GOOGLE","MICROSOFT","YAHOO","AOL","APPLE","OTHER","UNKNOWN"]},"underReview":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastSentAt":{"type":"string","format":"date-time"},"lastOpenedAt":{"type":"string","format":"date-time"},"lastClickedAt":{"type":"string","format":"date-time"},"subscription":{"$ref":"#/components/schemas/ContactSubscriptionDto","description":"Only when listing the contacts of a list (listId): the subscription of the contact to that list"}},"required":["attributes","createdAt","email","id","mailboxProvider","source","status","underReview"]},"ContactSubscriptionDto":{"type":"object","properties":{"listId":{"type":"string"},"listName":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUBSCRIBED","UNSUBSCRIBED"]},"source":{"type":"string","enum":["FORM","API","IMPORT","DASHBOARD","MCP","FLOW"]},"subscribedAt":{"type":"string","format":"date-time"},"unsubscribedAt":{"type":"string","format":"date-time"}},"required":["listId","listName","source","status"]},"PublicSubscribeRequest":{"type":"object","properties":{"listId":{"type":"string","minLength":1},"doubleOptIn":{"type":"boolean","description":"Ask the contact to confirm by email first"},"confirmationRedirectUrl":{"type":"string","description":"With doubleOptIn: the page the confirmation link leads to, instead of Kula's confirmation page. Absolute https URL, at most 1000 characters, kept exactly as given.","example":"https://app.example.com/welcome","maxLength":1000}},"required":["doubleOptIn","listId"]},"PublicBatchContactRequest":{"type":"object","description":"One contact of a batch upsert: the fields of POST /v1/contacts, plus unsubscriptions. A batch never subscribes again a contact or a subscription that is unsubscribed.","properties":{"email":{"type":"string","description":"Required","maxLength":320},"firstName":{"type":"string","description":"Left out: unchanged. Blank: cleared.","maxLength":120},"lastName":{"type":"string","description":"Left out: unchanged. Blank: cleared.","maxLength":120},"attributes":{"type":"object","additionalProperties":{},"description":"Merged into the stored attributes; a null value removes the attribute"},"listIds":{"type":"array","description":"Lists to subscribe the contact to. Skipped when the contact or its subscription is unsubscribed.","items":{"type":"string"}},"doubleOptIn":{"type":"boolean","description":"Ask the contact to confirm by email before the new subscriptions become active"},"confirmationRedirectUrl":{"type":"string","description":"With doubleOptIn: the page the confirmation link leads to, instead of Kula's confirmation page. Absolute https URL, at most 1000 characters, kept exactly as given.","example":"https://app.example.com/welcome","maxLength":1000},"unsubscribeListIds":{"type":"array","description":"Lists to unsubscribe the contact from","items":{"type":"string"}},"unsubscribed":{"type":"boolean","description":"Unsubscribe the contact from everything: it becomes UNSUBSCRIBED. Not with listIds."}},"required":["doubleOptIn","unsubscribed"]},"PublicBatchContactItemDto":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The contact id, when accepted"},"email":{"type":"string"},"created":{"type":"boolean","description":"True for a new contact"},"status":{"type":"string","description":"Status of the contact after the call","enum":["UNCONFIRMED","ACTIVE","UNSUBSCRIBED","BOUNCED","COMPLAINED"]},"subscriptions":{"type":"array","description":"Subscriptions of the lists named in the item (all of them with unsubscribed: true)","items":{"$ref":"#/components/schemas/PublicBatchSubscriptionDto"}},"skipped":{"type":"array","description":"Lists of listIds left alone","items":{"$ref":"#/components/schemas/PublicBatchSkippedDto"}},"error":{"type":"string","description":"Error code, when refused (nothing was changed for this contact)"},"message":{"type":"string"}},"required":["index","skipped","subscriptions"]},"PublicBatchSkippedDto":{"type":"object","properties":{"listId":{"type":"string"},"reason":{"type":"string","description":"`unsubscribed`: the contact or its subscription is unsubscribed, a batch does not subscribe it again"}},"required":["listId","reason"]},"PublicBatchSubscriptionDto":{"type":"object","properties":{"listId":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUBSCRIBED","UNSUBSCRIBED"]}},"required":["listId","status"]},"PublicContactBatchResultDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicBatchContactItemDto"}}},"required":["data"]},"CheckContentRequest":{"type":"object","description":"A content to check without creating anything","properties":{"subject":{"type":"string","maxLength":500,"minLength":0},"preheader":{"type":"string","maxLength":500,"minLength":0},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string","maxLength":1000000,"minLength":0},"text":{"type":"string","description":"Plain-text version sent instead of the derived one: its variables and links are checked too","maxLength":1000000,"minLength":0},"listId":{"type":"string","description":"List the email goes to: missing_variable_data counts its contacts","maxLength":36,"minLength":0},"segmentId":{"type":"string","description":"Segment narrowing the list","maxLength":36,"minLength":0},"transactional":{"type":"boolean","description":"A transactional email: data.* variables are allowed, no unsubscribe footer, no contact counts"},"fromEmail":{"type":"string","description":"From address; without it, the default sender of the space. A no-reply address raises no_reply_sender","maxLength":320,"minLength":0},"replyTo":{"type":"string","description":"Reply-to address; without it, the default reply-to of the space","maxLength":320,"minLength":0}},"required":["transactional"]},"CreateCampaignRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"minLength":0},"subject":{"type":"string","maxLength":500,"minLength":0},"preheader":{"type":"string","maxLength":500,"minLength":0},"fromName":{"type":"string","maxLength":120,"minLength":0},"fromEmail":{"type":"string","maxLength":320,"minLength":0},"replyTo":{"type":"string","maxLength":320,"minLength":0},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string","maxLength":1000000,"minLength":0},"text":{"type":"string","maxLength":1000000,"minLength":0},"listId":{"type":"string","maxLength":36,"minLength":0},"segmentId":{"type":"string","maxLength":36,"minLength":0},"templateId":{"type":"string","maxLength":100,"minLength":0}},"required":["name"]},"CampaignAudienceDto":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"eligible":{"type":"integer","format":"int64"},"underReview":{"type":"integer","format":"int64"},"reviewHeldBack":{"type":"integer","format":"int64"}},"required":["eligible","reviewHeldBack","total","underReview"]},"CampaignDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subject":{"type":"string"},"preheader":{"type":"string"},"fromName":{"type":"string"},"fromEmail":{"type":"string"},"replyTo":{"type":"string"},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string"},"text":{"type":"string"},"listId":{"type":"string"},"segmentId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PENDING_APPROVAL","SCHEDULED","SENDING","SENT","CANCELLED","FAILED"]},"editable":{"type":"boolean"},"scheduledAt":{"type":"string","format":"date-time"},"createdVia":{"type":"string","enum":["DASHBOARD","API","MCP"]},"createdByUserId":{"type":"string"},"approvalRequestedAt":{"type":"string","format":"date-time"},"approvalRequestedBy":{"type":"string"},"approvalNote":{"type":"string"},"approvedAt":{"type":"string","format":"date-time"},"approvedByUserId":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"cancelledAt":{"type":"string","format":"date-time"},"failureReason":{"type":"string"},"recipientCount":{"type":"integer","format":"int32"},"suppressedCount":{"type":"integer","format":"int32"},"reviewSkippedCount":{"type":"integer","format":"int32"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"stats":{"$ref":"#/components/schemas/EmailStatsDto"},"audience":{"$ref":"#/components/schemas/CampaignAudienceDto"},"checks":{"$ref":"#/components/schemas/ContentChecksDto"}},"required":["content","contentFormat","createdAt","createdVia","editable","id","name","stats","status","updatedAt"]},"ScheduleCampaignRequest":{"type":"object","properties":{"scheduledAt":{"type":"string","format":"date-time"}}},"ScheduledCampaignDto":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/CampaignDto"},"warnings":{"type":"array","items":{"type":"string"}},"checks":{"$ref":"#/components/schemas/ContentChecksDto"}},"required":["campaign","warnings"]},"UpdateWebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"minLength":0},"description":{"type":"string","maxLength":200,"minLength":0},"eventTypes":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"}}},"UpdateTransactionalTemplateRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"alias":{"type":"string","maxLength":100,"minLength":0},"subject":{"type":"string","maxLength":500,"minLength":0},"preheader":{"type":"string","maxLength":500,"minLength":0},"fromName":{"type":"string","maxLength":120,"minLength":0},"fromEmail":{"type":"string","maxLength":320,"minLength":0},"replyTo":{"type":"string","maxLength":320,"minLength":0},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string","maxLength":1000000,"minLength":0},"text":{"type":"string","maxLength":1000000,"minLength":0},"variables":{"type":"array","items":{"$ref":"#/components/schemas/TemplateVariableDto"},"maxItems":50,"minItems":0}}},"UpdatePublicSpaceRequest":{"type":"object","description":"Fields left out are not changed","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"language":{"type":"string","description":"Language of the texts Kula adds to your emails and pages. Forms created afterwards get their default texts in this language; texts already saved are kept","enum":["en","fr","es","it","de"],"maxLength":5,"minLength":0},"defaultFromName":{"type":"string","maxLength":120,"minLength":0},"defaultFromEmail":{"type":"string","maxLength":320,"minLength":0},"defaultReplyTo":{"type":"string","maxLength":320,"minLength":0},"trackOpens":{"type":"boolean"},"trackClicks":{"type":"boolean"},"confirmAddressOnce":{"type":"boolean"},"brandColor":{"type":"string","description":"Color of buttons and links, #rrggbb. Email buttons can take their own colors: buttonColor, buttonTextColor.","maxLength":20,"minLength":0},"buttonColor":{"type":"string","description":"Background of the email buttons, #rrggbb. A blank value goes back to the brand color.","maxLength":20,"minLength":0},"buttonTextColor":{"type":"string","description":"Text of the email buttons, #rrggbb. A blank value goes back to white or dark, whichever reads best.","maxLength":20,"minLength":0},"logoUrl":{"type":"string","description":"Public https URL of a PNG or JPG logo. A blank value removes it.","maxLength":1000,"minLength":0},"emailTheme":{"$ref":"#/components/schemas/EmailThemeSettings","description":"Email theme. Replaces the whole theme: a field left out goes back to its default"}}},"UpdateSegmentRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"description":{"type":"string","maxLength":500,"minLength":0},"definition":{"type":"object","additionalProperties":{}}}},"UpdateListRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"description":{"type":"string","maxLength":500,"minLength":0},"isPublic":{"type":"boolean"},"fromEmail":{"type":"string","maxLength":320,"minLength":0},"fromName":{"type":"string","maxLength":120,"minLength":0}}},"UpdateSignupFormRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"listIds":{"type":"array","items":{"type":"string"}},"doubleOptIn":{"type":"boolean"},"askFirstName":{"type":"boolean","description":"Deprecated: use firstNameField"},"status":{"type":"string","description":"PUBLISHED publishes the form (within the limits of the plan), DRAFT unpublishes it","enum":["DRAFT","PUBLISHED"]},"firstNameField":{"type":"string","enum":["HIDDEN","OPTIONAL","REQUIRED"]},"lastNameField":{"type":"string","enum":["HIDDEN","OPTIONAL","REQUIRED"]},"fields":{"type":"array","description":"Replaces the attributes asked; an empty list removes them","items":{"$ref":"#/components/schemas/SignupFormFieldDto"},"maxItems":10,"minItems":0},"hiddenFields":{"type":"object","additionalProperties":{"type":"string"},"description":"Replaces the hidden fields; an empty object removes them"},"listChoice":{"type":"boolean"},"title":{"type":"string","maxLength":200,"minLength":0},"description":{"type":"string","maxLength":1000,"minLength":0},"buttonLabel":{"type":"string","maxLength":60,"minLength":0},"successMessage":{"type":"string","maxLength":500,"minLength":0},"redirectUrl":{"type":"string","maxLength":1000,"minLength":0},"confirmationRedirectUrl":{"type":"string","maxLength":1000,"minLength":0},"confirmationSubject":{"type":"string","maxLength":200,"minLength":0},"incentive":{"$ref":"#/components/schemas/IncentiveRequest"},"content":{"type":"string","description":"The document of the form or page as JSON: a FORM holds exactly one form block, a PAGE at least one. Blank: the default content","maxLength":524288,"minLength":0},"thanksContent":{"type":"string","description":"PAGE: the thank-you page, same format; blank removes it","maxLength":524288,"minLength":0},"style":{"$ref":"#/components/schemas/CaptureStyleDto","description":"Replaces the style"},"slug":{"type":"string","description":"PAGE: 3 to 60 lowercase letters, digits or hyphens, unique in the space (409 slug_unavailable)","maxLength":60,"minLength":0},"homePage":{"type":"boolean","description":"PAGE: also served at / of the tracking domains (takes the place of the current home page)"},"pageDomainId":{"type":"string","description":"PAGE: id of the sending domain to share; blank takes the first verified one"},"seo":{"$ref":"#/components/schemas/CaptureSeoDto","description":"PAGE: replaces the SEO settings"},"analytics":{"$ref":"#/components/schemas/CaptureAnalyticsDto","description":"PAGE, Growth: replaces the analytics; an empty object removes them"},"display":{"$ref":"#/components/schemas/CaptureDisplayDto","description":"FORM: replaces the display (format, triggers, frequency); formats other than INLINE show on Growth only"}}},"UpdateFlowRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"minLength":0},"description":{"type":"string","maxLength":1000,"minLength":0},"triggerType":{"type":"string","enum":["LIST_SUBSCRIBED","EVENT","FORM_JOINED"]},"triggerListId":{"type":"string","maxLength":36,"minLength":0},"triggerEventName":{"type":"string","maxLength":100,"minLength":0},"triggerFormId":{"type":"string","maxLength":36,"minLength":0},"entryRule":{"type":"string","enum":["ONCE","EVERY_TIME"]},"goalEventNames":{"type":"array","items":{"type":"string"}},"sendWindow":{"$ref":"#/components/schemas/FlowSendWindowRequest"}}},"UpdateFlowStepRequest":{"type":"object","properties":{"waitMode":{"type":"string","enum":["DURATION","EVENT","UNTIL"]},"waitMinutes":{"type":"integer","format":"int32"},"waitEventName":{"type":"string","maxLength":100,"minLength":0},"waitDays":{"type":"array","items":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]}},"waitTime":{"type":"string","maxLength":5,"minLength":0},"subject":{"type":"string","maxLength":500,"minLength":0},"preheader":{"type":"string","maxLength":500,"minLength":0},"fromName":{"type":"string","maxLength":120,"minLength":0},"fromEmail":{"type":"string","maxLength":320,"minLength":0},"replyTo":{"type":"string","maxLength":320,"minLength":0},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string","maxLength":1000000,"minLength":0},"text":{"type":"string","maxLength":1000000,"minLength":0},"templateId":{"type":"string","maxLength":100,"minLength":0},"transactional":{"type":"boolean"},"condition":{"type":"object","additionalProperties":{}},"listId":{"type":"string","maxLength":36,"minLength":0},"attributeKey":{"type":"string","maxLength":50,"minLength":0},"attributeOperation":{"type":"string","enum":["SET","TODAY","REMOVE"]},"attributeValue":{"description":"SET_ATTRIBUTE SET: a string, a number or a boolean"},"webhookUrl":{"type":"string","maxLength":2000,"minLength":0},"webhookName":{"type":"string","maxLength":100,"minLength":0}}},"PublicUpdateContactRequest":{"type":"object","description":"Fields left out are not changed","properties":{"email":{"type":"string","description":"New address of the contact. Its subscriptions, flows and history stay. Refused when another contact of the space has it (409 `email_taken`) or when it is on the suppression list (409 `address_suppressed`).","maxLength":320,"minLength":0},"firstName":{"type":"string","maxLength":120,"minLength":0},"lastName":{"type":"string","maxLength":120,"minLength":0},"attributes":{"type":"object","additionalProperties":{},"description":"Merged into the stored attributes; a null value removes the attribute"}}},"UpdateCampaignRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"minLength":0},"subject":{"type":"string","maxLength":500,"minLength":0},"preheader":{"type":"string","maxLength":500,"minLength":0},"fromName":{"type":"string","maxLength":120,"minLength":0},"fromEmail":{"type":"string","maxLength":320,"minLength":0},"replyTo":{"type":"string","maxLength":320,"minLength":0},"contentFormat":{"type":"string","enum":["MARKDOWN","HTML","BLOCKS"]},"content":{"type":"string","maxLength":1000000,"minLength":0},"text":{"type":"string","maxLength":1000000,"minLength":0},"listId":{"type":"string","maxLength":36,"minLength":0},"segmentId":{"type":"string","maxLength":36,"minLength":0}}},"PagedSuppressionsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionDto"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"}},"required":["items","page","size","total"]},"PublicOpenRateDto":{"type":"object","description":"Emails delivered to one group of mailbox providers, and how many a human opened","properties":{"delivered":{"type":"integer","format":"int64"},"opened":{"type":"integer","format":"int64"},"openRate":{"type":"number","format":"double","description":"opened / delivered, a fraction (0.42 = 42 %); null when nothing was delivered"}},"required":["delivered","opened"]},"PublicSpaceReputationDto":{"type":"object","description":"Raw numbers of a space over the last 7 days. Rates are fractions (0.01 = 1 %), null when there is nothing to divide.","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"sent":{"type":"integer","format":"int64","description":"Emails accepted for delivery, test sends excluded"},"hardBounces":{"type":"integer","format":"int64"},"hardBounceRate":{"type":"number","format":"double","description":"hardBounces / sent"},"complaints":{"type":"integer","format":"int64","description":"Complaints outside Gmail, which reports none to senders"},"complaintRate":{"type":"number","format":"double","description":"complaints / emails sent outside Gmail and unidentified providers"},"gmailOpens":{"$ref":"#/components/schemas/PublicOpenRateDto","description":"Human opens at Gmail (Google Workspace included); machine opens are excluded"},"otherOpens":{"$ref":"#/components/schemas/PublicOpenRateDto","description":"Human opens at the other identified mailbox providers"},"contactsUnderReview":{"type":"integer","format":"int64","description":"Active contacts with no human sign of life yet (no open, click or confirmed subscription)"},"reputationStatus":{"type":"string","description":"OK, WATCH or ALERT"},"marketing":{"$ref":"#/components/schemas/PublicMarketingDto"}},"required":["complaints","contactsUnderReview","from","gmailOpens","hardBounces","marketing","otherOpens","reputationStatus","sent","to"]},"PublicAccountReputationDto":{"type":"object","description":"Raw numbers of every space of the account in the mode of the key, oldest space first, over one 7-day window","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"spaces":{"type":"array","items":{"$ref":"#/components/schemas/PublicSpaceReputationEntryDto"}}},"required":["from","spaces","to"]},"PublicSpaceReputationEntryDto":{"type":"object","description":"Raw numbers of one space: the fields of GET /v1/spaces/{id}/reputation, computed the same way, without from and to","properties":{"spaceId":{"type":"string"},"externalId":{"type":"string","description":"Your own reference for this space"},"sent":{"type":"integer","format":"int64","description":"Emails accepted for delivery, test sends excluded"},"hardBounces":{"type":"integer","format":"int64"},"hardBounceRate":{"type":"number","format":"double","description":"hardBounces / sent"},"complaints":{"type":"integer","format":"int64","description":"Complaints outside Gmail, which reports none to senders"},"complaintRate":{"type":"number","format":"double","description":"complaints / emails sent outside Gmail and unidentified providers"},"gmailOpens":{"$ref":"#/components/schemas/PublicOpenRateDto","description":"Human opens at Gmail (Google Workspace included); machine opens are excluded"},"otherOpens":{"$ref":"#/components/schemas/PublicOpenRateDto","description":"Human opens at the other identified mailbox providers"},"contactsUnderReview":{"type":"integer","format":"int64","description":"Active contacts with no human sign of life yet (no open, click or confirmed subscription)"},"reputationStatus":{"type":"string","description":"OK, WATCH or ALERT"},"marketing":{"$ref":"#/components/schemas/PublicMarketingDto"}},"required":["complaints","contactsUnderReview","gmailOpens","hardBounces","marketing","otherOpens","reputationStatus","sent","spaceId"]},"PublicAccountRefDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"PublicKeyDto":{"type":"object","description":"The API key making the request","properties":{"name":{"type":"string"},"permission":{"type":"string","enum":["FULL_ACCESS","SENDING_ACCESS"]},"prefix":{"type":"string","description":"First characters of the key, e.g. ml_a1b2c3d4, or ml_test_a1b2c3d4 for a test key"},"test":{"type":"boolean","description":"True for a test key: it only acts on test spaces, where no email is delivered"}},"required":["name","permission","prefix","test"]},"PublicMeDto":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/PublicKeyDto"},"account":{"$ref":"#/components/schemas/PublicAccountRefDto"},"space":{"$ref":"#/components/schemas/PublicSpaceRefDto","description":"The space the request acts on: the key's own, or X-Space-Id with an account key. Absent otherwise."}},"required":["account","key"]},"PublicSpaceRefDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"test":{"type":"boolean"}},"required":["id","name","test"]},"GrowthDayDto":{"type":"object","properties":{"date":{"type":"string","format":"date"},"subscribed":{"type":"integer","format":"int64"},"unsubscribed":{"type":"integer","format":"int64"},"deactivated":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"},"active":{"type":"integer","format":"int64"}},"required":["active","date","deactivated","subscribed","total","unsubscribed"]},"GrowthPeriodDto":{"type":"object","properties":{"subscribed":{"type":"integer","format":"int64"},"unsubscribed":{"type":"integer","format":"int64"},"deactivated":{"type":"integer","format":"int64"},"net":{"type":"integer","format":"int64"},"unsubscribedByReason":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}}},"required":["deactivated","net","subscribed","unsubscribed","unsubscribedByReason"]},"SubscriberGrowthDto":{"type":"object","properties":{"listId":{"type":"string"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"timezone":{"type":"string"},"period":{"$ref":"#/components/schemas/GrowthPeriodDto"},"days":{"type":"array","items":{"$ref":"#/components/schemas/GrowthDayDto"}}},"required":["days","from","period","timezone","to"]},"ImagesDto":{"type":"object","properties":{"images":{"type":"array","items":{"$ref":"#/components/schemas/ImageDto"}},"usedBytes":{"type":"integer","format":"int64"},"quotaBytes":{"type":"integer","format":"int64"}},"required":["images","quotaBytes","usedBytes"]},"FlowSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED"]},"triggerType":{"type":"string","enum":["LIST_SUBSCRIBED","EVENT","FORM_JOINED"]},"triggerListId":{"type":"string"},"triggerEventName":{"type":"string"},"triggerFormId":{"type":"string"},"entryRule":{"type":"string","enum":["ONCE","EVERY_TIME"]},"goalEventNames":{"type":"array","items":{"type":"string"}},"sendWindow":{"$ref":"#/components/schemas/FlowSendWindowDto"},"createdVia":{"type":"string","enum":["DASHBOARD","API","MCP"]},"activationRequestedAt":{"type":"string","format":"date-time"},"activatedAt":{"type":"string","format":"date-time"},"activeRuns":{"type":"integer","format":"int64"},"emailsSent":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["activeRuns","createdAt","createdVia","emailsSent","entryRule","goalEventNames","id","name","status","triggerType","updatedAt"]},"FlowRunDto":{"type":"object","properties":{"id":{"type":"string"},"contactId":{"type":"string"},"contactEmail":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","COMPLETED","EXITED","GOAL_REACHED","FAILED"]},"currentStepId":{"type":"string"},"nextRunAt":{"type":"string","format":"date-time"},"waitingEventName":{"type":"string"},"exitReason":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time"}},"required":["contactId","id","nextRunAt","startedAt","status"]},"PagedFlowRunsDto":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/FlowRunDto"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"}},"required":["page","runs","size","total","totalPages"]},"FlowRunDetailDto":{"type":"object","properties":{"run":{"$ref":"#/components/schemas/FlowRunDto"},"triggerEvent":{"$ref":"#/components/schemas/FlowRunEventDto"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FlowRunStepDto"}}},"required":["run","steps"]},"FlowRunEmailDto":{"type":"object","properties":{"messageId":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string","enum":["QUEUED","SENDING","SENT","DELIVERED","BOUNCED","COMPLAINED","FAILED","SUPPRESSED","CANCELLED"]},"sentAt":{"type":"string","format":"date-time"},"deliveredAt":{"type":"string","format":"date-time"},"openedAt":{"type":"string","format":"date-time"},"clickedAt":{"type":"string","format":"date-time"},"bouncedAt":{"type":"string","format":"date-time"}},"required":["messageId","status","subject"]},"FlowRunEventDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"properties":{"type":"object","additionalProperties":{}}},"required":["id","name","occurredAt","properties"]},"FlowRunStepDto":{"type":"object","properties":{"stepId":{"type":"string"},"stepType":{"type":"string","enum":["EMAIL","WAIT","CONDITION","SPLIT","END","ADD_TO_LIST","REMOVE_FROM_LIST","SET_ATTRIBUTE","UNSUBSCRIBE","WEBHOOK"]},"stepLabel":{"type":"string"},"outcome":{"type":"string","enum":["SENT","DEFERRED","WAITING","WAITED","WAITING_FOR_EVENT","EVENT_RECEIVED","TIMED_OUT","PASSED","NOT_MET","YES","NO","ENDED","DONE","SKIPPED","STOPPED"]},"eventName":{"type":"string"},"detail":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"untilAt":{"type":"string","format":"date-time"},"email":{"$ref":"#/components/schemas/FlowRunEmailDto"},"webhook":{"$ref":"#/components/schemas/FlowRunWebhookDto"}},"required":["outcome","startedAt","stepId","stepType"]},"FlowRunWebhookDto":{"type":"object","properties":{"deliveryId":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUCCEEDED","FAILED"]},"attempts":{"type":"integer","format":"int32"},"lastStatusCode":{"type":"integer","format":"int32","description":"HTTP code of the last attempt; null when none answered"},"lastError":{"type":"string"},"nextAttemptAt":{"type":"string","format":"date-time","description":"The next attempt, while PENDING"},"deliveredAt":{"type":"string","format":"date-time"}},"required":["attempts","deliveryId","status"]},"MessageSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"toEmail":{"type":"string"},"subject":{"type":"string"},"source":{"type":"string"},"stream":{"type":"string"},"status":{"type":"string"},"bounceType":{"type":"string"},"contactId":{"type":"string"},"campaignId":{"type":"string"},"flowId":{"type":"string"},"templateId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"sentAt":{"type":"string","format":"date-time"},"deliveredAt":{"type":"string","format":"date-time"},"bouncedAt":{"type":"string","format":"date-time"},"complainedAt":{"type":"string","format":"date-time"},"openedAt":{"type":"string","format":"date-time"},"openCount":{"type":"integer","format":"int32"},"clickedAt":{"type":"string","format":"date-time"},"clickCount":{"type":"integer","format":"int32"},"unsubscribedAt":{"type":"string","format":"date-time"}},"required":["clickCount","createdAt","id","openCount","source","status","stream","subject","toEmail"]},"PagedMessagesDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MessageSummaryDto"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"}},"required":["items","page","size","total"]},"CapturedEmailDto":{"type":"object","properties":{"html":{"type":"string"},"text":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"deliveredToMember":{"type":"boolean"}},"required":["deliveredToMember","headers"]},"MessageDetailDto":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/MessageSummaryDto"},"fromEmail":{"type":"string"},"fromName":{"type":"string"},"replyTo":{"type":"string"},"contactId":{"type":"string"},"statusDetail":{"type":"string"},"mailboxProvider":{"type":"string"},"importReview":{"type":"boolean"},"attempts":{"type":"integer","format":"int32"},"sendAfter":{"type":"string","format":"date-time"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"events":{"type":"array","items":{"$ref":"#/components/schemas/MessageEventDto"}},"captured":{"$ref":"#/components/schemas/CapturedEmailDto"},"submittedVia":{"type":"string","enum":["API","SMTP"]},"track":{"$ref":"#/components/schemas/MessageTrackDto"}},"required":["attempts","events","fromEmail","importReview","mailboxProvider","message","sendAfter","tags"]},"MessageEventDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"machine":{"type":"boolean"},"url":{"type":"string"},"userAgent":{"type":"string"},"detail":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","machine","occurredAt","type"]},"MessageTrackDto":{"type":"object","properties":{"opens":{"type":"boolean"},"clicks":{"type":"boolean"}},"required":["clicks","opens"]},"MessageContentDto":{"type":"object","properties":{"available":{"type":"boolean"},"unavailableReason":{"type":"string"},"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"},"masked":{"type":"boolean"},"withheld":{"type":"boolean"},"sourceChanged":{"type":"boolean"},"checks":{"type":"array","description":"Advice on the email as sent, with the codes of the pre-send checks (no_reply_sender, gmail_clipping, insecure_link...): empty when nothing was found, null when the content is not available. Urls keep their host only while the content is masked or withheld","items":{"$ref":"#/components/schemas/ContentCheckDto"}}},"required":["available","masked","sourceChanged","withheld"]},"EmailStatsGroupDto":{"type":"object","description":"One group of GET /v1/emails/stats","properties":{"key":{"type":"string","description":"Template, campaign or flow id, or the tag value; null for the emails without one"},"name":{"type":"string","description":"Current name of the template, campaign or flow; null when deleted, and for tags"},"stats":{"$ref":"#/components/schemas/EmailStatsDto"}},"required":["stats"]},"EmailStatsReportDto":{"type":"object","description":"Counters of a set of emails of the space","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"stats":{"$ref":"#/components/schemas/EmailStatsDto"},"groups":{"type":"array","description":"With groupBy: 100 groups at most, by number of emails, descending. Empty without groupBy","items":{"$ref":"#/components/schemas/EmailStatsGroupDto"}},"truncated":{"type":"boolean","description":"More than 100 groups: only the 100 largest are returned"}},"required":["from","groups","stats","to","truncated"]},"PagedContactsDto":{"type":"object","properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/ContactDto"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"}},"required":["contacts","page","size","total","totalPages"]},"ContactCountsDto":{"type":"object","properties":{"sent":{"type":"integer","format":"int64"},"opened":{"type":"integer","format":"int64"},"clicked":{"type":"integer","format":"int64"}},"required":["clicked","opened","sent"]},"ContactDetailDto":{"type":"object","properties":{"contact":{"$ref":"#/components/schemas/ContactDto"},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/ContactSubscriptionDto"}},"counts":{"$ref":"#/components/schemas/ContactCountsDto"},"events":{"type":"array","items":{"$ref":"#/components/schemas/ContactEventDto"}},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ContactMessageDto"}}},"required":["contact","counts","events","messages","subscriptions"]},"ContactEventDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"properties":{"type":"object","additionalProperties":{}},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","name","occurredAt","properties"]},"ContactMessageDto":{"type":"object","properties":{"id":{"type":"string"},"subject":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"openedAt":{"type":"string","format":"date-time"},"clickedAt":{"type":"string","format":"date-time"}},"required":["id","source","status","subject"]},"PublicPreferencesUrlDto":{"type":"object","properties":{"url":{"type":"string","example":"https://link.example.com/p/c/QzFhYjJjM2Q0ZTVmNjc4OTBhYmNkZWYxMjM0NTY3ODk"},"expiresAt":{"type":"string","format":"date-time"}},"required":["expiresAt","url"]},"CampaignSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PENDING_APPROVAL","SCHEDULED","SENDING","SENT","CANCELLED","FAILED"]},"listId":{"type":"string"},"segmentId":{"type":"string"},"scheduledAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"createdVia":{"type":"string","enum":["DASHBOARD","API","MCP"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"stats":{"$ref":"#/components/schemas/EmailStatsDto"}},"required":["createdAt","createdVia","id","name","stats","status","updatedAt"]},"PagedCampaignsDto":{"type":"object","properties":{"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/CampaignSummaryDto"}},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"}},"required":["campaigns","page","size","total","totalPages"]},"CampaignReportDto":{"type":"object","properties":{"stats":{"$ref":"#/components/schemas/EmailStatsDto"},"topLinks":{"type":"array","items":{"$ref":"#/components/schemas/LinkClicksDto"}},"providers":{"type":"array","items":{"$ref":"#/components/schemas/ProviderStatsDto"}},"opensOverTime":{"type":"array","items":{"$ref":"#/components/schemas/HourlyOpensDto"}}},"required":["opensOverTime","providers","stats","topLinks"]},"HourlyOpensDto":{"type":"object","properties":{"hour":{"type":"string","format":"date-time"},"opens":{"type":"integer","format":"int64"}},"required":["hour","opens"]},"LinkClicksDto":{"type":"object","properties":{"url":{"type":"string"},"clicks":{"type":"integer","format":"int64"},"uniqueClicks":{"type":"integer","format":"int64"}},"required":["clicks","uniqueClicks","url"]},"ProviderStatsDto":{"type":"object","properties":{"provider":{"type":"string"},"stats":{"$ref":"#/components/schemas/EmailStatsDto"}},"required":["provider","stats"]}},"parameters":{"SpaceIdHeader":{"name":"X-Space-Id","in":"header","description":"Required with an account key: the space the request acts on. Ignored with a space key, which acts on its own space.","required":false,"schema":{"type":"string"}}},"securitySchemes":{"apiKey":{"type":"http","description":"An API key created in the dashboard: `Authorization: Bearer ml_...`. A space key acts on its space. An account key manages spaces (`/v1/spaces`) and account webhooks (`/v1/account/webhooks`), and acts on one space with the `X-Space-Id` header.","scheme":"bearer","bearerFormat":"ml_..."}}}}