{"openapi":"3.1.0","info":{"title":"Forward Email API","version":"1.0.0","summary":"A friendly transactional, event-automation, and inbound-email API with reliable delivery primitives.","description":"Send, receive, automate, schedule, inspect, and cancel email. Every authenticated operation is workspace-scoped, rate limited, and declares whether it accepts a Sending access key or requires Full email access."},"servers":[{"url":"/","description":"The Forward deployment serving this document"}],"tags":[{"name":"Emails","description":"Send and inspect transactional email."},{"name":"Batches","description":"Send up to 100 independent emails atomically."},{"name":"Scheduling","description":"Change or cancel provider-confirmed schedules."},{"name":"Attachments","description":"List and download private message attachments."},{"name":"Receiving","description":"Inspect inbound email from an enabled receiving domain."},{"name":"API Keys","description":"Automate least-privilege server credential provisioning and revocation."},{"name":"Domains","description":"Automate sending-domain setup, DNS verification, receiving, and branded tracking."},{"name":"Sending Control","description":"Read and operate the workspace-wide emergency outbound sending switch."},{"name":"Templates","description":"Automate reusable, versioned transactional email content."},{"name":"Events","description":"Declare typed product events and send retry-safe triggers."},{"name":"Automations","description":"Connect product events through an optional durable wait and typed two-way condition to versioned transactional templates, then inspect or cancel Runs."},{"name":"Contacts","description":"Manage consent-aware marketing contacts and custom properties."},{"name":"Segments","description":"Organize contacts into internal, reusable groups."},{"name":"Topics","description":"Manage granular subscription preferences."},{"name":"Broadcasts","description":"Draft, schedule, deliver, and cancel consent-aware newsletters."},{"name":"Suppressions","description":"Synchronize recipients blocked by bounces, complaints, provider decisions, or manual safety rules."},{"name":"Webhooks","description":"Automate signed customer event endpoints and zero-downtime secret rotation."},{"name":"Observability","description":"Monitor workspace quota, rate limits, delivery analytics, and privacy-minimized API requests."}],"security":[{"BearerAuth":[]},{"OAuth2":[]}],"paths":{"/api/v1/emails":{"get":{"x-forward-api-key-permission":"full_access","tags":["Emails"],"operationId":"listEmails","summary":"List email logs","description":"Returns stable cursor-paginated email references from the authenticated workspace and optional API-key domain scope.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"$ref":"#/components/parameters/Before"},{"$ref":"#/components/parameters/Search"},{"$ref":"#/components/parameters/Status"},{"$ref":"#/components/parameters/TagName"},{"$ref":"#/components/parameters/TagValue"}],"responses":{"200":{"description":"A page of email logs.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":["sending_access","full_access"],"tags":["Emails"],"operationId":"sendEmail","summary":"Send one email request","description":"Validates the complete envelope before reserving recipient quota. The reserved forward.test recipients simulate deterministic outcomes without provider traffic or quota usage. A new request returns 202; an exact idempotent replay returns 200.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequest"}}}},"responses":{"200":{"description":"The original result of an exact idempotent replay.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"x-forward-monthly-quota":{"$ref":"#/components/headers/MonthlyQuota"},"x-forward-monthly-quota-outbound":{"$ref":"#/components/headers/MonthlyQuotaOutbound"},"x-forward-monthly-quota-inbound":{"$ref":"#/components/headers/MonthlyQuotaInbound"},"x-forward-monthly-quota-limit":{"$ref":"#/components/headers/MonthlyQuotaLimit"},"x-forward-monthly-quota-remaining":{"$ref":"#/components/headers/MonthlyQuotaRemaining"},"x-forward-monthly-quota-period":{"$ref":"#/components/headers/MonthlyQuotaPeriod"},"x-forward-monthly-quota-reset":{"$ref":"#/components/headers/MonthlyQuotaReset"},"x-forward-daily-quota":{"$ref":"#/components/headers/DailyQuota"},"x-forward-daily-quota-outbound":{"$ref":"#/components/headers/DailyQuotaOutbound"},"x-forward-daily-quota-inbound":{"$ref":"#/components/headers/DailyQuotaInbound"},"x-forward-daily-quota-limit":{"$ref":"#/components/headers/DailyQuotaLimit"},"x-forward-daily-quota-remaining":{"$ref":"#/components/headers/DailyQuotaRemaining"},"x-forward-daily-quota-reset":{"$ref":"#/components/headers/DailyQuotaReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResponse"}}}},"202":{"description":"The email was accepted for delivery, durable provider confirmation, or a provider-free test outcome.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"x-forward-monthly-quota":{"$ref":"#/components/headers/MonthlyQuota"},"x-forward-monthly-quota-outbound":{"$ref":"#/components/headers/MonthlyQuotaOutbound"},"x-forward-monthly-quota-inbound":{"$ref":"#/components/headers/MonthlyQuotaInbound"},"x-forward-monthly-quota-limit":{"$ref":"#/components/headers/MonthlyQuotaLimit"},"x-forward-monthly-quota-remaining":{"$ref":"#/components/headers/MonthlyQuotaRemaining"},"x-forward-monthly-quota-period":{"$ref":"#/components/headers/MonthlyQuotaPeriod"},"x-forward-monthly-quota-reset":{"$ref":"#/components/headers/MonthlyQuotaReset"},"x-forward-daily-quota":{"$ref":"#/components/headers/DailyQuota"},"x-forward-daily-quota-outbound":{"$ref":"#/components/headers/DailyQuotaOutbound"},"x-forward-daily-quota-inbound":{"$ref":"#/components/headers/DailyQuotaInbound"},"x-forward-daily-quota-limit":{"$ref":"#/components/headers/DailyQuotaLimit"},"x-forward-daily-quota-remaining":{"$ref":"#/components/headers/DailyQuotaRemaining"},"x-forward-daily-quota-reset":{"$ref":"#/components/headers/DailyQuotaReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/batch":{"post":{"x-forward-api-key-permission":["sending_access","full_access"],"tags":["Batches"],"operationId":"sendEmailBatch","summary":"Send a batch of emails","description":"Validates 1–100 independent email objects before reserving their combined recipient quota. Attachments, scheduling, and forward.test recipients are intentionally unavailable in batches.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEmailRequest"}}}},"responses":{"200":{"description":"The original result of an exact batch replay.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"x-forward-monthly-quota":{"$ref":"#/components/headers/MonthlyQuota"},"x-forward-monthly-quota-outbound":{"$ref":"#/components/headers/MonthlyQuotaOutbound"},"x-forward-monthly-quota-inbound":{"$ref":"#/components/headers/MonthlyQuotaInbound"},"x-forward-monthly-quota-limit":{"$ref":"#/components/headers/MonthlyQuotaLimit"},"x-forward-monthly-quota-remaining":{"$ref":"#/components/headers/MonthlyQuotaRemaining"},"x-forward-monthly-quota-period":{"$ref":"#/components/headers/MonthlyQuotaPeriod"},"x-forward-monthly-quota-reset":{"$ref":"#/components/headers/MonthlyQuotaReset"},"x-forward-daily-quota":{"$ref":"#/components/headers/DailyQuota"},"x-forward-daily-quota-outbound":{"$ref":"#/components/headers/DailyQuotaOutbound"},"x-forward-daily-quota-inbound":{"$ref":"#/components/headers/DailyQuotaInbound"},"x-forward-daily-quota-limit":{"$ref":"#/components/headers/DailyQuotaLimit"},"x-forward-daily-quota-remaining":{"$ref":"#/components/headers/DailyQuotaRemaining"},"x-forward-daily-quota-reset":{"$ref":"#/components/headers/DailyQuotaReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEmailResponse"}}}},"202":{"description":"The complete batch was accepted.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"x-forward-monthly-quota":{"$ref":"#/components/headers/MonthlyQuota"},"x-forward-monthly-quota-outbound":{"$ref":"#/components/headers/MonthlyQuotaOutbound"},"x-forward-monthly-quota-inbound":{"$ref":"#/components/headers/MonthlyQuotaInbound"},"x-forward-monthly-quota-limit":{"$ref":"#/components/headers/MonthlyQuotaLimit"},"x-forward-monthly-quota-remaining":{"$ref":"#/components/headers/MonthlyQuotaRemaining"},"x-forward-monthly-quota-period":{"$ref":"#/components/headers/MonthlyQuotaPeriod"},"x-forward-monthly-quota-reset":{"$ref":"#/components/headers/MonthlyQuotaReset"},"x-forward-daily-quota":{"$ref":"#/components/headers/DailyQuota"},"x-forward-daily-quota-outbound":{"$ref":"#/components/headers/DailyQuotaOutbound"},"x-forward-daily-quota-inbound":{"$ref":"#/components/headers/DailyQuotaInbound"},"x-forward-daily-quota-limit":{"$ref":"#/components/headers/DailyQuotaLimit"},"x-forward-daily-quota-remaining":{"$ref":"#/components/headers/DailyQuotaRemaining"},"x-forward-daily-quota-reset":{"$ref":"#/components/headers/DailyQuotaReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEmailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/{id}":{"parameters":[{"$ref":"#/components/parameters/EmailId"}],"get":{"x-forward-api-key-permission":"full_access","tags":["Emails"],"operationId":"getEmail","summary":"Inspect one email","description":"Returns retained content, attachment metadata, per-recipient outcomes, the ordered event timeline, and a retention-aware delivery checkup for message and current sending-domain practices.","responses":{"200":{"description":"The email and its retained delivery history.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","tags":["Scheduling"],"operationId":"rescheduleEmail","summary":"Change a scheduled send","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scheduled_at"],"properties":{"scheduled_at":{"type":"string","maxLength":100,"description":"A timezone-qualified ISO 8601 timestamp or relative phrase from one minute to 30 days ahead."}}}}}},"responses":{"200":{"description":"The provider accepted the new schedule.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleEmailResponse"}}}},"202":{"description":"The schedule change is durably queued for provider retry.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleEmailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/{id}/cancel":{"parameters":[{"$ref":"#/components/parameters/EmailId"}],"post":{"x-forward-api-key-permission":"full_access","tags":["Scheduling"],"operationId":"cancelEmail","summary":"Cancel a scheduled send","description":"Idempotently cancels a provider-confirmed schedule and returns only the daily and monthly quota that email originally reserved, even after a plan change.","responses":{"200":{"description":"The email is canceled.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelEmailResponse"}}}},"202":{"description":"The cancellation is durably queued for provider retry.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelEmailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/{id}/attachments":{"parameters":[{"$ref":"#/components/parameters/EmailId"}],"get":{"x-forward-api-key-permission":"full_access","tags":["Attachments"],"operationId":"listEmailAttachments","summary":"List private attachment metadata","responses":{"200":{"description":"Attachment metadata and authenticated download URLs.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/{id}/attachments/{attachmentId}":{"parameters":[{"$ref":"#/components/parameters/EmailId"},{"$ref":"#/components/parameters/AttachmentId"}],"get":{"x-forward-api-key-permission":"full_access","tags":["Attachments"],"operationId":"downloadEmailAttachment","summary":"Download one private attachment","responses":{"200":{"description":"The original attachment bytes. Content-Type and Content-Disposition reflect the stored safe metadata.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/receiving":{"get":{"x-forward-api-key-permission":"full_access","tags":["Receiving"],"operationId":"listReceivedEmails","summary":"List inbound email","description":"Returns stable cursor-paginated inbound metadata only after a signed provider event has mapped the message to exactly one receiving-enabled workspace domain. Domain-scoped keys see only their domain.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/ReceivedAfter"},{"$ref":"#/components/parameters/ReceivedBefore"},{"$ref":"#/components/parameters/ReceivedSearch"}],"responses":{"200":{"description":"A page of workspace-owned inbound email.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedEmailListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/receiving/{id}":{"parameters":[{"$ref":"#/components/parameters/ReceivedEmailId"}],"get":{"x-forward-api-key-permission":"full_access","tags":["Receiving"],"operationId":"getReceivedEmail","summary":"Inspect one inbound email","description":"Fetches the full provider message only after local workspace ownership and API-key domain scope are confirmed. Expired Forward content remains unavailable even if the provider still retains a copy.","responses":{"200":{"description":"Inbound metadata and retained message content.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedEmail"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/receiving/{id}/reply":{"parameters":[{"$ref":"#/components/parameters/ReceivedEmailId"}],"post":{"x-forward-api-key-permission":"full_access","tags":["Receiving"],"operationId":"replyToReceivedEmail","summary":"Reply in an inbound email thread","description":"Creates an outbound email from one original local recipient to the signed Reply-To address (or original sender). Forward supplies In-Reply-To and a bounded References chain, enforces the API key's domain scope plus normal sending safeguards, and refuses replies after retained source content expires.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedEmailReplyInput"}}}},"responses":{"200":{"description":"The original result of an exact threaded-reply replay.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"x-forward-monthly-quota":{"$ref":"#/components/headers/MonthlyQuota"},"x-forward-monthly-quota-outbound":{"$ref":"#/components/headers/MonthlyQuotaOutbound"},"x-forward-monthly-quota-inbound":{"$ref":"#/components/headers/MonthlyQuotaInbound"},"x-forward-monthly-quota-limit":{"$ref":"#/components/headers/MonthlyQuotaLimit"},"x-forward-monthly-quota-remaining":{"$ref":"#/components/headers/MonthlyQuotaRemaining"},"x-forward-monthly-quota-period":{"$ref":"#/components/headers/MonthlyQuotaPeriod"},"x-forward-monthly-quota-reset":{"$ref":"#/components/headers/MonthlyQuotaReset"},"x-forward-daily-quota":{"$ref":"#/components/headers/DailyQuota"},"x-forward-daily-quota-outbound":{"$ref":"#/components/headers/DailyQuotaOutbound"},"x-forward-daily-quota-inbound":{"$ref":"#/components/headers/DailyQuotaInbound"},"x-forward-daily-quota-limit":{"$ref":"#/components/headers/DailyQuotaLimit"},"x-forward-daily-quota-remaining":{"$ref":"#/components/headers/DailyQuotaRemaining"},"x-forward-daily-quota-reset":{"$ref":"#/components/headers/DailyQuotaReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedEmailReplyResponse"}}}},"202":{"description":"The threaded reply was accepted for delivery.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"x-forward-monthly-quota":{"$ref":"#/components/headers/MonthlyQuota"},"x-forward-monthly-quota-outbound":{"$ref":"#/components/headers/MonthlyQuotaOutbound"},"x-forward-monthly-quota-inbound":{"$ref":"#/components/headers/MonthlyQuotaInbound"},"x-forward-monthly-quota-limit":{"$ref":"#/components/headers/MonthlyQuotaLimit"},"x-forward-monthly-quota-remaining":{"$ref":"#/components/headers/MonthlyQuotaRemaining"},"x-forward-monthly-quota-period":{"$ref":"#/components/headers/MonthlyQuotaPeriod"},"x-forward-monthly-quota-reset":{"$ref":"#/components/headers/MonthlyQuotaReset"},"x-forward-daily-quota":{"$ref":"#/components/headers/DailyQuota"},"x-forward-daily-quota-outbound":{"$ref":"#/components/headers/DailyQuotaOutbound"},"x-forward-daily-quota-inbound":{"$ref":"#/components/headers/DailyQuotaInbound"},"x-forward-daily-quota-limit":{"$ref":"#/components/headers/DailyQuotaLimit"},"x-forward-daily-quota-remaining":{"$ref":"#/components/headers/DailyQuotaRemaining"},"x-forward-daily-quota-reset":{"$ref":"#/components/headers/DailyQuotaReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedEmailReplyResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/receiving/{id}/forward":{"parameters":[{"$ref":"#/components/parameters/ReceivedEmailId"}],"post":{"x-forward-api-key-permission":"full_access","tags":["Receiving"],"operationId":"forwardReceivedEmail","summary":"Forward an inbound email","description":"Forwards retained raw inbound content from one original local recipient. Passthrough mode preserves the original subject, body, inline content, and up to 10 attachments. Wrapped mode sends custom text or HTML with the untouched source attached as forwarded_message.eml. Normal sending safeguards and the API key's domain scope still apply.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedEmailForwardInput"}}}},"responses":{"200":{"description":"The original result of an exact inbound-forward replay.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"x-forward-monthly-quota":{"$ref":"#/components/headers/MonthlyQuota"},"x-forward-monthly-quota-outbound":{"$ref":"#/components/headers/MonthlyQuotaOutbound"},"x-forward-monthly-quota-inbound":{"$ref":"#/components/headers/MonthlyQuotaInbound"},"x-forward-monthly-quota-limit":{"$ref":"#/components/headers/MonthlyQuotaLimit"},"x-forward-monthly-quota-remaining":{"$ref":"#/components/headers/MonthlyQuotaRemaining"},"x-forward-monthly-quota-period":{"$ref":"#/components/headers/MonthlyQuotaPeriod"},"x-forward-monthly-quota-reset":{"$ref":"#/components/headers/MonthlyQuotaReset"},"x-forward-daily-quota":{"$ref":"#/components/headers/DailyQuota"},"x-forward-daily-quota-outbound":{"$ref":"#/components/headers/DailyQuotaOutbound"},"x-forward-daily-quota-inbound":{"$ref":"#/components/headers/DailyQuotaInbound"},"x-forward-daily-quota-limit":{"$ref":"#/components/headers/DailyQuotaLimit"},"x-forward-daily-quota-remaining":{"$ref":"#/components/headers/DailyQuotaRemaining"},"x-forward-daily-quota-reset":{"$ref":"#/components/headers/DailyQuotaReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedEmailForwardResponse"}}}},"202":{"description":"The inbound forward was accepted for delivery.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"x-forward-monthly-quota":{"$ref":"#/components/headers/MonthlyQuota"},"x-forward-monthly-quota-outbound":{"$ref":"#/components/headers/MonthlyQuotaOutbound"},"x-forward-monthly-quota-inbound":{"$ref":"#/components/headers/MonthlyQuotaInbound"},"x-forward-monthly-quota-limit":{"$ref":"#/components/headers/MonthlyQuotaLimit"},"x-forward-monthly-quota-remaining":{"$ref":"#/components/headers/MonthlyQuotaRemaining"},"x-forward-monthly-quota-period":{"$ref":"#/components/headers/MonthlyQuotaPeriod"},"x-forward-monthly-quota-reset":{"$ref":"#/components/headers/MonthlyQuotaReset"},"x-forward-daily-quota":{"$ref":"#/components/headers/DailyQuota"},"x-forward-daily-quota-outbound":{"$ref":"#/components/headers/DailyQuotaOutbound"},"x-forward-daily-quota-inbound":{"$ref":"#/components/headers/DailyQuotaInbound"},"x-forward-daily-quota-limit":{"$ref":"#/components/headers/DailyQuotaLimit"},"x-forward-daily-quota-remaining":{"$ref":"#/components/headers/DailyQuotaRemaining"},"x-forward-daily-quota-reset":{"$ref":"#/components/headers/DailyQuotaReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedEmailForwardResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/receiving/{id}/attachments":{"parameters":[{"$ref":"#/components/parameters/ReceivedEmailId"}],"get":{"x-forward-api-key-permission":"full_access","tags":["Receiving"],"operationId":"listReceivedEmailAttachments","summary":"List inbound attachment metadata","responses":{"200":{"description":"Retained attachment metadata with authenticated Forward download paths.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedAttachmentListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/emails/receiving/{id}/attachments/{attachmentId}":{"parameters":[{"$ref":"#/components/parameters/ReceivedEmailId"},{"$ref":"#/components/parameters/ReceivedAttachmentId"}],"get":{"x-forward-api-key-permission":"full_access","tags":["Receiving"],"operationId":"downloadReceivedEmailAttachment","summary":"Download one inbound attachment","description":"Proxies provider bytes through authenticated Forward access without exposing the provider's signed URL.","responses":{"200":{"description":"The inbound attachment bytes with safe no-store and sandbox headers.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/api-keys":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["API Keys"],"operationId":"listApiKeys","summary":"List active API keys","description":"Returns a stable cursor page of safe credential metadata. Secret hashes, plaintext keys, and member identities are never returned.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/ApiKeyAfter"}],"responses":{"200":{"description":"A page of active workspace API keys.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["API Keys"],"operationId":"createApiKey","summary":"Create an API key","description":"Returns the plaintext key exactly once after the credential and Activity record commit. The exact calling Full access key, current plan, optional domain, workspace lifecycle, and key allowance are rechecked in that transaction.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateInput"}}}},"responses":{"201":{"description":"The new API key, including its one-time plaintext secret.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/api-keys/{id}":{"parameters":[{"$ref":"#/components/parameters/ApiKeyId"}],"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["API Keys"],"operationId":"updateApiKey","summary":"Update API key settings","description":"Renames an active key or changes its permission and optional domain scope without changing its secret or rotation state. The caller must send the exact latest updated_at; an identical retry is safe, while an older conflicting write is rejected. Restricting the calling key itself takes effect immediately.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUpdateInput"}}}},"responses":{"200":{"description":"The current API key metadata after the version-safe update.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["API Keys"],"operationId":"deleteApiKey","summary":"Revoke an API key","description":"Immediately invalidates the active target after atomically rechecking the exact calling Full access key and committing Activity evidence. Use a replacement key to revoke an old deployment credential after cutover.","responses":{"200":{"description":"The API key was revoked.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteApiKeyResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/domains":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Domains"],"operationId":"listDomains","summary":"List sending domains","description":"Returns up to 100 domains from the authenticated workspace, including ownership and provider DNS state.","responses":{"200":{"description":"The workspace sending domains.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Domains"],"operationId":"createDomain","summary":"Create a sending domain","description":"Reserves the domain platform-wide and commits its ownership TXT record, immutable sending region, and immutable bounce Return-Path with Activity evidence only while the exact Full access key remains active and workspace-wide.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainCreateInput"}}}},"responses":{"201":{"description":"The pending domain and its Forward ownership TXT record.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/domains/{id}":{"parameters":[{"$ref":"#/components/parameters/DomainId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Domains"],"operationId":"getDomain","summary":"Get a sending domain","responses":{"200":{"description":"Current ownership, provider DNS, receiving, and tracking state.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Domains"],"operationId":"updateDomainTracking","summary":"Update branded engagement tracking","description":"Reconciles open and click tracking with the delivery provider, preserves an existing tracking hostname when metrics are disabled, and records the change only while the exact key remains current.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainTrackingInput"}}}},"responses":{"200":{"description":"The reconciled domain and tracking DNS state.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Domains"],"operationId":"deleteDomain","summary":"Delete a sending domain","description":"Removes provider configuration before freeing the plan slot. Active domain-scoped keys and queued provider deliveries must be cleared first.","responses":{"200":{"description":"The domain was deleted.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDomainResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/domains/{id}/verify":{"parameters":[{"$ref":"#/components/parameters/DomainId"}],"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Domains"],"operationId":"verifyDomain","summary":"Check ownership and email DNS","description":"Checks the Forward ownership TXT record, creates or verifies provider configuration, and returns every DNS record still required. Safe retries reconcile an interrupted provider update.","responses":{"200":{"description":"The latest verification outcome and domain state.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/domains/{id}/receiving":{"parameters":[{"$ref":"#/components/parameters/DomainId"}],"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Domains"],"operationId":"updateDomainReceiving","summary":"Enable or pause inbound receiving","description":"Reconciles the delivery-provider receiving capability before committing the local state with Activity evidence. While paused, signed in-flight inbound callbacks are acknowledged without storage, quota use, or customer-webhook dispatch. Enabling may add a Receiving MX record without interrupting already-verified SPF and DKIM sending.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainReceivingInput"}}}},"responses":{"200":{"description":"The reconciled domain and current receiving DNS state.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/sending-control":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Sending Control"],"operationId":"getSendingControl","summary":"Get workspace emergency sending control","description":"Returns the customer-controlled pause independently from Forward's operator sending-access state. Requires a workspace-wide Full access key.","responses":{"200":{"description":"The current workspace sending control.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendingControl"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Sending Control"],"operationId":"updateSendingControl","summary":"Pause or resume all workspace sending","description":"Atomically changes the customer emergency switch using the exact latest updated_at. Pausing holds API, SMTP, Automation, Broadcast, and provider-retry lanes without consuming attempts, while provider-confirmed scheduled emails are canceled. Resuming never clears an operator suspension.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendingControlInput"}}}},"responses":{"200":{"description":"The current workspace sending control after reconciliation.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendingControl"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/suppressions":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Suppressions"],"operationId":"listSuppressions","summary":"List active suppressions","description":"Returns a stable cursor page from the authenticated workspace. Search treats percent and underscore as literal email characters.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/SuppressionAfter"},{"$ref":"#/components/parameters/SuppressionSearch"},{"$ref":"#/components/parameters/SuppressionReason"}],"responses":{"200":{"description":"A page of active suppressions.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Suppressions"],"operationId":"createSuppression","summary":"Suppress one recipient","description":"Creates or safely restores a manual suppression. An already-active automatic bounce, complaint, or provider suppression keeps its original evidence.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionCreateInput"}}}},"responses":{"200":{"description":"The recipient was already actively suppressed.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionMutationResponse"}}}},"201":{"description":"The manual suppression was created or restored.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionMutationResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/suppressions/{id}":{"parameters":[{"$ref":"#/components/parameters/SuppressionId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Suppressions"],"operationId":"getSuppression","summary":"Get an active suppression","responses":{"200":{"description":"The active suppression and its latest version timestamp.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Suppressions"],"operationId":"deleteSuppression","summary":"Allow sends to a suppressed recipient","description":"Requires the exact updated_at last fetched by the caller. A newer provider event returns a conflict instead of erasing fresh bounce or complaint evidence.","parameters":[{"$ref":"#/components/parameters/SuppressionExpectedUpdatedAt"}],"responses":{"200":{"description":"The suppression was removed.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSuppressionResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/webhooks":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"listWebhooks","summary":"List customer webhook endpoints","description":"Returns a stable workspace-scoped cursor page. Endpoint search treats percent and underscore as literal characters.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/WebhookAfter"},{"$ref":"#/components/parameters/WebhookSearch"},{"$ref":"#/components/parameters/WebhookStatus"}],"responses":{"200":{"description":"A page of webhook endpoints without signing-secret material.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"createWebhook","summary":"Create a signed webhook endpoint","description":"Returns the active signing secret exactly once. Creation and Activity evidence commit only while the exact Full access key and plan allowance remain current.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateInput"}}}},"responses":{"201":{"description":"The created endpoint and its one-time signing secret.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/webhooks/{id}":{"parameters":[{"$ref":"#/components/parameters/WebhookId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"getWebhook","summary":"Get a customer webhook endpoint","responses":{"200":{"description":"The current endpoint configuration and version.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"updateWebhook","summary":"Update, pause, or enable a webhook endpoint","description":"Requires the exact updated_at last fetched by the caller. Configuration changes start a fresh delivery epoch and cancel work queued for the previous destination.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPatch"}}}},"responses":{"200":{"description":"The updated endpoint and whether queued retries were canceled.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookMutationResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"deleteWebhook","summary":"Delete a webhook and its delivery history","parameters":[{"$ref":"#/components/parameters/WebhookExpectedUpdatedAt"}],"responses":{"200":{"description":"The endpoint, secret material, delivery history, and queued retries were deleted.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWebhookResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/webhooks/{id}/secret":{"parameters":[{"$ref":"#/components/parameters/WebhookId"}],"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"rotateWebhookSecret","summary":"Generate a pending signing secret","description":"Returns a new pending secret exactly once. Live deliveries continue using the active secret and also carry a pending signature until activation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookVersionInput"}}}},"responses":{"200":{"description":"The endpoint and one-time pending secret.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"activateWebhookSecret","summary":"Activate the pending signing secret","description":"Promotes the pending secret and retains the previous signer for exactly 24 hours.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookVersionInput"}}}},"responses":{"200":{"description":"The endpoint with its previous-secret cutoff.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"cancelWebhookSecretRotation","summary":"Cancel a pending signing-secret rotation","parameters":[{"$ref":"#/components/parameters/WebhookExpectedUpdatedAt"}],"responses":{"200":{"description":"The pending secret was permanently cleared.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotationCanceled"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/webhooks/{id}/deliveries":{"parameters":[{"$ref":"#/components/parameters/WebhookId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"listWebhookDeliveries","summary":"List webhook delivery attempts","description":"Returns a stable cursor page of delivery metadata for one endpoint without event payloads, recipient addresses, signing secrets, or request headers.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/WebhookDeliveryAfter"},{"$ref":"#/components/parameters/WebhookDeliveryStatus"},{"$ref":"#/components/parameters/WebhookDeliveryEvent"}],"responses":{"200":{"description":"A page of webhook delivery attempts.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/webhooks/{id}/test":{"parameters":[{"$ref":"#/components/parameters/WebhookId"}],"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"testWebhook","summary":"Send a signed webhook diagnostic","description":"Sends a genuine signature with an isolated synthetic event that never enters delivery history. Tests and manual replays share a workspace limit of five operations per minute.","responses":{"200":{"description":"The receiver's diagnostic result and active transition signatures.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTest"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/webhooks/{id}/deliveries/{deliveryId}/retry":{"parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookDeliveryId"}],"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Webhooks"],"operationId":"retryWebhookDelivery","summary":"Replay a stored webhook event","description":"Reuses the original event ID, event time, and JSON body with a fresh request timestamp and signature. Each logical event is capped at 20 total attempts, and the endpoint must remain enabled in the same workspace.","responses":{"200":{"description":"The newly created delivery attempt.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/events":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Events"],"operationId":"listEventDefinitions","summary":"List event definitions","responses":{"200":{"description":"The workspace event library.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDefinitionListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Events"],"operationId":"createEventDefinition","summary":"Create an event definition","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDefinitionInput"}}}},"responses":{"201":{"description":"The created event definition.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDefinition"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/events/send":{"post":{"x-forward-api-key-permission":["sending_access","full_access"],"x-forward-domain-scope":"sender_domain","tags":["Events"],"operationId":"sendEvent","summary":"Send a product event","description":"Validates the payload against its declared flat schema, atomically reserves the complete set of matching Run starts, evaluates and snapshots each enabled Automation's typed branch and delay, and queues one durable Run per match. If the monthly allowance or active-Run capacity cannot fit the whole event, no partial event is accepted. Domain-scoped keys trigger only Automations whose sender uses that domain.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSendInput"}}}},"responses":{"200":{"description":"An exact idempotent replay.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSendResponse"}}}},"202":{"description":"The event and its matching Runs were accepted.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSendResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/events/{id}":{"parameters":[{"$ref":"#/components/parameters/EventDefinitionId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Events"],"operationId":"getEventDefinition","summary":"Get an event definition","responses":{"200":{"description":"The event definition.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDefinition"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Events"],"operationId":"updateEventDefinition","summary":"Update an event definition","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDefinitionPatch"}}}},"responses":{"200":{"description":"The updated event definition.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDefinition"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Events"],"operationId":"deleteEventDefinition","summary":"Delete an unused event definition","parameters":[{"name":"expected_version","in":"query","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"The event definition was deleted.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAutomationResourceResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/automations":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Automations"],"operationId":"listAutomations","summary":"List Automations","responses":{"200":{"description":"The workspace Automations.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Automations"],"operationId":"createAutomation","summary":"Create an Automation","description":"Creates a paused or enabled event flow with one immediate or delayed email path, a typed condition with two paths, or a durable Wait for Event with event-received and timeout paths. Condition, delay, and Wait for Event are mutually exclusive. Enabling requires a verified sender domain and compatible event schemas and templates.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationInput"}}}},"responses":{"201":{"description":"The created Automation.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/automations/{id}":{"parameters":[{"$ref":"#/components/parameters/AutomationId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Automations"],"operationId":"getAutomation","summary":"Get an Automation","responses":{"200":{"description":"The Automation.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Automations"],"operationId":"updateAutomation","summary":"Update, enable, or pause an Automation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationPatch"}}}},"responses":{"200":{"description":"The updated Automation.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Automations"],"operationId":"deleteAutomation","summary":"Delete a paused Automation","parameters":[{"name":"expected_version","in":"query","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"The Automation was deleted while Run history was preserved.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAutomationResourceResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/automations/{id}/runs":{"parameters":[{"$ref":"#/components/parameters/AutomationId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Automations"],"operationId":"listAutomationRuns","summary":"List recent Automation Runs","parameters":[{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Recent Runs for the Automation.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRunListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/automations/{id}/runs/{runId}":{"parameters":[{"$ref":"#/components/parameters/AutomationId"},{"$ref":"#/components/parameters/AutomationRunId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Automations"],"operationId":"getAutomationRun","summary":"Get an Automation Run","responses":{"200":{"description":"The Run and generated email reference.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/automations/{id}/runs/{runId}/cancel":{"parameters":[{"$ref":"#/components/parameters/AutomationId"},{"$ref":"#/components/parameters/AutomationRunId"}],"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Automations"],"operationId":"cancelAutomationRun","summary":"Cancel a waiting or queued Automation Run","responses":{"200":{"description":"The canceled Run.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/templates":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Templates"],"operationId":"listTemplates","summary":"List transactional templates","description":"Returns every current template in the authenticated workspace. A workspace can contain at most 200 templates, so this collection is not paginated.","responses":{"200":{"description":"The workspace templates.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Templates"],"operationId":"createTemplate","summary":"Create a transactional template","description":"Validates the complete template, derives its variables, and commits version 1 with Activity evidence only while the exact Full access key remains active and workspace-wide.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateInput"}}}},"responses":{"201":{"description":"The created template and its first published version.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/templates/{id}":{"parameters":[{"$ref":"#/components/parameters/TemplateId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Templates"],"operationId":"getTemplate","summary":"Get a transactional template","responses":{"200":{"description":"The current published template.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Templates"],"operationId":"updateTemplate","summary":"Publish a new template version","description":"Requires the version last fetched by the caller. A stale version returns a conflict instead of overwriting newer content.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplatePatch"}}}},"responses":{"200":{"description":"The newly published template version.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Templates"],"operationId":"deleteTemplate","summary":"Delete a template and its version history","parameters":[{"$ref":"#/components/parameters/TemplateExpectedVersion"}],"responses":{"200":{"description":"The template was deleted.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTemplateResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/contacts":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Contacts"],"operationId":"listContacts","summary":"List workspace contacts","description":"Requires a workspace-wide Full access key. Domain-scoped keys cannot read audience data.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/ContactAfter"},{"$ref":"#/components/parameters/ContactSearch"},{"$ref":"#/components/parameters/ContactStatus"},{"$ref":"#/components/parameters/SegmentFilter"}],"responses":{"200":{"description":"The workspace contacts.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Contacts"],"operationId":"createContact","summary":"Create a contact","description":"The write and its Activity record commit only while the Full access key remains active and workspace-wide.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}}},"responses":{"201":{"description":"The created contact.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/contacts/{id}":{"parameters":[{"$ref":"#/components/parameters/ContactId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Contacts"],"operationId":"getContact","summary":"Get a contact","responses":{"200":{"description":"The workspace-scoped contact.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Contacts"],"operationId":"updateContact","summary":"Update a contact","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPatch"}}}},"responses":{"200":{"description":"The updated contact.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Contacts"],"operationId":"deleteContact","summary":"Delete a contact","responses":{"200":{"description":"The contact was deleted.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAudienceResourceResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/segments":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Segments"],"operationId":"listSegments","summary":"List workspace segments","description":"Requires a workspace-wide Full access key. Domain-scoped keys cannot read audience data.","responses":{"200":{"description":"The workspace segments.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Segments"],"operationId":"createSegment","summary":"Create a segment","description":"The write and its Activity record commit only while the Full access key remains active and workspace-wide.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentInput"}}}},"responses":{"201":{"description":"The created segment.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Segment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/segments/{id}":{"parameters":[{"$ref":"#/components/parameters/SegmentId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Segments"],"operationId":"getSegment","summary":"Get a segment","responses":{"200":{"description":"The workspace-scoped segment.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Segment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Segments"],"operationId":"updateSegment","summary":"Update a segment","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentPatch"}}}},"responses":{"200":{"description":"The updated segment.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Segment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Segments"],"operationId":"deleteSegment","summary":"Delete a segment","responses":{"200":{"description":"The segment was deleted.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAudienceResourceResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/topics":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Topics"],"operationId":"listTopics","summary":"List workspace topics","description":"Requires a workspace-wide Full access key. Domain-scoped keys cannot read audience data.","responses":{"200":{"description":"The workspace topics.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Topics"],"operationId":"createTopic","summary":"Create a topic","description":"The write and its Activity record commit only while the Full access key remains active and workspace-wide.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicInput"}}}},"responses":{"201":{"description":"The created topic.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topic"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/topics/{id}":{"parameters":[{"$ref":"#/components/parameters/TopicId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Topics"],"operationId":"getTopic","summary":"Get a topic","responses":{"200":{"description":"The workspace-scoped topic.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topic"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Topics"],"operationId":"updateTopic","summary":"Update a topic","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicPatch"}}}},"responses":{"200":{"description":"The updated topic.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topic"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Topics"],"operationId":"deleteTopic","summary":"Delete a topic","responses":{"200":{"description":"The topic was deleted.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAudienceResourceResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/broadcasts":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Broadcasts"],"operationId":"listBroadcasts","summary":"List Broadcasts","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/BroadcastAfter"}],"responses":{"200":{"description":"A page of Broadcasts.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Broadcasts"],"operationId":"createBroadcast","summary":"Create a Broadcast draft","description":"Creates a draft tied to one internal segment and one recipient-facing topic.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastInput"}}}},"responses":{"201":{"description":"The Broadcast draft.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/broadcasts/{id}":{"parameters":[{"$ref":"#/components/parameters/BroadcastId"}],"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Broadcasts"],"operationId":"getBroadcast","summary":"Get a Broadcast","responses":{"200":{"description":"The Broadcast.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"patch":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Broadcasts"],"operationId":"updateBroadcast","summary":"Update a draft Broadcast","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastPatch"}}}},"responses":{"200":{"description":"The updated draft.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Broadcasts"],"operationId":"deleteBroadcast","summary":"Delete a draft Broadcast","responses":{"200":{"description":"The draft was deleted.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAudienceResourceResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/broadcasts/{id}/send":{"parameters":[{"$ref":"#/components/parameters/BroadcastId"}],"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Broadcasts"],"operationId":"sendBroadcast","summary":"Send or schedule a Broadcast","description":"Atomically snapshots eligible recipients and reserves their full quota before any delivery begins.","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSendInput"}}}},"responses":{"202":{"description":"The audience was reserved and queued or scheduled.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/broadcasts/{id}/cancel":{"parameters":[{"$ref":"#/components/parameters/BroadcastId"}],"post":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Broadcasts"],"operationId":"cancelBroadcast","summary":"Cancel a scheduled or active Broadcast","description":"Returns quota for recipients that have not entered the email delivery pipeline. A scheduled Broadcast returns to draft.","responses":{"200":{"description":"The Broadcast was canceled safely.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/usage":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Observability"],"operationId":"getUsage","summary":"Inspect current workspace usage","description":"Returns the authenticated workspace's current email quota, request and recipient rate-limit windows, plan limits, and sending-access state. Email quota combines outbound recipients with inbound messages. The request window includes this API call.","responses":{"200":{"description":"Current workspace usage and limits.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/analytics":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Observability"],"operationId":"getAnalytics","summary":"Inspect delivery and engagement analytics","description":"Uses the same workspace-scoped UTC aggregates as the Dashboard. forward.test outcomes are excluded, and 7, 30, or 90 days are allowed only when included by the current plan.","parameters":[{"$ref":"#/components/parameters/AnalyticsDays"}],"responses":{"200":{"description":"Delivery, engagement, domain, failure, and tag aggregates.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/api-logs":{"get":{"x-forward-api-key-permission":"full_access","x-forward-domain-scope":"workspace_only","tags":["Observability"],"operationId":"listApiLogs","summary":"List privacy-minimized API request logs","description":"Returns stable cursor-paginated request metadata for the authenticated workspace. Recipient addresses, message content, authorization values, and credentials are never retained in these logs. The current request is recorded only after its response completes.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/ApiLogBefore"},{"$ref":"#/components/parameters/ApiLogSearch"},{"$ref":"#/components/parameters/ApiLogStatus"}],"responses":{"200":{"description":"A page of API request logs and an unfiltered 24-hour summary.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiLogListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/ProviderError"},"503":{"$ref":"#/components/responses/Unavailable"}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"fw_live_* or fw_oauth_*","description":"A Forward API key or short-lived OAuth access token. Sending access may send email, batches, and typed product events; every management, list, inspect, attachment, reschedule, cancel, and inbound operation requires Full email access. Keep API keys on a trusted server."},"OAuth2":{"type":"oauth2","description":"OAuth 2.1 authorization code flow for public clients. S256 PKCE and an exact registered redirect URI are required; access tokens last one hour and refresh tokens rotate on every use.","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","refreshUrl":"/oauth/token","scopes":{"email.send":"Send transactional email and typed product events.","workspace.full":"Read and manage the connected workspace."}}}}},"parameters":{"EmailId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^em_[a-f0-9]{24}$"}},"AttachmentId":{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","pattern":"^att_[a-f0-9]{24}$"}},"ReceivedEmailId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^rx_[a-f0-9]{24}$"}},"ReceivedAttachmentId":{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},"ContactId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^con_[a-f0-9]{24}$"}},"SegmentId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^seg_[a-f0-9]{24}$"}},"TopicId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^top_[a-f0-9]{24}$"}},"BroadcastId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^brd_[a-f0-9]{24}$"}},"EventDefinitionId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^evd_[a-f0-9]{24}$"}},"AutomationId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^aut_[a-f0-9]{24}$"}},"AutomationRunId":{"name":"runId","in":"path","required":true,"schema":{"type":"string","pattern":"^run_[a-f0-9]{24}$"}},"ApiKeyId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^key_[a-f0-9]{24}$"}},"DomainId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^dom_[a-f0-9]{24}$"}},"SuppressionId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sup_[a-f0-9]{24}$"}},"SuppressionExpectedUpdatedAt":{"name":"expected_updated_at","in":"query","required":true,"description":"The exact ISO updated_at timestamp last fetched by this caller.","schema":{"type":"string","format":"date-time"}},"WebhookId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^wh_[a-f0-9]{24}$"}},"WebhookDeliveryId":{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string","pattern":"^whd_[a-f0-9]{24}$"}},"WebhookExpectedUpdatedAt":{"name":"expected_updated_at","in":"query","required":true,"description":"The exact ISO updated_at timestamp last fetched by this caller.","schema":{"type":"string","format":"date-time"}},"TemplateId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^tpl_[a-f0-9]{24}$"}},"TemplateExpectedVersion":{"name":"expected_version","in":"query","required":true,"description":"The current template version last fetched by this caller.","schema":{"type":"integer","minimum":1}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"A caller-generated key bound to the canonical request payload. Exact retries return the original result; changed payloads return 409.","schema":{"type":"string","minLength":1,"maxLength":256}},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},"AnalyticsDays":{"name":"days","in":"query","description":"UTC analytics window. Defaults to the longest window included by the current plan.","schema":{"type":"integer","enum":[7,30,90]}},"ApiLogBefore":{"name":"before","in":"query","description":"Load the next, older page before this API request ID.","schema":{"type":"string","pattern":"^req_[a-f0-9]{24}$"}},"ApiLogSearch":{"name":"q","in":"query","description":"Case-insensitive literal search across safe request IDs, key labels and prefixes, normalized routes, error codes, and resource IDs.","schema":{"type":"string","minLength":1,"maxLength":120}},"ApiLogStatus":{"name":"status","in":"query","schema":{"type":"string","enum":["all","success","error"],"default":"all"}},"ContactAfter":{"name":"after","in":"query","description":"Load the next, older page after this contact ID.","schema":{"type":"string","pattern":"^con_[a-f0-9]{24}$"}},"BroadcastAfter":{"name":"after","in":"query","description":"Load the next, older page after this Broadcast ID.","schema":{"type":"string","pattern":"^brd_[a-f0-9]{24}$"}},"ApiKeyAfter":{"name":"after","in":"query","description":"Load the next, older page after this active API key ID.","schema":{"type":"string","pattern":"^key_[a-f0-9]{24}$"}},"SuppressionAfter":{"name":"after","in":"query","description":"Load the next, older page after this active suppression ID.","schema":{"type":"string","pattern":"^sup_[a-f0-9]{24}$"}},"SuppressionSearch":{"name":"q","in":"query","description":"Case-insensitive literal substring search on recipient email.","schema":{"type":"string","maxLength":254}},"SuppressionReason":{"name":"reason","in":"query","schema":{"type":"string","enum":["bounced","complained","suppressed","manual"]}},"WebhookAfter":{"name":"after","in":"query","description":"Load the next, older page after this webhook endpoint ID.","schema":{"type":"string","pattern":"^wh_[a-f0-9]{24}$"}},"WebhookSearch":{"name":"q","in":"query","description":"Case-insensitive literal substring search on the endpoint URL.","schema":{"type":"string","maxLength":2048}},"WebhookStatus":{"name":"status","in":"query","schema":{"type":"string","enum":["enabled","disabled"]}},"WebhookDeliveryAfter":{"name":"after","in":"query","description":"Load the next, older page after this webhook delivery ID.","schema":{"type":"string","pattern":"^whd_[a-f0-9]{24}$"}},"WebhookDeliveryStatus":{"name":"status","in":"query","schema":{"type":"string","enum":["succeeded","failed"]}},"WebhookDeliveryEvent":{"name":"event","in":"query","schema":{"type":"string","enum":["email.queued","email.scheduled","email.rescheduled","email.canceled","email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.failed","email.delivery_unknown","email.suppressed","email.received"]}},"ContactSearch":{"name":"q","in":"query","description":"Case-insensitive email, first-name, and last-name search.","schema":{"type":"string","maxLength":100}},"ContactStatus":{"name":"status","in":"query","schema":{"type":"string","enum":["subscribed","unsubscribed"]}},"SegmentFilter":{"name":"segment_id","in":"query","schema":{"type":"string","pattern":"^seg_[a-f0-9]{24}$"}},"After":{"name":"after","in":"query","description":"Load the next, older page after this email ID. Do not combine with before.","schema":{"type":"string","pattern":"^em_[a-f0-9]{24}$"}},"Before":{"name":"before","in":"query","description":"Load the previous, newer page before this email ID. Do not combine with after.","schema":{"type":"string","pattern":"^em_[a-f0-9]{24}$"}},"ReceivedAfter":{"name":"after","in":"query","description":"Load the next, older page after this received-email ID. Do not combine with before.","schema":{"type":"string","pattern":"^rx_[a-f0-9]{24}$"}},"ReceivedBefore":{"name":"before","in":"query","description":"Load the previous, newer page before this received-email ID. Do not combine with after.","schema":{"type":"string","pattern":"^rx_[a-f0-9]{24}$"}},"ReceivedSearch":{"name":"q","in":"query","description":"Case-insensitive text search across inbound IDs, senders, recipients, subjects, domains, and Message-IDs.","schema":{"type":"string","minLength":1,"maxLength":256}},"Search":{"name":"q","in":"query","description":"Case-insensitive text search across email IDs, subjects, senders, recipients, statuses, tags, provider IDs, and batch IDs. SQL wildcard characters are treated literally.","schema":{"type":"string","minLength":1,"maxLength":256}},"Status":{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/EmailStatus"}},"TagName":{"name":"tag_name","in":"query","description":"Exact tag name. Provide tag_value at the same time.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,256}$"}},"TagValue":{"name":"tag_value","in":"query","description":"Exact tag value. Provide tag_name at the same time.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,256}$"}}},"headers":{"RequestId":{"description":"A server-generated identifier for this exact request. Include it when contacting support.","schema":{"type":"string","pattern":"^req_[a-f0-9]{24}$"}},"RateLimitLimit":{"description":"Workspace request limit for the current window.","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"Workspace requests remaining in the current window.","schema":{"type":"integer"}},"RateLimitReset":{"description":"Seconds until the current request window resets.","schema":{"type":"integer"}},"MonthlyQuota":{"description":"Outbound-recipient and inbound-message units reserved in the current monthly or billing period.","schema":{"type":"integer"}},"MonthlyQuotaOutbound":{"description":"Outbound-recipient units reserved in the current monthly or billing period.","schema":{"type":"integer"}},"MonthlyQuotaInbound":{"description":"Inbound-message units reserved in the current monthly or billing period.","schema":{"type":"integer"}},"MonthlyQuotaLimit":{"description":"Included email units in the current monthly or billing period.","schema":{"type":"integer"}},"MonthlyQuotaRemaining":{"description":"Email units remaining in the period.","schema":{"type":"integer"}},"MonthlyQuotaPeriod":{"description":"The UTC calendar month or verified Stripe billing period identifier.","schema":{"type":"string"}},"MonthlyQuotaReset":{"description":"Unix time in seconds when the current email allowance resets.","schema":{"type":"integer"}},"DailyQuota":{"description":"Free-plan outbound-recipient and inbound-message units reserved today.","schema":{"type":"integer"}},"DailyQuotaOutbound":{"description":"Free-plan outbound-recipient units reserved today.","schema":{"type":"integer"}},"DailyQuotaInbound":{"description":"Free-plan inbound-message units reserved today.","schema":{"type":"integer"}},"DailyQuotaLimit":{"description":"Free-plan daily email allowance.","schema":{"type":"integer"}},"DailyQuotaRemaining":{"description":"Free-plan email units remaining today.","schema":{"type":"integer"}},"DailyQuotaReset":{"description":"Unix time in seconds at the next UTC day boundary.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"The request is invalid.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Unauthorized":{"description":"The API key is missing, malformed, or revoked.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Forbidden":{"description":"The workspace, plan, sending-access state, API-key permission, or key scope does not permit this action.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"NotFound":{"description":"The requested workspace-scoped resource does not exist.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Conflict":{"description":"The current resource state or idempotency payload conflicts with this request.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"PayloadTooLarge":{"description":"The JSON, rendered content, or encoded email exceeds its documented limit.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"UnsupportedMediaType":{"description":"Use application/json for requests with a body.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"UnprocessableEntity":{"description":"A recipient is suppressed.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"RateLimited":{"description":"A workspace request, recipient, daily, or monthly limit was reached.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-forward-request-id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"InternalError":{"description":"Forward could not complete the request.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"ProviderError":{"description":"The configured delivery provider rejected or could not complete the operation.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Unavailable":{"description":"A required production component is unavailable or not configured.","headers":{"x-forward-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"schemas":{"EventSchema":{"type":"object","maxProperties":25,"propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"type":"string","enum":["string","number","boolean","date"]},"description":"A flat payload contract. email, first_name, and last_name are reserved built-ins."},"EventDefinitionInput":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z][A-Za-z0-9_.:-]{0,119}$","examples":["user.created"]},"schema":{"$ref":"#/components/schemas/EventSchema"}}},"EventDefinitionPatch":{"type":"object","additionalProperties":false,"required":["expected_version"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z][A-Za-z0-9_.:-]{0,119}$"},"schema":{"$ref":"#/components/schemas/EventSchema"},"expected_version":{"type":"integer","minimum":1}}},"EventDefinition":{"type":"object","required":["object","id","name","schema","version","automation_count","created_at","updated_at"],"properties":{"object":{"const":"event_definition"},"id":{"type":"string","pattern":"^evd_[a-f0-9]{24}$"},"name":{"type":"string"},"schema":{"$ref":"#/components/schemas/EventSchema"},"version":{"type":"integer","minimum":1},"automation_count":{"type":"integer","minimum":0},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"EventDefinitionListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"const":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventDefinition"}}}},"EventSendInput":{"type":"object","additionalProperties":false,"required":["event"],"oneOf":[{"required":["email"],"not":{"required":["contact_id"]}},{"required":["contact_id"],"not":{"required":["email"]}}],"properties":{"event":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email"},"contact_id":{"type":"string","pattern":"^con_[a-f0-9]{24}$"},"payload":{"type":"object","maxProperties":25,"additionalProperties":{"type":["string","number","boolean"]}}}},"EventSendResponse":{"type":"object","required":["object","id","event","contact_id","email","matched_automations","resumed_runs","idempotent_replay","created_at"],"properties":{"object":{"const":"event"},"id":{"type":"string","pattern":"^aev_[a-f0-9]{24}$"},"event":{"type":"string"},"contact_id":{"type":["string","null"]},"email":{"type":"string","format":"email"},"matched_automations":{"type":"integer","minimum":0,"description":"New Runs started by this event."},"resumed_runs":{"type":"integer","minimum":0,"description":"Existing Wait for Event Runs resumed by this event."},"idempotent_replay":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"AutomationConditionInput":{"type":"object","additionalProperties":false,"required":["field","operator","fallback_template_id"],"properties":{"field":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$","description":"A field declared by the selected Event schema."},"operator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","contains","starts_with","ends_with","exists","is_empty"]},"value":{"type":["string","number","boolean"],"description":"Required except for exists and is_empty. Its type must match the Event field."},"fallback_template_id":{"type":"string","pattern":"^tpl_[a-f0-9]{24}$","description":"The different template used when the condition is not met."}}},"AutomationWaitFilterInput":{"type":"object","additionalProperties":false,"required":["field","operator"],"properties":{"field":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$","description":"A field declared by the follow-up Event schema."},"operator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","contains","starts_with","ends_with","exists","is_empty"]},"value":{"type":["string","number","boolean"],"description":"Required except for exists and is_empty. Its type must match the follow-up Event field."}}},"AutomationWaitInput":{"type":"object","additionalProperties":false,"required":["event_id","timeout_seconds","timeout_template_id"],"properties":{"event_id":{"type":"string","pattern":"^evd_[a-f0-9]{24}$","description":"A different follow-up Event that resumes waiting Runs for the same normalized email address."},"timeout_seconds":{"type":"integer","minimum":60,"maximum":2592000,"description":"How long to wait before taking the timeout path."},"filter":{"oneOf":[{"$ref":"#/components/schemas/AutomationWaitFilterInput"},{"type":"null"}],"default":null,"description":"Optional typed filter evaluated against the follow-up Event payload."},"timeout_template_id":{"type":"string","pattern":"^tpl_[a-f0-9]{24}$","description":"A distinct template used when the timeout wins."}}},"AutomationInput":{"type":"object","additionalProperties":false,"required":["name","event_id","template_id","from"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"event_id":{"type":"string","pattern":"^evd_[a-f0-9]{24}$"},"template_id":{"type":"string","pattern":"^tpl_[a-f0-9]{24}$"},"from":{"type":"string","maxLength":377},"delay_seconds":{"oneOf":[{"const":0},{"type":"integer","minimum":60,"maximum":2592000}],"default":0,"description":"A durable wait before email creation. Use 0 for immediate delivery or 60 seconds through 30 days."},"condition":{"oneOf":[{"$ref":"#/components/schemas/AutomationConditionInput"},{"type":"null"}],"default":null,"description":"A single typed rule with condition-met and condition-not-met email paths."},"wait":{"oneOf":[{"$ref":"#/components/schemas/AutomationWaitInput"},{"type":"null"}],"default":null,"description":"Pause for a follow-up Event or a timeout. Mutually exclusive with condition and a nonzero delay. Both templates render from the original trigger payload; the follow-up payload is used only by filter."},"status":{"type":"string","enum":["disabled","enabled"],"default":"disabled"}}},"AutomationPatch":{"type":"object","additionalProperties":false,"required":["expected_version"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"event_id":{"type":"string","pattern":"^evd_[a-f0-9]{24}$"},"template_id":{"type":"string","pattern":"^tpl_[a-f0-9]{24}$"},"from":{"type":"string","maxLength":377},"delay_seconds":{"oneOf":[{"const":0},{"type":"integer","minimum":60,"maximum":2592000}],"description":"Changes only the timing of Runs created by future events."},"condition":{"oneOf":[{"$ref":"#/components/schemas/AutomationConditionInput"},{"type":"null"}],"description":"Replace the branch rule, or use null to return to one email path. Existing Runs keep their chosen branch."},"wait":{"oneOf":[{"$ref":"#/components/schemas/AutomationWaitInput"},{"type":"null"}],"description":"Replace Wait for Event, or use null to remove it. Existing Runs keep their snapshotted wait."},"status":{"type":"string","enum":["disabled","enabled"]},"expected_version":{"type":"integer","minimum":1}}},"AutomationCondition":{"type":"object","additionalProperties":false,"required":["field","field_type","operator","value","fallback_template"],"properties":{"field":{"type":"string"},"field_type":{"type":"string","enum":["string","number","boolean","date"]},"operator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","contains","starts_with","ends_with","exists","is_empty"]},"value":{"type":["string","number","boolean","null"]},"fallback_template":{"type":"object","additionalProperties":false,"required":["id","name","alias","version","variables"],"properties":{"id":{"type":"string","pattern":"^tpl_[a-f0-9]{24}$"},"name":{"type":"string"},"alias":{"type":"string"},"version":{"type":"integer","minimum":1},"variables":{"type":"array","items":{"type":"string"}}}}}},"AutomationWait":{"type":"object","additionalProperties":false,"required":["event","timeout_seconds","filter","timeout_template"],"properties":{"event":{"type":"object","additionalProperties":true},"timeout_seconds":{"type":"integer","minimum":60,"maximum":2592000},"filter":{"oneOf":[{"type":"object","additionalProperties":false,"required":["field","field_type","operator","value"],"properties":{"field":{"type":"string"},"field_type":{"type":"string","enum":["string","number","boolean","date"]},"operator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","contains","starts_with","ends_with","exists","is_empty"]},"value":{"type":["string","number","boolean","null"]}}},{"type":"null"}]},"timeout_template":{"type":"object","additionalProperties":true}}},"Automation":{"type":"object","required":["object","id","name","status","event","template","condition","wait","from","delay_seconds","version","run_counts","last_run_at","created_at","updated_at"],"properties":{"object":{"const":"automation"},"id":{"type":"string","pattern":"^aut_[a-f0-9]{24}$"},"name":{"type":"string"},"status":{"type":"string","enum":["disabled","enabled"]},"event":{"type":"object","additionalProperties":true},"template":{"type":"object","additionalProperties":true},"condition":{"oneOf":[{"$ref":"#/components/schemas/AutomationCondition"},{"type":"null"}]},"wait":{"oneOf":[{"$ref":"#/components/schemas/AutomationWait"},{"type":"null"}]},"from":{"type":"string"},"delay_seconds":{"type":"integer","minimum":0,"maximum":2592000},"version":{"type":"integer","minimum":1},"run_counts":{"type":"object","required":["total","completed","failed","active"],"properties":{"total":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"},"active":{"type":"integer"}}},"last_run_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"AutomationListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"const":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/Automation"}}}},"AutomationRun":{"type":"object","required":["object","id","automation_id","automation_name","event_id","event","email","branch","initial_delay_seconds","scheduled_for","template_id","template_version","wait","email_id","status","attempts","error","started_at","finished_at","created_at","updated_at"],"properties":{"object":{"const":"automation_run"},"id":{"type":"string","pattern":"^run_[a-f0-9]{24}$"},"automation_id":{"type":["string","null"]},"automation_name":{"type":"string"},"event_id":{"type":"string"},"event":{"type":"string"},"email":{"type":"string","format":"email"},"branch":{"type":"string","enum":["default","condition_met","condition_not_met","wait_pending","event_received","timeout"]},"initial_delay_seconds":{"type":"integer","minimum":0,"maximum":2592000},"scheduled_for":{"type":"string","format":"date-time"},"template_id":{"type":["string","null"]},"template_version":{"type":"integer"},"wait":{"oneOf":[{"type":"object","additionalProperties":false,"required":["event","expires_at","resume_event_id","timeout_template_id","timeout_template_version"],"properties":{"event":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"resume_event_id":{"type":["string","null"]},"timeout_template_id":{"type":["string","null"]},"timeout_template_version":{"type":"integer","minimum":1}}},{"type":"null"}]},"email_id":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","queued","processing","completed","failed","canceled"]},"attempts":{"type":"integer","minimum":0},"error":{"type":["object","null"],"additionalProperties":true},"started_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"AutomationRunListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"const":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/AutomationRun"}}}},"DeleteAutomationResourceResponse":{"type":"object","required":["object","id","deleted"],"properties":{"object":{"type":"string","enum":["event_definition","automation"]},"id":{"type":"string"},"deleted":{"const":true}}},"AnalyticsDailyPoint":{"type":"object","required":["day","requests","recipients","delivered","bounced","complained","failed","unknown","moving","canceled","engagement_eligible","unique_opened","unique_clicked","open_events","click_events"],"properties":{"day":{"type":"string","format":"date"},"requests":{"type":"integer","minimum":0},"recipients":{"type":"integer","minimum":0},"delivered":{"type":"integer","minimum":0},"bounced":{"type":"integer","minimum":0},"complained":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"unknown":{"type":"integer","minimum":0},"moving":{"type":"integer","minimum":0},"canceled":{"type":"integer","minimum":0},"engagement_eligible":{"type":"integer","minimum":0},"unique_opened":{"type":"integer","minimum":0},"unique_clicked":{"type":"integer","minimum":0},"open_events":{"type":"integer","minimum":0},"click_events":{"type":"integer","minimum":0}}},"AnalyticsSummary":{"type":"object","required":["requests","recipients","delivered","bounced","complained","failed","unknown","moving","canceled","engagement_eligible","unique_opened","unique_clicked","open_events","click_events","attention","terminal","delivery_rate","bounce_rate","complaint_rate","open_rate","click_rate"],"properties":{"requests":{"type":"integer","minimum":0},"recipients":{"type":"integer","minimum":0},"delivered":{"type":"integer","minimum":0},"bounced":{"type":"integer","minimum":0},"complained":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"unknown":{"type":"integer","minimum":0},"moving":{"type":"integer","minimum":0},"canceled":{"type":"integer","minimum":0},"engagement_eligible":{"type":"integer","minimum":0},"unique_opened":{"type":"integer","minimum":0},"unique_clicked":{"type":"integer","minimum":0},"open_events":{"type":"integer","minimum":0},"click_events":{"type":"integer","minimum":0},"attention":{"type":"integer","minimum":0},"terminal":{"type":"integer","minimum":0},"delivery_rate":{"type":["number","null"],"minimum":0,"maximum":100},"bounce_rate":{"type":["number","null"],"minimum":0,"maximum":100},"complaint_rate":{"type":["number","null"],"minimum":0,"maximum":100},"open_rate":{"type":["number","null"],"minimum":0},"click_rate":{"type":["number","null"],"minimum":0}}},"AnalyticsResponse":{"type":"object","required":["object","range","summary","previous","change","daily","top_domains","failure_reasons","top_tags"],"properties":{"object":{"const":"analytics"},"range":{"type":"object","required":["days","max_days","start_at","end_at","start_day","previous_start_day","timezone"],"properties":{"days":{"type":"integer","enum":[7,30,90]},"max_days":{"type":"integer","enum":[7,30,90]},"start_at":{"type":"string","format":"date-time"},"end_at":{"type":"string","format":"date-time"},"start_day":{"type":"string","format":"date"},"previous_start_day":{"type":"string","format":"date"},"timezone":{"const":"UTC"}}},"summary":{"$ref":"#/components/schemas/AnalyticsSummary"},"previous":{"$ref":"#/components/schemas/AnalyticsSummary"},"change":{"type":"object","required":["recipients_percent","requests_percent","delivery_rate_points","unique_opened_percent","unique_clicked_percent","open_rate_points","click_rate_points"],"properties":{"recipients_percent":{"type":["number","null"]},"requests_percent":{"type":["number","null"]},"delivery_rate_points":{"type":["number","null"]},"unique_opened_percent":{"type":["number","null"]},"unique_clicked_percent":{"type":["number","null"]},"open_rate_points":{"type":["number","null"]},"click_rate_points":{"type":["number","null"]}}},"daily":{"type":"array","minItems":7,"maxItems":90,"items":{"$ref":"#/components/schemas/AnalyticsDailyPoint"}},"top_domains":{"type":"array","maxItems":5,"items":{"type":"object","required":["domain","requests","recipients"],"properties":{"domain":{"type":"string","format":"hostname"},"requests":{"type":"integer","minimum":0},"recipients":{"type":"integer","minimum":0}}}},"failure_reasons":{"type":"array","maxItems":5,"items":{"type":"object","required":["code","count"],"properties":{"code":{"type":"string"},"count":{"type":"integer","minimum":0}}}},"top_tags":{"type":"array","maxItems":8,"items":{"type":"object","required":["name","value","requests","recipients"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"requests":{"type":"integer","minimum":0},"recipients":{"type":"integer","minimum":0}}}}}},"UsageQuotaWindow":{"type":"object","description":"A shared email-usage window. Each unique outbound To, CC, or BCC recipient and each inbound provider message consumes one unit.","required":["used","outbound_used","inbound_used","limit","included_limit","continuity_reserve","continuity_used","remaining","reset_at","period"],"properties":{"used":{"type":"integer","minimum":0},"outbound_used":{"type":"integer","minimum":0,"description":"Unique outbound To, CC, and BCC recipients charged in this window."},"inbound_used":{"type":"integer","minimum":0,"description":"Unique inbound provider messages charged in this window."},"limit":{"type":"integer","minimum":1},"included_limit":{"type":"integer","minimum":1},"continuity_reserve":{"type":"integer","minimum":0},"continuity_used":{"type":"integer","minimum":0},"remaining":{"type":"integer","minimum":0},"reset_at":{"type":"string","format":"date-time"},"period":{"type":"string","enum":["utc_day","calendar_month","billing_cycle"]}}},"UsageRateLimitWindow":{"type":"object","required":["dimension","used","limit","remaining","reset_at","reset_seconds","window_seconds"],"properties":{"dimension":{"type":"string","enum":["requests","recipients"]},"used":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1},"remaining":{"type":"integer","minimum":0},"reset_at":{"type":"string","format":"date-time"},"reset_seconds":{"type":"integer","minimum":1},"window_seconds":{"type":"integer","minimum":1}}},"UsageResponse":{"type":"object","required":["object","plan","sending_access","quota","rate_limits","automation_runs"],"properties":{"object":{"const":"usage"},"plan":{"type":"object","required":["id","name","monthly_email_limit","continuity_reserve","daily_email_limit","analytics_window_days","requests_per_second","recipients_per_minute","automation_run_monthly_limit","automation_active_run_limit"],"properties":{"id":{"type":"string","enum":["free","sprout","bloom"]},"name":{"type":"string"},"monthly_email_limit":{"type":"integer","minimum":1},"continuity_reserve":{"type":"integer","minimum":0},"daily_email_limit":{"type":["integer","null"],"minimum":1},"analytics_window_days":{"type":"integer","enum":[7,30,90]},"requests_per_second":{"type":"integer","minimum":1},"recipients_per_minute":{"type":"integer","minimum":1},"automation_run_monthly_limit":{"type":"integer","minimum":1},"automation_active_run_limit":{"type":"integer","minimum":1}}},"sending_access":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["sandbox","review_pending","active","suspended"]}}},"quota":{"type":"object","required":["day","month","daily","monthly"],"properties":{"day":{"type":"string","format":"date"},"month":{"type":"string"},"daily":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UsageQuotaWindow"}]},"monthly":{"$ref":"#/components/schemas/UsageQuotaWindow"}}},"rate_limits":{"type":"object","required":["requests","recipients","rejected_recent","last_rejected_at","recent_window_seconds"],"properties":{"requests":{"$ref":"#/components/schemas/UsageRateLimitWindow"},"recipients":{"$ref":"#/components/schemas/UsageRateLimitWindow"},"rejected_recent":{"type":"integer","minimum":0},"last_rejected_at":{"type":["string","null"],"format":"date-time"},"recent_window_seconds":{"type":"integer","minimum":1}}},"automation_runs":{"type":"object","required":["period","monthly","active"],"properties":{"period":{"type":"string"},"monthly":{"type":"object","required":["used","limit","remaining","reset_at","period"],"properties":{"used":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1},"remaining":{"type":"integer","minimum":0},"reset_at":{"type":"string","format":"date-time"},"period":{"type":"string","enum":["calendar_month","billing_cycle"]}}},"active":{"type":"object","required":["used","limit","remaining"],"properties":{"used":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1},"remaining":{"type":"integer","minimum":0}}}}}}},"ApiLog":{"type":"object","required":["object","id","api_key","method","route","status_code","error_code","resource_id","duration_ms","occurred_at"],"properties":{"object":{"const":"api_log"},"id":{"type":"string","pattern":"^req_[a-f0-9]{24}$"},"api_key":{"type":"object","required":["name","prefix"],"properties":{"name":{"type":"string"},"prefix":{"type":"string"}}},"method":{"type":"string","enum":["GET","POST","PATCH","DELETE"]},"route":{"type":"string"},"status_code":{"type":"integer","minimum":100,"maximum":599},"error_code":{"type":["string","null"]},"resource_id":{"type":["string","null"]},"duration_ms":{"type":"integer","minimum":0},"occurred_at":{"type":"string","format":"date-time"}}},"ApiLogListResponse":{"type":"object","required":["object","has_more","next_cursor","summary","data"],"properties":{"object":{"const":"list"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"pattern":"^req_[a-f0-9]{24}$"},"summary":{"type":"object","required":["window_hours","requests","errors","success_rate","average_duration_ms","last_error_at"],"properties":{"window_hours":{"const":24},"requests":{"type":"integer","minimum":0},"errors":{"type":"integer","minimum":0},"success_rate":{"type":"number","minimum":0,"maximum":100},"average_duration_ms":{"type":"number","minimum":0},"last_error_at":{"type":["string","null"],"format":"date-time"}}},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiLog"}}}},"ErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","examples":["invalid_request"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}},"ContactPropertyValue":{"type":["string","number","boolean","null"]},"ContactTopicPreferenceInput":{"type":"object","required":["id","subscription"],"properties":{"id":{"type":"string","pattern":"^top_[a-f0-9]{24}$"},"subscription":{"type":"string","enum":["opt_in","opt_out"]}}},"ContactInput":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":254},"first_name":{"type":["string","null"],"maxLength":100},"last_name":{"type":["string","null"],"maxLength":100},"properties":{"type":"object","maxProperties":25,"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"$ref":"#/components/schemas/ContactPropertyValue"}},"unsubscribed":{"type":"boolean","default":false},"segments":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"string","pattern":"^seg_[a-f0-9]{24}$"}},"topics":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/ContactTopicPreferenceInput"}}}},"ContactPatch":{"type":"object","minProperties":1,"properties":{"email":{"type":"string","format":"email","maxLength":254},"first_name":{"type":["string","null"],"maxLength":100},"last_name":{"type":["string","null"],"maxLength":100},"properties":{"type":"object","maxProperties":25,"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"$ref":"#/components/schemas/ContactPropertyValue"}},"unsubscribed":{"type":"boolean"},"segments":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"string","pattern":"^seg_[a-f0-9]{24}$"}},"topics":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/ContactTopicPreferenceInput"}},"expected_updated_at":{"type":"integer","description":"Optional stale-write guard in Unix milliseconds."}}},"Contact":{"type":"object","required":["object","id","email","first_name","last_name","properties","unsubscribed","subscription_source","subscription_updated_at","segments","topics","created_at","updated_at"],"properties":{"object":{"const":"contact"},"id":{"type":"string","pattern":"^con_[a-f0-9]{24}$"},"email":{"type":"string","format":"email"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ContactPropertyValue"}},"unsubscribed":{"type":"boolean","description":"Global marketing unsubscribe. When true it overrides every topic opt-in."},"subscription_source":{"type":"string","enum":["dashboard","api","import","unsubscribe"]},"subscription_updated_at":{"type":"string","format":"date-time"},"segments":{"type":"array","items":{"type":"string","pattern":"^seg_[a-f0-9]{24}$"}},"topics":{"type":"array","items":{"type":"object","required":["id","subscription","source","updated_at"],"properties":{"id":{"type":"string","pattern":"^top_[a-f0-9]{24}$"},"subscription":{"type":"string","enum":["opt_in","opt_out"]},"source":{"type":"string","enum":["dashboard","api","import","unsubscribe"]},"updated_at":{"type":"string","format":"date-time"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ContactListResponse":{"type":"object","required":["object","has_more","next_cursor","data"],"properties":{"object":{"const":"list"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}}}},"SegmentInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":["string","null"],"maxLength":500}}},"SegmentPatch":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":["string","null"],"maxLength":500},"expected_updated_at":{"type":"integer"}}},"Segment":{"type":"object","required":["object","id","name","description","contact_count","created_at","updated_at"],"properties":{"object":{"const":"segment"},"id":{"type":"string","pattern":"^seg_[a-f0-9]{24}$"},"name":{"type":"string"},"description":{"type":["string","null"]},"contact_count":{"type":"integer","minimum":0},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"SegmentListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"const":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/Segment"}}}},"TopicInput":{"type":"object","required":["name","default_subscription"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":["string","null"],"maxLength":500},"default_subscription":{"type":"string","enum":["opt_in","opt_out"],"description":"Permanent after creation."},"visibility":{"type":"string","enum":["public","private"],"default":"public"}}},"TopicPatch":{"type":"object","required":["name","visibility"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":["string","null"],"maxLength":500},"visibility":{"type":"string","enum":["public","private"]},"expected_updated_at":{"type":"integer"}}},"Topic":{"type":"object","required":["object","id","name","description","default_subscription","visibility","subscribed_count","created_at","updated_at"],"properties":{"object":{"const":"topic"},"id":{"type":"string","pattern":"^top_[a-f0-9]{24}$"},"name":{"type":"string"},"description":{"type":["string","null"]},"default_subscription":{"type":"string","enum":["opt_in","opt_out"]},"visibility":{"type":"string","enum":["public","private"]},"subscribed_count":{"type":"integer","minimum":0},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"TopicListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"const":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/Topic"}}}},"BroadcastInput":{"type":"object","required":["name","segment_id","topic_id","from","subject"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"segment_id":{"type":"string","pattern":"^seg_[a-f0-9]{24}$"},"topic_id":{"type":"string","pattern":"^top_[a-f0-9]{24}$"},"from":{"type":"string","maxLength":377},"reply_to":{"$ref":"#/components/schemas/OptionalAddressOrAddresses"},"subject":{"type":"string","minLength":1,"maxLength":998},"content_mode":{"type":"string","enum":["html","markdown"]},"markdown":{"type":"string","minLength":1,"maxLength":250000},"html":{"type":"string","minLength":1,"maxLength":900000},"text":{"type":"string","minLength":1,"maxLength":900000}},"anyOf":[{"required":["html"]},{"required":["text"]},{"required":["markdown"]}]},"BroadcastPatch":{"type":"object","minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"segment_id":{"type":"string","pattern":"^seg_[a-f0-9]{24}$"},"topic_id":{"type":"string","pattern":"^top_[a-f0-9]{24}$"},"from":{"type":"string","maxLength":377},"reply_to":{"$ref":"#/components/schemas/OptionalAddressOrAddresses"},"subject":{"type":"string","minLength":1,"maxLength":998},"content_mode":{"type":"string","enum":["html","markdown"]},"markdown":{"type":"string","minLength":1,"maxLength":250000},"html":{"type":["string","null"],"maxLength":900000},"text":{"type":["string","null"],"maxLength":900000},"expected_updated_at":{"type":"integer","minimum":1}}},"BroadcastSendInput":{"type":"object","properties":{"scheduled_at":{"type":"string","maxLength":100,"description":"A timezone-qualified ISO 8601 timestamp or relative phrase from one minute to 30 days ahead."}}},"BroadcastStatus":{"type":"string","enum":["draft","scheduled","queued","sending","sent","canceled","failed"]},"Broadcast":{"type":"object","required":["object","id","name","segment_id","segment_name","topic_id","topic_name","from","reply_to","subject","content_mode","markdown","html","text","status","recipient_count","counts","scheduled_at","started_at","completed_at","cancel_requested_at","error","created_at","updated_at"],"properties":{"object":{"const":"broadcast"},"id":{"type":"string","pattern":"^brd_[a-f0-9]{24}$"},"name":{"type":"string"},"segment_id":{"type":["string","null"]},"segment_name":{"type":"string"},"topic_id":{"type":["string","null"]},"topic_name":{"type":"string"},"from":{"type":"string"},"reply_to":{"type":"array","items":{"type":"string","format":"email"}},"subject":{"type":"string"},"content_mode":{"type":"string","enum":["html","markdown"]},"markdown":{"type":["string","null"]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/BroadcastStatus"},"recipient_count":{"type":"integer","minimum":0},"counts":{"type":"object","required":["pending","sent","delivered","failed","canceled","bounced","complained","opened","clicked","unsubscribed"],"properties":{"pending":{"type":"integer","minimum":0},"sent":{"type":"integer","minimum":0},"delivered":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0,"description":"Recipients that failed, bounced, or complained."},"canceled":{"type":"integer","minimum":0},"bounced":{"type":"integer","minimum":0},"complained":{"type":"integer","minimum":0},"opened":{"type":"integer","minimum":0,"description":"Unique Broadcast recipients with at least one open event."},"clicked":{"type":"integer","minimum":0,"description":"Unique Broadcast recipients with at least one click event."},"unsubscribed":{"type":"integer","minimum":0,"description":"Unique contacts that globally unsubscribed or opted out of this Broadcast topic through this Broadcast's signed preference link."}}},"scheduled_at":{"type":["string","null"],"format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"cancel_requested_at":{"type":["string","null"],"format":"date-time"},"error":{"oneOf":[{"type":"null"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":["string","null"]}}}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"BroadcastListResponse":{"type":"object","required":["object","has_more","next_cursor","data"],"properties":{"object":{"const":"list"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Broadcast"}}}},"DeleteAudienceResourceResponse":{"type":"object","required":["object","id","deleted"],"properties":{"object":{"type":"string","enum":["contact","segment","topic","broadcast"]},"id":{"type":"string"},"deleted":{"const":true}}},"EmailStatus":{"type":"string","enum":["queued","scheduled","sent","delivered","bounced","complained","failed","canceled","unknown"]},"AddressOrAddresses":{"oneOf":[{"type":"string","format":"email"},{"type":"array","minItems":1,"maxItems":50,"items":{"type":"string","format":"email"}}]},"OptionalAddressOrAddresses":{"oneOf":[{"type":"string","format":"email"},{"type":"array","maxItems":50,"items":{"type":"string","format":"email"}}]},"EmailTag":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,256}$"},"value":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,256}$"}}},"ApiKeyCreateInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"permission":{"type":"string","enum":["sending_access","full_access"],"default":"sending_access"},"domain_id":{"type":["string","null"],"pattern":"^dom_[a-f0-9]{24}$","description":"Optional sending-domain scope. Domain-scoped keys cannot access workspace-wide resources."}}},"ApiKeyUpdateInput":{"type":"object","additionalProperties":false,"required":["expected_updated_at"],"anyOf":[{"required":["name"]},{"required":["permission"]},{"required":["domain_id"]}],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"permission":{"type":"string","enum":["sending_access","full_access"]},"domain_id":{"type":["string","null"],"pattern":"^dom_[a-f0-9]{24}$","description":"Set null to remove the domain restriction."},"expected_updated_at":{"type":"string","format":"date-time","description":"The exact updated_at from the latest API key response."}}},"ApiKey":{"type":"object","required":["object","id","name","prefix","permission","domain","last_used_at","updated_at","created_at"],"properties":{"object":{"const":"api_key"},"id":{"type":"string","pattern":"^key_[a-f0-9]{24}$"},"name":{"type":"string","minLength":1,"maxLength":80},"prefix":{"type":"string","description":"A display-only fingerprint. It cannot authenticate a request."},"permission":{"type":"string","enum":["sending_access","full_access"]},"domain":{"oneOf":[{"type":"null"},{"type":"object","required":["id"],"properties":{"id":{"type":"string","pattern":"^dom_[a-f0-9]{24}$"},"name":{"type":["string","null"],"format":"hostname"}}}]},"last_used_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"ApiKeyCreated":{"allOf":[{"$ref":"#/components/schemas/ApiKey"},{"type":"object","required":["key"],"properties":{"key":{"type":"string","pattern":"^fw_live_","description":"Returned exactly once. Store it in a server-side secret manager."}}}]},"ApiKeyListResponse":{"type":"object","required":["object","has_more","next_cursor","data"],"properties":{"object":{"const":"list"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"pattern":"^key_[a-f0-9]{24}$"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}},"DeleteApiKeyResponse":{"type":"object","required":["object","id","deleted"],"properties":{"object":{"const":"api_key"},"id":{"type":"string","pattern":"^key_[a-f0-9]{24}$"},"deleted":{"const":true}}},"DomainCreateInput":{"type":"object","required":["name","region"],"properties":{"name":{"type":"string","format":"hostname","maxLength":253,"examples":["mail.paperkite.co"]},"region":{"type":"string","enum":["us-east-1","eu-west-1","sa-east-1","ap-northeast-1"],"description":"The immutable provider sending region selected before DNS setup."},"receiving_enabled":{"type":"boolean","default":false},"custom_return_path":{"type":"string","default":"send","maxLength":63,"pattern":"^[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$","description":"Immutable DNS label used for SPF alignment and bounce routing. Choose it before provider DNS is created, and keep it different from tracking_subdomain."},"open_tracking":{"type":"boolean","default":false},"click_tracking":{"type":"boolean","default":false},"tracking_subdomain":{"type":["string","null"],"pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$","description":"Required when open or click tracking is enabled."}}},"DomainTrackingInput":{"type":"object","required":["open_tracking","click_tracking"],"properties":{"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"tracking_subdomain":{"type":["string","null"],"pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$","description":"Required while either metric is enabled. Disabling both preserves the existing provider hostname."}}},"DomainReceivingInput":{"type":"object","required":["receiving_enabled"],"properties":{"receiving_enabled":{"type":"boolean","description":"Whether the provider should accept inbound mail for this domain."}}},"SendingControlInput":{"type":"object","additionalProperties":false,"required":["paused","expected_updated_at"],"properties":{"paused":{"type":"boolean"},"expected_updated_at":{"type":["string","null"],"format":"date-time","description":"The exact updated_at from the latest response, or null before the first change."}}},"SendingControl":{"type":"object","additionalProperties":false,"required":["object","paused","paused_at","updated_at","operator_status"],"properties":{"object":{"const":"sending_control"},"paused":{"type":"boolean"},"paused_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"operator_status":{"type":"string","enum":["sandbox","review_pending","active","suspended"]}}},"DomainDnsRecord":{"type":"object","required":["record","type","name","value","status"],"properties":{"record":{"type":["string","null"]},"type":{"type":"string","enum":["TXT","MX","CNAME"]},"name":{"type":"string"},"value":{"type":"string"},"status":{"type":"string"},"priority":{"type":["integer","null"]},"ttl":{"type":["string","null"]}}},"Domain":{"type":"object","required":["object","id","name","status","region","receiving_enabled","custom_return_path","return_path_hostname","tracking","dmarc","ownership_verified","ownership_verified_at","verification_record","provider","provider_claim","dns_records","last_checked_at","created_at"],"properties":{"object":{"const":"domain"},"id":{"type":"string","pattern":"^dom_[a-f0-9]{24}$"},"name":{"type":"string","format":"hostname"},"status":{"type":"string","enum":["pending","configuring","verified","failed","disabled"]},"region":{"type":"string","enum":["us-east-1","eu-west-1","sa-east-1","ap-northeast-1"]},"receiving_enabled":{"type":"boolean"},"custom_return_path":{"type":"string","maxLength":63},"return_path_hostname":{"type":"string","format":"hostname","maxLength":253},"tracking":{"type":"object","required":["open_enabled","click_enabled","subdomain","hostname","status","verified"],"properties":{"open_enabled":{"type":"boolean"},"click_enabled":{"type":"boolean"},"subdomain":{"type":["string","null"]},"hostname":{"type":["string","null"]},"status":{"type":"string","enum":["disabled","setup_required","pending","failed","active"]},"verified":{"type":"boolean"}}},"dmarc":{"type":"object","required":["status","policy","percentage","record","source","inherited","checked_at","error","suggested_record"],"properties":{"status":{"type":"string","enum":["unchecked","missing","invalid","monitoring","partial","enforced","unavailable"]},"policy":{"type":["string","null"],"enum":["none","quarantine","reject",null]},"percentage":{"type":["integer","null"],"minimum":0,"maximum":100},"record":{"oneOf":[{"type":"null"},{"type":"object","required":["type","name","value"],"properties":{"type":{"const":"TXT"},"name":{"type":"string","maxLength":260},"value":{"type":"string","maxLength":2048}}}]},"source":{"type":["string","null"],"enum":["sending_domain","organizational_domain",null]},"inherited":{"type":"boolean"},"checked_at":{"type":["string","null"],"format":"date-time"},"error":{"type":["string","null"],"maxLength":300},"suggested_record":{"type":"object","required":["type","name","value"],"properties":{"type":{"const":"TXT"},"name":{"type":"string","maxLength":260},"value":{"const":"v=DMARC1; p=none;"}}}},"description":"The latest bounded public-DNS observation. Missing or invalid DMARC never unlocks or locks sending; it is deliverability guidance."},"ownership_verified":{"type":"boolean"},"ownership_verified_at":{"type":["string","null"],"format":"date-time"},"verification_record":{"type":"object","required":["type","name","value"],"properties":{"type":{"const":"TXT"},"name":{"type":"string"},"value":{"type":"string"}}},"provider":{"type":"object","required":["configured","supported","status","error","checked_at"],"properties":{"configured":{"type":"boolean"},"supported":{"type":"boolean"},"status":{"type":["string","null"]},"error":{"type":["string","null"]},"checked_at":{"type":["string","null"],"format":"date-time"}}},"provider_claim":{"oneOf":[{"type":"null"},{"type":"object","required":["status","record","requested_at","dns_verified_at","completed_at","updated_at"],"properties":{"status":{"type":"string","enum":["pending_operator","waiting_for_dns","dns_verified","completed"]},"record":{"oneOf":[{"type":"null"},{"type":"object","required":["type","name","value"],"properties":{"type":{"const":"TXT"},"name":{"type":"string","maxLength":253},"value":{"type":"string","maxLength":1024}}}]},"requested_at":{"type":["string","null"],"format":"date-time"},"dns_verified_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}}],"description":"Manual Resend account-transfer coordination when a verified domain is already registered elsewhere."},"dns_records":{"type":"array","items":{"$ref":"#/components/schemas/DomainDnsRecord"}},"last_checked_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"DomainListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"const":false},"data":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/Domain"}}}},"DeleteDomainResponse":{"type":"object","required":["object","id","deleted"],"properties":{"object":{"const":"domain"},"id":{"type":"string","pattern":"^dom_[a-f0-9]{24}$"},"deleted":{"const":true}}},"DomainVerificationResponse":{"type":"object","required":["object","outcome","message","verified","domain"],"properties":{"object":{"const":"domain_verification"},"outcome":{"type":"string","enum":["ownership_pending","provider_setup_required","provider_claim_pending_operator","provider_claim_dns_pending","provider_claim_dns_verified","provider_claim_retry_required","provider_created","provider_verification_started","verified","rechecked"]},"message":{"type":"string"},"verified":{"type":"boolean"},"domain":{"$ref":"#/components/schemas/Domain"}}},"SuppressionCreateInput":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":254}}},"Suppression":{"type":"object","required":["object","id","email","reason","source_email_id","created_at","updated_at"],"properties":{"object":{"const":"suppression"},"id":{"type":"string","pattern":"^sup_[a-f0-9]{24}$"},"email":{"type":"string","format":"email"},"reason":{"type":"string","enum":["bounced","complained","suppressed","manual"]},"source_email_id":{"type":["string","null"],"pattern":"^em_[a-f0-9]{24}$"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"SuppressionMutationResponse":{"allOf":[{"$ref":"#/components/schemas/Suppression"},{"type":"object","required":["changed"],"properties":{"changed":{"type":"boolean"}}}]},"SuppressionListResponse":{"type":"object","required":["object","has_more","next_cursor","data"],"properties":{"object":{"const":"list"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"pattern":"^sup_[a-f0-9]{24}$"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Suppression"}}}},"DeleteSuppressionResponse":{"type":"object","required":["object","id","deleted"],"properties":{"object":{"const":"suppression"},"id":{"type":"string","pattern":"^sup_[a-f0-9]{24}$"},"deleted":{"const":true}}},"WebhookCreateInput":{"type":"object","required":["endpoint","events"],"properties":{"endpoint":{"type":"string","format":"uri","maxLength":2048},"events":{"type":"array","minItems":1,"maxItems":15,"uniqueItems":true,"items":{"type":"string","enum":["*","email.queued","email.scheduled","email.rescheduled","email.canceled","email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.failed","email.delivery_unknown","email.suppressed","email.received"]},"description":"Use * alone for every supported customer event."}}},"WebhookVersionInput":{"type":"object","required":["expected_updated_at"],"properties":{"expected_updated_at":{"type":"string","format":"date-time","description":"The exact updated_at timestamp last fetched by this caller."}}},"WebhookPatch":{"type":"object","required":["expected_updated_at"],"properties":{"endpoint":{"type":"string","format":"uri","maxLength":2048},"events":{"type":"array","minItems":1,"maxItems":15,"uniqueItems":true,"items":{"type":"string","enum":["*","email.queued","email.scheduled","email.rescheduled","email.canceled","email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.failed","email.delivery_unknown","email.suppressed","email.received"]}},"status":{"type":"string","enum":["enabled","disabled"]},"expected_updated_at":{"type":"string","format":"date-time"}},"anyOf":[{"required":["endpoint"]},{"required":["events"]},{"required":["status"]}]},"Webhook":{"type":"object","required":["object","id","endpoint","events","status","health_status","health_error","health_changed_at","pending_secret_created_at","previous_secret_expires_at","created_at","updated_at"],"properties":{"object":{"const":"webhook"},"id":{"type":"string","pattern":"^wh_[a-f0-9]{24}$"},"endpoint":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["*","email.queued","email.scheduled","email.rescheduled","email.canceled","email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.failed","email.delivery_unknown","email.suppressed","email.received"]}},"status":{"type":"string","enum":["enabled","disabled"]},"health_status":{"type":"string","enum":["healthy","degraded"]},"health_error":{"type":["string","null"]},"health_changed_at":{"type":["string","null"],"format":"date-time"},"pending_secret_created_at":{"type":["string","null"],"format":"date-time"},"previous_secret_expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"WebhookWithSecret":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["signing_secret"],"properties":{"signing_secret":{"type":"string","pattern":"^whsec_","description":"Returned once. Store it before discarding this response."}}}]},"WebhookMutationResponse":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["retries_canceled"],"properties":{"retries_canceled":{"type":"boolean"}}}]},"WebhookRotationCanceled":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["rotation_canceled"],"properties":{"rotation_canceled":{"const":true}}}]},"WebhookListResponse":{"type":"object","required":["object","has_more","next_cursor","data"],"properties":{"object":{"const":"list"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"pattern":"^wh_[a-f0-9]{24}$"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}},"WebhookDelivery":{"type":"object","required":["object","id","webhook_id","event_id","event_type","email_id","status","response_code","duration_ms","attempt","error_message","created_at"],"properties":{"object":{"const":"webhook_delivery"},"id":{"type":"string","pattern":"^whd_[a-f0-9]{24}$"},"webhook_id":{"type":"string","pattern":"^wh_[a-f0-9]{24}$"},"event_id":{"type":"string","pattern":"^evt_[a-f0-9]{24}$"},"event_type":{"type":"string","enum":["email.queued","email.scheduled","email.rescheduled","email.canceled","email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.failed","email.delivery_unknown","email.suppressed","email.received"]},"email_id":{"type":"string","pattern":"^(?:em|rx)_[a-f0-9]{24}$"},"status":{"type":"string","enum":["succeeded","failed"]},"response_code":{"type":["integer","null"],"minimum":100,"maximum":599},"duration_ms":{"type":"integer","minimum":0},"attempt":{"type":"integer","minimum":1,"maximum":20},"error_message":{"type":["string","null"],"maxLength":500},"created_at":{"type":"string","format":"date-time"}}},"WebhookDeliveryListResponse":{"type":"object","required":["object","has_more","next_cursor","data"],"properties":{"object":{"const":"list"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"pattern":"^whd_[a-f0-9]{24}$"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"WebhookTest":{"type":"object","required":["object","webhook_id","event_id","event_type","email_id","status","response_code","duration_ms","error_message","pending_signature_included","previous_signature_included","created_at"],"properties":{"object":{"const":"webhook_test"},"webhook_id":{"type":"string","pattern":"^wh_[a-f0-9]{24}$"},"event_id":{"type":"string","pattern":"^evt_[a-f0-9]{24}$"},"event_type":{"type":"string","enum":["email.queued","email.scheduled","email.rescheduled","email.canceled","email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.failed","email.delivery_unknown","email.suppressed","email.received"]},"email_id":{"type":"string","pattern":"^em_[a-f0-9]{24}$"},"status":{"type":"string","enum":["succeeded","failed"]},"response_code":{"type":["integer","null"],"minimum":100,"maximum":599},"duration_ms":{"type":"integer","minimum":0},"error_message":{"type":["string","null"],"maxLength":500},"pending_signature_included":{"type":"boolean"},"previous_signature_included":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"DeleteWebhookResponse":{"type":"object","required":["object","id","deleted"],"properties":{"object":{"const":"webhook"},"id":{"type":"string","pattern":"^wh_[a-f0-9]{24}$"},"deleted":{"const":true}}},"TemplateInput":{"type":"object","required":["name","alias","subject"],"description":"Provide at least one non-empty HTML or plain-text body. Forward derives the sorted variable list from simple {{name}} tokens.","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"alias":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","maxLength":64,"description":"A stable workspace-unique reference for template sends."},"subject":{"type":"string","minLength":1,"maxLength":998},"html":{"type":["string","null"],"maxLength":900000},"text":{"type":["string","null"],"maxLength":900000}},"anyOf":[{"required":["html"]},{"required":["text"]}]},"TemplatePatch":{"allOf":[{"$ref":"#/components/schemas/TemplateInput"},{"type":"object","required":["expected_version"],"properties":{"expected_version":{"type":"integer","minimum":1,"description":"The current template version last fetched by this caller."}}}]},"Template":{"type":"object","required":["object","id","name","alias","subject","html","text","variables","version","created_at","updated_at"],"properties":{"object":{"const":"template"},"id":{"type":"string","pattern":"^tpl_[a-f0-9]{24}$"},"name":{"type":"string"},"alias":{"type":"string"},"subject":{"type":"string"},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"variables":{"type":"array","maxItems":25,"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"version":{"type":"integer","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"TemplateListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"const":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}}},"DeleteTemplateResponse":{"type":"object","required":["object","id","deleted"],"properties":{"object":{"const":"template"},"id":{"type":"string","pattern":"^tpl_[a-f0-9]{24}$"},"deleted":{"const":true}}},"TemplateReference":{"type":"object","description":"Reference exactly one workspace template by id or alias and provide every declared variable.","properties":{"id":{"type":"string","pattern":"^tpl_[a-f0-9]{24}$"},"alias":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","maxLength":64},"variables":{"type":"object","additionalProperties":{"type":["string","number","boolean"]}}},"oneOf":[{"required":["id"]},{"required":["alias"]}]},"AttachmentInput":{"type":"object","required":["filename","content"],"properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"content":{"type":"string","format":"byte","description":"Canonical Base64 content."},"content_type":{"type":"string","maxLength":127,"default":"application/octet-stream"},"content_id":{"type":["string","null"],"maxLength":127}}},"EmailRequest":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","maxLength":377,"description":"A sender address or a display name followed by an address in angle brackets.","examples":["Mia <hello@paperkite.co>"]},"to":{"$ref":"#/components/schemas/AddressOrAddresses"},"cc":{"$ref":"#/components/schemas/OptionalAddressOrAddresses"},"bcc":{"$ref":"#/components/schemas/OptionalAddressOrAddresses"},"reply_to":{"$ref":"#/components/schemas/OptionalAddressOrAddresses"},"subject":{"type":"string","minLength":1,"maxLength":998,"description":"Required for direct content and omitted when template is present.","examples":["Your order is ready ✨"]},"html":{"type":"string","minLength":1,"maxLength":900000,"description":"HTML body. Provide html, text, or both for a direct-content send."},"text":{"type":"string","minLength":1,"maxLength":900000,"description":"Plain-text body. Provide html, text, or both for a direct-content send."},"template":{"$ref":"#/components/schemas/TemplateReference"},"headers":{"type":"object","maxProperties":30,"additionalProperties":{"type":"string","maxLength":1000},"description":"Safe custom headers. Envelope, MIME, authentication, x-forward-*, and x-resend-* names are reserved."},"tags":{"type":"array","maxItems":74,"items":{"$ref":"#/components/schemas/EmailTag"},"description":"Up to 74 customer tags. Forward reserves a separate provider-correlation tag."},"attachments":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/AttachmentInput"},"description":"Canonical Base64 files. The encoded message is limited to 40 MB in total."},"scheduled_at":{"type":"string","maxLength":100,"description":"A timezone-qualified ISO 8601 timestamp or a phrase such as 'in 15 minutes', from one minute to 30 days ahead.","examples":["2026-07-15T10:30:00.000Z","in 15 minutes"]}},"oneOf":[{"not":{"required":["template"]},"anyOf":[{"required":["subject","html"]},{"required":["subject","text"]}]},{"required":["template"],"not":{"anyOf":[{"required":["subject"]},{"required":["html"]},{"required":["text"]}]}}]},"BatchEmailRequestItem":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","maxLength":377,"description":"A sender address or a display name followed by an address in angle brackets.","examples":["Mia <hello@paperkite.co>"]},"to":{"$ref":"#/components/schemas/AddressOrAddresses"},"cc":{"$ref":"#/components/schemas/OptionalAddressOrAddresses"},"bcc":{"$ref":"#/components/schemas/OptionalAddressOrAddresses"},"reply_to":{"$ref":"#/components/schemas/OptionalAddressOrAddresses"},"subject":{"type":"string","minLength":1,"maxLength":998,"description":"Required for direct content and omitted when template is present.","examples":["Your order is ready ✨"]},"html":{"type":"string","minLength":1,"maxLength":900000,"description":"HTML body. Provide html, text, or both for a direct-content send."},"text":{"type":"string","minLength":1,"maxLength":900000,"description":"Plain-text body. Provide html, text, or both for a direct-content send."},"template":{"$ref":"#/components/schemas/TemplateReference"},"headers":{"type":"object","maxProperties":30,"additionalProperties":{"type":"string","maxLength":1000},"description":"Safe custom headers. Envelope, MIME, authentication, x-forward-*, and x-resend-* names are reserved."},"tags":{"type":"array","maxItems":74,"items":{"$ref":"#/components/schemas/EmailTag"},"description":"Up to 74 customer tags. Forward reserves a separate provider-correlation tag."}},"oneOf":[{"not":{"required":["template"]},"anyOf":[{"required":["subject","html"]},{"required":["subject","text"]}]},{"required":["template"],"not":{"anyOf":[{"required":["subject"]},{"required":["html"]},{"required":["text"]}]}}]},"BatchEmailRequest":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/BatchEmailRequestItem"}},"SendEmailResponse":{"type":"object","required":["id","status","provider_message_id","test_mode","scheduled_at","idempotent_replay"],"properties":{"id":{"type":"string","pattern":"^em_[a-f0-9]{24}$"},"status":{"$ref":"#/components/schemas/EmailStatus"},"provider_message_id":{"type":["string","null"],"description":"The delivery-provider message ID, or null when test_mode is true or provider acceptance is still pending."},"test_mode":{"type":"boolean","description":"True when Forward simulated this outcome without contacting the delivery provider or consuming sending quota."},"scheduled_at":{"type":["string","null"],"format":"date-time"},"idempotent_replay":{"type":"boolean"}}},"EmailListItem":{"type":"object","required":["id","to","from","created_at","subject","bcc","cc","reply_to","last_event","tags","provider_message_id","message_id","test_mode","batch_id","batch_index","scheduled_at","content_redacted_at"],"properties":{"id":{"type":"string"},"to":{"type":"array","items":{"type":"string","format":"email"}},"from":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"subject":{"type":"string"},"bcc":{"type":"array","items":{"type":"string","format":"email"}},"cc":{"type":"array","items":{"type":"string","format":"email"}},"reply_to":{"type":"array","items":{"type":"string","format":"email"}},"last_event":{"$ref":"#/components/schemas/EmailStatus"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/EmailTag"}},"provider_message_id":{"type":["string","null"]},"message_id":{"type":["string","null"],"maxLength":998,"description":"The RFC Message-ID reported by the delivery provider, or null before it is known or after content retention expires."},"test_mode":{"type":"boolean"},"batch_id":{"type":["string","null"]},"batch_index":{"type":["integer","null"]},"scheduled_at":{"type":["string","null"],"format":"date-time"},"content_redacted_at":{"type":["string","null"],"format":"date-time"}}},"EmailListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailListItem"}}}},"EmailRecipient":{"type":"object","required":["id","email","kind","position","status","lastEventType","lastEventAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"kind":{"type":"string","enum":["to","cc","bcc"]},"position":{"type":"integer","minimum":0},"status":{"$ref":"#/components/schemas/EmailStatus"},"lastEventType":{"type":["string","null"]},"lastEventAt":{"type":["integer","null"],"description":"Unix time in milliseconds."},"createdAt":{"type":"integer","description":"Unix time in milliseconds."},"updatedAt":{"type":"integer","description":"Unix time in milliseconds."}}},"AttachmentMetadata":{"type":"object","required":["id","filename","contentType","contentId","contentDisposition","size","createdAt"],"properties":{"id":{"type":"string"},"filename":{"type":"string"},"contentType":{"type":"string"},"contentId":{"type":["string","null"]},"contentDisposition":{"type":"string","enum":["attachment","inline"]},"size":{"type":"integer","minimum":0},"createdAt":{"type":"integer","description":"Unix time in milliseconds."}}},"EmailEvent":{"type":"object","required":["id","type","payload","occurredAt"],"properties":{"id":{"type":"string"},"type":{"type":"string"},"payload":{"type":"object","additionalProperties":true},"occurredAt":{"type":"integer","description":"Unix time in milliseconds."}}},"DeliverabilityInsight":{"type":"object","required":["id","category","status","title","detail","suggestion"],"properties":{"id":{"type":"string","enum":["plain_text","reply_friendly_sender","body_size","link_alignment","youtube_links","sending_subdomain","dmarc","click_tracking","open_tracking"]},"category":{"type":"string","enum":["message","sender","tracking"]},"status":{"type":"string","enum":["pass","attention","improvement","unavailable"]},"title":{"type":"string"},"detail":{"type":"string"},"suggestion":{"type":["string","null"]}}},"DeliverabilityReport":{"type":"object","description":"Nine best-practice checks based on retained message content plus the sending domain's DMARC and tracking state. Guidance does not guarantee inbox placement.","required":["status","sendingDomain","bodySizeBytes","counts","insights"],"properties":{"status":{"type":"string","enum":["healthy","improvable","attention","unavailable"]},"sendingDomain":{"type":"string"},"bodySizeBytes":{"type":["integer","null"],"minimum":0},"counts":{"type":"object","required":["passed","attention","improvements","unavailable"],"properties":{"passed":{"type":"integer","minimum":0},"attention":{"type":"integer","minimum":0},"improvements":{"type":"integer","minimum":0},"unavailable":{"type":"integer","minimum":0}}},"insights":{"type":"array","minItems":9,"maxItems":9,"items":{"$ref":"#/components/schemas/DeliverabilityInsight"}}}},"EmailDetail":{"type":"object","required":["id","from","to","cc","bcc","replyTo","subject","html","text","headers","tags","recipients","attachments","status","providerMessageId","messageId","testMode","batchId","batchIndex","scheduledAt","contentRedactedAt","deliverability","error","createdAt","updatedAt","scheduleOperation","events"],"properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string","format":"email"}},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}},"replyTo":{"type":"array","items":{"type":"string","format":"email"}},"subject":{"type":["string","null"]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"tags":{"type":"array","items":{"$ref":"#/components/schemas/EmailTag"}},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/EmailRecipient"}},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentMetadata"}},"status":{"$ref":"#/components/schemas/EmailStatus"},"providerMessageId":{"type":["string","null"]},"messageId":{"type":["string","null"],"maxLength":998,"description":"The RFC Message-ID reported by the delivery provider, or null before it is known or after content retention expires."},"testMode":{"type":"boolean"},"batchId":{"type":["string","null"]},"batchIndex":{"type":["integer","null"]},"scheduledAt":{"type":["integer","null"],"description":"Unix time in milliseconds."},"contentRedactedAt":{"type":["integer","null"],"description":"Unix time in milliseconds."},"deliverability":{"$ref":"#/components/schemas/DeliverabilityReport"},"error":{"oneOf":[{"type":"null"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":["string","null"]}}}]},"createdAt":{"type":"integer","description":"Unix time in milliseconds."},"updatedAt":{"type":"integer","description":"Unix time in milliseconds."},"scheduleOperation":{"oneOf":[{"type":"null"},{"type":"object","required":["id","kind","status","requestedScheduledAt","attempts","nextAttemptAt","lastError","createdAt"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["reschedule","cancel"]},"status":{"type":"string","enum":["pending","processing","exhausted"]},"requestedScheduledAt":{"type":["integer","null"]},"attempts":{"type":"integer","minimum":0},"nextAttemptAt":{"type":["integer","null"]},"lastError":{"type":["string","null"]},"createdAt":{"type":"integer"}}}]},"events":{"type":"array","items":{"$ref":"#/components/schemas/EmailEvent"}}}},"EmailDetailResponse":{"type":"object","required":["email"],"properties":{"email":{"$ref":"#/components/schemas/EmailDetail"}}},"ScheduleEmailResponse":{"type":"object","required":["object","id","status","scheduled_at","requested_scheduled_at","operation_pending"],"properties":{"object":{"const":"email"},"id":{"type":"string"},"status":{"const":"scheduled"},"scheduled_at":{"type":"string","format":"date-time"},"requested_scheduled_at":{"type":["string","null"],"format":"date-time"},"operation_pending":{"type":"boolean"}}},"CancelEmailResponse":{"type":"object","required":["object","id","status","scheduled_at","idempotent_replay","operation_pending","quota_released","daily_quota_released"],"properties":{"object":{"const":"email"},"id":{"type":"string"},"status":{"type":"string","enum":["scheduled","canceled"]},"scheduled_at":{"type":["string","null"],"format":"date-time"},"idempotent_replay":{"type":"boolean"},"operation_pending":{"type":"boolean"},"quota_released":{"type":"boolean"},"daily_quota_released":{"type":"boolean"}}},"BatchEmailResponse":{"type":"object","required":["object","id","status","email_count","recipient_count","data","error","idempotent_replay"],"properties":{"object":{"const":"batch"},"id":{"type":"string"},"status":{"type":"string"},"email_count":{"type":"integer","minimum":1,"maximum":100},"recipient_count":{"type":"integer","minimum":1,"maximum":5000},"data":{"type":"array","items":{"type":"object","required":["id","index","status","provider_message_id","created_at"],"properties":{"id":{"type":"string"},"index":{"type":"integer","minimum":0},"status":{"$ref":"#/components/schemas/EmailStatus"},"provider_message_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}}},"error":{"oneOf":[{"type":"null"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":["string","null"]}}}]},"idempotent_replay":{"type":"boolean"}}},"AttachmentListItem":{"type":"object","required":["id","filename","size","content_type","content_disposition","content_id","download_url","expires_at"],"properties":{"id":{"type":"string"},"filename":{"type":"string"},"size":{"type":"integer","minimum":0},"content_type":{"type":"string"},"content_disposition":{"type":"string","enum":["attachment","inline"]},"content_id":{"type":["string","null"]},"download_url":{"type":"string","format":"uri"},"expires_at":{"type":"null"}}},"AttachmentListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"const":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentListItem"}}}},"ReceivedEmailAttachment":{"type":"object","required":["id","filename","size","content_type","content_disposition","content_id"],"properties":{"id":{"type":"string","minLength":1,"maxLength":200},"filename":{"type":"string","minLength":1,"maxLength":500},"size":{"type":["integer","null"],"minimum":0},"content_type":{"type":"string"},"content_disposition":{"type":["string","null"],"enum":["attachment","inline",null]},"content_id":{"type":["string","null"]}}},"ReceivedEmailListItem":{"type":"object","required":["id","domain","from","to","cc","bcc","subject","message_id","attachments","received_at","content_redacted_at"],"properties":{"id":{"type":"string","pattern":"^rx_[a-f0-9]{24}$"},"domain":{"type":"string","format":"hostname"},"from":{"type":"string","format":"email"},"to":{"type":"array","items":{"type":"string","format":"email"}},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}},"subject":{"type":["string","null"]},"message_id":{"type":["string","null"]},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReceivedEmailAttachment"}},"received_at":{"type":"string","format":"date-time"},"content_redacted_at":{"type":["string","null"],"format":"date-time"}}},"ReceivedEmailListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ReceivedEmailListItem"}}}},"ReceivedEmail":{"type":"object","required":["object","id","domain","from","to","cc","bcc","reply_to","subject","message_id","html","text","headers","attachments","replies","forwards","received_at","content_available","content_redacted_at"],"properties":{"object":{"const":"email"},"id":{"type":"string","pattern":"^rx_[a-f0-9]{24}$"},"domain":{"type":"string","format":"hostname"},"from":{"type":"string","format":"email"},"to":{"type":"array","items":{"type":"string","format":"email"}},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}},"reply_to":{"type":"array","items":{"type":"string","format":"email"}},"subject":{"type":["string","null"]},"message_id":{"type":["string","null"]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ReceivedEmailAttachment"}},"replies":{"type":"array","items":{"$ref":"#/components/schemas/ReceivedEmailReply"}},"forwards":{"type":"array","items":{"$ref":"#/components/schemas/ReceivedEmailForward"}},"received_at":{"type":"string","format":"date-time"},"content_available":{"type":"boolean"},"content_redacted_at":{"type":["string","null"],"format":"date-time"}}},"ReceivedEmailReply":{"type":"object","required":["id","from","to","subject","status","provider_message_id","message_id","content_redacted_at","created_at"],"properties":{"id":{"type":"string","pattern":"^em_[a-f0-9]{24}$"},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string","format":"email"}},"subject":{"type":"string"},"status":{"$ref":"#/components/schemas/EmailStatus"},"provider_message_id":{"type":["string","null"]},"message_id":{"type":["string","null"],"maxLength":998},"content_redacted_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"ReceivedEmailReplyInput":{"type":"object","additionalProperties":false,"properties":{"from":{"type":"string","maxLength":377,"description":"Optional sender; must be one of the original local To recipients. Defaults to the first."},"subject":{"type":"string","minLength":1,"maxLength":998,"description":"Optional subject. Defaults to the original subject with Re: added once."},"html":{"type":"string","minLength":1,"maxLength":900000},"text":{"type":"string","minLength":1,"maxLength":900000}},"anyOf":[{"required":["html"]},{"required":["text"]}]},"ReceivedEmailReplyResponse":{"type":"object","required":["id","received_email_id","status","provider_message_id","idempotent_replay"],"properties":{"id":{"type":"string","pattern":"^em_[a-f0-9]{24}$"},"received_email_id":{"type":"string","pattern":"^rx_[a-f0-9]{24}$"},"status":{"$ref":"#/components/schemas/EmailStatus"},"provider_message_id":{"type":["string","null"]},"idempotent_replay":{"type":"boolean"}}},"ReceivedEmailForward":{"type":"object","required":["id","from","to","subject","mode","status","provider_message_id","message_id","content_redacted_at","created_at"],"properties":{"id":{"type":"string","pattern":"^em_[a-f0-9]{24}$"},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string","format":"email"}},"subject":{"type":"string"},"mode":{"type":"string","enum":["passthrough","wrapped"]},"status":{"$ref":"#/components/schemas/EmailStatus"},"provider_message_id":{"type":["string","null"]},"message_id":{"type":["string","null"],"maxLength":998},"content_redacted_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"ReceivedEmailForwardInput":{"type":"object","additionalProperties":false,"required":["to"],"properties":{"from":{"type":"string","maxLength":377,"description":"Optional sender; must be one of the original local To recipients. Defaults to the first."},"to":{"$ref":"#/components/schemas/AddressOrAddresses"},"passthrough":{"type":"boolean","default":true,"description":"When true, preserve parsed original content and attachments. When false, html or text is required and the raw source is attached as forwarded_message.eml."},"html":{"type":"string","minLength":1,"maxLength":900000},"text":{"type":"string","minLength":1,"maxLength":900000}}},"ReceivedEmailForwardResponse":{"type":"object","required":["id","received_email_id","mode","status","provider_message_id","idempotent_replay"],"properties":{"id":{"type":"string","pattern":"^em_[a-f0-9]{24}$"},"received_email_id":{"type":"string","pattern":"^rx_[a-f0-9]{24}$"},"mode":{"type":"string","enum":["passthrough","wrapped"]},"status":{"$ref":"#/components/schemas/EmailStatus"},"provider_message_id":{"type":["string","null"]},"idempotent_replay":{"type":"boolean"}}},"ReceivedAttachmentListItem":{"allOf":[{"$ref":"#/components/schemas/ReceivedEmailAttachment"},{"type":"object","required":["download_url","expires_at"],"properties":{"download_url":{"type":"string"},"expires_at":{"type":"null"}}}]},"ReceivedAttachmentListResponse":{"type":"object","required":["object","has_more","data"],"properties":{"object":{"const":"list"},"has_more":{"const":false},"data":{"type":"array","items":{"$ref":"#/components/schemas/ReceivedAttachmentListItem"}}}}}}}