{"openapi": "3.1.0", "info": {"title": "Sendfern API", "version": "1", "description": "Email API on Amazon SES. Authenticate with `Authorization: Bearer sk_live_...` (or `sk_test_...`: test keys send nothing and simulate the outcome)."}, "servers": [{"url": "https://api.sendfern.com"}], "security": [{"apiKey": []}], "components": {"securitySchemes": {"apiKey": {"type": "http", "scheme": "bearer", "description": "sk_live_... or sk_test_..."}}, "schemas": {"Error": {"type": "object", "properties": {"error": {"type": "object", "properties": {"type": {"type": "string"}, "code": {"type": "string"}, "message": {"type": "string"}, "param": {"type": "string"}}, "required": ["type", "code", "message"]}}}, "Email": {"type": "object", "properties": {"id": {"type": "string", "example": "em_VNqV5JEIqYYeYbZRhbPrJ6"}, "object": {"const": "email"}, "mode": {"enum": ["live", "test"]}, "status": {"enum": ["queued", "scheduled", "sending", "sent", "delivered", "bounced", "complained", "failed", "canceled", "suppressed"]}, "from": {"type": "string"}, "to": {"type": "array", "items": {"type": "string"}}, "cc": {"type": "array", "items": {"type": "string"}}, "bcc": {"type": "array", "items": {"type": "string"}}, "reply_to": {"type": "array", "items": {"type": "string"}}, "subject": {"type": "string"}, "tags": {"type": "object", "additionalProperties": {"type": "string"}}, "broadcast_id": {"type": ["string", "null"]}, "error": {"type": ["string", "null"]}, "scheduled_at": {"type": ["string", "null"], "format": "date-time"}, "sent_at": {"type": ["string", "null"], "format": "date-time"}, "created_at": {"type": "string", "format": "date-time"}}}, "SendEmail": {"type": "object", "properties": {"from": {"type": "string"}, "to": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}], "description": "One address or a list. 'Name <a@b.com>' allowed."}, "cc": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}], "description": "One address or a list. 'Name <a@b.com>' allowed."}, "bcc": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}], "description": "One address or a list. 'Name <a@b.com>' allowed."}, "reply_to": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}], "description": "One address or a list. 'Name <a@b.com>' allowed."}, "subject": {"type": "string", "description": "Required unless template_id is used. No CR/LF."}, "html": {"type": "string"}, "text": {"type": "string"}, "headers": {"type": "object", "additionalProperties": {"type": "string"}, "description": "Custom headers; envelope headers are refused."}, "tags": {"type": "object", "additionalProperties": {"type": "string"}, "description": "Up to 10."}, "attachments": {"type": "array", "items": {"type": "object", "properties": {"filename": {"type": "string"}, "content": {"type": "string", "description": "Base64"}, "content_type": {"type": "string"}}, "required": ["filename", "content"]}, "description": "7 MB decoded in total."}, "scheduled_at": {"type": "string", "format": "date-time", "description": "Up to 30 days ahead."}, "template_id": {"type": "string"}, "variables": {"type": "object", "additionalProperties": {"type": ["string", "number"]}}}, "required": ["from", "to"]}, "Domain": {"type": "object", "properties": {"id": {"type": "string"}, "name": {"type": "string"}, "status": {"enum": ["pending", "verified", "failed"]}, "region": {"type": "string"}, "records": {"type": "array", "items": {"type": "object", "properties": {"record": {"type": "string"}, "type": {"type": "string"}, "name": {"type": "string"}, "value": {"type": "string"}, "priority": {"type": "integer"}}}}, "track_opens": {"type": "boolean"}, "track_clicks": {"type": "boolean"}, "tracking_domain": {"type": "string"}, "verified_at": {"type": ["string", "null"], "format": "date-time"}, "created_at": {"type": "string", "format": "date-time"}}}, "ApiKey": {"type": "object", "properties": {"id": {"type": "string"}, "name": {"type": "string"}, "mode": {"enum": ["live", "test"]}, "permission": {"enum": ["full", "send_only"]}, "prefix": {"type": "string"}, "last_used_at": {"type": ["string", "null"], "format": "date-time"}, "created_at": {"type": "string", "format": "date-time"}}}, "Template": {"type": "object", "properties": {"id": {"type": "string"}, "name": {"type": "string"}, "subject": {"type": "string"}, "html": {"type": "string"}, "text": {"type": "string"}, "variables": {"type": "array", "items": {"type": "string"}}, "created_at": {"type": "string", "format": "date-time"}, "updated_at": {"type": "string", "format": "date-time"}}}, "Suppression": {"type": "object", "properties": {"id": {"type": "string"}, "email": {"type": "string"}, "reason": {"enum": ["bounce", "complaint", "manual"]}, "created_at": {"type": "string", "format": "date-time"}}}, "Webhook": {"type": "object", "properties": {"id": {"type": "string"}, "url": {"type": "string"}, "events": {"type": "array", "items": {"type": "string"}}, "enabled": {"type": "boolean"}, "created_at": {"type": "string", "format": "date-time"}, "secret": {"type": "string", "description": "Only in the response to create."}}}, "WebhookDelivery": {"type": "object", "properties": {"id": {"type": "string"}, "event_type": {"type": "string"}, "status": {"enum": ["pending", "succeeded", "failed"]}, "attempts": {"type": "integer"}, "response_code": {"type": ["integer", "null"]}, "last_error": {"type": "string"}, "payload": {"type": "object"}, "test": {"type": "boolean"}, "created_at": {"type": "string", "format": "date-time"}}}, "Audience": {"type": "object", "properties": {"id": {"type": "string"}, "name": {"type": "string"}, "contact_count": {"type": "integer"}, "subscribed_count": {"type": "integer"}, "created_at": {"type": "string", "format": "date-time"}}}, "Contact": {"type": "object", "properties": {"id": {"type": "string"}, "email": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "unsubscribed": {"type": "boolean"}, "created_at": {"type": "string", "format": "date-time"}}}, "Broadcast": {"type": "object", "properties": {"id": {"type": "string"}, "name": {"type": "string"}, "audience_id": {"type": "string"}, "from": {"type": "string"}, "reply_to": {"type": "array", "items": {"type": "string"}}, "subject": {"type": "string"}, "preview_text": {"type": "string"}, "blocks": {"type": ["array", "null"], "items": {"type": "object"}, "description": "Builder blocks (null = raw html). With blocks, html/text are rendered."}, "html": {"type": "string"}, "text": {"type": "string"}, "status": {"enum": ["draft", "scheduled", "sending", "sent"]}, "scheduled_at": {"type": ["string", "null"], "format": "date-time"}, "error": {"type": "string"}, "recipient_count": {"type": "integer"}, "sent_at": {"type": ["string", "null"], "format": "date-time"}, "created_at": {"type": "string", "format": "date-time"}, "stats": {"type": "object", "properties": {"sent": {"type": "integer"}, "delivered": {"type": "integer"}, "opened": {"type": "integer"}, "clicked": {"type": "integer"}, "bounced": {"type": "integer"}, "complained": {"type": "integer"}, "unsubscribed": {"type": "integer"}}, "description": "On GET {id} only."}}}, "Stats": {"type": "object", "properties": {"totals": {"type": "object"}, "series": {"type": "array", "items": {"type": "object"}}}}, "Usage": {"type": "object", "properties": {"period_start": {"type": "string", "format": "date"}, "period_end": {"type": "string", "format": "date"}, "used": {"type": "integer"}, "quota": {"type": ["integer", "null"]}}}}}, "tags": [{"name": "Emails"}, {"name": "Templates"}, {"name": "Domains"}, {"name": "API keys"}, {"name": "Suppressions"}, {"name": "Webhooks"}, {"name": "Audiences"}, {"name": "Broadcasts"}], "paths": {"/v1/emails": {"post": {"tags": ["Emails"], "summary": "Send an email", "operationId": "post__v1_emails", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SendEmail"}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Email"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "parameters": [{"name": "Idempotency-Key", "in": "header", "schema": {"type": "string", "maxLength": 200}, "description": "Same key + same body within 24 h replays the first response."}]}, "get": {"tags": ["Emails"], "summary": "List emails, newest first", "operationId": "get__v1_emails", "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}, {"name": "status", "in": "query", "schema": {"type": "string"}}, {"name": "to", "in": "query", "schema": {"type": "string"}}, {"name": "tag", "in": "query", "schema": {"type": "string"}}, {"name": "broadcast_id", "in": "query", "schema": {"type": "string"}}, {"name": "created_after", "in": "query", "schema": {"type": "string"}}, {"name": "created_before", "in": "query", "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Email"}}, "has_more": {"type": "boolean"}, "next": {"type": ["string", "null"], "description": "Follow as given."}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/emails/batch": {"post": {"tags": ["Emails"], "summary": "Send up to 100 emails (all-or-nothing validation)", "operationId": "post__v1_emails_batch", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/SendEmail"}, "maxItems": 100}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Email"}}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "parameters": [{"name": "Idempotency-Key", "in": "header", "schema": {"type": "string", "maxLength": 200}, "description": "Same key + same body within 24 h replays the first response."}]}}, "/v1/emails/{id}": {"get": {"tags": ["Emails"], "summary": "An email with its html, text and events", "operationId": "get__v1_emails_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Email"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/emails/{id}/cancel": {"post": {"tags": ["Emails"], "summary": "Cancel a scheduled email", "operationId": "post__v1_emails_id_cancel", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Email"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/emails/{id}/resend": {"post": {"tags": ["Emails"], "summary": "Send a copy now (not for broadcast emails)", "operationId": "post__v1_emails_id_resend", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Email"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/stats": {"get": {"tags": ["Emails"], "summary": "Counts and rates by day (up to 90 days)", "operationId": "get__v1_stats", "parameters": [{"name": "from", "in": "query", "schema": {"type": "string"}}, {"name": "to", "in": "query", "schema": {"type": "string"}}, {"name": "interval", "in": "query", "schema": {"type": "string"}}, {"name": "broadcast_id", "in": "query", "schema": {"type": "string"}}, {"name": "tag", "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Stats"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/usage": {"get": {"tags": ["Emails"], "summary": "Live emails this month against the quota", "operationId": "get__v1_usage", "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Usage"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/templates": {"get": {"tags": ["Templates"], "summary": "List templates", "operationId": "get__v1_templates", "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Template"}}, "has_more": {"type": "boolean"}, "next": {"type": ["string", "null"], "description": "Follow as given."}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "post": {"tags": ["Templates"], "summary": "Create a template", "operationId": "post__v1_templates", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Template"}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Template"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/templates/{id}": {"get": {"tags": ["Templates"], "summary": "A template", "operationId": "get__v1_templates_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Template"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "put": {"tags": ["Templates"], "summary": "Replace a template", "operationId": "put__v1_templates_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Template"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Template"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "patch": {"tags": ["Templates"], "summary": "Change a template", "operationId": "patch__v1_templates_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Template"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Template"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "delete": {"tags": ["Templates"], "summary": "Delete a template", "operationId": "delete__v1_templates_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"204": {"description": "No content"}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/templates/{id}/render": {"post": {"tags": ["Templates"], "summary": "Render with variables (missing ones stay as written)", "operationId": "post__v1_templates_id_render", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"variables": {"type": "object"}}}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"subject": {"type": "string"}, "html": {"type": "string"}, "text": {"type": "string"}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/domains": {"get": {"tags": ["Domains"], "summary": "List domains", "operationId": "get__v1_domains", "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Domain"}}, "has_more": {"type": "boolean"}, "next": {"type": ["string", "null"], "description": "Follow as given."}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "post": {"tags": ["Domains"], "summary": "Add a domain; returns its DNS records", "operationId": "post__v1_domains", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}}, "required": ["name"]}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Domain"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/domains/{id}": {"get": {"tags": ["Domains"], "summary": "A domain", "operationId": "get__v1_domains_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Domain"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "patch": {"tags": ["Domains"], "summary": "Open/click tracking and the tracking domain", "operationId": "patch__v1_domains_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"track_opens": {"type": "boolean"}, "track_clicks": {"type": "boolean"}, "tracking_domain": {"type": "string"}}}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Domain"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "delete": {"tags": ["Domains"], "summary": "Remove a domain", "operationId": "delete__v1_domains_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"204": {"description": "No content"}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/domains/{id}/verify": {"post": {"tags": ["Domains"], "summary": "Check the DNS records now", "operationId": "post__v1_domains_id_verify", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Domain"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/api-keys": {"get": {"tags": ["API keys"], "summary": "List keys (test mode: test keys only)", "operationId": "get__v1_api-keys", "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/ApiKey"}}, "has_more": {"type": "boolean"}, "next": {"type": ["string", "null"], "description": "Follow as given."}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "post": {"tags": ["API keys"], "summary": "Create a key (dashboard session only; the token is shown once)", "operationId": "post__v1_api-keys", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "mode": {"enum": ["live", "test"]}, "permission": {"enum": ["full", "send_only"]}}, "required": ["name"]}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiKey"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/api-keys/{id}": {"delete": {"tags": ["API keys"], "summary": "Revoke a key", "operationId": "delete__v1_api-keys_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"204": {"description": "No content"}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/suppressions": {"get": {"tags": ["Suppressions"], "summary": "List suppressed addresses", "operationId": "get__v1_suppressions", "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}, {"name": "email", "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Suppression"}}, "has_more": {"type": "boolean"}, "next": {"type": ["string", "null"], "description": "Follow as given."}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "post": {"tags": ["Suppressions"], "summary": "Suppress an address", "operationId": "post__v1_suppressions", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"email": {"type": "string"}}, "required": ["email"]}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Suppression"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/suppressions/{id}": {"delete": {"tags": ["Suppressions"], "summary": "Remove a suppression", "operationId": "delete__v1_suppressions_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"204": {"description": "No content"}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/webhooks": {"get": {"tags": ["Webhooks"], "summary": "List endpoints", "operationId": "get__v1_webhooks", "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Webhook"}}, "has_more": {"type": "boolean"}, "next": {"type": ["string", "null"], "description": "Follow as given."}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "post": {"tags": ["Webhooks"], "summary": "Add an endpoint (the secret is shown once)", "operationId": "post__v1_webhooks", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"url": {"type": "string"}, "events": {"type": "array", "items": {"type": "string"}}, "enabled": {"type": "boolean"}}, "required": ["url"]}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhook"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/webhooks/{id}": {"get": {"tags": ["Webhooks"], "summary": "An endpoint", "operationId": "get__v1_webhooks_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhook"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "put": {"tags": ["Webhooks"], "summary": "Replace an endpoint", "operationId": "put__v1_webhooks_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhook"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhook"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "patch": {"tags": ["Webhooks"], "summary": "Change an endpoint", "operationId": "patch__v1_webhooks_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhook"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhook"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "delete": {"tags": ["Webhooks"], "summary": "Delete an endpoint", "operationId": "delete__v1_webhooks_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"204": {"description": "No content"}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/webhooks/{id}/deliveries": {"get": {"tags": ["Webhooks"], "summary": "Delivery log, newest first", "operationId": "get__v1_webhooks_id_deliveries", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/WebhookDelivery"}}, "has_more": {"type": "boolean"}, "next": {"type": ["string", "null"], "description": "Follow as given."}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/webhooks/{id}/test": {"post": {"tags": ["Webhooks"], "summary": "Send a test event now", "operationId": "post__v1_webhooks_id_test", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookDelivery"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/webhooks/{id}/deliveries/{delivery_id}/retry": {"post": {"tags": ["Webhooks"], "summary": "One more attempt for a failed delivery", "operationId": "post__v1_webhooks_id_deliveries_delivery_id_retry", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "delivery_id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookDelivery"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/audiences": {"get": {"tags": ["Audiences"], "summary": "List audiences", "operationId": "get__v1_audiences", "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Audience"}}, "has_more": {"type": "boolean"}, "next": {"type": ["string", "null"], "description": "Follow as given."}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "post": {"tags": ["Audiences"], "summary": "Create an audience", "operationId": "post__v1_audiences", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}}, "required": ["name"]}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Audience"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/audiences/{id}": {"get": {"tags": ["Audiences"], "summary": "An audience", "operationId": "get__v1_audiences_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Audience"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "put": {"tags": ["Audiences"], "summary": "Rename an audience", "operationId": "put__v1_audiences_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}}, "required": ["name"]}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Audience"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "patch": {"tags": ["Audiences"], "summary": "Rename an audience", "operationId": "patch__v1_audiences_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}}}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Audience"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "delete": {"tags": ["Audiences"], "summary": "Delete an audience and its contacts (not if it has broadcasts)", "operationId": "delete__v1_audiences_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"204": {"description": "No content"}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/audiences/{id}/contacts": {"get": {"tags": ["Audiences"], "summary": "List an audience's contacts", "operationId": "get__v1_audiences_id_contacts", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}, {"name": "email", "in": "query", "schema": {"type": "string"}}, {"name": "status", "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Contact"}}, "has_more": {"type": "boolean"}, "next": {"type": ["string", "null"], "description": "Follow as given."}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "post": {"tags": ["Audiences"], "summary": "Add or update a contact (by email)", "operationId": "post__v1_audiences_id_contacts", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"email": {"type": "string"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "unsubscribed": {"type": "boolean"}}, "required": ["email"]}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/audiences/{id}/contacts/import": {"post": {"tags": ["Audiences"], "summary": "Import a CSV (multipart, field 'file')", "operationId": "post__v1_audiences_id_contacts_import", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"created": {"type": "integer"}, "updated": {"type": "integer"}, "invalid": {"type": "array"}, "invalid_count": {"type": "integer"}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/contacts/{id}": {"get": {"tags": ["Audiences"], "summary": "A contact", "operationId": "get__v1_contacts_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "put": {"tags": ["Audiences"], "summary": "Replace a contact", "operationId": "put__v1_contacts_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "patch": {"tags": ["Audiences"], "summary": "Change a contact", "operationId": "patch__v1_contacts_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "delete": {"tags": ["Audiences"], "summary": "Delete a contact", "operationId": "delete__v1_contacts_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"204": {"description": "No content"}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/broadcasts": {"get": {"tags": ["Broadcasts"], "summary": "List broadcasts (your key's mode)", "operationId": "get__v1_broadcasts", "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}, {"name": "status", "in": "query", "schema": {"type": "string"}}, {"name": "audience_id", "in": "query", "schema": {"type": "string"}}, {"name": "q", "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Broadcast"}}, "has_more": {"type": "boolean"}, "next": {"type": ["string", "null"], "description": "Follow as given."}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "post": {"tags": ["Broadcasts"], "summary": "Create a draft", "operationId": "post__v1_broadcasts", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Broadcast"}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Broadcast"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/broadcasts/{id}": {"get": {"tags": ["Broadcasts"], "summary": "A broadcast, with stats", "operationId": "get__v1_broadcasts_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Broadcast"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "put": {"tags": ["Broadcasts"], "summary": "Replace a draft", "operationId": "put__v1_broadcasts_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Broadcast"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Broadcast"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "patch": {"tags": ["Broadcasts"], "summary": "Change a draft", "operationId": "patch__v1_broadcasts_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Broadcast"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Broadcast"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}, "delete": {"tags": ["Broadcasts"], "summary": "Delete a broadcast", "operationId": "delete__v1_broadcasts_id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"204": {"description": "No content"}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/broadcasts/{id}/checks": {"post": {"tags": ["Broadcasts"], "summary": "The Before-you-send checks and recipient count", "operationId": "post__v1_broadcasts_id_checks", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"type": "object"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/broadcasts/{id}/send": {"post": {"tags": ["Broadcasts"], "summary": "Send now, or schedule (up to 30 days)", "operationId": "post__v1_broadcasts_id_send", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"scheduled_at": {"type": "string", "format": "date-time"}}}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Broadcast"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/broadcasts/{id}/cancel": {"post": {"tags": ["Broadcasts"], "summary": "A scheduled broadcast back to draft", "operationId": "post__v1_broadcasts_id_cancel", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Broadcast"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/broadcasts/{id}/test": {"post": {"tags": ["Broadcasts"], "summary": "One test copy with sample values", "operationId": "post__v1_broadcasts_id_test", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"to": {"type": "string"}}, "required": ["to"]}}}}, "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Email"}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}, "/v1/assets": {"post": {"tags": ["Broadcasts"], "summary": "Upload an image for image blocks (multipart 'file', PNG/JPEG/GIF, 2 MB)", "operationId": "post__v1_assets", "responses": {"201": {"description": "OK", "content": {"application/json": {"schema": {"type": "object", "properties": {"id": {"type": "string"}, "url": {"type": "string"}}}}}}, "400": {"description": "Invalid request: `invalid_parameter` names the field in `param`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "401": {"description": "Missing, invalid or revoked API key", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "403": {"description": "Not allowed: `permission_denied`, `account_not_active`, `domain_not_verified`, `quota_exceeded`", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "404": {"description": "Not found (or another team's)", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"description": "Rate limited: retry after `Retry-After` seconds", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}}}}}