{"openapi":"3.1.0","info":{"description":"The Stamp0 API: Resend-compatible email sending on your own AWS SES account.","title":"Stamp0 API","version":"0.0.0"},"components":{"securitySchemes":{"apiKey":{"bearerFormat":"s0_…","description":"A project API key: `Authorization: Bearer s0_…`","scheme":"bearer","type":"http"}},"schemas":{"Error":{"type":"object","properties":{"statusCode":{"type":"integer","minimum":400,"maximum":599},"name":{"type":"string","enum":["validation_error","missing_required_field","invalid_parameter","invalid_from_address","invalid_attachment","invalid_region","invalid_scheduled_at","invalid_idempotency_key","invalid_idempotent_request","concurrent_idempotent_requests","missing_api_key","invalid_api_key","restricted_api_key","invalid_access","security_error","not_found","method_not_allowed","rate_limit_exceeded","daily_quota_exceeded","monthly_quota_exceeded","application_error","internal_server_error","unauthorized","conflict","connection_not_ready","plan_limit_exceeded","provider_error","sandbox_restricted","provider_not_configured","unsupported_by_provider","zone_not_on_cloudflare","provider_subscription_conflict"]},"message":{"type":"string"},"planned_records":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string","enum":["SPF","DKIM","MX","DMARC","Receiving","VERIFICATION","Tracking"]},"name":{"type":"string"},"type":{"type":"string","enum":["TXT","CNAME","MX"]},"value":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["record","name","type","value"],"additionalProperties":false}}},"required":["statusCode","name","message"],"additionalProperties":false}}},"paths":{"/api-keys":{"post":{"tags":["api-keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"permission":{"default":"full_access","type":"string","enum":["full_access","sending_access"]},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9A-Za-z]{16}$","description":"Stamp0 key_ identifier"},"token":{"type":"string","pattern":"^s0_[0-9A-Za-z]{40}$"}},"required":["id","token"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createApiKey","summary":"Create an API key","description":"The `s0_` token is returned once. `sending_access` keys may only send; add `domain_id` to restrict sending to one domain, or `inbox_id` for an agent key scoped to one inbox."},"get":{"tags":["api-keys"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9A-Za-z]{16}$","description":"Stamp0 key_ identifier"},"name":{"type":"string"},"permission":{"type":"string","enum":["full_access","sending_access"]},"domain_id":{"anyOf":[{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},{"type":"null"}]},"inbox_id":{"type":["string","null"]},"token_prefix":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","name","permission","domain_id","inbox_id","token_prefix","created_at","last_used_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listApiKeys","summary":"List API keys"}},"/api-keys/{id}":{"patch":{"tags":["api-keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["api_key"]},"id":{"type":"string","pattern":"^key_[0-9A-Za-z]{16}$","description":"Stamp0 key_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateApiKey","summary":"Rename an API key"},"delete":{"tags":["api-keys"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["api_key"]},"id":{"type":"string","pattern":"^key_[0-9A-Za-z]{16}$","description":"Stamp0 key_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteApiKey","summary":"Delete an API key"}},"/webhooks":{"post":{"tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":2048,"format":"uri"},"events":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","enum":["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.rejected","email.failed","email.suppressed","email.received","email.scheduled","domain.created","domain.updated","domain.deleted","contact.unsubscribed","contact.created","contact.updated","contact.deleted","contact.topics.updated","suppression.added","suppression.removed","topic.created","topic.updated","topic.deleted"]}}},"required":["endpoint","events"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["webhook"]},"id":{"type":"string","pattern":"^whk_[0-9A-Za-z]{16}$","description":"Stamp0 whk_ identifier"},"endpoint":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.rejected","email.failed","email.suppressed","email.received","email.scheduled","domain.created","domain.updated","domain.deleted","contact.unsubscribed"]}},"status":{"type":"string","enum":["enabled","disabled"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"signing_secret":{"type":"string","pattern":"^whsec_[A-Za-z0-9+/=]+$"}},"required":["object","id","endpoint","events","status","created_at","signing_secret"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createWebhook","summary":"Create a webhook","description":"The `whsec_` signing secret is returned once, in this response."},"get":{"tags":["webhooks"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["webhook"]},"id":{"type":"string","pattern":"^whk_[0-9A-Za-z]{16}$","description":"Stamp0 whk_ identifier"},"endpoint":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.rejected","email.failed","email.suppressed","email.received","email.scheduled","domain.created","domain.updated","domain.deleted","contact.unsubscribed"]}},"status":{"type":"string","enum":["enabled","disabled"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","endpoint","events","status","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listWebhooks","summary":"List webhooks"}},"/webhooks/{id}":{"get":{"tags":["webhooks"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["webhook"]},"id":{"type":"string","pattern":"^whk_[0-9A-Za-z]{16}$","description":"Stamp0 whk_ identifier"},"endpoint":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.rejected","email.failed","email.suppressed","email.received","email.scheduled","domain.created","domain.updated","domain.deleted","contact.unsubscribed"]}},"status":{"type":"string","enum":["enabled","disabled"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"signing_secret":{"type":"string","pattern":"^whsec_[A-Za-z0-9+/=]+$"}},"required":["object","id","endpoint","events","status","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getWebhook","summary":"Retrieve a webhook","description":"Includes `signing_secret` for full-access API keys and dashboard owners and admins, as in Resend."},"patch":{"tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":2048,"format":"uri"},"events":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","enum":["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.rejected","email.failed","email.suppressed","email.received","email.scheduled","domain.created","domain.updated","domain.deleted","contact.unsubscribed","contact.created","contact.updated","contact.deleted","contact.topics.updated","suppression.added","suppression.removed","topic.created","topic.updated","topic.deleted"]}},"status":{"type":"string","enum":["enabled","disabled"]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["webhook"]},"id":{"type":"string","pattern":"^whk_[0-9A-Za-z]{16}$","description":"Stamp0 whk_ identifier"},"endpoint":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.rejected","email.failed","email.suppressed","email.received","email.scheduled","domain.created","domain.updated","domain.deleted","contact.unsubscribed"]}},"status":{"type":"string","enum":["enabled","disabled"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","endpoint","events","status","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateWebhook","summary":"Update a webhook","description":"Changes the endpoint URL, subscribed events or status."},"delete":{"tags":["webhooks"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["webhook"]},"id":{"type":"string","pattern":"^whk_[0-9A-Za-z]{16}$","description":"Stamp0 whk_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteWebhook","summary":"Delete a webhook"}},"/webhooks/{id}/signing-secret/rotate":{"post":{"tags":["webhooks"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["webhook"]},"id":{"type":"string","pattern":"^whk_[0-9A-Za-z]{16}$","description":"Stamp0 whk_ identifier"},"signing_secret":{"type":"string","pattern":"^whsec_[A-Za-z0-9+/=]+$"}},"required":["object","id","signing_secret"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"rotateWebhookSigningSecret","summary":"Rotate the signing secret","description":"Issues a new `whsec_` secret and returns it; deliveries are signed with it from now on."}},"/webhooks/{id}/events":{"get":{"tags":["webhooks"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^whd_[0-9A-Za-z]{16}$","description":"Stamp0 whd_ identifier"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"status":{"type":"string","enum":["success","pending","failed","attempting"]}},"required":["id","type","created_at","status"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listWebhookEvents","summary":"List webhook events","description":"Resend's webhook event log: one entry per delivery, newest first, with `success`, `pending`, `attempting` or `failed`."}},"/webhooks/{id}/events/{eventId}":{"get":{"tags":["webhooks"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"eventId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^whd_[0-9A-Za-z]{16}$","description":"Stamp0 whd_ identifier"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"status":{"type":"string","enum":["success","pending","failed","attempting"]},"object":{"type":"string","enum":["webhook_event"]},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","created_at","status","object","next_attempt_at","payload"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getWebhookEvent","summary":"Retrieve a webhook event","description":"The delivery with its signed payload and next attempt time."}},"/webhooks/{id}/events/{eventId}/attempts":{"get":{"tags":["webhooks"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"eventId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"http_status_code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response":{"type":"string"},"sent_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","http_status_code","response","sent_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listWebhookEventAttempts","summary":"List webhook event attempts","description":"The latest delivery attempt (Stamp0 keeps the last status code and error, not every attempt)."}},"/webhooks/{id}/events/{eventId}/replay":{"post":{"tags":["webhooks"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"eventId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["webhook_event"]},"id":{"type":"string","pattern":"^whd_[0-9A-Za-z]{16}$","description":"Stamp0 whd_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"replayWebhookEvent","summary":"Replay a webhook event","description":"Queues the same payload to the endpoint again as a new delivery."}},"/webhooks/{id}/deliveries":{"get":{"tags":["webhooks"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["pending","retrying","delivered","failed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["webhook_delivery"]},"id":{"type":"string","pattern":"^whd_[0-9A-Za-z]{16}$","description":"Stamp0 whd_ identifier"},"webhook_id":{"type":"string","pattern":"^whk_[0-9A-Za-z]{16}$","description":"Stamp0 whk_ identifier"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","retrying","delivered","failed"]},"attempt_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_error":{"type":["string","null"]},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","webhook_id","event_type","status","attempt_count","last_response_status","last_error","next_attempt_at","delivered_at","payload","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listWebhookDeliveries","summary":"List webhook deliveries","description":"Delivery attempts to the endpoint, newest first, cursor-paginated. Filter with `status`."}},"/webhooks/{id}/test":{"post":{"tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.rejected","email.failed","email.suppressed","email.received","email.scheduled","domain.created","domain.updated","domain.deleted","contact.unsubscribed"]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["webhook_delivery"]},"id":{"type":"string","pattern":"^whd_[0-9A-Za-z]{16}$","description":"Stamp0 whd_ identifier"},"webhook_id":{"type":"string","pattern":"^whk_[0-9A-Za-z]{16}$","description":"Stamp0 whk_ identifier"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","retrying","delivered","failed"]},"attempt_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_error":{"type":["string","null"]},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","webhook_id","event_type","status","attempt_count","last_response_status","last_error","next_attempt_at","delivered_at","payload","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendTestWebhook","summary":"Send a test event","description":"Queues a signed test event to the endpoint and returns the delivery. `type` picks the event type of the sample payload."}},"/events":{"get":{"tags":["events"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["sent","delivered","delivery_delayed","bounced","complained","opened","clicked","rejected","failed","received"]},"in":"query","name":"type","required":false},{"schema":{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$"},"in":"query","name":"email_id","required":false,"description":"Stamp0 em_ identifier"},{"schema":{"type":"string","minLength":1,"maxLength":320},"in":"query","name":"recipient","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["email_event"]},"id":{"type":"string","pattern":"^evt_[0-9A-Za-z]{16}$","description":"Stamp0 evt_ identifier"},"type":{"type":"string","enum":["sent","delivered","delivery_delayed","bounced","complained","opened","clicked","rejected","failed","received"]},"email_id":{"type":["string","null"]},"received_email_id":{"type":["string","null"]},"recipient":{"type":["string","null"]},"bounce_type":{"anyOf":[{"type":"string","enum":["hard","soft","undetermined"]},{"type":"null"}]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","type","email_id","received_email_id","recipient","bounce_type","data","occurred_at","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listEmailEvents","summary":"List email events","description":"Events of the project, newest first, cursor-paginated. Filter with `type`, `email_id` or `recipient` (an exact address, or a case-insensitive substring)."},"post":{"tags":["contact-events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string","maxLength":254},"properties":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{}},"payload":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{}},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"idempotency_key":{"type":"string","minLength":1,"maxLength":256},"create_contact":{"type":"boolean"}}}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["event"]},"id":{"type":"string","pattern":"^cev_[0-9A-Za-z]{16}$","description":"Stamp0 cev_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"created":{"type":"boolean"}},"required":["object","id","contact_id","created"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"trackEvent","summary":"Track a custom event","description":"Records a named event for a contact (`contact_id` or `email`; an unknown email creates the contact unless `create_contact` is false). `properties` (or Resend's `payload`) become merge variables of the sequence it starts. An `idempotency_key` (or `Idempotency-Key` header) makes a retry return the first event; the same key with a different event is a 409 `invalid_idempotent_request`."}},"/emails/{id}/events":{"get":{"tags":["events"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["email_event"]},"id":{"type":"string","pattern":"^evt_[0-9A-Za-z]{16}$","description":"Stamp0 evt_ identifier"},"type":{"type":"string","enum":["sent","delivered","delivery_delayed","bounced","complained","opened","clicked","rejected","failed","received"]},"email_id":{"type":["string","null"]},"received_email_id":{"type":["string","null"]},"recipient":{"type":["string","null"]},"bounce_type":{"anyOf":[{"type":"string","enum":["hard","soft","undetermined"]},{"type":"null"}]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","type","email_id","received_email_id","recipient","bounce_type","data","occurred_at","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listEmailEventsForEmail","summary":"List the events of an email","description":"The timeline of one email, oldest first."}},"/domains":{"post":{"tags":["domains"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":253,"pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"region":{"type":"string"},"custom_return_path":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$"},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"tls":{"type":"string","enum":["opportunistic","enforced"]},"capabilities":{"type":"object","properties":{"sending":{"type":"string","enum":["enabled","disabled"]},"receiving":{"type":"string","enum":["enabled","disabled"]}}},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"sending_connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"receiving_connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"receiving":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["subdomain_rules","apex_catch_all"]}},"required":["enabled"]},"setup_token":{"type":"string","pattern":"^[A-Za-z0-9_.-]{20,512}$"},"confirm_mx_takeover":{"type":"boolean"},"confirm_dmarc_create":{"type":"boolean"},"keep_email_preview":{"type":"boolean"},"tracking_subdomain":{"anyOf":[{"type":"string","maxLength":127,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)?$"},{"type":"null"}]}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["domain"]},"id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["not_started","pending","verified","partially_verified","partially_failed","failed","temporary_failure"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"region":{"type":["string","null"]},"records":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string","enum":["SPF","DKIM","MX","DMARC","Receiving","VERIFICATION","Tracking"]},"name":{"type":"string"},"fqdn":{"type":"string"},"type":{"type":"string","enum":["TXT","CNAME","MX"]},"value":{"type":"string"},"ttl":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["not_started","pending","verified","failed","temporary_failure"]}},"required":["record","name","type","value","ttl","status"],"additionalProperties":false}},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"tls":{"type":"string","enum":["opportunistic","enforced"]},"capabilities":{"type":"object","properties":{"sending":{"type":"string","enum":["enabled","disabled"]},"receiving":{"type":"string","enum":["enabled","disabled"]}},"required":["sending","receiving"],"additionalProperties":false},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"sending_connection":{"type":"object","properties":{"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]}},"required":["id","provider"],"additionalProperties":false},"receiving_connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]}},"required":["id","provider"],"additionalProperties":false},{"type":"null"}]},"custom_return_path":{"type":"string"},"tracking_subdomain":{"type":["string","null"]},"configuration_set_name":{"type":["string","null"]},"tracking_status":{"type":"string","enum":["pending","applied","stack_update_required"]},"receiving":{"type":"object","properties":{"status":{"type":"string","enum":["disabled","pending","enabled"]},"setup":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unsupported_region","stack_update_required","rule_set_inactive","zone_not_on_cloudflare","mx_conflict","rule_limit_reached","data_plane_missing","setup_token_required","routing_misconfigured","ready"]},"stack_update":{"anyOf":[{"type":"object","properties":{"stack_name":{"type":"string"},"region":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["stack_name","region","parameters","console_url","command"],"additionalProperties":false},{"type":"null"}]},"activate_rule_set":{"anyOf":[{"type":"object","properties":{"rule_set_name":{"type":"string"},"command":{"type":"string"}},"required":["rule_set_name","command"],"additionalProperties":false},{"type":"null"}]},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status","stack_update","activate_rule_set","checked_at"],"additionalProperties":false},{"type":"null"}]}},"required":["status","setup"],"additionalProperties":false},"receiving_only":{"type":"boolean"},"dns_automation":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["route53","cloudflare"]},"status":{"type":"string","enum":["applied","partial","zone_not_found","not_permitted"]},"zone_name":{"type":["string","null"]},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"records":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string","enum":["SPF","DKIM","MX","DMARC","Receiving","VERIFICATION","Tracking"]},"name":{"type":"string"},"type":{"type":"string","enum":["TXT","CNAME","MX"]},"result":{"type":"string","enum":["created","updated","unchanged","conflict","manual"]}},"required":["record","name","type","result"],"additionalProperties":false}}},"required":["provider","status","zone_name","checked_at","records"],"additionalProperties":false},{"type":"null"}]},"sending_restriction":{"type":"object","properties":{"status":{"type":"string","enum":["not_configured","allowed","stack_update_required","unknown"]},"stack_update":{"anyOf":[{"type":"object","properties":{"stack_name":{"type":"string"},"region":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["stack_name","region","parameters","console_url","command"],"additionalProperties":false},{"type":"null"}]}},"required":["status","stack_update"],"additionalProperties":false}},"required":["object","id","name","status","created_at","region","records","open_tracking","click_tracking","tls","capabilities","connection_id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createDomain","summary":"Create a domain","description":"Creates the SES identity in the connected AWS account (tagged for the connection, with a custom MAIL FROM) and returns the DNS records to add. Needs a `connected` connection. An identity Stamp0 did not create is a `409 conflict`, never taken over."},"get":{"tags":["domains"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["not_started","pending","verified","partially_verified","partially_failed","failed","temporary_failure"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"region":{"type":["string","null"]},"capabilities":{"type":"object","properties":{"sending":{"type":"string","enum":["enabled","disabled"]},"receiving":{"type":"string","enum":["enabled","disabled"]}},"required":["sending","receiving"],"additionalProperties":false},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"sending_connection":{"type":"object","properties":{"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]}},"required":["id","provider"],"additionalProperties":false}},"required":["id","name","status","created_at","region","capabilities","connection_id"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listDomains","summary":"List domains"}},"/domains/{id}":{"get":{"tags":["domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["domain"]},"id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["not_started","pending","verified","partially_verified","partially_failed","failed","temporary_failure"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"region":{"type":["string","null"]},"records":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string","enum":["SPF","DKIM","MX","DMARC","Receiving","VERIFICATION","Tracking"]},"name":{"type":"string"},"fqdn":{"type":"string"},"type":{"type":"string","enum":["TXT","CNAME","MX"]},"value":{"type":"string"},"ttl":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["not_started","pending","verified","failed","temporary_failure"]}},"required":["record","name","type","value","ttl","status"],"additionalProperties":false}},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"tls":{"type":"string","enum":["opportunistic","enforced"]},"capabilities":{"type":"object","properties":{"sending":{"type":"string","enum":["enabled","disabled"]},"receiving":{"type":"string","enum":["enabled","disabled"]}},"required":["sending","receiving"],"additionalProperties":false},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"sending_connection":{"type":"object","properties":{"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]}},"required":["id","provider"],"additionalProperties":false},"receiving_connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]}},"required":["id","provider"],"additionalProperties":false},{"type":"null"}]},"custom_return_path":{"type":"string"},"tracking_subdomain":{"type":["string","null"]},"configuration_set_name":{"type":["string","null"]},"tracking_status":{"type":"string","enum":["pending","applied","stack_update_required"]},"receiving":{"type":"object","properties":{"status":{"type":"string","enum":["disabled","pending","enabled"]},"setup":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unsupported_region","stack_update_required","rule_set_inactive","zone_not_on_cloudflare","mx_conflict","rule_limit_reached","data_plane_missing","setup_token_required","routing_misconfigured","ready"]},"stack_update":{"anyOf":[{"type":"object","properties":{"stack_name":{"type":"string"},"region":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["stack_name","region","parameters","console_url","command"],"additionalProperties":false},{"type":"null"}]},"activate_rule_set":{"anyOf":[{"type":"object","properties":{"rule_set_name":{"type":"string"},"command":{"type":"string"}},"required":["rule_set_name","command"],"additionalProperties":false},{"type":"null"}]},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status","stack_update","activate_rule_set","checked_at"],"additionalProperties":false},{"type":"null"}]}},"required":["status","setup"],"additionalProperties":false},"receiving_only":{"type":"boolean"},"dns_automation":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["route53","cloudflare"]},"status":{"type":"string","enum":["applied","partial","zone_not_found","not_permitted"]},"zone_name":{"type":["string","null"]},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"records":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string","enum":["SPF","DKIM","MX","DMARC","Receiving","VERIFICATION","Tracking"]},"name":{"type":"string"},"type":{"type":"string","enum":["TXT","CNAME","MX"]},"result":{"type":"string","enum":["created","updated","unchanged","conflict","manual"]}},"required":["record","name","type","result"],"additionalProperties":false}}},"required":["provider","status","zone_name","checked_at","records"],"additionalProperties":false},{"type":"null"}]},"sending_restriction":{"type":"object","properties":{"status":{"type":"string","enum":["not_configured","allowed","stack_update_required","unknown"]},"stack_update":{"anyOf":[{"type":"object","properties":{"stack_name":{"type":"string"},"region":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["stack_name","region","parameters","console_url","command"],"additionalProperties":false},{"type":"null"}]}},"required":["status","stack_update"],"additionalProperties":false}},"required":["object","id","name","status","created_at","region","records","open_tracking","click_tracking","tls","capabilities","connection_id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getDomain","summary":"Retrieve a domain","description":"The domain with its DNS records, verification status, capabilities, tracking and TLS settings."},"patch":{"tags":["domains"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"tls":{"type":"string","enum":["opportunistic","enforced"]},"capabilities":{"type":"object","properties":{"sending":{"type":"string","enum":["enabled","disabled"]},"receiving":{"type":"string","enum":["enabled","disabled"]}}},"tracking_subdomain":{"anyOf":[{"type":"string","maxLength":127,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)?$"},{"type":"null"}]},"receiving_connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"receiving":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["subdomain_rules","apex_catch_all"]}},"required":["enabled"]},"setup_token":{"type":"string","pattern":"^[A-Za-z0-9_.-]{20,512}$"},"confirm_mx_takeover":{"type":"boolean"},"confirm_dmarc_create":{"type":"boolean"},"keep_email_preview":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["domain"]},"id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateDomain","summary":"Update a domain","description":"Changes open and click tracking, the tracking subdomain, TLS policy, and the sending and receiving capabilities."},"delete":{"tags":["domains"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"setup_token":{"type":"string","pattern":"^[A-Za-z0-9_.-]{20,512}$"},"force":{"type":"boolean"}}},{"type":"null"}]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["domain"]},"id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"deleted":{"type":"boolean","enum":[true]},"left_behind":{"type":"array","items":{"type":"object","properties":{"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"kind":{"type":"string","enum":["sending_subdomain","event_subscription","routing_rules","email_routing","catch_all","dns_record"]},"name":{"type":"string"}},"required":["connection_id","kind","name"],"additionalProperties":false}}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteDomain","summary":"Delete a domain","description":"Deletes the SES identity Stamp0 created and the domain configuration set, then the domain."}},"/domains/{id}/verify":{"post":{"tags":["domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["domain"]},"id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"verifyDomain","summary":"Verify a domain","description":"Starts a new round of DNS and SES verification checks."}},"/domains/{id}/dns/cloudflare":{"post":{"tags":["domains"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"setup_token":{"type":"string","pattern":"^[A-Za-z0-9_.-]{20,512}$"}},"required":["connection_id","setup_token"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["domain"]},"id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["not_started","pending","verified","partially_verified","partially_failed","failed","temporary_failure"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"region":{"type":["string","null"]},"records":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string","enum":["SPF","DKIM","MX","DMARC","Receiving","VERIFICATION","Tracking"]},"name":{"type":"string"},"fqdn":{"type":"string"},"type":{"type":"string","enum":["TXT","CNAME","MX"]},"value":{"type":"string"},"ttl":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["not_started","pending","verified","failed","temporary_failure"]}},"required":["record","name","type","value","ttl","status"],"additionalProperties":false}},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"tls":{"type":"string","enum":["opportunistic","enforced"]},"capabilities":{"type":"object","properties":{"sending":{"type":"string","enum":["enabled","disabled"]},"receiving":{"type":"string","enum":["enabled","disabled"]}},"required":["sending","receiving"],"additionalProperties":false},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"sending_connection":{"type":"object","properties":{"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]}},"required":["id","provider"],"additionalProperties":false},"receiving_connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]}},"required":["id","provider"],"additionalProperties":false},{"type":"null"}]},"custom_return_path":{"type":"string"},"tracking_subdomain":{"type":["string","null"]},"configuration_set_name":{"type":["string","null"]},"tracking_status":{"type":"string","enum":["pending","applied","stack_update_required"]},"receiving":{"type":"object","properties":{"status":{"type":"string","enum":["disabled","pending","enabled"]},"setup":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["unsupported_region","stack_update_required","rule_set_inactive","zone_not_on_cloudflare","mx_conflict","rule_limit_reached","data_plane_missing","setup_token_required","routing_misconfigured","ready"]},"stack_update":{"anyOf":[{"type":"object","properties":{"stack_name":{"type":"string"},"region":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["stack_name","region","parameters","console_url","command"],"additionalProperties":false},{"type":"null"}]},"activate_rule_set":{"anyOf":[{"type":"object","properties":{"rule_set_name":{"type":"string"},"command":{"type":"string"}},"required":["rule_set_name","command"],"additionalProperties":false},{"type":"null"}]},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status","stack_update","activate_rule_set","checked_at"],"additionalProperties":false},{"type":"null"}]}},"required":["status","setup"],"additionalProperties":false},"receiving_only":{"type":"boolean"},"dns_automation":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["route53","cloudflare"]},"status":{"type":"string","enum":["applied","partial","zone_not_found","not_permitted"]},"zone_name":{"type":["string","null"]},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"records":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string","enum":["SPF","DKIM","MX","DMARC","Receiving","VERIFICATION","Tracking"]},"name":{"type":"string"},"type":{"type":"string","enum":["TXT","CNAME","MX"]},"result":{"type":"string","enum":["created","updated","unchanged","conflict","manual"]}},"required":["record","name","type","result"],"additionalProperties":false}}},"required":["provider","status","zone_name","checked_at","records"],"additionalProperties":false},{"type":"null"}]},"sending_restriction":{"type":"object","properties":{"status":{"type":"string","enum":["not_configured","allowed","stack_update_required","unknown"]},"stack_update":{"anyOf":[{"type":"object","properties":{"stack_name":{"type":"string"},"region":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["stack_name","region","parameters","console_url","command"],"additionalProperties":false},{"type":"null"}]}},"required":["status","stack_update"],"additionalProperties":false}},"required":["object","id","name","status","created_at","region","records","open_tracking","click_tracking","tls","capabilities","connection_id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"publishDomainOnCloudflare","summary":"Publish DNS records on Cloudflare","description":"Publishes an Amazon SES domain's DKIM, MAIL FROM and DMARC records in its zone on Cloudflare DNS, through a Cloudflare connection of the organization. Needs a setup token with Zone Read and DNS Write on the zone, used for this request only. Never overwrites a record: a name that holds a different value is reported as `conflict`, a receiving MX as `manual` (see `dns_automation`)."}},"/domains/{id}/senders":{"get":{"tags":["domains"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["sender"]},"id":{"type":"string","pattern":"^snd_[0-9A-Za-z]{16}$","description":"Stamp0 snd_ identifier"},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"email":{"type":"string"},"name":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","domain_id","email","name","reply_to","from","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listSenders","summary":"List senders","description":"From-addresses saved on the domain."},"post":{"tags":["domains"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\r\\n]*$"},{"type":"null"}]},"reply_to":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"string","maxLength":254}}]}},"required":["email"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sender"]},"id":{"type":"string","pattern":"^snd_[0-9A-Za-z]{16}$","description":"Stamp0 snd_ identifier"},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"email":{"type":"string"},"name":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","domain_id","email","name","reply_to","from","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createSender","summary":"Create a sender","description":"Saves a from-address with display name and reply-to; the response `from` is ready for `POST /emails`."}},"/domains/{id}/senders/{senderId}":{"get":{"tags":["domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"senderId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sender"]},"id":{"type":"string","pattern":"^snd_[0-9A-Za-z]{16}$","description":"Stamp0 snd_ identifier"},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"email":{"type":"string"},"name":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","domain_id","email","name","reply_to","from","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getSender","summary":"Retrieve a sender"},"patch":{"tags":["domains"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\r\\n]*$"},{"type":"null"}]},"reply_to":{"anyOf":[{"anyOf":[{"type":"string","maxLength":254},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":254}}]},{"type":"null"}]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"senderId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sender"]},"id":{"type":"string","pattern":"^snd_[0-9A-Za-z]{16}$","description":"Stamp0 snd_ identifier"},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"email":{"type":"string"},"name":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","domain_id","email","name","reply_to","from","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateSender","summary":"Update a sender"},"delete":{"tags":["domains"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"senderId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sender"]},"id":{"type":"string","pattern":"^snd_[0-9A-Za-z]{16}$","description":"Stamp0 snd_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteSender","summary":"Delete a sender"}},"/emails":{"post":{"tags":["emails"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","maxLength":320},"to":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"subject":{"type":"string","minLength":1,"maxLength":998},"cc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"bcc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"reply_to":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"html":{"type":"string"},"text":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"},"additionalProperties":{"type":"string","maxLength":998,"pattern":"^[^\\r\\n]*$"}},"tags":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9_-]+$"},"value":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["name","value"]}},"template":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"variables":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"}]}}},"required":["id"],"additionalProperties":false},"attachments":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"content":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"type":{"type":"string","enum":["Buffer"]},"data":{}},"required":["type","data"],"additionalProperties":false}]},"path":{"type":"string","format":"uri"},"filename":{"type":"string","minLength":1,"maxLength":255},"content_type":{"type":"string","minLength":3,"maxLength":255},"content_id":{"type":"string","minLength":1,"maxLength":255},"inline_content_id":{"type":"string","minLength":1,"maxLength":255}}}},"scheduled_at":{"type":"string","minLength":1,"maxLength":100}},"required":["to"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"header","name":"idempotency-key","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$","description":"Stamp0 em_ identifier"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendEmail","summary":"Send an email","description":"Queues one email for sending through SES in your AWS account. Accepts `scheduled_at` (ISO 8601 or natural language, up to 30 days ahead) and an `Idempotency-Key` header. The `from` domain must be a verified domain of the project with sending enabled. With `template: { id, variables }` (a published template by id or alias) the body comes from the template; `html` and `text` may then not be set, and `from`, `subject` and `reply_to` override the template defaults."},"get":{"tags":["emails"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["scheduled","queued","sent","delivered","delivery_delayed","opened","clicked","bounced","complained","rejected","failed","suppressed","canceled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"query","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["email"]},"id":{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$","description":"Stamp0 em_ identifier"},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"bcc":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_event":{"type":"string","enum":["scheduled","queued","sent","delivered","delivery_delayed","opened","clicked","bounced","complained","rejected","failed","suppressed","canceled"]},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9_-]+$"},"value":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["name","value"],"additionalProperties":false}}},"required":["object","id","from","to","cc","bcc","reply_to","subject","created_at","scheduled_at","last_event"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listEmails","summary":"List emails","description":"Sent and scheduled emails, newest first, cursor-paginated."}},"/emails/batch":{"post":{"tags":["emails"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","maxLength":320},"to":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"subject":{"type":"string","minLength":1,"maxLength":998},"cc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"bcc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"reply_to":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"html":{"type":"string"},"text":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string","maxLength":128,"pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"},"additionalProperties":{"type":"string","maxLength":998,"pattern":"^[^\\r\\n]*$"}},"tags":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9_-]+$"},"value":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["name","value"]}},"template":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"variables":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"}]}}},"required":["id"],"additionalProperties":false}},"required":["to"],"additionalProperties":false}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"header","name":"idempotency-key","required":false},{"schema":{"type":"string","enum":["strict","permissive"]},"in":"header","name":"x-batch-validation","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$","description":"Stamp0 em_ identifier"}},"required":["id"],"additionalProperties":false}},"errors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"message":{"type":"string"}},"required":["index","message"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendBatchEmails","summary":"Send a batch of emails","description":"Queues up to 100 emails in one request. `x-batch-validation: strict` (default) rejects the whole batch when one item is invalid; `permissive` sends the valid items and returns `errors[]` with the index of each rejected one."}},"/emails/{id}":{"get":{"tags":["emails"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["email"]},"id":{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$","description":"Stamp0 em_ identifier"},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"bcc":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":"string"},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_event":{"type":"string","enum":["scheduled","queued","sent","delivered","delivery_delayed","opened","clicked","bounced","complained","rejected","failed","suppressed","canceled"]},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9_-]+$"},"value":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["name","value"],"additionalProperties":false}},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":["string","null"]},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","filename","content_type","size"],"additionalProperties":false}},"message_id":{"type":["string","null"]}},"required":["object","id","from","to","cc","bcc","reply_to","subject","html","text","created_at","scheduled_at","last_event"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getEmail","summary":"Retrieve an email","description":"One sent email with its last event. `html` and `text` are read back from your S3 bucket and are null when they cannot be read."},"patch":{"tags":["emails"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scheduled_at":{"type":"string","minLength":1,"maxLength":100}},"required":["scheduled_at"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["email"]},"id":{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$","description":"Stamp0 em_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateEmail","summary":"Reschedule an email","description":"Changes `scheduled_at` of a scheduled email."}},"/emails/{id}/attachments":{"get":{"tags":["emails"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"content_disposition":{"type":"string","enum":["attachment","inline"]},"content_id":{"type":["string","null"]},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"download_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","filename","content_type","content_disposition","content_id","size","download_url","expires_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listEmailAttachments","summary":"List attachments of a sent email","description":"Each with a presigned download URL from your S3 bucket, valid for one hour."}},"/emails/{id}/attachments/{attachmentId}":{"get":{"tags":["emails"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"attachmentId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"content_disposition":{"type":"string","enum":["attachment","inline"]},"content_id":{"type":["string","null"]},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"object":{"type":"string","enum":["attachment"]},"download_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","filename","content_type","content_disposition","content_id","size","object","download_url","expires_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getEmailAttachment","summary":"Retrieve an attachment of a sent email"}},"/emails/{id}/attachments/{attachmentId}/content":{"get":{"tags":["emails"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"query","name":"expires","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"attachmentId","required":true}],"responses":{"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"downloadEmailAttachment","summary":"Download an attachment of a sent email","description":"The bytes of one attachment, with the same authentication as the listing. The attachment of a Cloudflare connection is read from your R2 bucket with the runtime token and answered as a download; an Amazon SES one redirects to a presigned S3 URL. `expires` (from the `download_url`) is checked when present."}},"/emails/{id}/cancel":{"post":{"tags":["emails"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["email"]},"id":{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$","description":"Stamp0 em_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"cancelEmail","summary":"Cancel a scheduled email"}},"/templates":{"post":{"tags":["templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"alias":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"},"from":{"type":"string","maxLength":320},"reply_to":{"anyOf":[{"type":"string","maxLength":320},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320}}]},"subject":{"type":"string","maxLength":998},"preheader":{"type":"string","maxLength":512},"html":{"type":"string","minLength":1},"text":{"type":"string"},"react":{"type":"string","maxLength":1048576},"variables":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","enum":["string","number"]},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"}]},{"type":"null"}]}},"required":["key","type"]}}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["template"]},"id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createTemplate","summary":"Create a template","description":"Saves a draft with HTML, optional text, subject, preheader, sender defaults and up to 50 variables (`{{{KEY}}}`, `{{{KEY|fallback}}}` or `{{ KEY | default: \"x\" }}`). Publish it before sending with it. React Email is not compiled server-side: send the rendered `html` (`react` is stored as source only)."},"get":{"tags":["templates"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"alias":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"name":{"type":"string"},"object":{"type":"string","enum":["template"]},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","published"]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["alias","created_at","id","name","object","published_at","status","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listTemplates","summary":"List templates","description":"Newest first, cursor-paginated."}},"/templates/{id}":{"get":{"tags":["templates"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["template"]},"id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"name":{"type":"string"},"alias":{"type":["string","null"]},"status":{"type":"string","enum":["draft","published"]},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"html":{"type":"string"},"text":{"type":["string","null"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["string","number"]},"fallback_value":{"type":["string","number","null"]}},"required":["key","type","fallback_value"],"additionalProperties":false}},"published_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"current_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"react":{"type":["string","null"]},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"has_unpublished_versions":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","alias","status","from","reply_to","subject","preheader","html","text","variables","published_version_id","current_version_id","react","published_at","has_unpublished_versions","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getTemplate","summary":"Retrieve a template","description":"By `tpl_…` id or alias: the draft, its publish state and whether it differs from the published version."},"patch":{"tags":["templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"alias":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"},{"type":"null"}]},"from":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"reply_to":{"anyOf":[{"anyOf":[{"type":"string","maxLength":320},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320}}]},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":998},{"type":"null"}]},"preheader":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]},"html":{"type":"string","minLength":1},"text":{"type":["string","null"]},"react":{"anyOf":[{"type":"string","maxLength":1048576},{"type":"null"}]},"variables":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","enum":["string","number"]},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"}]},{"type":"null"}]}},"required":["key","type"]}}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["template"]},"id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateTemplate","summary":"Update a template","description":"Changes the draft; sends keep using the published version until you publish again."},"delete":{"tags":["templates"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["template"]},"id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteTemplate","summary":"Delete a template"}},"/templates/{id}/publish":{"post":{"tags":["templates"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["template"]},"id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"publishTemplate","summary":"Publish a template","description":"Snapshots the draft into a new immutable version that sends use."}},"/templates/{id}/duplicate":{"post":{"tags":["templates"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["template"]},"id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"duplicateTemplate","summary":"Duplicate a template","description":"Copies the draft into a new unpublished template without an alias."}},"/templates/{id}/versions":{"get":{"tags":["templates"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["template_version"]},"id":{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"html":{"type":"string"},"text":{"type":["string","null"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["string","number"]},"fallback_value":{"type":["string","number","null"]}},"required":["key","type","fallback_value"],"additionalProperties":false}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","template_id","version","from","reply_to","subject","preheader","html","text","variables","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listTemplateVersions","summary":"List template versions","description":"Published versions, newest first."}},"/templates/{id}/versions/{versionId}":{"get":{"tags":["templates"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"versionId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["template_version"]},"id":{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"html":{"type":"string"},"text":{"type":["string","null"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["string","number"]},"fallback_value":{"type":["string","number","null"]}},"required":["key","type","fallback_value"],"additionalProperties":false}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","template_id","version","from","reply_to","subject","preheader","html","text","variables","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getTemplateVersion","summary":"Retrieve a template version"}},"/templates/{id}/render":{"post":{"tags":["templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variables":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"}]}},"contact":{"type":"string","maxLength":254},"draft":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["rendered_template"]},"version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"from":{"type":["string","null"]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"html":{"type":"string"},"text":{"type":["string","null"]},"missing":{"type":"array","items":{"type":"string"}}},"required":["object","version_id","from","subject","preheader","html","text","missing"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"renderTemplate","summary":"Preview a template","description":"Renders the published version (or the draft) as a contact of the project or a sample contact, with your variables. Variables without a value render as `[KEY]` and are listed in `missing`."}},"/templates/{id}/test":{"post":{"tags":["templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variables":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"}]}},"contact":{"type":"string","maxLength":254},"draft":{"type":"boolean"},"from":{"type":"string","maxLength":320}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["email"]},"id":{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$","description":"Stamp0 em_ identifier"},"to":{"type":"string"}},"required":["object","id","to"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendTemplateTest","summary":"Send a test email","description":"Sends the rendered template once to your own verified email address. Dashboard and OAuth sessions only."}},"/campaigns":{"post":{"tags":["campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"from":{"type":"string","maxLength":320},"reply_to":{"anyOf":[{"type":"string","maxLength":320},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320}}]},"subject":{"type":"string","maxLength":998},"preheader":{"type":"string","maxLength":512},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"html":{"type":"string","minLength":1},"text":{"type":"string","minLength":1},"list_ids":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},"preference_list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["campaign"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","paused"]},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"template_id":{"anyOf":[{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},{"type":"null"}]},"template_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"null"}]},"preference_list_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"type":["string","null"]},"stats":{"type":"object","properties":{"recipients":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recipients","sent","delivered","opened","clicked","bounced","complained","unsubscribed","failed","skipped"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","from","reply_to","subject","preheader","template_id","template_version_id","html","text","list_ids","segment_id","preference_list_id","scheduled_at","sent_at","last_error","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createCampaign","summary":"Create a campaign","description":"Creates a draft. Content is a template (its published version is pinned at send time) or inline `html`/`text` with merge tags; the audience is `list_ids` and/or a filter `segment_id`, optionally gated by a public `preference_list_id`."},"get":{"tags":["campaigns"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","paused"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["campaign"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","paused"]},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"template_id":{"anyOf":[{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},{"type":"null"}]},"template_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"null"}]},"preference_list_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"type":["string","null"]},"stats":{"type":"object","properties":{"recipients":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recipients","sent","delivered","opened","clicked","bounced","complained","unsubscribed","failed","skipped"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","from","reply_to","subject","preheader","template_id","template_version_id","html","text","list_ids","segment_id","preference_list_id","scheduled_at","sent_at","last_error","stats","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listCampaigns","summary":"List campaigns","description":"Newest first; filter by `status`."}},"/campaigns/{id}":{"get":{"tags":["campaigns"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["campaign"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","paused"]},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"template_id":{"anyOf":[{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},{"type":"null"}]},"template_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"null"}]},"preference_list_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"type":["string","null"]},"stats":{"type":"object","properties":{"recipients":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recipients","sent","delivered","opened","clicked","bounced","complained","unsubscribed","failed","skipped"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","from","reply_to","subject","preheader","template_id","template_version_id","html","text","list_ids","segment_id","preference_list_id","scheduled_at","sent_at","last_error","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getCampaign","summary":"Retrieve a campaign","description":"Includes `stats` (recipients, sent, delivered, opened, clicked, bounced, complained, unsubscribed, failed, skipped) rolled up from SES events, and `last_error` when the sender paused it."},"patch":{"tags":["campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"from":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"reply_to":{"anyOf":[{"anyOf":[{"type":"string","maxLength":320},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320}}]},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":998},{"type":"null"}]},"preheader":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]},"template_id":{"anyOf":[{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},{"type":"null"}]},"html":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"text":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"list_ids":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"null"}]},"preference_list_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["campaign"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","paused"]},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"template_id":{"anyOf":[{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},{"type":"null"}]},"template_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"null"}]},"preference_list_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"type":["string","null"]},"stats":{"type":"object","properties":{"recipients":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recipients","sent","delivered","opened","clicked","bounced","complained","unsubscribed","failed","skipped"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","from","reply_to","subject","preheader","template_id","template_version_id","html","text","list_ids","segment_id","preference_list_id","scheduled_at","sent_at","last_error","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateCampaign","summary":"Update a campaign","description":"Drafts only."},"delete":{"tags":["campaigns"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["campaign"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteCampaign","summary":"Delete a campaign","description":"Drafts, campaigns scheduled but not started, and canceled campaigns."}},"/campaigns/{id}/send":{"post":{"tags":["campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"scheduled_at":{"type":"string","minLength":1,"maxLength":100}}},{"type":"null"}]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["campaign"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","paused"]},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"template_id":{"anyOf":[{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},{"type":"null"}]},"template_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"null"}]},"preference_list_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"type":["string","null"]},"stats":{"type":"object","properties":{"recipients":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recipients","sent","delivered","opened","clicked","bounced","complained","unsubscribed","failed","skipped"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","from","reply_to","subject","preheader","template_id","template_version_id","html","text","list_ids","segment_id","preference_list_id","scheduled_at","sent_at","last_error","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendCampaign","summary":"Send or schedule a campaign","description":"Sends now, or at `scheduled_at` (ISO 8601 or natural language, up to 30 days ahead). Needs from, subject, content, an audience, a verified sending domain and a physical address in the marketing settings. The audience is snapshotted when sending starts."}},"/campaigns/{id}/cancel":{"post":{"tags":["campaigns"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["campaign"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","paused"]},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"template_id":{"anyOf":[{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},{"type":"null"}]},"template_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"null"}]},"preference_list_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"type":["string","null"]},"stats":{"type":"object","properties":{"recipients":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recipients","sent","delivered","opened","clicked","bounced","complained","unsubscribed","failed","skipped"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","from","reply_to","subject","preheader","template_id","template_version_id","html","text","list_ids","segment_id","preference_list_id","scheduled_at","sent_at","last_error","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"cancelCampaign","summary":"Cancel a campaign","description":"Stops a scheduled, sending or paused campaign for good; recipients not yet sent are never sent."}},"/campaigns/{id}/pause":{"post":{"tags":["campaigns"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["campaign"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","paused"]},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"template_id":{"anyOf":[{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},{"type":"null"}]},"template_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"null"}]},"preference_list_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"type":["string","null"]},"stats":{"type":"object","properties":{"recipients":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recipients","sent","delivered","opened","clicked","bounced","complained","unsubscribed","failed","skipped"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","from","reply_to","subject","preheader","template_id","template_version_id","html","text","list_ids","segment_id","preference_list_id","scheduled_at","sent_at","last_error","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"pauseCampaign","summary":"Pause a campaign","description":"Stops a scheduled or sending campaign after the email in flight."}},"/campaigns/{id}/resume":{"post":{"tags":["campaigns"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["campaign"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","paused"]},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"template_id":{"anyOf":[{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},{"type":"null"}]},"template_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"null"}]},"preference_list_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"type":["string","null"]},"stats":{"type":"object","properties":{"recipients":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recipients","sent","delivered","opened","clicked","bounced","complained","unsubscribed","failed","skipped"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","from","reply_to","subject","preheader","template_id","template_version_id","html","text","list_ids","segment_id","preference_list_id","scheduled_at","sent_at","last_error","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"resumeCampaign","summary":"Resume a campaign","description":"Continues a paused campaign where it stopped, or waits for its schedule again. Nobody is sent twice."}},"/campaigns/{id}/duplicate":{"post":{"tags":["campaigns"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["campaign"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","paused"]},"from":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"subject":{"type":["string","null"]},"preheader":{"type":["string","null"]},"template_id":{"anyOf":[{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},{"type":"null"}]},"template_version_id":{"anyOf":[{"type":"string","pattern":"^tplv_[0-9A-Za-z]{16}$","description":"Stamp0 tplv_ identifier"},{"type":"null"}]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"segment_id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"null"}]},"preference_list_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_error":{"type":["string","null"]},"stats":{"type":"object","properties":{"recipients":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recipients","sent","delivered","opened","clicked","bounced","complained","unsubscribed","failed","skipped"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","from","reply_to","subject","preheader","template_id","template_version_id","html","text","list_ids","segment_id","preference_list_id","scheduled_at","sent_at","last_error","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"duplicateCampaign","summary":"Duplicate a campaign","description":"A new draft with the same content and audience."}},"/campaigns/{id}/test":{"post":{"tags":["campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","maxLength":320}},"contact":{"type":"string","maxLength":254}},"required":["to"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["campaign_test"]},"campaign_id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"email_ids":{"type":"array","items":{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$","description":"Stamp0 em_ identifier"}}},"required":["object","campaign_id","email_ids"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"testCampaign","summary":"Send a test","description":"Sends the rendered campaign to up to 5 addresses as transactional emails, with merge tags filled from `contact` when given. Its unsubscribe link is a placeholder."}},"/campaigns/{id}/recipients":{"get":{"tags":["campaigns"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["pending","queued","sent","delivered","bounced","complained","failed","skipped"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["campaign_recipient"]},"campaign_id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string"},"status":{"type":"string","enum":["pending","queued","sent","delivered","bounced","complained","failed","skipped"]},"skip_reason":{"anyOf":[{"type":"string","enum":["unsubscribed","list_opted_out","suppressed","invalid_email","consent_pending","email_changed"]},{"type":"null"}]},"email_id":{"anyOf":[{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$","description":"Stamp0 em_ identifier"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["object","campaign_id","contact_id","email","status","skip_reason","email_id","sent_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listCampaignRecipients","summary":"List campaign recipients","description":"The audience snapshot with each recipient's status, skip reason and email id."}},"/broadcasts":{"post":{"tags":["broadcasts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"segment_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}]},"audience_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"topic_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"reply_to":{"anyOf":[{"type":"string","maxLength":320},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320}}]},"preview_text":{"type":"string","maxLength":512},"html":{"type":"string","minLength":1},"text":{"type":"string","minLength":1},"send":{"type":"boolean"},"scheduled_at":{"type":"string","minLength":1,"maxLength":100}},"required":["from","subject"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createBroadcast","summary":"Create a broadcast","description":"Resend-compatible. `segment_id` (or `audience_id`) is a list or a filter segment; `send: true` creates and sends (or schedules) in one step: a refused send creates nothing. Honours `Idempotency-Key` (24 hours)."},"get":{"tags":["broadcasts"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"audience_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":["string","null"]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"segment_id":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}]},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","scheduled","queued","sent","canceled"]}},"required":["audience_id","created_at","id","name","scheduled_at","segment_id","sent_at","status"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listBroadcasts","summary":"List broadcasts"}},"/broadcasts/{id}":{"get":{"tags":["broadcasts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["broadcast"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"name":{"type":["string","null"]},"segment_id":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}]},{"type":"null"}]},"audience_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"topic_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"from":{"type":["string","null"]},"subject":{"type":["string","null"]},"reply_to":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"preview_text":{"type":["string","null"]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"status":{"type":"string","enum":["draft","scheduled","queued","sent","canceled"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["object","id","name","segment_id","audience_id","topic_id","from","subject","reply_to","preview_text","html","text","status","created_at","scheduled_at","sent_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getBroadcast","summary":"Retrieve a broadcast"},"patch":{"tags":["broadcasts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"segment_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}]},"audience_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"topic_id":{"anyOf":[{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},{"type":"null"}]},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"reply_to":{"anyOf":[{"anyOf":[{"type":"string","maxLength":320},{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320}}]},{"type":"null"}]},"preview_text":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}]},"html":{"type":"string","minLength":1},"text":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateBroadcast","summary":"Update a broadcast","description":"Drafts only."},"delete":{"tags":["broadcasts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["broadcast"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteBroadcast","summary":"Delete a broadcast"}},"/broadcasts/{id}/cancel":{"post":{"tags":["broadcasts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["broadcast"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"cancelBroadcast","summary":"Cancel a broadcast","description":"A scheduled, sending or paused broadcast; recipients not yet sent are never sent. Its status becomes `canceled`."}},"/broadcasts/{id}/duplicate":{"post":{"tags":["broadcasts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["broadcast"]},"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"duplicateBroadcast","summary":"Duplicate a broadcast","description":"A new draft with the same content and audience."}},"/broadcasts/{id}/recipients":{"get":{"tags":["broadcasts"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["sent","delivered","opened","clicked","bounced","complained","unsubscribed","suppressed"]},"in":"query","name":"type","required":true},{"schema":{"type":"string","minLength":1,"maxLength":320},"in":"query","name":"email","required":false},{"schema":{"type":"string","enum":["permanent","transient","undetermined"]},"in":"query","name":"bounce_type","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contact_id":{"type":["string","null"]},"email":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"clicked_links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url","clicks"],"additionalProperties":false}},"bounce_type":{"type":"string","enum":["permanent","transient","undetermined"]}},"required":["id","contact_id","email"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listBroadcastRecipients","summary":"List broadcast recipients","description":"Recipients with one event `type` (sent, delivered, opened, clicked, bounced, complained, unsubscribed, suppressed)."}},"/broadcasts/{id}/clicked-links":{"get":{"tags":["broadcasts"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unique_clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","url","clicks","unique_clicks"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listBroadcastClickedLinks","summary":"List clicked links","description":"Clicks and unique clicks per link of the broadcast."}},"/broadcasts/{id}/send":{"post":{"tags":["broadcasts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"scheduled_at":{"type":"string","minLength":1,"maxLength":100}}},{"type":"null"}]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^cmp_[0-9A-Za-z]{16}$","description":"Stamp0 cmp_ identifier"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendBroadcast","summary":"Send a broadcast","description":"Sends now, or at `scheduled_at`."}},"/emails/receiving":{"get":{"tags":["emails"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["email"]},"id":{"type":"string","pattern":"^rcv_[0-9A-Za-z]{16}$","description":"Stamp0 rcv_ identifier"},"to":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"subject":{"type":"string"},"bcc":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"received_for":{"type":"array","items":{"type":"string"}},"reply_to":{"type":"array","items":{"type":"string"}},"message_id":{"type":["string","null"]},"inbox_id":{"type":["string","null"]},"inbox_ids":{"type":"array","items":{"type":"string"}},"verdicts":{"type":"object","properties":{"spam":{"type":["string","null"]},"virus":{"type":["string","null"]},"spf":{"type":["string","null"]},"dkim":{"type":["string","null"]},"dmarc":{"type":["string","null"]}},"required":["spam","virus","spf","dkim","dmarc"],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"content_disposition":{"type":"string","enum":["attachment","inline"]},"content_id":{"type":["string","null"]},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","filename","content_type","content_disposition","content_id","size"],"additionalProperties":false}}},"required":["object","id","to","from","created_at","subject","bcc","cc","received_for","reply_to","message_id","inbox_id","inbox_ids","verdicts","attachments"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listReceivedEmails","summary":"List received emails","description":"Inbound email received on your domains, with SES spam and virus verdicts and the inbox it reached."}},"/emails/receiving/{id}":{"get":{"tags":["emails"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["email"]},"id":{"type":"string","pattern":"^rcv_[0-9A-Za-z]{16}$","description":"Stamp0 rcv_ identifier"},"to":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"subject":{"type":"string"},"bcc":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"received_for":{"type":"array","items":{"type":"string"}},"reply_to":{"type":"array","items":{"type":"string"}},"message_id":{"type":["string","null"]},"inbox_id":{"type":["string","null"]},"inbox_ids":{"type":"array","items":{"type":"string"}},"verdicts":{"type":"object","properties":{"spam":{"type":["string","null"]},"virus":{"type":["string","null"]},"spf":{"type":["string","null"]},"dkim":{"type":["string","null"]},"dmarc":{"type":["string","null"]}},"required":["spam","virus","spf","dkim","dmarc"],"additionalProperties":false},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"content_disposition":{"type":"string","enum":["attachment","inline"]},"content_id":{"type":["string","null"]},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","filename","content_type","content_disposition","content_id","size"],"additionalProperties":false}},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"raw":{"type":"object","properties":{"download_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["download_url","expires_at"],"additionalProperties":false}},"required":["object","id","to","from","created_at","subject","bcc","cc","received_for","reply_to","message_id","inbox_id","inbox_ids","verdicts","attachments","html","text","headers","raw"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getReceivedEmail","summary":"Retrieve a received email","description":"Parsed html, text and headers from the raw MIME in your bucket, plus `raw.download_url`, valid for up to one hour: a presigned S3 URL on Amazon SES, a link to `GET /emails/receiving/{id}/raw` on Cloudflare."}},"/emails/receiving/{id}/raw":{"get":{"tags":["emails"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"query","name":"expires","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"downloadReceivedEmail","summary":"Download the raw message of a received email","description":"The raw MIME, with the same authentication as the read that returned the link. On Cloudflare it is read from your R2 bucket with the runtime token and answered as a download; on Amazon SES it redirects to a presigned S3 URL. `expires` (from the `download_url`) is checked when present."}},"/emails/receiving/{id}/attachments":{"get":{"tags":["emails"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"content_disposition":{"type":"string","enum":["attachment","inline"]},"content_id":{"type":["string","null"]},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"download_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","filename","content_type","content_disposition","content_id","size","download_url","expires_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listReceivedEmailAttachments","summary":"List attachments of a received email"}},"/emails/receiving/{id}/attachments/{attachmentId}":{"get":{"tags":["emails"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"attachmentId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"content_disposition":{"type":"string","enum":["attachment","inline"]},"content_id":{"type":["string","null"]},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"object":{"type":"string","enum":["attachment"]},"download_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","filename","content_type","content_disposition","content_id","size","object","download_url","expires_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getReceivedEmailAttachment","summary":"Retrieve an attachment of a received email","description":"Metadata and a download URL valid for up to one hour: presigned from your S3 bucket on Amazon SES, a link to `…/content` on Cloudflare."}},"/emails/receiving/{id}/attachments/{attachmentId}/content":{"get":{"tags":["emails"],"parameters":[{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"query","name":"expires","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"attachmentId","required":true}],"responses":{"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"downloadReceivedEmailAttachment","summary":"Download an attachment of a received email","description":"The bytes of one attachment, with the same authentication as the listing. On Cloudflare it is read from your R2 bucket with the runtime token and answered as a download; on Amazon SES it redirects to a presigned S3 URL. `expires` (from the `download_url`) is checked when present."}},"/inboxes":{"post":{"tags":["inboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"address":{"type":"string","minLength":1,"maxLength":254},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"agent_settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","address","domain_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["inbox"]},"id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"name":{"type":"string"},"address":{"type":"string"},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"status":{"type":"string","enum":["active","activating"]},"agent_settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","address","domain_id","status","agent_settings","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createInbox","summary":"Create an inbox","description":"An address on a project domain with receiving enabled, by local part or full address."},"get":{"tags":["inboxes"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["inbox"]},"id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"name":{"type":"string"},"address":{"type":"string"},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"status":{"type":"string","enum":["active","activating"]},"agent_settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","address","domain_id","status","agent_settings","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listInboxes","summary":"List inboxes"}},"/inboxes/{id}":{"get":{"tags":["inboxes"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["inbox"]},"id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"name":{"type":"string"},"address":{"type":"string"},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"status":{"type":"string","enum":["active","activating"]},"agent_settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","address","domain_id","status","agent_settings","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getInbox","summary":"Retrieve an inbox"},"patch":{"tags":["inboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"agent_settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["inbox"]},"id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"name":{"type":"string"},"address":{"type":"string"},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"status":{"type":"string","enum":["active","activating"]},"agent_settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","address","domain_id","status","agent_settings","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateInbox","summary":"Update an inbox","description":"Changes the name and agent settings."},"delete":{"tags":["inboxes"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["inbox"]},"id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteInbox","summary":"Delete an inbox","description":"Deletes the inbox with its threads, messages, drafts and agent keys. Received emails stay, unassigned."}},"/inboxes/{id}/threads":{"get":{"tags":["inboxes"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"query","required":false},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.:-]{0,63}$"},"in":"query","name":"label","required":false},{"schema":{"type":"string","enum":["open","closed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unread","required":false},{"schema":{"anyOf":[{"type":"string","enum":["me","none"]},{"type":"string","pattern":"^usr_[0-9A-Za-z]{16}$","description":"Stamp0 usr_ identifier"}]},"in":"query","name":"assignee","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["thread"]},"id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"subject":{"type":"string"},"status":{"type":"string","enum":["open","closed"]},"labels":{"type":"array","items":{"type":"string"}},"participants":{"type":"array","items":{"type":"string"}},"message_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed_message_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"unread_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"assignee_id":{"anyOf":[{"type":"string","pattern":"^usr_[0-9A-Za-z]{16}$","description":"Stamp0 usr_ identifier"},{"type":"null"}]},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","inbox_id","subject","status","labels","participants","message_count","failed_message_count","unread_count","assignee_id","last_message_at","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listThreads","summary":"List threads","description":"Newest activity first. Filter by `query` (subject or participant), `label`, `status`, `unread` and `assignee` (`me`, `none` or a member id)."}},"/inboxes/{id}/threads/{threadId}":{"get":{"tags":["inboxes"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"threadId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["thread"]},"id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"subject":{"type":"string"},"status":{"type":"string","enum":["open","closed"]},"labels":{"type":"array","items":{"type":"string"}},"participants":{"type":"array","items":{"type":"string"}},"message_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed_message_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"unread_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"assignee_id":{"anyOf":[{"type":"string","pattern":"^usr_[0-9A-Za-z]{16}$","description":"Stamp0 usr_ identifier"},{"type":"null"}]},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"messages":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["message"]},"id":{"type":"string","pattern":"^msg_[0-9A-Za-z]{16}$","description":"Stamp0 msg_ identifier"},"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"direction":{"type":"string","enum":["inbound","outbound"]},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"reply_to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"message_id":{"type":["string","null"]},"in_reply_to":{"type":["string","null"]},"references":{"type":"array","items":{"type":"string"}},"email_id":{"type":["string","null"]},"received_email_id":{"type":["string","null"]},"verdicts":{"anyOf":[{"type":"object","properties":{"spam":{"type":["string","null"]},"virus":{"type":["string","null"]},"spf":{"type":["string","null"]},"dkim":{"type":["string","null"]},"dmarc":{"type":["string","null"]}},"required":["spam","virus","spf","dkim","dmarc"],"additionalProperties":false},{"type":"null"}]},"read":{"type":"boolean"},"status":{"type":"string","enum":["received","scheduled","queued","sent","delivered","delivery_delayed","opened","clicked","bounced","complained","rejected","failed","suppressed","canceled"]},"sent_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","thread_id","inbox_id","direction","from","to","cc","reply_to","subject","message_id","in_reply_to","references","email_id","received_email_id","verdicts","read","status","sent_at"],"additionalProperties":false}}},"required":["object","id","inbox_id","subject","status","labels","participants","message_count","failed_message_count","unread_count","assignee_id","last_message_at","created_at","messages"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getThread","summary":"Retrieve a thread","description":"The thread with its messages."},"patch":{"tags":["inboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","closed"]},"labels":{"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.:-]{0,63}$"}},"add_labels":{"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.:-]{0,63}$"}},"remove_labels":{"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.:-]{0,63}$"}},"read":{"type":"boolean"},"assignee_id":{"anyOf":[{"type":"string","pattern":"^usr_[0-9A-Za-z]{16}$","description":"Stamp0 usr_ identifier"},{"type":"null"}]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"threadId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["thread"]},"id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"subject":{"type":"string"},"status":{"type":"string","enum":["open","closed"]},"labels":{"type":"array","items":{"type":"string"}},"participants":{"type":"array","items":{"type":"string"}},"message_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed_message_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"unread_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"assignee_id":{"anyOf":[{"type":"string","pattern":"^usr_[0-9A-Za-z]{16}$","description":"Stamp0 usr_ identifier"},{"type":"null"}]},"last_message_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","inbox_id","subject","status","labels","participants","message_count","failed_message_count","unread_count","assignee_id","last_message_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateThread","summary":"Update a thread","description":"Changes status, labels (`labels`, `add_labels`, `remove_labels`), read state and the assignee (`assignee_id`, a member of the organization, or null). Status, label and assignment changes are recorded in the thread activity."}},"/inboxes/{id}/threads/{threadId}/notes":{"post":{"tags":["inboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000}},"required":["body"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"threadId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["thread_activity"]},"id":{"type":"string","pattern":"^tha_[0-9A-Za-z]{16}$","description":"Stamp0 tha_ identifier"},"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"kind":{"type":"string","enum":["note","assigned","status_changed","labels_changed","message_sent"]},"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"user_id":{"type":"string","pattern":"^usr_[0-9A-Za-z]{16}$","description":"Stamp0 usr_ identifier"}},"required":["type","user_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["api_key"]},"api_key_id":{"type":["string","null"]},"api_key_name":{"type":["string","null"]},"agent":{"type":"boolean"}},"required":["type","api_key_id","api_key_name","agent"],"additionalProperties":false}]},"body":{"type":["string","null"]},"message_id":{"anyOf":[{"type":"string","pattern":"^msg_[0-9A-Za-z]{16}$","description":"Stamp0 msg_ identifier"},{"type":"null"}]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","thread_id","inbox_id","kind","actor","body","message_id","data","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createThreadNote","summary":"Add an internal note","description":"A note on the thread for teammates and agents. It is never sent to the participants."}},"/inboxes/{id}/threads/{threadId}/activity":{"get":{"tags":["inboxes"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"threadId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["thread_activity"]},"id":{"type":"string","pattern":"^tha_[0-9A-Za-z]{16}$","description":"Stamp0 tha_ identifier"},"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"kind":{"type":"string","enum":["note","assigned","status_changed","labels_changed","message_sent"]},"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"user_id":{"type":"string","pattern":"^usr_[0-9A-Za-z]{16}$","description":"Stamp0 usr_ identifier"}},"required":["type","user_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["api_key"]},"api_key_id":{"type":["string","null"]},"api_key_name":{"type":["string","null"]},"agent":{"type":"boolean"}},"required":["type","api_key_id","api_key_name","agent"],"additionalProperties":false}]},"body":{"type":["string","null"]},"message_id":{"anyOf":[{"type":"string","pattern":"^msg_[0-9A-Za-z]{16}$","description":"Stamp0 msg_ identifier"},{"type":"null"}]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","thread_id","inbox_id","kind","actor","body","message_id","data","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listThreadActivity","summary":"List thread activity","description":"Oldest first: notes, assignment, status and label changes, and who sent each message (a member or an API key, agent keys marked)."}},"/inboxes/{id}/threads/{threadId}/messages":{"get":{"tags":["inboxes"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"threadId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["message"]},"id":{"type":"string","pattern":"^msg_[0-9A-Za-z]{16}$","description":"Stamp0 msg_ identifier"},"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"direction":{"type":"string","enum":["inbound","outbound"]},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"reply_to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"message_id":{"type":["string","null"]},"in_reply_to":{"type":["string","null"]},"references":{"type":"array","items":{"type":"string"}},"email_id":{"type":["string","null"]},"received_email_id":{"type":["string","null"]},"verdicts":{"anyOf":[{"type":"object","properties":{"spam":{"type":["string","null"]},"virus":{"type":["string","null"]},"spf":{"type":["string","null"]},"dkim":{"type":["string","null"]},"dmarc":{"type":["string","null"]}},"required":["spam","virus","spf","dkim","dmarc"],"additionalProperties":false},{"type":"null"}]},"read":{"type":"boolean"},"status":{"type":"string","enum":["received","scheduled","queued","sent","delivered","delivery_delayed","opened","clicked","bounced","complained","rejected","failed","suppressed","canceled"]},"sent_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","thread_id","inbox_id","direction","from","to","cc","reply_to","subject","message_id","in_reply_to","references","email_id","received_email_id","verdicts","read","status","sent_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listThreadMessages","summary":"List messages in a thread"}},"/inboxes/{id}/messages/{messageId}":{"get":{"tags":["inboxes"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"messageId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["message"]},"id":{"type":"string","pattern":"^msg_[0-9A-Za-z]{16}$","description":"Stamp0 msg_ identifier"},"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"direction":{"type":"string","enum":["inbound","outbound"]},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"reply_to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"message_id":{"type":["string","null"]},"in_reply_to":{"type":["string","null"]},"references":{"type":"array","items":{"type":"string"}},"email_id":{"type":["string","null"]},"received_email_id":{"type":["string","null"]},"verdicts":{"anyOf":[{"type":"object","properties":{"spam":{"type":["string","null"]},"virus":{"type":["string","null"]},"spf":{"type":["string","null"]},"dkim":{"type":["string","null"]},"dmarc":{"type":["string","null"]}},"required":["spam","virus","spf","dkim","dmarc"],"additionalProperties":false},{"type":"null"}]},"read":{"type":"boolean"},"status":{"type":"string","enum":["received","scheduled","queued","sent","delivered","delivery_delayed","opened","clicked","bounced","complained","rejected","failed","suppressed","canceled"]},"sent_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","thread_id","inbox_id","direction","from","to","cc","reply_to","subject","html","text","message_id","in_reply_to","references","email_id","received_email_id","verdicts","read","status","sent_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getMessage","summary":"Retrieve a message","description":"One message with its bodies."},"patch":{"tags":["inboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"read":{"type":"boolean"}},"required":["read"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"messageId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["message"]},"id":{"type":"string","pattern":"^msg_[0-9A-Za-z]{16}$","description":"Stamp0 msg_ identifier"},"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"direction":{"type":"string","enum":["inbound","outbound"]},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"reply_to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"message_id":{"type":["string","null"]},"in_reply_to":{"type":["string","null"]},"references":{"type":"array","items":{"type":"string"}},"email_id":{"type":["string","null"]},"received_email_id":{"type":["string","null"]},"verdicts":{"anyOf":[{"type":"object","properties":{"spam":{"type":["string","null"]},"virus":{"type":["string","null"]},"spf":{"type":["string","null"]},"dkim":{"type":["string","null"]},"dmarc":{"type":["string","null"]}},"required":["spam","virus","spf","dkim","dmarc"],"additionalProperties":false},{"type":"null"}]},"read":{"type":"boolean"},"status":{"type":"string","enum":["received","scheduled","queued","sent","delivered","delivery_delayed","opened","clicked","bounced","complained","rejected","failed","suppressed","canceled"]},"sent_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","thread_id","inbox_id","direction","from","to","cc","reply_to","subject","message_id","in_reply_to","references","email_id","received_email_id","verdicts","read","status","sent_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateMessage","summary":"Update a message","description":"Marks the message read or unread."}},"/inboxes/{id}/messages":{"post":{"tags":["inboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"to":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"cc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"bcc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"subject":{"type":"string","minLength":1,"maxLength":998},"html":{"type":"string","maxLength":5242880},"text":{"type":"string","maxLength":5242880},"from_name":{"type":"string","maxLength":256},"reply_to":{"type":"string","maxLength":320}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["message"]},"id":{"type":"string","pattern":"^msg_[0-9A-Za-z]{16}$","description":"Stamp0 msg_ identifier"},"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"email_id":{"type":"string"}},"required":["object","id","thread_id","email_id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendInboxMessage","summary":"Send a message from an inbox","description":"Starts a new conversation, or replies within `thread_id`. The message is sent from the inbox address."}},"/inboxes/{id}/threads/{threadId}/reply":{"post":{"tags":["inboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message_id":{"type":"string","pattern":"^msg_[0-9A-Za-z]{16}$","description":"Stamp0 msg_ identifier"},"reply_all":{"type":"boolean"},"to":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"cc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"bcc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"html":{"type":"string","maxLength":5242880},"text":{"type":"string","maxLength":5242880},"from_name":{"type":"string","maxLength":256}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"threadId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["message"]},"id":{"type":"string","pattern":"^msg_[0-9A-Za-z]{16}$","description":"Stamp0 msg_ identifier"},"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"email_id":{"type":"string"}},"required":["object","id","thread_id","email_id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"replyToThread","summary":"Reply to a thread","description":"Replies to the latest message (or `message_id`), to its Reply-To or From, with `Re:` subject and In-Reply-To/References set. `reply_all` adds the other recipients."}},"/inboxes/{id}/drafts":{"post":{"tags":["inboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"to":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"cc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"bcc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"subject":{"type":"string","maxLength":998},"html":{"type":"string","maxLength":5242880},"text":{"type":"string","maxLength":5242880}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["draft"]},"id":{"type":"string","pattern":"^drf_[0-9A-Za-z]{16}$","description":"Stamp0 drf_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"thread_id":{"anyOf":[{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},{"type":"null"}]},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","inbox_id","thread_id","to","cc","bcc","subject","html","text","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createDraft","summary":"Create a draft"},"get":{"tags":["inboxes"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["draft"]},"id":{"type":"string","pattern":"^drf_[0-9A-Za-z]{16}$","description":"Stamp0 drf_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"thread_id":{"anyOf":[{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},{"type":"null"}]},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","inbox_id","thread_id","to","cc","bcc","subject","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listDrafts","summary":"List drafts"}},"/inboxes/{id}/drafts/{draftId}":{"get":{"tags":["inboxes"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"draftId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["draft"]},"id":{"type":"string","pattern":"^drf_[0-9A-Za-z]{16}$","description":"Stamp0 drf_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"thread_id":{"anyOf":[{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},{"type":"null"}]},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","inbox_id","thread_id","to","cc","bcc","subject","html","text","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getDraft","summary":"Retrieve a draft"},"patch":{"tags":["inboxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"cc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"bcc":{"anyOf":[{"type":"string","maxLength":320},{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":320}}]},"subject":{"type":"string","maxLength":998},"html":{"type":"string","maxLength":5242880},"text":{"type":"string","maxLength":5242880}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"draftId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["draft"]},"id":{"type":"string","pattern":"^drf_[0-9A-Za-z]{16}$","description":"Stamp0 drf_ identifier"},"inbox_id":{"type":"string","pattern":"^ibx_[0-9A-Za-z]{16}$","description":"Stamp0 ibx_ identifier"},"thread_id":{"anyOf":[{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},{"type":"null"}]},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","inbox_id","thread_id","to","cc","bcc","subject","html","text","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateDraft","summary":"Update a draft"},"delete":{"tags":["inboxes"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"draftId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["draft"]},"id":{"type":"string","pattern":"^drf_[0-9A-Za-z]{16}$","description":"Stamp0 drf_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteDraft","summary":"Delete a draft"}},"/inboxes/{id}/drafts/{draftId}/send":{"post":{"tags":["inboxes"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"draftId","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["message"]},"id":{"type":"string","pattern":"^msg_[0-9A-Za-z]{16}$","description":"Stamp0 msg_ identifier"},"thread_id":{"type":"string","pattern":"^thr_[0-9A-Za-z]{16}$","description":"Stamp0 thr_ identifier"},"email_id":{"type":"string"}},"required":["object","id","thread_id","email_id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendDraft","summary":"Send a draft","description":"Sends the draft and deletes it in the same transaction, so it is sent once."}},"/deliverability/overview":{"get":{"tags":["deliverability"],"parameters":[{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":366},"in":"query","name":"days","required":false},{"schema":{"type":"string","minLength":1,"maxLength":253},"in":"query","name":"domain","required":false},{"schema":{"type":"string","enum":["gmail","outlook","yahoo","icloud","other"]},"in":"query","name":"isp","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["deliverability_overview"]},"period":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},"counts":{"type":"object","properties":{"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivery_delayed":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_hard":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_soft":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_undetermined":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened_unique":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked_unique":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sent","delivered","delivery_delayed","bounced_hard","bounced_soft","bounced_undetermined","complained","opened","opened_unique","clicked","clicked_unique","rejected","failed"],"additionalProperties":false},"rates":{"type":"object","properties":{"delivery_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"bounce_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"soft_bounce_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"complaint_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"open_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"click_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["delivery_rate","bounce_rate","soft_bounce_rate","complaint_rate","open_rate","click_rate"],"additionalProperties":false},"health":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","warning","critical","no_data"]},"bounce":{"type":"string","enum":["healthy","warning","critical","no_data"]},"complaint":{"type":"string","enum":["healthy","warning","critical","no_data"]},"low_volume":{"type":"boolean"},"basis":{"type":"string","enum":["ses","cloudflare","strictest"]},"thresholds":{"type":"object","properties":{"bounce_rate":{"type":"object","properties":{"warning":{"type":"number"},"critical":{"type":"number"}},"required":["warning","critical"],"additionalProperties":false},"complaint_rate":{"type":"object","properties":{"warning":{"type":"number"},"critical":{"type":"number"}},"required":["warning","critical"],"additionalProperties":false}},"required":["bounce_rate","complaint_rate"],"additionalProperties":false}},"required":["status","bounce","complaint","low_volume","thresholds"],"additionalProperties":false},"previous":{"type":"object","properties":{"counts":{"type":"object","properties":{"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivery_delayed":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_hard":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_soft":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_undetermined":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened_unique":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked_unique":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sent","delivered","delivery_delayed","bounced_hard","bounced_soft","bounced_undetermined","complained","opened","opened_unique","clicked","clicked_unique","rejected","failed"],"additionalProperties":false},"rates":{"type":"object","properties":{"delivery_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"bounce_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"soft_bounce_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"complaint_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"open_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"click_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["delivery_rate","bounce_rate","soft_bounce_rate","complaint_rate","open_rate","click_rate"],"additionalProperties":false},"health":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","warning","critical","no_data"]},"bounce":{"type":"string","enum":["healthy","warning","critical","no_data"]},"complaint":{"type":"string","enum":["healthy","warning","critical","no_data"]},"low_volume":{"type":"boolean"},"basis":{"type":"string","enum":["ses","cloudflare","strictest"]},"thresholds":{"type":"object","properties":{"bounce_rate":{"type":"object","properties":{"warning":{"type":"number"},"critical":{"type":"number"}},"required":["warning","critical"],"additionalProperties":false},"complaint_rate":{"type":"object","properties":{"warning":{"type":"number"},"critical":{"type":"number"}},"required":["warning","critical"],"additionalProperties":false}},"required":["bounce_rate","complaint_rate"],"additionalProperties":false}},"required":["status","bounce","complaint","low_volume","thresholds"],"additionalProperties":false},"period":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false}},"required":["counts","rates","health","period"],"additionalProperties":false},"cost":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"emails_billed":{"type":"integer","minimum":0,"maximum":9007199254740991},"attachment_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"emails_received":{"type":"integer","minimum":0,"maximum":9007199254740991},"sending_usd":{"type":"number","minimum":0},"outbound_data_usd":{"type":"number","minimum":0},"receiving_usd":{"type":"number","minimum":0},"total_usd":{"type":"number","minimum":0},"fixed_monthly_usd":{"type":"number","minimum":0},"pricing":{"type":"object","properties":{"outbound_per_thousand_usd":{"type":"number"},"outbound_data_per_gb_usd":{"type":"number"},"inbound_per_thousand_usd":{"type":"number"},"inbound_chunk_per_thousand_usd":{"type":"number"}},"required":["outbound_per_thousand_usd","outbound_data_per_gb_usd","inbound_per_thousand_usd","inbound_chunk_per_thousand_usd"],"additionalProperties":false}},"required":["currency","emails_billed","attachment_bytes","emails_received","sending_usd","outbound_data_usd","receiving_usd","total_usd","fixed_monthly_usd","pricing"],"additionalProperties":false},"connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]},"resets_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"sent_source":{"type":"string","enum":["cloudflare_analytics","stamp0_records"]},"region":{"type":["string","null"]},"status":{"type":"string"},"sandbox_status":{"type":"string","enum":["unknown","sandbox","production"]},"sending_enabled":{"type":["boolean","null"]},"max_24_hour_send":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_send_rate":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"sent_last_24_hours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["id","region","status","sandbox_status","sending_enabled","max_24_hour_send","max_send_rate","sent_last_24_hours"],"additionalProperties":false},{"type":"null"}]},"suppressions":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"shared_with_projects":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count","shared_with_projects"],"additionalProperties":false},"dns":{"type":"object","properties":{"healthy":{"type":"integer","minimum":0,"maximum":9007199254740991},"warning":{"type":"integer","minimum":0,"maximum":9007199254740991},"critical":{"type":"integer","minimum":0,"maximum":9007199254740991},"unchecked":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["healthy","warning","critical","unchecked"],"additionalProperties":false}},"required":["object","period","counts","rates","health","previous","cost","connection","suppressions","dns"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getDeliverabilityOverview","summary":"Deliverability overview","description":"Counts, rates and health against the SES bounce and complaint thresholds for the period, compared with the previous one, with estimated SES cost, sandbox status and DNS advisor summary."}},"/deliverability/timeseries":{"get":{"tags":["deliverability"],"parameters":[{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":366},"in":"query","name":"days","required":false},{"schema":{"type":"string","minLength":1,"maxLength":253},"in":"query","name":"domain","required":false},{"schema":{"type":"string","enum":["gmail","outlook","yahoo","icloud","other"]},"in":"query","name":"isp","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"period":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"counts":{"type":"object","properties":{"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivery_delayed":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_hard":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_soft":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_undetermined":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened_unique":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked_unique":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sent","delivered","delivery_delayed","bounced_hard","bounced_soft","bounced_undetermined","complained","opened","opened_unique","clicked","clicked_unique","rejected","failed"],"additionalProperties":false},"rates":{"type":"object","properties":{"delivery_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"bounce_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"soft_bounce_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"complaint_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"open_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"click_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["delivery_rate","bounce_rate","soft_bounce_rate","complaint_rate","open_rate","click_rate"],"additionalProperties":false}},"required":["day","counts","rates"],"additionalProperties":false}}},"required":["object","period","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getDeliverabilityTimeseries","summary":"Deliverability by day"}},"/deliverability/domains":{"get":{"tags":["deliverability"],"parameters":[{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":366},"in":"query","name":"days","required":false},{"schema":{"type":"string","minLength":1,"maxLength":253},"in":"query","name":"domain","required":false},{"schema":{"type":"string","enum":["gmail","outlook","yahoo","icloud","other"]},"in":"query","name":"isp","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"period":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"counts":{"type":"object","properties":{"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivery_delayed":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_hard":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_soft":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_undetermined":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened_unique":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked_unique":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sent","delivered","delivery_delayed","bounced_hard","bounced_soft","bounced_undetermined","complained","opened","opened_unique","clicked","clicked_unique","rejected","failed"],"additionalProperties":false},"rates":{"type":"object","properties":{"delivery_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"bounce_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"soft_bounce_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"complaint_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"open_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"click_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["delivery_rate","bounce_rate","soft_bounce_rate","complaint_rate","open_rate","click_rate"],"additionalProperties":false},"health":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","warning","critical","no_data"]},"bounce":{"type":"string","enum":["healthy","warning","critical","no_data"]},"complaint":{"type":"string","enum":["healthy","warning","critical","no_data"]},"low_volume":{"type":"boolean"},"basis":{"type":"string","enum":["ses","cloudflare","strictest"]},"thresholds":{"type":"object","properties":{"bounce_rate":{"type":"object","properties":{"warning":{"type":"number"},"critical":{"type":"number"}},"required":["warning","critical"],"additionalProperties":false},"complaint_rate":{"type":"object","properties":{"warning":{"type":"number"},"critical":{"type":"number"}},"required":["warning","critical"],"additionalProperties":false}},"required":["bounce_rate","complaint_rate"],"additionalProperties":false}},"required":["status","bounce","complaint","low_volume","thresholds"],"additionalProperties":false},"domain":{"type":"string"},"domain_id":{"anyOf":[{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},{"type":"null"}]},"dns_status":{"anyOf":[{"type":"string","enum":["healthy","warning","critical","unchecked"]},{"type":"null"}]}},"required":["counts","rates","health","domain","domain_id","dns_status"],"additionalProperties":false}}},"required":["object","period","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getDeliverabilityByDomain","summary":"Deliverability by sending domain"}},"/deliverability/isps":{"get":{"tags":["deliverability"],"parameters":[{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"from","required":false},{"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"in":"query","name":"to","required":false},{"schema":{"type":"integer","minimum":1,"maximum":366},"in":"query","name":"days","required":false},{"schema":{"type":"string","minLength":1,"maxLength":253},"in":"query","name":"domain","required":false},{"schema":{"type":"string","enum":["gmail","outlook","yahoo","icloud","other"]},"in":"query","name":"isp","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"period":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"days":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},"data":{"type":"array","items":{"type":"object","properties":{"counts":{"type":"object","properties":{"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivery_delayed":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_hard":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_soft":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced_undetermined":{"type":"integer","minimum":0,"maximum":9007199254740991},"complained":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened_unique":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked_unique":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sent","delivered","delivery_delayed","bounced_hard","bounced_soft","bounced_undetermined","complained","opened","opened_unique","clicked","clicked_unique","rejected","failed"],"additionalProperties":false},"rates":{"type":"object","properties":{"delivery_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"bounce_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"soft_bounce_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"complaint_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"open_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"click_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}},"required":["delivery_rate","bounce_rate","soft_bounce_rate","complaint_rate","open_rate","click_rate"],"additionalProperties":false},"health":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","warning","critical","no_data"]},"bounce":{"type":"string","enum":["healthy","warning","critical","no_data"]},"complaint":{"type":"string","enum":["healthy","warning","critical","no_data"]},"low_volume":{"type":"boolean"},"basis":{"type":"string","enum":["ses","cloudflare","strictest"]},"thresholds":{"type":"object","properties":{"bounce_rate":{"type":"object","properties":{"warning":{"type":"number"},"critical":{"type":"number"}},"required":["warning","critical"],"additionalProperties":false},"complaint_rate":{"type":"object","properties":{"warning":{"type":"number"},"critical":{"type":"number"}},"required":["warning","critical"],"additionalProperties":false}},"required":["bounce_rate","complaint_rate"],"additionalProperties":false}},"required":["status","bounce","complaint","low_volume","thresholds"],"additionalProperties":false},"isp":{"type":"string","enum":["gmail","outlook","yahoo","icloud","other"]}},"required":["counts","rates","health","isp"],"additionalProperties":false}}},"required":["object","period","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getDeliverabilityByIsp","summary":"Deliverability by mailbox provider","description":"Gmail, Outlook, Yahoo, iCloud and other, from the recipient domain MX."}},"/deliverability/dns":{"get":{"tags":["deliverability"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["dns_report"]},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"domain":{"type":"string"},"status":{"type":"string","enum":["healthy","warning","critical","unchecked"]},"checked_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pass","warn","fail","info","error"]},"summary":{"type":"string"},"names":{"type":"array","items":{"type":"string"}},"found":{"type":"array","items":{"type":"string"}}},"required":["id","status","summary","names","found"],"additionalProperties":false}},"recommendations":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"check":{"type":"string"},"severity":{"type":"string","enum":["critical","warning","suggestion"]},"title":{"type":"string"},"detail":{"type":"string"},"record":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","name","value"],"additionalProperties":false}},"required":["code","check","severity","title","detail"],"additionalProperties":false}}},"required":["object","domain_id","domain","status","checked_at","checks","recommendations"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listDnsReports","summary":"List DNS advisor reports","description":"The latest SPF, DKIM, DMARC and MX report per domain."}},"/deliverability/dns/{id}":{"get":{"tags":["deliverability"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["dns_report"]},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"domain":{"type":"string"},"status":{"type":"string","enum":["healthy","warning","critical","unchecked"]},"checked_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pass","warn","fail","info","error"]},"summary":{"type":"string"},"names":{"type":"array","items":{"type":"string"}},"found":{"type":"array","items":{"type":"string"}}},"required":["id","status","summary","names","found"],"additionalProperties":false}},"recommendations":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"check":{"type":"string"},"severity":{"type":"string","enum":["critical","warning","suggestion"]},"title":{"type":"string"},"detail":{"type":"string"},"record":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","name","value"],"additionalProperties":false}},"required":["code","check","severity","title","detail"],"additionalProperties":false}}},"required":["object","domain_id","domain","status","checked_at","checks","recommendations"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getDnsReport","summary":"Retrieve a DNS advisor report"}},"/deliverability/dns/{id}/check":{"post":{"tags":["deliverability"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["dns_report"]},"domain_id":{"type":"string","pattern":"^dom_[0-9A-Za-z]{16}$","description":"Stamp0 dom_ identifier"},"domain":{"type":"string"},"status":{"type":"string","enum":["healthy","warning","critical","unchecked"]},"checked_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pass","warn","fail","info","error"]},"summary":{"type":"string"},"names":{"type":"array","items":{"type":"string"}},"found":{"type":"array","items":{"type":"string"}}},"required":["id","status","summary","names","found"],"additionalProperties":false}},"recommendations":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"check":{"type":"string"},"severity":{"type":"string","enum":["critical","warning","suggestion"]},"title":{"type":"string"},"detail":{"type":"string"},"record":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","name","value"],"additionalProperties":false}},"required":["code","check","severity","title","detail"],"additionalProperties":false}}},"required":["object","domain_id","domain","status","checked_at","checks","recommendations"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"checkDns","summary":"Run the DNS advisor now"}},"/suppressions":{"get":{"tags":["suppressions"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":320},"in":"query","name":"email","required":false},{"schema":{"type":"string","enum":["bounce","complaint","manual"]},"in":"query","name":"reason","required":false},{"schema":{"type":"string","enum":["bounce","complaint","manual"]},"in":"query","name":"origin","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["suppression"]},"id":{"type":"string","pattern":"^sup_[0-9A-Za-z]{16}$","description":"Stamp0 sup_ identifier"},"email":{"type":"string"},"origin":{"type":"string","enum":["bounce","complaint","manual"]},"source_id":{"type":["string","null"]},"reason":{"type":"string","enum":["bounce","complaint","manual"]},"source":{"type":"string","enum":["provider","event","api","dashboard"]},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"last_event_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"targets":{"type":"array","items":{"type":"object","properties":{"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]},"status":{"type":"string","enum":["suppressed","failed"]},"error":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"],"additionalProperties":false},{"type":"null"}]}},"required":["connection_id","provider","status","error"],"additionalProperties":false}}},"required":["object","id","email","origin","source_id","reason","source","connection_id","last_event_at","created_at","updated_at"],"additionalProperties":false}},"connection_id":{"anyOf":[{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},{"type":"null"}]},"shared_with_projects":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["object","has_more","data","connection_id","shared_with_projects","last_synced_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listSuppressions","summary":"List suppressions","description":"Filter with Resend's `origin` (or `reason`) and `email`."},"post":{"tags":["suppressions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320},"reason":{"type":"string","enum":["manual"]}},"required":["email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["suppression"]},"id":{"type":"string","pattern":"^sup_[0-9A-Za-z]{16}$","description":"Stamp0 sup_ identifier"},"email":{"type":"string"},"origin":{"type":"string","enum":["bounce","complaint","manual"]},"source_id":{"type":["string","null"]},"reason":{"type":"string","enum":["bounce","complaint","manual"]},"source":{"type":"string","enum":["provider","event","api","dashboard"]},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"last_event_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"targets":{"type":"array","items":{"type":"object","properties":{"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]},"status":{"type":"string","enum":["suppressed","failed"]},"error":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"],"additionalProperties":false},{"type":"null"}]}},"required":["connection_id","provider","status","error"],"additionalProperties":false}}},"required":["object","id","email","origin","source_id","reason","source","connection_id","last_event_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createSuppression","summary":"Suppress an address","description":"Adds the address to the SES account-level suppression list of the connection, then to the Stamp0 mirror."}},"/suppressions/batch/add":{"post":{"tags":["suppressions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":320}}},"required":["emails"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["suppression"]},"id":{"type":"string","pattern":"^sup_[0-9A-Za-z]{16}$","description":"Stamp0 sup_ identifier"},"targets":{"type":"array","items":{"type":"object","properties":{"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]},"status":{"type":"string","enum":["suppressed","failed"]},"error":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"],"additionalProperties":false},{"type":"null"}]}},"required":["connection_id","provider","status","error"],"additionalProperties":false}}},"required":["object","id"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"batchAddSuppressions","summary":"Suppress several addresses","description":"Up to 100 addresses, each added to SES first, then to the mirror."}},"/suppressions/batch/remove":{"post":{"tags":["suppressions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"emails":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":320}},"ids":{}},"required":["emails"]},{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"emails":{}},"required":["ids"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["suppression"]},"id":{"type":"string"},"deleted":{"type":"boolean"}},"required":["object","id","deleted"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"batchRemoveSuppressions","summary":"Remove several suppressions","description":"By `emails` or by `ids` (up to 100); entries that match nothing come back with `deleted: false`."}},"/suppressions/{id}":{"get":{"tags":["suppressions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":320},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["suppression"]},"id":{"type":"string","pattern":"^sup_[0-9A-Za-z]{16}$","description":"Stamp0 sup_ identifier"},"email":{"type":"string"},"origin":{"type":"string","enum":["bounce","complaint","manual"]},"source_id":{"type":["string","null"]},"reason":{"type":"string","enum":["bounce","complaint","manual"]},"source":{"type":"string","enum":["provider","event","api","dashboard"]},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"last_event_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"targets":{"type":"array","items":{"type":"object","properties":{"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"provider":{"type":"string","enum":["ses","cloudflare"]},"status":{"type":"string","enum":["suppressed","failed"]},"error":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"],"additionalProperties":false},{"type":"null"}]}},"required":["connection_id","provider","status","error"],"additionalProperties":false}}},"required":["object","id","email","origin","source_id","reason","source","connection_id","last_event_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getSuppression","summary":"Retrieve a suppression","description":"By `sup_` id or by email address, as in Resend."},"delete":{"tags":["suppressions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":320},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["suppression"]},"id":{"type":"string","pattern":"^sup_[0-9A-Za-z]{16}$","description":"Stamp0 sup_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteSuppression","summary":"Remove a suppression","description":"By `sup_` id or by email address. Removes the address from SES, then from the mirror."}},"/suppressions/sync":{"post":{"tags":["suppressions"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["suppression_sync"]},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"queued":{"type":"boolean"}},"required":["object","connection_id","queued"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"syncSuppressions","summary":"Sync suppressions from SES"}},"/logs":{"get":{"tags":["logs"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["2xx","3xx","4xx","5xx","error"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"in":"query","name":"method","required":false},{"schema":{"type":"string","pattern":"^key_[0-9A-Za-z]{16}$"},"in":"query","name":"api_key_id","required":false,"description":"Stamp0 key_ identifier"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["api_request_log"]},"id":{"type":"string","pattern":"^req_[0-9A-Za-z]{16}$","description":"Stamp0 req_ identifier"},"method":{"type":"string"},"path":{"type":"string"},"endpoint":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response_status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"duration_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"api_key_id":{"type":["string","null"]},"request_id":{"type":"string"},"user_agent":{"type":["string","null"]},"ip_address":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","method","path","endpoint","status","response_status","duration_ms","api_key_id","request_id","user_agent","ip_address","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listRequestLogs","summary":"List API request logs","description":"Route, status and duration of each public API request, with Resend's `endpoint` and `response_status`. No bodies are stored."}},"/logs/{id}":{"get":{"tags":["logs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["log"]},"id":{"type":"string","pattern":"^req_[0-9A-Za-z]{16}$","description":"Stamp0 req_ identifier"},"method":{"type":"string"},"path":{"type":"string"},"endpoint":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response_status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"duration_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"api_key_id":{"type":["string","null"]},"request_id":{"type":"string"},"user_agent":{"type":["string","null"]},"ip_address":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"request_body":{"type":"null"},"response_body":{"type":"null"}},"required":["object","id","method","path","endpoint","status","response_status","duration_ms","api_key_id","request_id","user_agent","ip_address","created_at","request_body","response_body"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getRequestLog","summary":"Retrieve an API request log","description":"Resend's log shape; `request_body` and `response_body` are always null because bodies are not stored."}},"/contacts/imports":{"post":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":1000},"in":"query","name":"consent","required":true},{"schema":{"type":"string","maxLength":420},"in":"query","name":"list_ids","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"update_existing","required":false},{"schema":{"type":"string","minLength":1,"maxLength":255},"in":"query","name":"filename","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_import"]},"id":{"type":"string","pattern":"^cim_[0-9A-Za-z]{16}$","description":"Stamp0 cim_ identifier"},"status":{"type":"string","enum":["uploading","queued","processing","completed","failed","canceled"]},"filename":{"type":["string","null"]},"consent":{"type":"string"},"list_ids":{"type":"array","items":{"type":"string"}},"update_existing":{"type":"boolean"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"columns":{"type":"object","properties":{"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"properties":{"type":"array","items":{"type":"string"}},"ignored":{"type":"array","items":{"type":"string"}}},"required":["fields","properties","ignored"],"additionalProperties":false},"rows_processed":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_created":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_updated":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_skipped":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"started_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","status","filename","consent","list_ids","update_existing","size_bytes","columns","rows_processed","rows_created","rows_updated","rows_skipped","rows_failed","error","created_at","started_at","completed_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createContactImport","summary":"Import contacts from CSV","description":"Send the CSV (up to 50 MB) as the body with `Content-Type: text/csv`. `consent` is required: how these people agreed to receive marketing email. The file needs an email column; other columns map to names, `unsubscribed`, `external_id` and properties by name. Imports run in the background."},"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["contact_import"]},"id":{"type":"string","pattern":"^cim_[0-9A-Za-z]{16}$","description":"Stamp0 cim_ identifier"},"status":{"type":"string","enum":["uploading","queued","processing","completed","failed","canceled"]},"filename":{"type":["string","null"]},"consent":{"type":"string"},"list_ids":{"type":"array","items":{"type":"string"}},"update_existing":{"type":"boolean"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"columns":{"type":"object","properties":{"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"properties":{"type":"array","items":{"type":"string"}},"ignored":{"type":"array","items":{"type":"string"}}},"required":["fields","properties","ignored"],"additionalProperties":false},"rows_processed":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_created":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_updated":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_skipped":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"started_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","status","filename","consent","list_ids","update_existing","size_bytes","columns","rows_processed","rows_created","rows_updated","rows_skipped","rows_failed","error","created_at","started_at","completed_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContactImports","summary":"List contact imports"}},"/contacts/imports/{id}":{"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_import"]},"id":{"type":"string","pattern":"^cim_[0-9A-Za-z]{16}$","description":"Stamp0 cim_ identifier"},"status":{"type":"string","enum":["uploading","queued","processing","completed","failed","canceled"]},"filename":{"type":["string","null"]},"consent":{"type":"string"},"list_ids":{"type":"array","items":{"type":"string"}},"update_existing":{"type":"boolean"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"columns":{"type":"object","properties":{"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"properties":{"type":"array","items":{"type":"string"}},"ignored":{"type":"array","items":{"type":"string"}}},"required":["fields","properties","ignored"],"additionalProperties":false},"rows_processed":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_created":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_updated":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_skipped":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"started_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","status","filename","consent","list_ids","update_existing","size_bytes","columns","rows_processed","rows_created","rows_updated","rows_skipped","rows_failed","error","created_at","started_at","completed_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getContactImport","summary":"Retrieve a contact import","description":"Status, header mapping and row counters."},"delete":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_import"]},"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteContactImport","summary":"Delete a contact import","description":"Deletes the import record and its errors report; imported contacts stay."}},"/contacts/imports/{id}/errors":{"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["contact_import_error"]},"row":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"email":{"type":["string","null"]},"code":{"type":"string","enum":["missing_email","invalid_email","invalid_value","duplicate","malformed_row","plan_limit"]},"message":{"type":"string"}},"required":["object","row","email","code","message"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContactImportErrors","summary":"List an import’s row errors","description":"Rows that were refused or skipped as duplicates, by row number."}},"/contacts/imports/{id}/errors/download":{"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK"}},"operationId":"downloadContactImportErrors","summary":"Download an import’s errors report","description":"The row errors as CSV."}},"/contacts/imports/{id}/cancel":{"post":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_import"]},"id":{"type":"string","pattern":"^cim_[0-9A-Za-z]{16}$","description":"Stamp0 cim_ identifier"},"status":{"type":"string","enum":["uploading","queued","processing","completed","failed","canceled"]},"filename":{"type":["string","null"]},"consent":{"type":"string"},"list_ids":{"type":"array","items":{"type":"string"}},"update_existing":{"type":"boolean"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"columns":{"type":"object","properties":{"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"properties":{"type":"array","items":{"type":"string"}},"ignored":{"type":"array","items":{"type":"string"}}},"required":["fields","properties","ignored"],"additionalProperties":false},"rows_processed":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_created":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_updated":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_skipped":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"started_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","status","filename","consent","list_ids","update_existing","size_bytes","columns","rows_processed","rows_created","rows_updated","rows_skipped","rows_failed","error","created_at","started_at","completed_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"cancelContactImport","summary":"Cancel a contact import","description":"Rows already imported stay."}},"/contacts":{"post":{"tags":["contacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254},"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"unsubscribed":{"type":"boolean"},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"external_id":{"type":"string","minLength":1,"maxLength":256},"segments":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["id"]}},"topics":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"subscription":{"type":"string","enum":["opt_in","opt_out"]}},"required":["id","subscription"]}},"lists":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"status":{"type":"string","enum":["subscribed","unsubscribed"]}},"required":["id"]}},"audience_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createContact","summary":"Create a contact","description":"Creates a contact (409 when the address exists; use `POST /contacts/batch` to upsert). Resend `segments` and `audience_id` add it to private lists, `topics` set public list preferences, `lists` sets any list. Counts against the plan’s contact limit."},"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"query","name":"search","required":false},{"schema":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$"},"in":"query","name":"list_id","required":false,"description":"Stamp0 lst_ identifier"},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unsubscribed","required":false},{"schema":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$"},"in":"query","name":"audience_id","required":false,"description":"Stamp0 lst_ identifier"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"unsubscribed":{"type":"boolean"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"external_id":{"type":["string","null"]},"source":{"type":"string","enum":["api","dashboard","import","form","sequence"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","email","first_name","last_name","unsubscribed","properties","external_id","source","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContacts","summary":"List contacts","description":"Newest first. `search` matches an exact address, or part of an address or name; `list_id` (or `audience_id`) narrows to a list’s members."}},"/contacts/batch":{"post":{"tags":["contacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"email":{"type":"string","maxLength":254},"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"unsubscribed":{"type":"boolean"},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"external_id":{"type":"string","minLength":1,"maxLength":256},"segments":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["id"]}},"topics":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"subscription":{"type":"string","enum":["opt_in","opt_out"]}},"required":["id","subscription"]}},"lists":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"status":{"type":"string","enum":["subscribed","unsubscribed"]}},"required":["id"]}},"audience_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["email"]}}},"required":["contacts"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string"},"created":{"type":"boolean"}},"required":["id","email","created"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"],"additionalProperties":false}},"required":["index","error"],"additionalProperties":false}]}}},"required":["object","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"upsertContacts","summary":"Create or update contacts in bulk","description":"Up to 1,000 contacts, matched by email. Each item succeeds or fails on its own."}},"/contacts/export":{"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$"},"in":"query","name":"list_id","required":false,"description":"Stamp0 lst_ identifier"},{"schema":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$"},"in":"query","name":"segment_id","required":false,"description":"Stamp0 seg_ identifier"},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unsubscribed","required":false}],"responses":{"200":{"description":"OK"}},"operationId":"exportContacts","summary":"Export contacts as CSV","description":"Streams every contact (or a list’s members, or a segment’s matches) as CSV with one column per property."}},"/contacts/{id}":{"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"unsubscribed":{"type":"boolean"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"external_id":{"type":["string","null"]},"source":{"type":"string","enum":["api","dashboard","import","form","sequence"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","email","first_name","last_name","unsubscribed","properties","external_id","source","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getContact","summary":"Retrieve a contact","description":"By `ct_` id or email address."},"patch":{"tags":["contacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254},"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"unsubscribed":{"type":"boolean"},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"external_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"unsubscribed":{"type":"boolean"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"external_id":{"type":["string","null"]},"source":{"type":"string","enum":["api","dashboard","import","form","sequence"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","email","first_name","last_name","unsubscribed","properties","external_id","source","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateContact","summary":"Update a contact","description":"By id or address. `properties` merge into the stored ones; `null` removes one. `unsubscribed: true` opts the contact out of all marketing email."},"delete":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"contact":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","contact","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteContact","summary":"Delete a contact"}},"/contacts/{id}/lists":{"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["list_membership"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"visibility":{"type":"string","enum":["private","public"]},"status":{"type":"string","enum":["subscribed","unsubscribed","pending"]},"subscribed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unsubscribed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["object","list_id","name","visibility","status","subscribed_at","unsubscribed_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContactLists","summary":"List a contact’s list memberships"},"patch":{"tags":["contacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lists":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"status":{"type":"string","enum":["subscribed","unsubscribed"]}},"required":["id"]}}},"required":["lists"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["list_membership"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"visibility":{"type":"string","enum":["private","public"]},"status":{"type":"string","enum":["subscribed","unsubscribed","pending"]},"subscribed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unsubscribed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["object","list_id","name","visibility","status","subscribed_at","unsubscribed_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateContactLists","summary":"Update a contact’s list memberships"}},"/contacts/{id}/segments":{"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContactSegments","summary":"List a contact’s segments","description":"Resend segments: the private lists the contact is subscribed to."}},"/contacts/{id}/segments/{segment_id}":{"post":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"segment_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"addContactToSegment","summary":"Add a contact to a segment","description":"Resend segments are private lists (`lst_`); filter segments compute their members."},"delete":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"segment_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"removeContactFromSegment","summary":"Remove a contact from a segment"}},"/contacts/{id}/topics":{"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"subscription":{"type":"string","enum":["opt_in","opt_out"]}},"required":["id","name","description","subscription"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContactTopics","summary":"List a contact’s topic subscriptions","description":"Every public list with the contact’s subscription, defaults included."},"patch":{"tags":["contacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"subscription":{"type":"string","enum":["opt_in","opt_out"]}},"required":["id","subscription"]}},{"type":"object","properties":{"topics":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"subscription":{"type":"string","enum":["opt_in","opt_out"]}},"required":["id","subscription"]}}},"required":["topics"]}]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateContactTopics","summary":"Update a contact’s topic subscriptions"}},"/contacts/{id}/companies":{"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^co_[0-9A-Za-z]{16}$","description":"Stamp0 co_ identifier"},"name":{"type":"string"},"domain":{"type":["string","null"]},"external_id":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"contacts_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"object":{"type":"string","enum":["company"]},"role":{"type":["string","null"]}},"required":["id","name","domain","external_id","properties","contacts_count","created_at","updated_at","object","role"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContactCompanies","summary":"List a contact’s companies"}},"/contacts/{id}/activity":{"get":{"tags":["contacts"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"object":{"type":"string","enum":["contact_activity"]},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"type":{"type":"string","enum":["contact_created"]},"source":{"type":"string","enum":["api","dashboard","import","form","sequence"]}},"required":["object","occurred_at","type","source"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","enum":["contact_activity"]},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"type":{"type":"string","enum":["email"]},"email_id":{"type":"string","pattern":"^em_[0-9A-Za-z]{16}$","description":"Stamp0 em_ identifier"},"subject":{"type":"string"},"status":{"type":"string"}},"required":["object","occurred_at","type","email_id","subject","status"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","enum":["contact_activity"]},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"type":{"type":"string","enum":["event"]},"event_id":{"type":"string","pattern":"^cev_[0-9A-Za-z]{16}$","description":"Stamp0 cev_ identifier"},"name":{"type":"string"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["object","occurred_at","type","event_id","name","properties"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","enum":["contact_activity"]},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"type":{"type":"string","enum":["list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"list_name":{"type":"string"},"status":{"type":"string","enum":["subscribed","unsubscribed","pending","removed"]},"previous_status":{"anyOf":[{"type":"string","enum":["subscribed","unsubscribed","pending"]},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["api","dashboard","import","form","sequence","preference_center","unsubscribe_link","one_click"]},{"type":"null"}]}},"required":["object","occurred_at","type","list_id","list_name","status","previous_status","source"],"additionalProperties":false}]}},"next_before":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["object","has_more","data","next_before"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getContactActivity","summary":"Get a contact’s activity","description":"Emails sent to the contact, custom events, list changes and its creation, newest first. Page with `before` = `next_before`."}},"/properties":{"post":{"tags":["properties"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","enum":["string","number","boolean","date"]},"label":{"type":"string","minLength":1,"maxLength":256},"description":{"type":"string","maxLength":2000},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},{"type":"null"}]}},"required":["key","type"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_property"]},"id":{"type":"string","pattern":"^prop_[0-9A-Za-z]{16}$","description":"Stamp0 prop_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createProperty","summary":"Create a contact property","description":"Types: `string`, `number`, `boolean`, `date`. The key and type are fixed once created."},"get":{"tags":["properties"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["contact_property"]},"id":{"type":"string","pattern":"^prop_[0-9A-Za-z]{16}$","description":"Stamp0 prop_ identifier"},"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"label":{"type":["string","null"]},"description":{"type":["string","null"]},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","key","type","label","description","fallback_value","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listPropertys","summary":"List contact properties"}},"/properties/{id}":{"get":{"tags":["properties"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_property"]},"id":{"type":"string","pattern":"^prop_[0-9A-Za-z]{16}$","description":"Stamp0 prop_ identifier"},"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"label":{"type":["string","null"]},"description":{"type":["string","null"]},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","key","type","label","description","fallback_value","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getProperty","summary":"Retrieve a contact property"},"patch":{"tags":["properties"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},{"type":"null"}]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_property"]},"id":{"type":"string","pattern":"^prop_[0-9A-Za-z]{16}$","description":"Stamp0 prop_ identifier"},"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"label":{"type":["string","null"]},"description":{"type":["string","null"]},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","key","type","label","description","fallback_value","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateProperty","summary":"Update a contact property"},"delete":{"tags":["properties"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_property"]},"id":{"type":"string","pattern":"^prop_[0-9A-Za-z]{16}$","description":"Stamp0 prop_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteProperty","summary":"Delete a contact property","description":"Removes the property’s values from every contact."}},"/contact-properties":{"post":{"tags":["properties"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","enum":["string","number","boolean","date"]},"label":{"type":"string","minLength":1,"maxLength":256},"description":{"type":"string","maxLength":2000},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},{"type":"null"}]}},"required":["key","type"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_property"]},"id":{"type":"string","pattern":"^prop_[0-9A-Za-z]{16}$","description":"Stamp0 prop_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createContactProperty","summary":"Create a contact property (Resend path)","description":"Types: `string`, `number`, `boolean`, `date`. The key and type are fixed once created."},"get":{"tags":["properties"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["contact_property"]},"id":{"type":"string","pattern":"^prop_[0-9A-Za-z]{16}$","description":"Stamp0 prop_ identifier"},"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"label":{"type":["string","null"]},"description":{"type":["string","null"]},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","key","type","label","description","fallback_value","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContactPropertys","summary":"List contact properties (Resend path)"}},"/contact-properties/{id}":{"get":{"tags":["properties"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_property"]},"id":{"type":"string","pattern":"^prop_[0-9A-Za-z]{16}$","description":"Stamp0 prop_ identifier"},"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"label":{"type":["string","null"]},"description":{"type":["string","null"]},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","key","type","label","description","fallback_value","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getContactProperty","summary":"Retrieve a contact property (Resend path)"},"patch":{"tags":["properties"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},{"type":"null"}]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_property"]},"id":{"type":"string","pattern":"^prop_[0-9A-Za-z]{16}$","description":"Stamp0 prop_ identifier"},"key":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"label":{"type":["string","null"]},"description":{"type":["string","null"]},"fallback_value":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","key","type","label","description","fallback_value","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateContactProperty","summary":"Update a contact property (Resend path)"},"delete":{"tags":["properties"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact_property"]},"id":{"type":"string","pattern":"^prop_[0-9A-Za-z]{16}$","description":"Stamp0 prop_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteContactProperty","summary":"Delete a contact property (Resend path)","description":"Removes the property’s values from every contact."}},"/lists":{"post":{"tags":["lists"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"description":{"type":"string","maxLength":2000},"visibility":{"default":"private","type":"string","enum":["private","public"]},"default_subscription":{"default":"opt_in","type":"string","enum":["opt_in","opt_out"]},"double_opt_in":{"default":false,"type":"boolean"}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"visibility":{"type":"string","enum":["private","public"]},"default_subscription":{"type":"string","enum":["opt_in","opt_out"]},"double_opt_in":{"type":"boolean"},"subscribers_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","visibility","default_subscription","double_opt_in","subscribers_count","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createList","summary":"Create a list","description":"`public` lists appear in the preference center; `double_opt_in` makes new members confirm by email."},"get":{"tags":["lists"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["private","public"]},"in":"query","name":"visibility","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"visibility":{"type":"string","enum":["private","public"]},"default_subscription":{"type":"string","enum":["opt_in","opt_out"]},"double_opt_in":{"type":"boolean"},"subscribers_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","visibility","default_subscription","double_opt_in","subscribers_count","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listLists","summary":"List lists"}},"/lists/{id}":{"get":{"tags":["lists"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"visibility":{"type":"string","enum":["private","public"]},"default_subscription":{"type":"string","enum":["opt_in","opt_out"]},"double_opt_in":{"type":"boolean"},"subscribers_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","visibility","default_subscription","double_opt_in","subscribers_count","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getList","summary":"Retrieve a list"},"patch":{"tags":["lists"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"visibility":{"type":"string","enum":["private","public"]},"default_subscription":{"type":"string","enum":["opt_in","opt_out"]},"double_opt_in":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"visibility":{"type":"string","enum":["private","public"]},"default_subscription":{"type":"string","enum":["opt_in","opt_out"]},"double_opt_in":{"type":"boolean"},"subscribers_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","visibility","default_subscription","double_opt_in","subscribers_count","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateList","summary":"Update a list"},"delete":{"tags":["lists"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteList","summary":"Delete a list"}},"/lists/{id}/contacts":{"get":{"tags":["lists"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["subscribed","unsubscribed","pending"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["list_membership"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string"},"status":{"type":"string","enum":["subscribed","unsubscribed","pending"]},"source":{"type":"string","enum":["api","dashboard","import","form","sequence","preference_center","unsubscribe_link","one_click"]},"subscribed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"unsubscribed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","list_id","contact_id","email","status","source","subscribed_at","unsubscribed_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listListMembers","summary":"List a list’s members"},"post":{"tags":["lists"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"minItems":1,"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"}},"required":["id"]},{"type":"object","properties":{"email":{"type":"string","maxLength":254}},"required":["email"]}]}},"status":{"type":"string","enum":["subscribed","pending"]}},"required":["contacts"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string"},"status":{"type":"string","enum":["subscribed","unsubscribed","pending"]},"confirmation_sent":{"type":"boolean"}},"required":["contact_id","email","status","confirmation_sent"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"],"additionalProperties":false}},"required":["index","error"],"additionalProperties":false}]}}},"required":["object","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"addListMembers","summary":"Add contacts to a list","description":"By id or email (created when missing). On a double opt-in list (or with `status: \"pending\"`) members are pending and get a confirmation email from the project’s default marketing sender."}},"/lists/{id}/contacts/{contact}":{"delete":{"tags":["lists"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"contact","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list_membership"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","list_id","contact_id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"removeListMember","summary":"Remove a contact from a list"}},"/topics":{"post":{"tags":["lists"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"description":{"type":"string","maxLength":2000},"default_subscription":{"default":"opt_in","type":"string","enum":["opt_in","opt_out"]}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["topic"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createTopic","summary":"Create a topic","description":"Resend topics are public lists."},"get":{"tags":["lists"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["topic"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"default_subscription":{"type":"string","enum":["opt_in","opt_out"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","default_subscription","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listTopics","summary":"List topics"}},"/topics/{id}":{"get":{"tags":["lists"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["topic"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"default_subscription":{"type":"string","enum":["opt_in","opt_out"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","default_subscription","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getTopic","summary":"Retrieve a topic"},"patch":{"tags":["lists"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"default_subscription":{"type":"string","enum":["opt_in","opt_out"]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["topic"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"default_subscription":{"type":"string","enum":["opt_in","opt_out"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","default_subscription","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateTopic","summary":"Update a topic"},"delete":{"tags":["lists"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["topic"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteTopic","summary":"Delete a topic"}},"/audiences":{"post":{"tags":["lists"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["audience"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"}},"required":["object","id","name"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createAudience","summary":"Create an audience","description":"Resend’s legacy audiences are private lists."},"get":{"tags":["lists"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["audience"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listAudiences","summary":"List audiences"}},"/audiences/{id}":{"get":{"tags":["lists"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["audience"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getAudience","summary":"Retrieve an audience"},"delete":{"tags":["lists"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["audience"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteAudience","summary":"Delete an audience"}},"/audiences/{id}/contacts":{"post":{"tags":["lists"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254},"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"unsubscribed":{"type":"boolean"}},"required":["email"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createAudienceContact","summary":"Add a contact to an audience"},"get":{"tags":["lists"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"unsubscribed":{"type":"boolean"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"external_id":{"type":["string","null"]},"source":{"type":"string","enum":["api","dashboard","import","form","sequence"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","email","first_name","last_name","unsubscribed","properties","external_id","source","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listAudienceContacts","summary":"List an audience’s contacts"}},"/audiences/{id}/contacts/{contact}":{"get":{"tags":["lists"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"contact","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"unsubscribed":{"type":"boolean"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"external_id":{"type":["string","null"]},"source":{"type":"string","enum":["api","dashboard","import","form","sequence"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","email","first_name","last_name","unsubscribed","properties","external_id","source","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getAudienceContact","summary":"Retrieve an audience contact"},"patch":{"tags":["lists"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254},"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"unsubscribed":{"type":"boolean"},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"external_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"contact","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"}},"required":["object","id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateAudienceContact","summary":"Update an audience contact"},"delete":{"tags":["lists"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"contact","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"contact":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","contact","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"removeAudienceContact","summary":"Remove a contact from an audience","description":"The contact leaves the audience; it is not deleted."}},"/segments":{"post":{"tags":["segments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"description":{"type":"string","maxLength":2000},"filter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"A segment filter: `and` / `or` / `not` groups over `contact`, `property`, `list`, `company` and `event` conditions (depth 6, 50 conditions)."},"name":{"type":"string","minLength":1,"maxLength":256}},"required":["filter","name"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"filter":{}},"required":["name"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","enum":["segment"]},"id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},"kind":{"type":"string","enum":["filter"]},"name":{"type":"string"},"description":{"type":["string","null"]},"filter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"A segment filter: `and` / `or` / `not` groups over `contact`, `property`, `list`, `company` and `event` conditions (depth 6, 50 conditions)."},"contacts_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"counted_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","kind","name","description","filter","contacts_count","counted_at","created_at","updated_at"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","enum":["segment"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"name":{"type":"string"}},"required":["object","id","name"],"additionalProperties":false}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createSegment","summary":"Create a segment","description":"With a `filter`: a live filter segment (`seg_`). Without one: a Resend manual segment, which is a private list (`lst_`)."},"get":{"tags":["segments"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["filter","manual"]},"in":"query","name":"kind","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","enum":["segment"]},"id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},"kind":{"type":"string","enum":["filter"]},"name":{"type":"string"},"description":{"type":["string","null"]},"filter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"A segment filter: `and` / `or` / `not` groups over `contact`, `property`, `list`, `company` and `event` conditions (depth 6, 50 conditions)."},"contacts_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"counted_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","kind","name","description","filter","contacts_count","counted_at","created_at","updated_at"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","enum":["segment"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"kind":{"type":"string","enum":["manual"]},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","kind","name","created_at"],"additionalProperties":false}]}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listSegments","summary":"List segments","description":"Filter and manual segments, newest first; `kind` narrows."}},"/segments/preview":{"post":{"tags":["segments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"A segment filter: `and` / `or` / `not` groups over `contact`, `property`, `list`, `company` and `event` conditions (depth 6, 50 conditions)."}},"required":["filter"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["segment_preview"]},"contacts_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"sample":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}},"required":["id","email"],"additionalProperties":false}}},"required":["object","contacts_count","sample"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"previewSegment","summary":"Preview a segment filter","description":"How many contacts a filter matches now, with a sample."}},"/segments/{id}":{"get":{"tags":["segments"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","enum":["segment"]},"id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},"kind":{"type":"string","enum":["filter"]},"name":{"type":"string"},"description":{"type":["string","null"]},"filter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"A segment filter: `and` / `or` / `not` groups over `contact`, `property`, `list`, `company` and `event` conditions (depth 6, 50 conditions)."},"contacts_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"counted_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","kind","name","description","filter","contacts_count","counted_at","created_at","updated_at"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","enum":["segment"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"kind":{"type":"string","enum":["manual"]},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","kind","name","created_at"],"additionalProperties":false}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getSegment","summary":"Retrieve a segment","description":"A filter segment’s `contacts_count` is cached and recomputed in the background."},"patch":{"tags":["segments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"filter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"A segment filter: `and` / `or` / `not` groups over `contact`, `property`, `list`, `company` and `event` conditions (depth 6, 50 conditions)."},"name":{"type":"string","minLength":1,"maxLength":256}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","enum":["segment"]},"id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},"kind":{"type":"string","enum":["filter"]},"name":{"type":"string"},"description":{"type":["string","null"]},"filter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"A segment filter: `and` / `or` / `not` groups over `contact`, `property`, `list`, `company` and `event` conditions (depth 6, 50 conditions)."},"contacts_count":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"counted_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","kind","name","description","filter","contacts_count","counted_at","created_at","updated_at"],"additionalProperties":false},{"type":"object","properties":{"object":{"type":"string","enum":["segment"]},"id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"kind":{"type":"string","enum":["manual"]},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","kind","name","created_at"],"additionalProperties":false}]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateSegment","summary":"Update a segment"},"delete":{"tags":["segments"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["segment"]},"id":{"anyOf":[{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"},{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}]},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteSegment","summary":"Delete a segment"}},"/segments/{id}/contacts":{"get":{"tags":["segments"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["contact"]},"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"unsubscribed":{"type":"boolean"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"external_id":{"type":["string","null"]},"source":{"type":"string","enum":["api","dashboard","import","form","sequence"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","email","first_name","last_name","unsubscribed","properties","external_id","source","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listSegmentContacts","summary":"List a segment’s contacts","description":"Resend-compatible (`contacts.list({ segmentId })`): the contacts of a manual segment (its subscribed members) or a filter segment, paged by contact id."}},"/segments/{id}/preview":{"get":{"tags":["segments"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["segment_preview"]},"contacts_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"sample":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}},"required":["id","email"],"additionalProperties":false}}},"required":["object","contacts_count","sample"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"countSegmentContacts","summary":"Count a segment’s contacts now","description":"A live count and sample of up to 20; refreshes the cached count of a filter segment."}},"/companies":{"post":{"tags":["companies"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"domain":{"type":"string","maxLength":253,"pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"external_id":{"type":"string","minLength":1,"maxLength":256},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["company"]},"id":{"type":"string","pattern":"^co_[0-9A-Za-z]{16}$","description":"Stamp0 co_ identifier"},"name":{"type":"string"},"domain":{"type":["string","null"]},"external_id":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"contacts_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","domain","external_id","properties","contacts_count","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createCompany","summary":"Create a company"},"get":{"tags":["companies"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["company"]},"id":{"type":"string","pattern":"^co_[0-9A-Za-z]{16}$","description":"Stamp0 co_ identifier"},"name":{"type":"string"},"domain":{"type":["string","null"]},"external_id":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"contacts_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","domain","external_id","properties","contacts_count","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listCompanies","summary":"List companies"}},"/companies/{id}":{"get":{"tags":["companies"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["company"]},"id":{"type":"string","pattern":"^co_[0-9A-Za-z]{16}$","description":"Stamp0 co_ identifier"},"name":{"type":"string"},"domain":{"type":["string","null"]},"external_id":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"contacts_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","domain","external_id","properties","contacts_count","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getCompany","summary":"Retrieve a company"},"patch":{"tags":["companies"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"domain":{"anyOf":[{"type":"string","maxLength":253,"pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},{"type":"null"}]},"external_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["company"]},"id":{"type":"string","pattern":"^co_[0-9A-Za-z]{16}$","description":"Stamp0 co_ identifier"},"name":{"type":"string"},"domain":{"type":["string","null"]},"external_id":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},"contacts_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","domain","external_id","properties","contacts_count","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateCompany","summary":"Update a company"},"delete":{"tags":["companies"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["company"]},"id":{"type":"string","pattern":"^co_[0-9A-Za-z]{16}$","description":"Stamp0 co_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteCompany","summary":"Delete a company"}},"/companies/{id}/contacts":{"get":{"tags":["companies"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["company_contact"]},"company_id":{"type":"string","pattern":"^co_[0-9A-Za-z]{16}$","description":"Stamp0 co_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"role":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","company_id","contact_id","role","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listCompanyContacts","summary":"List a company’s contacts"},"post":{"tags":["companies"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"contact":{"anyOf":[{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},{"type":"string","maxLength":254}]},"role":{"type":"string","minLength":1,"maxLength":128}},"required":["contact"]}}},"required":["contacts"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["company_contact"]},"company_id":{"type":"string","pattern":"^co_[0-9A-Za-z]{16}$","description":"Stamp0 co_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"role":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","company_id","contact_id","role","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"addCompanyContacts","summary":"Add contacts to a company","description":"By id or email (created when missing), with an optional role."}},"/companies/{id}/contacts/{contact}":{"delete":{"tags":["companies"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":254},"in":"path","name":"contact","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["company_contact"]},"company_id":{"type":"string","pattern":"^co_[0-9A-Za-z]{16}$","description":"Stamp0 co_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","company_id","contact_id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"removeCompanyContact","summary":"Remove a contact from a company"}},"/group":{"post":{"tags":["companies"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":"string","minLength":1,"maxLength":256},"traits":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"domain":{"type":"string","maxLength":253,"pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"}},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"email":{"type":"string","maxLength":254},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"role":{"type":"string","minLength":1,"maxLength":128}},"required":["group_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["group"]},"company_id":{"type":"string","pattern":"^co_[0-9A-Za-z]{16}$","description":"Stamp0 co_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"}},"required":["object","company_id","contact_id"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"group","summary":"Group a contact into a company","description":"Segment-style: upserts the company by `group_id` (its external id) with `traits` and attaches the contact."}},"/events/send":{"post":{"tags":["contact-events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string","maxLength":254},"properties":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{}},"payload":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{}},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"idempotency_key":{"type":"string","minLength":1,"maxLength":256},"create_contact":{"type":"boolean"}}}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["event"]},"event":{"type":"string"},"id":{"type":"string","pattern":"^cev_[0-9A-Za-z]{16}$","description":"Stamp0 cev_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"created":{"type":"boolean"}},"required":["object","event","id","contact_id","created"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"sendEvent","summary":"Send an event","description":"Resend's Send Event: the same as `POST /events`, answering `{ object, event }` plus the event id."}},"/events/batch":{"post":{"tags":["contact-events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string","maxLength":254},"properties":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{}},"payload":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{}},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"idempotency_key":{"type":"string","minLength":1,"maxLength":256},"create_contact":{"type":"boolean"}}}}},"required":["events"]}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["event"]},"id":{"type":"string","pattern":"^cev_[0-9A-Za-z]{16}$","description":"Stamp0 cev_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"created":{"type":"boolean"}},"required":["object","id","contact_id","created"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"trackEvents","summary":"Track custom events in a batch","description":"Up to 100 events, recorded atomically."}},"/events/custom":{"get":{"tags":["contact-events"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"in":"query","name":"name","required":false},{"schema":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$"},"in":"query","name":"contact_id","required":false,"description":"Stamp0 ct_ identifier"},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"since","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["event"]},"id":{"type":"string","pattern":"^cev_[0-9A-Za-z]{16}$","description":"Stamp0 cev_ identifier"},"name":{"type":"string"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","contact_id","properties","occurred_at","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listCustomEvents","summary":"List custom events"}},"/contacts/{id}/events":{"get":{"tags":["contact-events"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"in":"query","name":"name","required":false},{"schema":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$"},"in":"query","name":"contact_id","required":false,"description":"Stamp0 ct_ identifier"},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"in":"query","name":"since","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["event"]},"id":{"type":"string","pattern":"^cev_[0-9A-Za-z]{16}$","description":"Stamp0 cev_ identifier"},"name":{"type":"string"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","contact_id","properties","occurred_at","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listContactEvents","summary":"List a contact's custom events"}},"/sequences":{"post":{"tags":["sequences"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"description":{"type":"string","maxLength":2000},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list_joined"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["type","list_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contact_created"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["segment_entered"]},"segment_id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}},"required":["type","segment_id"],"additionalProperties":false}]},"steps":{"type":"object","properties":{"entry":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"steps":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["delay"]},"duration":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"]},"until_time":{"type":"object","properties":{"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["weekdays","time","timezone"],"additionalProperties":false},"until_date":{"type":"object","properties":{"property":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"offset":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]},"direction":{"type":"string","enum":["before","after"]}},"required":["amount","unit","direction"],"additionalProperties":false},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["property"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["wait_for_event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"timeout":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"]},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"timeout_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","event","timeout","next","timeout_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"filter":{"$ref":"#/components/schemas/schema0"},"if_true":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"if_false":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","filter","if_true","if_false"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition_split"]},"paths":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"filter":{"$ref":"#/components/schemas/schema0"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["filter","next"],"additionalProperties":false}},"else_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","paths","else_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["random_split"]},"paths":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"weight":{"type":"integer","minimum":1,"maximum":99},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["weight","next"],"additionalProperties":false}}},"required":["type","paths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["send_email"]},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","template_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update_contact"]},"set":{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","set","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["add_to_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["remove_from_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["exit"]}},"required":["type"],"additionalProperties":false}]}}},"required":["entry","steps"],"additionalProperties":false},"from":{"type":"string","maxLength":320},"reply_to":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320}},"allow_reentry":{"type":"boolean"}},"required":["name","trigger","steps"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sequence"]},"id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","active","paused","archived"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list_joined"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["type","list_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contact_created"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["segment_entered"]},"segment_id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}},"required":["type","segment_id"],"additionalProperties":false}]},"steps":{"type":"object","properties":{"entry":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"steps":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["delay"]},"duration":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"until_time":{"type":"object","properties":{"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["weekdays","time","timezone"],"additionalProperties":false},"until_date":{"type":"object","properties":{"property":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"offset":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]},"direction":{"type":"string","enum":["before","after"]}},"required":["amount","unit","direction"],"additionalProperties":false},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["property"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["wait_for_event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"timeout":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"timeout_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","event","timeout","next","timeout_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"filter":{"$ref":"#/components/schemas/schema0"},"if_true":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"if_false":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","filter","if_true","if_false"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition_split"]},"paths":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"filter":{"$ref":"#/components/schemas/schema0"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["filter","next"],"additionalProperties":false}},"else_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","paths","else_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["random_split"]},"paths":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"weight":{"type":"integer","minimum":1,"maximum":99},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["weight","next"],"additionalProperties":false}}},"required":["type","paths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["send_email"]},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","template_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update_contact"]},"set":{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","set","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["add_to_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["remove_from_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["exit"]}},"required":["type"],"additionalProperties":false}]}}},"required":["entry","steps"],"additionalProperties":false},"graph_version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"allow_reentry":{"type":"boolean"},"stats":{"type":"object","properties":{"active":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"exited":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["active","completed","exited"],"additionalProperties":false},"activated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","status","trigger","steps","graph_version","from","reply_to","allow_reentry","stats","activated_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createSequence","summary":"Create a sequence","description":"Creates a draft. The step graph is checked: every referenced step, template and list exists, every step is reachable, every loop passes a delay or wait, and conditions compile."},"get":{"tags":["sequences"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["draft","active","paused","archived"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["sequence"]},"id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","active","paused","archived"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list_joined"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["type","list_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contact_created"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["segment_entered"]},"segment_id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}},"required":["type","segment_id"],"additionalProperties":false}]},"steps":{"type":"object","properties":{"entry":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"steps":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["delay"]},"duration":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"until_time":{"type":"object","properties":{"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["weekdays","time","timezone"],"additionalProperties":false},"until_date":{"type":"object","properties":{"property":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"offset":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]},"direction":{"type":"string","enum":["before","after"]}},"required":["amount","unit","direction"],"additionalProperties":false},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["property"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["wait_for_event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"timeout":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"timeout_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","event","timeout","next","timeout_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"filter":{"$ref":"#/components/schemas/schema0"},"if_true":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"if_false":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","filter","if_true","if_false"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition_split"]},"paths":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"filter":{"$ref":"#/components/schemas/schema0"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["filter","next"],"additionalProperties":false}},"else_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","paths","else_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["random_split"]},"paths":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"weight":{"type":"integer","minimum":1,"maximum":99},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["weight","next"],"additionalProperties":false}}},"required":["type","paths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["send_email"]},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","template_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update_contact"]},"set":{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","set","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["add_to_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["remove_from_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["exit"]}},"required":["type"],"additionalProperties":false}]}}},"required":["entry","steps"],"additionalProperties":false},"graph_version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"allow_reentry":{"type":"boolean"},"stats":{"type":"object","properties":{"active":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"exited":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["active","completed","exited"],"additionalProperties":false},"activated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","status","trigger","steps","graph_version","from","reply_to","allow_reentry","stats","activated_at","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listSequences","summary":"List sequences"}},"/sequences/{id}":{"get":{"tags":["sequences"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sequence"]},"id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","active","paused","archived"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list_joined"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["type","list_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contact_created"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["segment_entered"]},"segment_id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}},"required":["type","segment_id"],"additionalProperties":false}]},"steps":{"type":"object","properties":{"entry":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"steps":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["delay"]},"duration":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"until_time":{"type":"object","properties":{"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["weekdays","time","timezone"],"additionalProperties":false},"until_date":{"type":"object","properties":{"property":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"offset":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]},"direction":{"type":"string","enum":["before","after"]}},"required":["amount","unit","direction"],"additionalProperties":false},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["property"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["wait_for_event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"timeout":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"timeout_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","event","timeout","next","timeout_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"filter":{"$ref":"#/components/schemas/schema0"},"if_true":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"if_false":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","filter","if_true","if_false"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition_split"]},"paths":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"filter":{"$ref":"#/components/schemas/schema0"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["filter","next"],"additionalProperties":false}},"else_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","paths","else_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["random_split"]},"paths":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"weight":{"type":"integer","minimum":1,"maximum":99},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["weight","next"],"additionalProperties":false}}},"required":["type","paths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["send_email"]},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","template_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update_contact"]},"set":{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","set","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["add_to_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["remove_from_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["exit"]}},"required":["type"],"additionalProperties":false}]}}},"required":["entry","steps"],"additionalProperties":false},"graph_version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"allow_reentry":{"type":"boolean"},"stats":{"type":"object","properties":{"active":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"exited":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["active","completed","exited"],"additionalProperties":false},"activated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","status","trigger","steps","graph_version","from","reply_to","allow_reentry","stats","activated_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getSequence","summary":"Retrieve a sequence"},"patch":{"tags":["sequences"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list_joined"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["type","list_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contact_created"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["segment_entered"]},"segment_id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}},"required":["type","segment_id"],"additionalProperties":false}]},"steps":{"type":"object","properties":{"entry":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"steps":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["delay"]},"duration":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"]},"until_time":{"type":"object","properties":{"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["weekdays","time","timezone"],"additionalProperties":false},"until_date":{"type":"object","properties":{"property":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"offset":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]},"direction":{"type":"string","enum":["before","after"]}},"required":["amount","unit","direction"],"additionalProperties":false},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["property"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["wait_for_event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"timeout":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"]},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"timeout_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","event","timeout","next","timeout_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"filter":{"$ref":"#/components/schemas/schema0"},"if_true":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"if_false":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","filter","if_true","if_false"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition_split"]},"paths":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"filter":{"$ref":"#/components/schemas/schema0"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["filter","next"],"additionalProperties":false}},"else_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","paths","else_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["random_split"]},"paths":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"weight":{"type":"integer","minimum":1,"maximum":99},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["weight","next"],"additionalProperties":false}}},"required":["type","paths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["send_email"]},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","template_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update_contact"]},"set":{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","set","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["add_to_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["remove_from_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["exit"]}},"required":["type"],"additionalProperties":false}]}}},"required":["entry","steps"],"additionalProperties":false},"from":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"reply_to":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320}},"allow_reentry":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sequence"]},"id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","active","paused","archived"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list_joined"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["type","list_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contact_created"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["segment_entered"]},"segment_id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}},"required":["type","segment_id"],"additionalProperties":false}]},"steps":{"type":"object","properties":{"entry":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"steps":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["delay"]},"duration":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"until_time":{"type":"object","properties":{"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["weekdays","time","timezone"],"additionalProperties":false},"until_date":{"type":"object","properties":{"property":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"offset":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]},"direction":{"type":"string","enum":["before","after"]}},"required":["amount","unit","direction"],"additionalProperties":false},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["property"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["wait_for_event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"timeout":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"timeout_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","event","timeout","next","timeout_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"filter":{"$ref":"#/components/schemas/schema0"},"if_true":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"if_false":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","filter","if_true","if_false"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition_split"]},"paths":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"filter":{"$ref":"#/components/schemas/schema0"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["filter","next"],"additionalProperties":false}},"else_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","paths","else_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["random_split"]},"paths":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"weight":{"type":"integer","minimum":1,"maximum":99},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["weight","next"],"additionalProperties":false}}},"required":["type","paths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["send_email"]},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","template_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update_contact"]},"set":{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","set","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["add_to_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["remove_from_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["exit"]}},"required":["type"],"additionalProperties":false}]}}},"required":["entry","steps"],"additionalProperties":false},"graph_version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"allow_reentry":{"type":"boolean"},"stats":{"type":"object","properties":{"active":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"exited":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["active","completed","exited"],"additionalProperties":false},"activated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","status","trigger","steps","graph_version","from","reply_to","allow_reentry","stats","activated_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateSequence","summary":"Update a sequence","description":"Changing `steps` creates a new graph version; contacts already enrolled finish on the version they started."},"delete":{"tags":["sequences"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sequence"]},"id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteSequence","summary":"Delete a sequence"}},"/sequences/{id}/activate":{"post":{"tags":["sequences"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sequence"]},"id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","active","paused","archived"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list_joined"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["type","list_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contact_created"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["segment_entered"]},"segment_id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}},"required":["type","segment_id"],"additionalProperties":false}]},"steps":{"type":"object","properties":{"entry":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"steps":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["delay"]},"duration":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"until_time":{"type":"object","properties":{"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["weekdays","time","timezone"],"additionalProperties":false},"until_date":{"type":"object","properties":{"property":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"offset":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]},"direction":{"type":"string","enum":["before","after"]}},"required":["amount","unit","direction"],"additionalProperties":false},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["property"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["wait_for_event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"timeout":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"timeout_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","event","timeout","next","timeout_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"filter":{"$ref":"#/components/schemas/schema0"},"if_true":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"if_false":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","filter","if_true","if_false"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition_split"]},"paths":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"filter":{"$ref":"#/components/schemas/schema0"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["filter","next"],"additionalProperties":false}},"else_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","paths","else_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["random_split"]},"paths":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"weight":{"type":"integer","minimum":1,"maximum":99},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["weight","next"],"additionalProperties":false}}},"required":["type","paths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["send_email"]},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","template_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update_contact"]},"set":{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","set","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["add_to_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["remove_from_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["exit"]}},"required":["type"],"additionalProperties":false}]}}},"required":["entry","steps"],"additionalProperties":false},"graph_version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"allow_reentry":{"type":"boolean"},"stats":{"type":"object","properties":{"active":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"exited":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["active","completed","exited"],"additionalProperties":false},"activated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","status","trigger","steps","graph_version","from","reply_to","allow_reentry","stats","activated_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"activateSequence","summary":"Activate a sequence","description":"Starts enrolling contacts on its trigger. A sequence that sends email needs the project's physical postal address in the marketing settings."}},"/sequences/{id}/pause":{"post":{"tags":["sequences"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sequence"]},"id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","active","paused","archived"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list_joined"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["type","list_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contact_created"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["segment_entered"]},"segment_id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}},"required":["type","segment_id"],"additionalProperties":false}]},"steps":{"type":"object","properties":{"entry":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"steps":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["delay"]},"duration":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"until_time":{"type":"object","properties":{"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["weekdays","time","timezone"],"additionalProperties":false},"until_date":{"type":"object","properties":{"property":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"offset":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]},"direction":{"type":"string","enum":["before","after"]}},"required":["amount","unit","direction"],"additionalProperties":false},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["property"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["wait_for_event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"timeout":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"timeout_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","event","timeout","next","timeout_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"filter":{"$ref":"#/components/schemas/schema0"},"if_true":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"if_false":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","filter","if_true","if_false"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition_split"]},"paths":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"filter":{"$ref":"#/components/schemas/schema0"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["filter","next"],"additionalProperties":false}},"else_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","paths","else_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["random_split"]},"paths":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"weight":{"type":"integer","minimum":1,"maximum":99},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["weight","next"],"additionalProperties":false}}},"required":["type","paths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["send_email"]},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","template_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update_contact"]},"set":{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","set","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["add_to_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["remove_from_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["exit"]}},"required":["type"],"additionalProperties":false}]}}},"required":["entry","steps"],"additionalProperties":false},"graph_version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"allow_reentry":{"type":"boolean"},"stats":{"type":"object","properties":{"active":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"exited":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["active","completed","exited"],"additionalProperties":false},"activated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","status","trigger","steps","graph_version","from","reply_to","allow_reentry","stats","activated_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"pauseSequence","summary":"Pause a sequence","description":"Stops enrolling and holds enrollments where they are until it is activated again."}},"/sequences/{id}/archive":{"post":{"tags":["sequences"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sequence"]},"id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","active","paused","archived"]},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list_joined"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"required":["type","list_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contact_created"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["segment_entered"]},"segment_id":{"type":"string","pattern":"^seg_[0-9A-Za-z]{16}$","description":"Stamp0 seg_ identifier"}},"required":["type","segment_id"],"additionalProperties":false}]},"steps":{"type":"object","properties":{"entry":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"steps":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["delay"]},"duration":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"until_time":{"type":"object","properties":{"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["weekdays","time","timezone"],"additionalProperties":false},"until_date":{"type":"object","properties":{"property":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"offset":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]},"direction":{"type":"string","enum":["before","after"]}},"required":["amount","unit","direction"],"additionalProperties":false},"time":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},"timezone":{"type":"string","minLength":1,"maxLength":64}},"required":["property"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["wait_for_event"]},"event":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"},"timeout":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"maximum":10000},"unit":{"type":"string","enum":["minutes","hours","days","weeks"]}},"required":["amount","unit"],"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"timeout_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","event","timeout","next","timeout_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"filter":{"$ref":"#/components/schemas/schema0"},"if_true":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"if_false":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","filter","if_true","if_false"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["condition_split"]},"paths":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"filter":{"$ref":"#/components/schemas/schema0"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["filter","next"],"additionalProperties":false}},"else_next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","paths","else_next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["random_split"]},"paths":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"weight":{"type":"integer","minimum":1,"maximum":99},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["weight","next"],"additionalProperties":false}}},"required":["type","paths"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["send_email"]},"template_id":{"type":"string","pattern":"^tpl_[0-9A-Za-z]{16}$","description":"Stamp0 tpl_ identifier"},"from":{"type":"string","maxLength":320},"subject":{"type":"string","maxLength":998},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","template_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update_contact"]},"set":{"type":"object","properties":{"first_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"last_name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"additionalProperties":false},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","set","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["add_to_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["remove_from_list"]},"list_id":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"},"next":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]}},"required":["type","list_id","next"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["exit"]}},"required":["type"],"additionalProperties":false}]}}},"required":["entry","steps"],"additionalProperties":false},"graph_version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"from":{"type":["string","null"]},"reply_to":{"type":"array","items":{"type":"string"}},"allow_reentry":{"type":"boolean"},"stats":{"type":"object","properties":{"active":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"exited":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["active","completed","exited"],"additionalProperties":false},"activated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","description","status","trigger","steps","graph_version","from","reply_to","allow_reentry","stats","activated_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"archiveSequence","summary":"Archive a sequence","description":"Final: cancels every live enrollment."}},"/sequences/{id}/enrollments":{"get":{"tags":["sequences"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false},{"schema":{"type":"string","enum":["active","waiting","completed","exited","canceled","failed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$"},"in":"query","name":"contact_id","required":false,"description":"Stamp0 ct_ identifier"},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["sequence_enrollment"]},"id":{"type":"string","pattern":"^enr_[0-9A-Za-z]{16}$","description":"Stamp0 enr_ identifier"},"sequence_id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"status":{"type":"string","enum":["active","waiting","completed","exited","canceled","failed"]},"current_step_id":{"type":["string","null"]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"waiting_for_event":{"type":["string","null"]},"exit_reason":{"type":["string","null"]},"history":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"type":{"type":"string","enum":["delay","wait_for_event","condition","condition_split","random_split","send_email","update_contact","add_to_list","remove_from_list","exit"]},"outcome":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["step_id","type","outcome","at"],"additionalProperties":false}},"enrolled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["object","id","sequence_id","contact_id","status","current_step_id","next_run_at","waiting_for_event","exit_reason","history","enrolled_at","completed_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listSequenceEnrollments","summary":"List enrollments"},"post":{"tags":["sequences"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"minItems":1,"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"}},"required":["id"]},{"type":"object","properties":{"email":{"type":"string","maxLength":254}},"required":["email"]}]}}},"required":["contacts"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"contact_id":{"anyOf":[{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},{"type":"null"}]},"enrollment_id":{"anyOf":[{"type":"string","pattern":"^enr_[0-9A-Za-z]{16}$","description":"Stamp0 enr_ identifier"},{"type":"null"}]},"status":{"type":"string","enum":["enrolled","skipped"]},"reason":{"type":["string","null"]}},"required":["contact_id","enrollment_id","status","reason"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"enrollContacts","summary":"Enroll contacts","description":"Enrolls up to 1,000 contacts in an active sequence, ignoring its trigger but honoring its re-entry policy; unsubscribed contacts are skipped."}},"/sequences/{id}/enrollments/{enrollment_id}/cancel":{"post":{"tags":["sequences"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"enrollment_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sequence_enrollment"]},"id":{"type":"string","pattern":"^enr_[0-9A-Za-z]{16}$","description":"Stamp0 enr_ identifier"},"sequence_id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"status":{"type":"string","enum":["active","waiting","completed","exited","canceled","failed"]},"current_step_id":{"type":["string","null"]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"waiting_for_event":{"type":["string","null"]},"exit_reason":{"type":["string","null"]},"history":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"type":{"type":"string","enum":["delay","wait_for_event","condition","condition_split","random_split","send_email","update_contact","add_to_list","remove_from_list","exit"]},"outcome":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["step_id","type","outcome","at"],"additionalProperties":false}},"enrolled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["object","id","sequence_id","contact_id","status","current_step_id","next_run_at","waiting_for_event","exit_reason","history","enrolled_at","completed_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"cancelEnrollment","summary":"Cancel an enrollment"}},"/sequences/{id}/stats":{"get":{"tags":["sequences"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["sequence_step_stats"]},"step_id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["delay","wait_for_event","condition","condition_split","random_split","send_email","update_contact","add_to_list","remove_from_list","exit"]},{"type":"null"}]},"current":{"type":"integer","minimum":0,"maximum":9007199254740991},"entered":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"exited":{"type":"integer","minimum":0,"maximum":9007199254740991},"branch_true":{"type":"integer","minimum":0,"maximum":9007199254740991},"branch_false":{"type":"integer","minimum":0,"maximum":9007199254740991},"event_received":{"type":"integer","minimum":0,"maximum":9007199254740991},"timed_out":{"type":"integer","minimum":0,"maximum":9007199254740991},"opened":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicked":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["object","step_id","type","current","entered","completed","sent","skipped","failed","exited","branch_true","branch_false","event_received","timed_out","opened","clicked"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getSequenceStats","summary":"Retrieve per-step stats"}},"/sequences/{id}/test":{"post":{"tags":["sequences"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"email":{"type":"string","maxLength":254},"assume_events":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 _.:/-]{0,127}$"}},"send_to":{"type":"string","maxLength":254}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["sequence_test"]},"sequence_id":{"type":"string","pattern":"^seq_[0-9A-Za-z]{16}$","description":"Stamp0 seq_ identifier"},"contact_id":{"type":"string","pattern":"^ct_[0-9A-Za-z]{16}$","description":"Stamp0 ct_ identifier"},"ends":{"type":"string"},"truncated":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"type":{"type":"string","enum":["delay","wait_for_event","condition","condition_split","random_split","send_email","update_contact","add_to_list","remove_from_list","exit"]},"outcome":{"type":"string"},"at_offset_seconds":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["step_id","type","outcome","at_offset_seconds"],"additionalProperties":false}},"emails":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"from":{"type":["string","null"]},"subject":{"type":["string","null"]},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"email_id":{"type":["string","null"]},"error":{"type":["string","null"]}},"required":["step_id","from","subject","html","text","email_id","error"],"additionalProperties":false}}},"required":["object","sequence_id","contact_id","ends","truncated","steps","emails"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"testSequence","summary":"Test a sequence","description":"A dry run for one contact: conditions are evaluated, emails rendered, nothing changes. With `send_to` (your own address, from a dashboard session) each email is also sent to you, prefixed `[Test]`."}},"/forms":{"post":{"tags":["forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"fields":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","enum":["email","first_name","last_name"]},{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"}]},"label":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["email","text","number","checkbox","date"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string","maxLength":256}},"required":["name","label","type"]}},"list_ids":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"double_opt_in":{"default":true,"type":"boolean"},"redirect_url":{"type":"string","maxLength":2048,"format":"uri"},"success_message":{"type":"string","minLength":1,"maxLength":2000},"spam_protection":{"type":"object","properties":{"honeypot":{"default":true,"type":"boolean"},"turnstile":{"default":false,"type":"boolean"},"max_per_ip_per_hour":{"default":20,"type":"integer","minimum":1,"maximum":10000}}}},"required":["name","fields"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["form"]},"id":{"type":"string","pattern":"^frm_[0-9A-Za-z]{16}$","description":"Stamp0 frm_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","enum":["email","first_name","last_name"]},{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"}]},"label":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["email","text","number","checkbox","date"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string","maxLength":256}},"required":["name","label","type","required"],"additionalProperties":false}},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"double_opt_in":{"type":"boolean"},"redirect_url":{"type":["string","null"]},"success_message":{"type":["string","null"]},"spam_protection":{"type":"object","properties":{"honeypot":{"default":true,"type":"boolean"},"turnstile":{"default":false,"type":"boolean"},"max_per_ip_per_hour":{"default":20,"type":"integer","minimum":1,"maximum":10000}},"required":["honeypot","turnstile","max_per_ip_per_hour"],"additionalProperties":false},"action_url":{"type":"string"},"hosted_url":{"type":"string"},"embed":{"type":"object","properties":{"iframe":{"type":"string"},"html":{"type":"string"}},"required":["iframe","html"],"additionalProperties":false},"submission_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_submitted_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","fields","list_ids","double_opt_in","redirect_url","success_message","spam_protection","action_url","hosted_url","embed","submission_count","last_submitted_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createForm","summary":"Create a signup form","description":"Returns the hosted page (`hosted_url`), the public endpoint it posts to (`action_url`) and embed snippets. Double opt-in needs at least one list and a `default_from` in the marketing settings (it sends the confirmation email)."},"get":{"tags":["forms"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["form"]},"id":{"type":"string","pattern":"^frm_[0-9A-Za-z]{16}$","description":"Stamp0 frm_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","enum":["email","first_name","last_name"]},{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"}]},"label":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["email","text","number","checkbox","date"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string","maxLength":256}},"required":["name","label","type","required"],"additionalProperties":false}},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"double_opt_in":{"type":"boolean"},"redirect_url":{"type":["string","null"]},"success_message":{"type":["string","null"]},"spam_protection":{"type":"object","properties":{"honeypot":{"default":true,"type":"boolean"},"turnstile":{"default":false,"type":"boolean"},"max_per_ip_per_hour":{"default":20,"type":"integer","minimum":1,"maximum":10000}},"required":["honeypot","turnstile","max_per_ip_per_hour"],"additionalProperties":false},"action_url":{"type":"string"},"hosted_url":{"type":"string"},"embed":{"type":"object","properties":{"iframe":{"type":"string"},"html":{"type":"string"}},"required":["iframe","html"],"additionalProperties":false},"submission_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_submitted_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","fields","list_ids","double_opt_in","redirect_url","success_message","spam_protection","action_url","hosted_url","embed","submission_count","last_submitted_at","created_at","updated_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listForms","summary":"List signup forms"}},"/forms/{id}":{"get":{"tags":["forms"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["form"]},"id":{"type":"string","pattern":"^frm_[0-9A-Za-z]{16}$","description":"Stamp0 frm_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","enum":["email","first_name","last_name"]},{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"}]},"label":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["email","text","number","checkbox","date"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string","maxLength":256}},"required":["name","label","type","required"],"additionalProperties":false}},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"double_opt_in":{"type":"boolean"},"redirect_url":{"type":["string","null"]},"success_message":{"type":["string","null"]},"spam_protection":{"type":"object","properties":{"honeypot":{"default":true,"type":"boolean"},"turnstile":{"default":false,"type":"boolean"},"max_per_ip_per_hour":{"default":20,"type":"integer","minimum":1,"maximum":10000}},"required":["honeypot","turnstile","max_per_ip_per_hour"],"additionalProperties":false},"action_url":{"type":"string"},"hosted_url":{"type":"string"},"embed":{"type":"object","properties":{"iframe":{"type":"string"},"html":{"type":"string"}},"required":["iframe","html"],"additionalProperties":false},"submission_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_submitted_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","fields","list_ids","double_opt_in","redirect_url","success_message","spam_protection","action_url","hosted_url","embed","submission_count","last_submitted_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getForm","summary":"Retrieve a signup form"},"patch":{"tags":["forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"status":{"type":"string","enum":["active","disabled"]},"fields":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","enum":["email","first_name","last_name"]},{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"}]},"label":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["email","text","number","checkbox","date"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string","maxLength":256}},"required":["name","label","type"]}},"list_ids":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"double_opt_in":{"type":"boolean"},"redirect_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"success_message":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]},"spam_protection":{"type":"object","properties":{"honeypot":{"default":true,"type":"boolean"},"turnstile":{"default":false,"type":"boolean"},"max_per_ip_per_hour":{"default":20,"type":"integer","minimum":1,"maximum":10000}}}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["form"]},"id":{"type":"string","pattern":"^frm_[0-9A-Za-z]{16}$","description":"Stamp0 frm_ identifier"},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","enum":["email","first_name","last_name"]},{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"}]},"label":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["email","text","number","checkbox","date"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string","maxLength":256}},"required":["name","label","type","required"],"additionalProperties":false}},"list_ids":{"type":"array","items":{"type":"string","pattern":"^lst_[0-9A-Za-z]{16}$","description":"Stamp0 lst_ identifier"}},"double_opt_in":{"type":"boolean"},"redirect_url":{"type":["string","null"]},"success_message":{"type":["string","null"]},"spam_protection":{"type":"object","properties":{"honeypot":{"default":true,"type":"boolean"},"turnstile":{"default":false,"type":"boolean"},"max_per_ip_per_hour":{"default":20,"type":"integer","minimum":1,"maximum":10000}},"required":["honeypot","turnstile","max_per_ip_per_hour"],"additionalProperties":false},"action_url":{"type":"string"},"hosted_url":{"type":"string"},"embed":{"type":"object","properties":{"iframe":{"type":"string"},"html":{"type":"string"}},"required":["iframe","html"],"additionalProperties":false},"submission_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_submitted_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","id","name","status","fields","list_ids","double_opt_in","redirect_url","success_message","spam_protection","action_url","hosted_url","embed","submission_count","last_submitted_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateForm","summary":"Update a signup form","description":"Changes fields, lists, double opt-in, redirect, spam protection or status (`disabled` forms refuse signups)."},"delete":{"tags":["forms"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["form"]},"id":{"type":"string","pattern":"^frm_[0-9A-Za-z]{16}$","description":"Stamp0 frm_ identifier"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteForm","summary":"Delete a signup form"}},"/settings/marketing":{"get":{"tags":["marketing"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["marketing_settings"]},"physical_address":{"type":["string","null"]},"company_name":{"type":["string","null"]},"default_from":{"type":["string","null"]},"default_reply_to":{"type":"array","items":{"type":"string"}},"unsubscribe_page":{"type":"object","properties":{"logo_url":{"type":"string","maxLength":2048,"format":"uri"},"accent_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"heading":{"type":"string","minLength":1,"maxLength":200},"message":{"type":"string","minLength":1,"maxLength":2000}},"additionalProperties":false},"preference_center_enabled":{"type":"boolean"},"ready_to_send":{"type":"boolean"},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["object","physical_address","company_name","default_from","default_reply_to","unsubscribe_page","preference_center_enabled","ready_to_send","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getMarketingSettings","summary":"Retrieve marketing settings"},"patch":{"tags":["marketing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"physical_address":{"anyOf":[{"type":"string","minLength":10,"maxLength":1000},{"type":"null"}]},"company_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"default_from":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"default_reply_to":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":320}},"unsubscribe_page":{"type":"object","properties":{"logo_url":{"type":"string","maxLength":2048,"format":"uri"},"accent_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"heading":{"type":"string","minLength":1,"maxLength":200},"message":{"type":"string","minLength":1,"maxLength":2000}},"additionalProperties":false},"preference_center_enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["marketing_settings"]},"physical_address":{"type":["string","null"]},"company_name":{"type":["string","null"]},"default_from":{"type":["string","null"]},"default_reply_to":{"type":"array","items":{"type":"string"}},"unsubscribe_page":{"type":"object","properties":{"logo_url":{"type":"string","maxLength":2048,"format":"uri"},"accent_color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"heading":{"type":"string","minLength":1,"maxLength":200},"message":{"type":"string","minLength":1,"maxLength":2000}},"additionalProperties":false},"preference_center_enabled":{"type":"boolean"},"ready_to_send":{"type":"boolean"},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["object","physical_address","company_name","default_from","default_reply_to","unsubscribe_page","preference_center_enabled","ready_to_send","updated_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateMarketingSettings","summary":"Update marketing settings","description":"The physical postal address is required before any campaign or sequence sends; `default_from` must use a domain of the project."}},"/providers":{"get":{"tags":["connections"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["ses","cloudflare"]},"available":{"type":"boolean"},"beta":{"type":"boolean"}},"required":["provider","available"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listProviders","summary":"List providers","description":"The providers this organization may connect. Cloudflare is in beta (Cloudflare Email Sending is in public beta) and available wherever the deployment enables it for the organization."}},"/connections":{"get":{"tags":["connections"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"before","required":false}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["connection"]},"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"name":{"type":"string"},"provider":{"type":"string","enum":["ses","cloudflare"]},"region":{"type":["string","null"]},"status":{"type":"string","enum":["pending","verifying","connected","error","disconnected"]},"external_id":{"type":["string","null"]},"role_arn":{"type":["string","null"]},"provider_account_id":{"type":["string","null"]},"stack_version":{"type":["string","null"]},"sandbox_status":{"type":"string","enum":["unknown","sandbox","production"]},"sending_quota":{"anyOf":[{"type":"object","properties":{"max_24_hour_send":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_send_rate":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"sent_last_24_hours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"resets_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_source":{"anyOf":[{"type":"string","enum":["cloudflare_analytics","stamp0_records"]},{"type":"null"}]}},"required":["max_24_hour_send","max_send_rate","sent_last_24_hours"],"additionalProperties":false},{"type":"null"}]},"setup_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"last_error":{"type":["string","null"]},"capabilities":{"anyOf":[{"type":"object","properties":{"sending":{"type":"boolean"},"receiving":{"type":"boolean"},"receiving_in_region":{"type":"boolean"},"dkim":{"type":"string","enum":["managed","bring_your_own","none"]},"custom_mail_from":{"type":"boolean"},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"campaigns":{"type":"boolean"},"suppression_list":{"type":"string","enum":["account","sending_domain","none"]},"event_delivery":{"type":"string","enum":["push","poll"]},"max_recipients_per_message":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_message_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_send_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["sending","receiving","receiving_in_region","dkim","custom_mail_from","open_tracking","click_tracking","campaigns","suppression_list","event_delivery","max_recipients_per_message","max_message_bytes","max_send_rate"],"additionalProperties":false},{"type":"null"}]},"provider_config":{"anyOf":[{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9a-f]{32}$"},"worker_name":{"type":["string","null"]},"bucket_name":{"type":["string","null"]},"queue_name":{"type":["string","null"]},"sending_domains":{"type":"array","items":{"type":"string"}}},"required":["account_id","worker_name","bucket_name","queue_name","sending_domains"],"additionalProperties":false},{"type":"null"}]},"data_plane":{"anyOf":[{"type":"object","properties":{"version":{"type":["string","null"]},"previous_version":{"type":["string","null"]},"latest_version":{"type":"string"},"status":{"type":"string","enum":["not_deployed","up_to_date","update_available","update_required","modified","destroyed"]},"pinned":{"type":"boolean"},"pin":{"type":["string","null"]}},"required":["version","previous_version","latest_version","status","pinned"],"additionalProperties":false},{"type":"null"}]},"credential_hint":{"type":["string","null"]},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"detail":{"type":"string"}},"required":["code","created_at"],"additionalProperties":false}},"last_verified_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"stack_update":{"anyOf":[{"type":"object","properties":{"current_version":{"type":"string"},"latest_version":{"type":"string"},"template_url":{"type":"string"},"stack_name":{"type":"string"},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["current_version","latest_version","template_url","stack_name","console_url","command"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","name","provider","region","status","external_id","role_arn","provider_account_id","stack_version","sandbox_status","sending_quota","setup_url","last_verified_at","created_at"],"additionalProperties":false}}},"required":["object","has_more","data"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listConnections","summary":"List connections"},"post":{"tags":["connections"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"provider":{"default":"ses","type":"string","enum":["ses"]},"region":{"type":"string","pattern":"^[a-z]{2}(-[a-z]+)+-[0-9]$"}},"required":["name","region"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","enum":["cloudflare"]},"account_id":{"type":"string","pattern":"^[0-9a-f]{32}$"},"setup_token":{"type":"string","pattern":"^[A-Za-z0-9_.-]{20,512}$"},"api_token":{"type":"string","pattern":"^[A-Za-z0-9_.-]{20,512}$"},"acknowledge_transactional_only":{"type":"boolean","enum":[true]}},"required":["name","provider","account_id","setup_token","acknowledge_transactional_only"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["connection"]},"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"name":{"type":"string"},"provider":{"type":"string","enum":["ses","cloudflare"]},"region":{"type":["string","null"]},"status":{"type":"string","enum":["pending","verifying","connected","error","disconnected"]},"external_id":{"type":["string","null"]},"role_arn":{"type":["string","null"]},"provider_account_id":{"type":["string","null"]},"stack_version":{"type":["string","null"]},"sandbox_status":{"type":"string","enum":["unknown","sandbox","production"]},"sending_quota":{"anyOf":[{"type":"object","properties":{"max_24_hour_send":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_send_rate":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"sent_last_24_hours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"resets_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_source":{"anyOf":[{"type":"string","enum":["cloudflare_analytics","stamp0_records"]},{"type":"null"}]}},"required":["max_24_hour_send","max_send_rate","sent_last_24_hours"],"additionalProperties":false},{"type":"null"}]},"setup_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"last_error":{"type":["string","null"]},"capabilities":{"anyOf":[{"type":"object","properties":{"sending":{"type":"boolean"},"receiving":{"type":"boolean"},"receiving_in_region":{"type":"boolean"},"dkim":{"type":"string","enum":["managed","bring_your_own","none"]},"custom_mail_from":{"type":"boolean"},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"campaigns":{"type":"boolean"},"suppression_list":{"type":"string","enum":["account","sending_domain","none"]},"event_delivery":{"type":"string","enum":["push","poll"]},"max_recipients_per_message":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_message_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_send_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["sending","receiving","receiving_in_region","dkim","custom_mail_from","open_tracking","click_tracking","campaigns","suppression_list","event_delivery","max_recipients_per_message","max_message_bytes","max_send_rate"],"additionalProperties":false},{"type":"null"}]},"provider_config":{"anyOf":[{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9a-f]{32}$"},"worker_name":{"type":["string","null"]},"bucket_name":{"type":["string","null"]},"queue_name":{"type":["string","null"]},"sending_domains":{"type":"array","items":{"type":"string"}}},"required":["account_id","worker_name","bucket_name","queue_name","sending_domains"],"additionalProperties":false},{"type":"null"}]},"data_plane":{"anyOf":[{"type":"object","properties":{"version":{"type":["string","null"]},"previous_version":{"type":["string","null"]},"latest_version":{"type":"string"},"status":{"type":"string","enum":["not_deployed","up_to_date","update_available","update_required","modified","destroyed"]},"pinned":{"type":"boolean"},"pin":{"type":["string","null"]}},"required":["version","previous_version","latest_version","status","pinned"],"additionalProperties":false},{"type":"null"}]},"credential_hint":{"type":["string","null"]},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"detail":{"type":"string"}},"required":["code","created_at"],"additionalProperties":false}},"last_verified_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"stack_update":{"anyOf":[{"type":"object","properties":{"current_version":{"type":"string"},"latest_version":{"type":"string"},"template_url":{"type":"string"},"stack_name":{"type":"string"},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["current_version","latest_version","template_url","stack_name","console_url","command"],"additionalProperties":false},{"type":"null"}]},"ingest":{"anyOf":[{"type":"object","properties":{"header_name":{"type":"string","enum":["x-stamp0-ingest-token"]},"token":{"type":"string"},"endpoint":{"type":"string","format":"uri"}},"required":["header_name","token","endpoint"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","name","provider","region","status","external_id","role_arn","provider_account_id","stack_version","sandbox_status","sending_quota","setup_url","last_verified_at","created_at","ingest"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createConnection","summary":"Create a connection","description":"Dashboard only (owners and admins): API keys and OAuth clients get 403. Issues the external ID and event-ingest token and returns `setup_url`, the CloudFormation Quick Create link."}},"/connections/{id}":{"get":{"tags":["connections"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["connection"]},"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"name":{"type":"string"},"provider":{"type":"string","enum":["ses","cloudflare"]},"region":{"type":["string","null"]},"status":{"type":"string","enum":["pending","verifying","connected","error","disconnected"]},"external_id":{"type":["string","null"]},"role_arn":{"type":["string","null"]},"provider_account_id":{"type":["string","null"]},"stack_version":{"type":["string","null"]},"sandbox_status":{"type":"string","enum":["unknown","sandbox","production"]},"sending_quota":{"anyOf":[{"type":"object","properties":{"max_24_hour_send":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_send_rate":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"sent_last_24_hours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"resets_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_source":{"anyOf":[{"type":"string","enum":["cloudflare_analytics","stamp0_records"]},{"type":"null"}]}},"required":["max_24_hour_send","max_send_rate","sent_last_24_hours"],"additionalProperties":false},{"type":"null"}]},"setup_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"last_error":{"type":["string","null"]},"capabilities":{"anyOf":[{"type":"object","properties":{"sending":{"type":"boolean"},"receiving":{"type":"boolean"},"receiving_in_region":{"type":"boolean"},"dkim":{"type":"string","enum":["managed","bring_your_own","none"]},"custom_mail_from":{"type":"boolean"},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"campaigns":{"type":"boolean"},"suppression_list":{"type":"string","enum":["account","sending_domain","none"]},"event_delivery":{"type":"string","enum":["push","poll"]},"max_recipients_per_message":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_message_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_send_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["sending","receiving","receiving_in_region","dkim","custom_mail_from","open_tracking","click_tracking","campaigns","suppression_list","event_delivery","max_recipients_per_message","max_message_bytes","max_send_rate"],"additionalProperties":false},{"type":"null"}]},"provider_config":{"anyOf":[{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9a-f]{32}$"},"worker_name":{"type":["string","null"]},"bucket_name":{"type":["string","null"]},"queue_name":{"type":["string","null"]},"sending_domains":{"type":"array","items":{"type":"string"}}},"required":["account_id","worker_name","bucket_name","queue_name","sending_domains"],"additionalProperties":false},{"type":"null"}]},"data_plane":{"anyOf":[{"type":"object","properties":{"version":{"type":["string","null"]},"previous_version":{"type":["string","null"]},"latest_version":{"type":"string"},"status":{"type":"string","enum":["not_deployed","up_to_date","update_available","update_required","modified","destroyed"]},"pinned":{"type":"boolean"},"pin":{"type":["string","null"]}},"required":["version","previous_version","latest_version","status","pinned"],"additionalProperties":false},{"type":"null"}]},"credential_hint":{"type":["string","null"]},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"detail":{"type":"string"}},"required":["code","created_at"],"additionalProperties":false}},"last_verified_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"stack_update":{"anyOf":[{"type":"object","properties":{"current_version":{"type":"string"},"latest_version":{"type":"string"},"template_url":{"type":"string"},"stack_name":{"type":"string"},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["current_version","latest_version","template_url","stack_name","console_url","command"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","name","provider","region","status","external_id","role_arn","provider_account_id","stack_version","sandbox_status","sending_quota","setup_url","last_verified_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getConnection","summary":"Retrieve a connection","description":"Status, stack outputs, SES sandbox status and sending quota. API keys and OAuth clients get no `external_id` or `setup_url`."},"patch":{"tags":["connections"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"role_arn":{"type":"string","maxLength":2048,"pattern":"^arn:aws(-[a-z]+)*:iam::[0-9]{12}:role\\/[A-Za-z0-9+=,.@_/-]+$"}}}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["connection"]},"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"name":{"type":"string"},"provider":{"type":"string","enum":["ses","cloudflare"]},"region":{"type":["string","null"]},"status":{"type":"string","enum":["pending","verifying","connected","error","disconnected"]},"external_id":{"type":["string","null"]},"role_arn":{"type":["string","null"]},"provider_account_id":{"type":["string","null"]},"stack_version":{"type":["string","null"]},"sandbox_status":{"type":"string","enum":["unknown","sandbox","production"]},"sending_quota":{"anyOf":[{"type":"object","properties":{"max_24_hour_send":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_send_rate":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"sent_last_24_hours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"resets_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_source":{"anyOf":[{"type":"string","enum":["cloudflare_analytics","stamp0_records"]},{"type":"null"}]}},"required":["max_24_hour_send","max_send_rate","sent_last_24_hours"],"additionalProperties":false},{"type":"null"}]},"setup_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"last_error":{"type":["string","null"]},"capabilities":{"anyOf":[{"type":"object","properties":{"sending":{"type":"boolean"},"receiving":{"type":"boolean"},"receiving_in_region":{"type":"boolean"},"dkim":{"type":"string","enum":["managed","bring_your_own","none"]},"custom_mail_from":{"type":"boolean"},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"campaigns":{"type":"boolean"},"suppression_list":{"type":"string","enum":["account","sending_domain","none"]},"event_delivery":{"type":"string","enum":["push","poll"]},"max_recipients_per_message":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_message_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_send_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["sending","receiving","receiving_in_region","dkim","custom_mail_from","open_tracking","click_tracking","campaigns","suppression_list","event_delivery","max_recipients_per_message","max_message_bytes","max_send_rate"],"additionalProperties":false},{"type":"null"}]},"provider_config":{"anyOf":[{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9a-f]{32}$"},"worker_name":{"type":["string","null"]},"bucket_name":{"type":["string","null"]},"queue_name":{"type":["string","null"]},"sending_domains":{"type":"array","items":{"type":"string"}}},"required":["account_id","worker_name","bucket_name","queue_name","sending_domains"],"additionalProperties":false},{"type":"null"}]},"data_plane":{"anyOf":[{"type":"object","properties":{"version":{"type":["string","null"]},"previous_version":{"type":["string","null"]},"latest_version":{"type":"string"},"status":{"type":"string","enum":["not_deployed","up_to_date","update_available","update_required","modified","destroyed"]},"pinned":{"type":"boolean"},"pin":{"type":["string","null"]}},"required":["version","previous_version","latest_version","status","pinned"],"additionalProperties":false},{"type":"null"}]},"credential_hint":{"type":["string","null"]},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"detail":{"type":"string"}},"required":["code","created_at"],"additionalProperties":false}},"last_verified_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"stack_update":{"anyOf":[{"type":"object","properties":{"current_version":{"type":"string"},"latest_version":{"type":"string"},"template_url":{"type":"string"},"stack_name":{"type":"string"},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["current_version","latest_version","template_url","stack_name","console_url","command"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","name","provider","region","status","external_id","role_arn","provider_account_id","stack_version","sandbox_status","sending_quota","setup_url","last_verified_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"updateConnection","summary":"Update a connection","description":"Dashboard only. Renames the connection or records the role ARN after the stack is created."},"delete":{"tags":["connections"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"setup_token":{"type":"string","pattern":"^[A-Za-z0-9_.-]{20,512}$"}}},{"type":"null"}]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["connection"]},"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"deleted":{"type":"boolean","enum":[true]},"data_plane":{"anyOf":[{"type":"object","properties":{"destroy":{"type":"string","enum":["queued","manual"]},"manual_cleanup":{"type":"array","items":{"type":"string"}},"kept":{"type":"array","items":{"type":"string"}}},"required":["destroy","manual_cleanup","kept"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","deleted"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteConnection","summary":"Delete a connection","description":"Dashboard only."}},"/connections/{id}/sender-domains":{"get":{"tags":["connections"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["connection_sender_domains"]},"connection_id":{"type":"string"},"available":{"type":"boolean"},"minimum_stack_version":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"current":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"recommended":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["unavailable","not_configured","up_to_date","stack_update_required"]},"stack_update":{"anyOf":[{"type":"object","properties":{"stack_name":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["stack_name","parameters","console_url","command"],"additionalProperties":false},{"type":"null"}]}},"required":["object","connection_id","available","minimum_stack_version","domains","current","recommended","status","stack_update"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getConnectionSenderDomains","summary":"Retrieve the sender domain restriction","description":"Optional IAM hardening (customer template 1.6.0+): the connection's sending domains and the exact stack update that sets `AllowedSenderDomains` to them, so AWS also denies any send from another domain. Stamp0 checks the sender's identity before every send either way."}},"/connections/{id}/verify":{"post":{"tags":["connections"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"role_arn":{"type":"string","maxLength":2048,"pattern":"^arn:aws(-[a-z]+)*:iam::[0-9]{12}:role\\/[A-Za-z0-9+=,.@_/-]+$"},"account_id":{"type":"string","pattern":"^[0-9]{12}$"},"stack_name":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9-]{0,127}$"}}},{"type":"null"}]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["connection"]},"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"status":{"type":"string","enum":["pending","verifying","connected","error","disconnected"]}},"required":["object","id","status"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"verifyConnection","summary":"Verify a connection","description":"Dashboard only. Checks the stack: assumes the role, reads the outputs, sandbox status and quota. Pass `role_arn` or `account_id`, and `stack_name` when it is not the Quick Create default."}},"/connections/{id}/ingest-token":{"post":{"tags":["connections"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["ingest_token"]},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"ingest":{"type":"object","properties":{"header_name":{"type":"string","enum":["x-stamp0-ingest-token"]},"token":{"type":"string"},"endpoint":{"type":"string","format":"uri"}},"required":["header_name","token","endpoint"],"additionalProperties":false},"setup_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["object","connection_id","ingest","setup_url"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"rotateIngestToken","summary":"Rotate the ingest token","description":"Dashboard only. Issues a new event-ingest token (shown once). Before verification it also returns a fresh `setup_url`."}},"/connections/{id}/credential":{"put":{"tags":["connections"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"api_token":{"type":"string","pattern":"^[A-Za-z0-9_.-]{20,512}$"}},"required":["api_token"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["connection"]},"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"name":{"type":"string"},"provider":{"type":"string","enum":["ses","cloudflare"]},"region":{"type":["string","null"]},"status":{"type":"string","enum":["pending","verifying","connected","error","disconnected"]},"external_id":{"type":["string","null"]},"role_arn":{"type":["string","null"]},"provider_account_id":{"type":["string","null"]},"stack_version":{"type":["string","null"]},"sandbox_status":{"type":"string","enum":["unknown","sandbox","production"]},"sending_quota":{"anyOf":[{"type":"object","properties":{"max_24_hour_send":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_send_rate":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"sent_last_24_hours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"resets_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_source":{"anyOf":[{"type":"string","enum":["cloudflare_analytics","stamp0_records"]},{"type":"null"}]}},"required":["max_24_hour_send","max_send_rate","sent_last_24_hours"],"additionalProperties":false},{"type":"null"}]},"setup_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"last_error":{"type":["string","null"]},"capabilities":{"anyOf":[{"type":"object","properties":{"sending":{"type":"boolean"},"receiving":{"type":"boolean"},"receiving_in_region":{"type":"boolean"},"dkim":{"type":"string","enum":["managed","bring_your_own","none"]},"custom_mail_from":{"type":"boolean"},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"campaigns":{"type":"boolean"},"suppression_list":{"type":"string","enum":["account","sending_domain","none"]},"event_delivery":{"type":"string","enum":["push","poll"]},"max_recipients_per_message":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_message_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_send_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["sending","receiving","receiving_in_region","dkim","custom_mail_from","open_tracking","click_tracking","campaigns","suppression_list","event_delivery","max_recipients_per_message","max_message_bytes","max_send_rate"],"additionalProperties":false},{"type":"null"}]},"provider_config":{"anyOf":[{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9a-f]{32}$"},"worker_name":{"type":["string","null"]},"bucket_name":{"type":["string","null"]},"queue_name":{"type":["string","null"]},"sending_domains":{"type":"array","items":{"type":"string"}}},"required":["account_id","worker_name","bucket_name","queue_name","sending_domains"],"additionalProperties":false},{"type":"null"}]},"data_plane":{"anyOf":[{"type":"object","properties":{"version":{"type":["string","null"]},"previous_version":{"type":["string","null"]},"latest_version":{"type":"string"},"status":{"type":"string","enum":["not_deployed","up_to_date","update_available","update_required","modified","destroyed"]},"pinned":{"type":"boolean"},"pin":{"type":["string","null"]}},"required":["version","previous_version","latest_version","status","pinned"],"additionalProperties":false},{"type":"null"}]},"credential_hint":{"type":["string","null"]},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"detail":{"type":"string"}},"required":["code","created_at"],"additionalProperties":false}},"last_verified_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"stack_update":{"anyOf":[{"type":"object","properties":{"current_version":{"type":"string"},"latest_version":{"type":"string"},"template_url":{"type":"string"},"stack_name":{"type":"string"},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["current_version","latest_version","template_url","stack_name","console_url","command"],"additionalProperties":false},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string"},"status":{"type":"string","enum":["ok","failed","not_checked"]},"detail":{"type":"string"}},"required":["check","status"],"additionalProperties":false}}},"required":["object","id","name","provider","region","status","external_id","role_arn","provider_account_id","stack_version","sandbox_status","sending_quota","setup_url","last_verified_at","created_at","checklist"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"putConnectionCredential","summary":"Replace the Cloudflare API token","description":"Dashboard only, Cloudflare connections. Checks the runtime token (every permission it needs, and that it cannot upload a Worker) before it replaces the stored one, then re-verifies the connection. Returns the checklist."}},"/connections/{id}/data-plane":{"post":{"tags":["connections"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["upgrade","redeploy","rollback","rotate_keys"]},"setup_token":{"type":"string","pattern":"^[A-Za-z0-9_.-]{20,512}$"},"version":{"type":"string","pattern":"^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,3})$"}},"required":["action","setup_token"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["data_plane_change"]},"connection_id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"action":{"type":"string","enum":["deploy","upgrade","redeploy","rollback","rotate_keys","destroy"]},"status":{"type":"string","enum":["queued"]},"setup_session_expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["object","connection_id","action","status","setup_session_expires_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"changeConnectionDataPlane","summary":"Change the Cloudflare data plane","description":"Dashboard only, Cloudflare connections. Upgrades, redeploys, rolls back or rotates the keys of what Stamp0 deployed in your Cloudflare account, with a setup token Stamp0 holds sealed for at most an hour. One change runs at a time."}},"/connections/{id}/data-plane/pin":{"put":{"tags":["connections"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"version":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,3})\\.(0|[1-9]\\d{0,3})$"},{"type":"string","enum":["opt_out"]}]}},"additionalProperties":false},{"type":"null"}]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["connection"]},"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"name":{"type":"string"},"provider":{"type":"string","enum":["ses","cloudflare"]},"region":{"type":["string","null"]},"status":{"type":"string","enum":["pending","verifying","connected","error","disconnected"]},"external_id":{"type":["string","null"]},"role_arn":{"type":["string","null"]},"provider_account_id":{"type":["string","null"]},"stack_version":{"type":["string","null"]},"sandbox_status":{"type":"string","enum":["unknown","sandbox","production"]},"sending_quota":{"anyOf":[{"type":"object","properties":{"max_24_hour_send":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_send_rate":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"sent_last_24_hours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"resets_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_source":{"anyOf":[{"type":"string","enum":["cloudflare_analytics","stamp0_records"]},{"type":"null"}]}},"required":["max_24_hour_send","max_send_rate","sent_last_24_hours"],"additionalProperties":false},{"type":"null"}]},"setup_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"last_error":{"type":["string","null"]},"capabilities":{"anyOf":[{"type":"object","properties":{"sending":{"type":"boolean"},"receiving":{"type":"boolean"},"receiving_in_region":{"type":"boolean"},"dkim":{"type":"string","enum":["managed","bring_your_own","none"]},"custom_mail_from":{"type":"boolean"},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"campaigns":{"type":"boolean"},"suppression_list":{"type":"string","enum":["account","sending_domain","none"]},"event_delivery":{"type":"string","enum":["push","poll"]},"max_recipients_per_message":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_message_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_send_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["sending","receiving","receiving_in_region","dkim","custom_mail_from","open_tracking","click_tracking","campaigns","suppression_list","event_delivery","max_recipients_per_message","max_message_bytes","max_send_rate"],"additionalProperties":false},{"type":"null"}]},"provider_config":{"anyOf":[{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9a-f]{32}$"},"worker_name":{"type":["string","null"]},"bucket_name":{"type":["string","null"]},"queue_name":{"type":["string","null"]},"sending_domains":{"type":"array","items":{"type":"string"}}},"required":["account_id","worker_name","bucket_name","queue_name","sending_domains"],"additionalProperties":false},{"type":"null"}]},"data_plane":{"anyOf":[{"type":"object","properties":{"version":{"type":["string","null"]},"previous_version":{"type":["string","null"]},"latest_version":{"type":"string"},"status":{"type":"string","enum":["not_deployed","up_to_date","update_available","update_required","modified","destroyed"]},"pinned":{"type":"boolean"},"pin":{"type":["string","null"]}},"required":["version","previous_version","latest_version","status","pinned"],"additionalProperties":false},{"type":"null"}]},"credential_hint":{"type":["string","null"]},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"detail":{"type":"string"}},"required":["code","created_at"],"additionalProperties":false}},"last_verified_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"stack_update":{"anyOf":[{"type":"object","properties":{"current_version":{"type":"string"},"latest_version":{"type":"string"},"template_url":{"type":"string"},"stack_name":{"type":"string"},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["current_version","latest_version","template_url","stack_name","console_url","command"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","name","provider","region","status","external_id","role_arn","provider_account_id","stack_version","sandbox_status","sending_quota","setup_url","last_verified_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"pinConnectionDataPlane","summary":"Pin the Cloudflare data plane","description":"Dashboard only (owners and admins), Cloudflare connections. Keeps the connection on one data-plane version (default: the deployed one), or `opt_out` of every upgrade. Upgrades and redeploys to another version are refused while pinned; rollback still works. Nothing is deployed."},"delete":{"tags":["connections"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["connection"]},"id":{"type":"string","pattern":"^con_[0-9A-Za-z]{16}$","description":"Stamp0 con_ identifier"},"name":{"type":"string"},"provider":{"type":"string","enum":["ses","cloudflare"]},"region":{"type":["string","null"]},"status":{"type":"string","enum":["pending","verifying","connected","error","disconnected"]},"external_id":{"type":["string","null"]},"role_arn":{"type":["string","null"]},"provider_account_id":{"type":["string","null"]},"stack_version":{"type":["string","null"]},"sandbox_status":{"type":"string","enum":["unknown","sandbox","production"]},"sending_quota":{"anyOf":[{"type":"object","properties":{"max_24_hour_send":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"max_send_rate":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"sent_last_24_hours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"resets_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"sent_source":{"anyOf":[{"type":"string","enum":["cloudflare_analytics","stamp0_records"]},{"type":"null"}]}},"required":["max_24_hour_send","max_send_rate","sent_last_24_hours"],"additionalProperties":false},{"type":"null"}]},"setup_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"last_error":{"type":["string","null"]},"capabilities":{"anyOf":[{"type":"object","properties":{"sending":{"type":"boolean"},"receiving":{"type":"boolean"},"receiving_in_region":{"type":"boolean"},"dkim":{"type":"string","enum":["managed","bring_your_own","none"]},"custom_mail_from":{"type":"boolean"},"open_tracking":{"type":"boolean"},"click_tracking":{"type":"boolean"},"campaigns":{"type":"boolean"},"suppression_list":{"type":"string","enum":["account","sending_domain","none"]},"event_delivery":{"type":"string","enum":["push","poll"]},"max_recipients_per_message":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_message_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_send_rate":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]}},"required":["sending","receiving","receiving_in_region","dkim","custom_mail_from","open_tracking","click_tracking","campaigns","suppression_list","event_delivery","max_recipients_per_message","max_message_bytes","max_send_rate"],"additionalProperties":false},{"type":"null"}]},"provider_config":{"anyOf":[{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9a-f]{32}$"},"worker_name":{"type":["string","null"]},"bucket_name":{"type":["string","null"]},"queue_name":{"type":["string","null"]},"sending_domains":{"type":"array","items":{"type":"string"}}},"required":["account_id","worker_name","bucket_name","queue_name","sending_domains"],"additionalProperties":false},{"type":"null"}]},"data_plane":{"anyOf":[{"type":"object","properties":{"version":{"type":["string","null"]},"previous_version":{"type":["string","null"]},"latest_version":{"type":"string"},"status":{"type":"string","enum":["not_deployed","up_to_date","update_available","update_required","modified","destroyed"]},"pinned":{"type":"boolean"},"pin":{"type":["string","null"]}},"required":["version","previous_version","latest_version","status","pinned"],"additionalProperties":false},{"type":"null"}]},"credential_hint":{"type":["string","null"]},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"detail":{"type":"string"}},"required":["code","created_at"],"additionalProperties":false}},"last_verified_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"stack_update":{"anyOf":[{"type":"object","properties":{"current_version":{"type":"string"},"latest_version":{"type":"string"},"template_url":{"type":"string"},"stack_name":{"type":"string"},"console_url":{"type":"string"},"command":{"type":"string"}},"required":["current_version","latest_version","template_url","stack_name","console_url","command"],"additionalProperties":false},{"type":"null"}]}},"required":["object","id","name","provider","region","status","external_id","role_arn","provider_account_id","stack_version","sandbox_status","sending_quota","setup_url","last_verified_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed for this key or plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"unpinConnectionDataPlane","summary":"Unpin the Cloudflare data plane","description":"Dashboard only (owners and admins), Cloudflare connections. Removes the pin; nothing is deployed."}}},"servers":[{"url":"https://api.stamp0.com"}],"security":[{"apiKey":[]}],"tags":[{"description":"Send transactional email through SES in your own AWS account. Same request and response shapes as Resend.","name":"emails","x-displayName":"Emails"},{"description":"Reusable emails with variables: drafts, immutable published versions, previews and test sends. Send one with `POST /emails` and `template`.","name":"templates","x-displayName":"Templates"},{"description":"The activity feed: delivery, bounce, complaint, open and click events of sent email, and received email, as SES reports them.","name":"events","x-displayName":"Events"},{"description":"Sending and receiving domains: SES identities tagged for your connection, DNS records, tracking and TLS.","name":"domains","x-displayName":"Domains"},{"description":"Agent and team inboxes on your domains: threads, messages, replies and drafts over SES receiving.","name":"inboxes","x-displayName":"Inboxes"},{"description":"Endpoints that receive signed events (Standard Webhooks) for email and domain activity.","name":"webhooks","x-displayName":"Webhooks"},{"description":"Project API keys: full access, sending only, domain-restricted or scoped to one inbox.","name":"api-keys","x-displayName":"API keys"},{"description":"Links between your organization and an AWS account through the Stamp0Access CloudFormation stack.","name":"connections","x-displayName":"Connections"},{"description":"Delivery, bounce and complaint rates from your SES events, per domain and mailbox provider, plus the DNS advisor.","name":"deliverability","x-displayName":"Deliverability"},{"description":"Your SES account-level suppression list, mirrored in Stamp0.","name":"suppressions","x-displayName":"Suppressions"},{"description":"Marketing contacts: create, update, import from CSV, export, list memberships and the activity timeline. Same shapes as Resend contacts.","name":"contacts","x-displayName":"Contacts"},{"description":"Typed custom contact fields (Resend `/contact-properties`).","name":"properties","x-displayName":"Properties"},{"description":"Manually managed lists of contacts: private lists (Resend segments and audiences) and public lists (Resend topics, the preference center), with double opt-in.","name":"lists","x-displayName":"Lists"},{"description":"Filter segments that update live (`seg_`), and Resend manual segments, which are private lists (`lst_`).","name":"segments","x-displayName":"Segments"},{"description":"Companies (B2B accounts) and the contacts that belong to them.","name":"companies","x-displayName":"Companies"},{"description":"One-off marketing sends to lists and segments, through SES in your AWS account: personalized, with one-click unsubscribe (RFC 8058), a physical-address footer, and suppressions and opt-outs honored.","name":"campaigns","x-displayName":"Campaigns"},{"description":"Resend's broadcasts API, an alias of campaigns with Resend's request and response shapes.","name":"broadcasts","x-displayName":"Broadcasts"},{"description":"The request log of the public API.","name":"logs","x-displayName":"Logs"},{"description":"Custom events about your contacts: they start sequences and end `wait_for_event` steps. `POST /events/send` is Resend's Send Event.","name":"contact-events","x-displayName":"Contact events"},{"description":"Automated drips: a trigger (event, list joined, contact created, segment entered) and a graph of steps. Resend's `/automations` path is an alias with the same shapes.","name":"sequences","x-displayName":"Sequences"},{"description":"Hosted and embeddable signup forms: fields, target lists, double opt-in, honeypot, Turnstile and per-IP limits.","name":"forms","x-displayName":"Forms"},{"description":"Marketing settings of a project: physical address, default sender, and the hosted unsubscribe and preference pages.","name":"marketing","x-displayName":"Marketing settings"}]}