{"info":{"title":"Broadside API","version":"v1","description":"Contract-first API for Broadside subscribers, campaigns, issue drafts, sponsors, and engagement exports."},"servers":[{"url":"https://broadside-staging.upweb.dev/api/v1"}],"tags":[{"name":"System"},{"name":"Auth"},{"name":"Subscribers"},{"name":"Issue Drafts"},{"name":"Sponsors"},{"name":"Engagement Report Exports"}],"components":{"securitySchemes":{"BroadsideApiKey":{"type":"http","scheme":"bearer","bearerFormat":"Broadside API key"}}},"openapi":"3.1.1","paths":{"/health":{"get":{"operationId":"system.health","tags":["System"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"const":"ok","description":"Service health status."},"version":{"const":"v1","description":"API version served by this endpoint."}},"required":["status","version"],"description":"Health check response."}}}}},"security":[],"x-broadside-auth":"anonymous","x-broadside-rate-limit":"public","x-broadside-scopes":[],"x-broadside-stability":"experimental"}},"/auth/introspect":{"get":{"operationId":"auth.introspect","tags":["Auth"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"principal":{"type":"object","properties":{"id":{"type":"string","description":"Stable API key identifier."},"prefix":{"type":"string","description":"Non-secret API key prefix used for lookup."},"name":{"type":"string","description":"Operator-defined API key label."},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes granted to this API key."},"rate_limit_tier":{"type":"string","description":"Rate-limit tier assigned to this API key."},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Expiration time, or null if non-expiring."}},"required":["id","prefix","name","scopes","rate_limit_tier","expires_at"],"description":"Authenticated API key principal."}},"required":["principal"],"description":"Current API key authentication context."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["auth:introspect"],"x-broadside-stability":"experimental"}},"/dashboard/counts":{"get":{"operationId":"dashboard.counts","tags":["Dashboard"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"counts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["counts"],"description":"Dashboard counts response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["dashboard:read"],"x-broadside-stability":"experimental"}},"/dashboard/charts":{"get":{"operationId":"dashboard.charts","tags":["Dashboard"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"charts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["charts"],"description":"Dashboard charts response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["dashboard:read"],"x-broadside-stability":"experimental"}},"/bounces":{"get":{"operationId":"bounces.list","tags":["Bounces"],"parameters":[{"name":"query","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"campaign_id","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"allowEmptyValue":true,"allowReserved":true},{"name":"source","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"type","in":"query","schema":{"enum":["soft","hard","complaint"],"type":"string","description":"Bounce type."},"allowEmptyValue":true,"allowReserved":true},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"allowEmptyValue":true,"allowReserved":true},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"order_by","in":"query","schema":{"enum":["id","created_at","type","source"],"type":"string","default":"created_at"},"allowEmptyValue":true,"allowReserved":true},{"name":"order","in":"query","schema":{"enum":["asc","desc"],"type":"string","default":"desc"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"bounces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Bounce numeric id."},"subscriber_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"subscriber_uuid":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"email":{"type":"string","format":"email"},"campaign_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"campaign":{"anyOf":[{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}],"description":"Campaign associated with the bounce, if known."},"type":{"enum":["soft","hard","complaint"],"type":"string","description":"Bounce type."},"source":{"type":"string"},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","subscriber_id","campaign_id","type","source","meta","created_at"],"description":"Bounce resource."}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"per_page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0}},"required":["bounces","total","page","per_page"],"description":"List bounces response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["bounces:read"],"x-broadside-stability":"experimental"}},"/bounces/{bounce_id}":{"get":{"operationId":"bounces.get","tags":["Bounces"],"parameters":[{"name":"bounce_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Bounce numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Bounce numeric id."},"subscriber_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"subscriber_uuid":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"email":{"type":"string","format":"email"},"campaign_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"campaign":{"anyOf":[{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"name":{"type":"string"}},"required":["id","name"]},{"type":"null"}],"description":"Campaign associated with the bounce, if known."},"type":{"enum":["soft","hard","complaint"],"type":"string","description":"Bounce type."},"source":{"type":"string"},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","subscriber_id","campaign_id","type","source","meta","created_at"],"description":"Bounce resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["bounces:read"],"x-broadside-stability":"experimental"},"delete":{"operationId":"bounces.delete","tags":["Bounces"],"parameters":[{"name":"bounce_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Bounce numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"bounce_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Bounce numeric id."},"deleted":{"type":"boolean"}},"required":["bounce_id","deleted"],"description":"Delete bounce response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["bounces:write"],"x-broadside-stability":"experimental"}},"/bounces/delete":{"post":{"operationId":"bounces.delete_many","tags":["Bounces"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bounce_ids":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Bounce numeric id."},"default":[]},"all":{"type":"boolean","default":false},"dry_run":{"type":"boolean","default":true},"confirm":{"type":"boolean","default":false}},"description":"Bulk bounce delete request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"type":"boolean"},"all":{"type":"boolean"},"bounce_ids":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Bounce numeric id."}},"matched":{"type":"integer","minimum":0,"maximum":9007199254740991},"deleted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["dry_run","all","bounce_ids","matched","deleted"],"description":"Bulk bounce delete response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["bounces:write"],"x-broadside-stability":"experimental"}},"/bounces/suppress-subscribers":{"post":{"operationId":"bounces.suppress_subscribers","tags":["Bounces"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"type":"boolean","default":true},"confirm":{"type":"boolean","default":false}},"description":"Suppress every subscriber with at least one bounce."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"type":"boolean"},"affected":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["dry_run","affected"],"description":"Suppress bounced subscribers response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["bounces:write"],"x-broadside-stability":"experimental"}},"/settings":{"get":{"operationId":"settings.list","tags":["Settings"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Settings key-value map."}},"required":["settings"],"description":"List settings response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["settings:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"settings.update","tags":["Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Settings key-value map."}},"required":["settings"],"description":"Bulk settings update request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Settings key-value map."}},"required":["settings"],"description":"List settings response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["settings:write"],"x-broadside-stability":"experimental"}},"/settings/{key}":{"get":{"operationId":"settings.get","tags":["Settings"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Setting key."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Setting key."},"value":{"description":"JSON setting value."}},"required":["key"],"description":"Single setting value."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["settings:read"],"x-broadside-stability":"experimental"},"put":{"operationId":"settings.update_key","tags":["Settings"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Setting key."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"description":"JSON setting value."}},"description":"Single setting update request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Setting key."},"value":{"description":"JSON setting value."}},"required":["key"],"description":"Single setting value."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["settings:write"],"x-broadside-stability":"experimental"}},"/templates":{"get":{"operationId":"templates.list","tags":["Templates"],"parameters":[{"name":"type","in":"query","schema":{"enum":["campaign","campaign_visual","tx"],"type":"string","description":"Optional template type filter."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template numeric id."},"name":{"type":"string","description":"Template name."},"type":{"enum":["campaign","campaign_visual","tx"],"type":"string","description":"Template type."},"subject":{"type":"string","description":"Default subject for this template."},"body_html":{"type":"string","description":"Template HTML/body."},"body_source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional editor/source representation."},"is_default":{"type":"boolean","description":"Whether this is the default campaign template."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","type","subject","body_html","body_source","is_default","created_at","updated_at"],"description":"Template resource."}}},"required":["templates"],"description":"List templates response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["templates:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"templates.create","tags":["Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"enum":["campaign","campaign_visual","tx"],"type":"string","description":"Template type."},"subject":{"type":"string","default":""},"body_html":{"type":"string","minLength":1},"body_source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"required":["name","type","body_html"],"description":"Create template request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template numeric id."},"name":{"type":"string","description":"Template name."},"type":{"enum":["campaign","campaign_visual","tx"],"type":"string","description":"Template type."},"subject":{"type":"string","description":"Default subject for this template."},"body_html":{"type":"string","description":"Template HTML/body."},"body_source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional editor/source representation."},"is_default":{"type":"boolean","description":"Whether this is the default campaign template."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","type","subject","body_html","body_source","is_default","created_at","updated_at"],"description":"Template resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["templates:write"],"x-broadside-stability":"experimental"}},"/templates/{template_id}":{"get":{"operationId":"templates.get","tags":["Templates"],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template numeric id."},"name":{"type":"string","description":"Template name."},"type":{"enum":["campaign","campaign_visual","tx"],"type":"string","description":"Template type."},"subject":{"type":"string","description":"Default subject for this template."},"body_html":{"type":"string","description":"Template HTML/body."},"body_source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional editor/source representation."},"is_default":{"type":"boolean","description":"Whether this is the default campaign template."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","type","subject","body_html","body_source","is_default","created_at","updated_at"],"description":"Template resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["templates:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"templates.update","tags":["Templates"],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template numeric id."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"enum":["campaign","campaign_visual","tx"],"type":"string","description":"Template type."},"subject":{"type":"string","default":""},"body_html":{"type":"string","minLength":1},"body_source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"description":"Update template request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template numeric id."},"name":{"type":"string","description":"Template name."},"type":{"enum":["campaign","campaign_visual","tx"],"type":"string","description":"Template type."},"subject":{"type":"string","description":"Default subject for this template."},"body_html":{"type":"string","description":"Template HTML/body."},"body_source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional editor/source representation."},"is_default":{"type":"boolean","description":"Whether this is the default campaign template."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","type","subject","body_html","body_source","is_default","created_at","updated_at"],"description":"Template resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["templates:write"],"x-broadside-stability":"experimental"},"delete":{"operationId":"templates.delete","tags":["Templates"],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template numeric id."},"deleted":{"type":"boolean"}},"required":["template_id","deleted"],"description":"Delete template response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["templates:write"],"x-broadside-stability":"experimental"}},"/templates/{template_id}/default":{"put":{"operationId":"templates.set_default","tags":["Templates"],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template numeric id."},"name":{"type":"string","description":"Template name."},"type":{"enum":["campaign","campaign_visual","tx"],"type":"string","description":"Template type."},"subject":{"type":"string","description":"Default subject for this template."},"body_html":{"type":"string","description":"Template HTML/body."},"body_source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional editor/source representation."},"is_default":{"type":"boolean","description":"Whether this is the default campaign template."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","type","subject","body_html","body_source","is_default","created_at","updated_at"],"description":"Template resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["templates:write"],"x-broadside-stability":"experimental"}},"/templates/preview":{"post":{"operationId":"templates.preview","tags":["Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Template to preview."},"body_html":{"type":"string","minLength":1,"description":"Optional template body override."}},"description":"Preview template request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string","description":"Rendered preview HTML."}},"required":["html"],"description":"Preview template response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["templates:read"],"x-broadside-stability":"experimental"}},"/media":{"get":{"operationId":"media.list","tags":["Media"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Media public UUID."},"filename":{"type":"string","description":"Stored filename."},"provider":{"type":"string","description":"Storage provider."},"content_type":{"type":"string","description":"Media content type."},"thumb":{"type":"string","description":"Thumbnail filename or identifier."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider metadata."},"url":{"type":"string","description":"Public media URL or path."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","filename","provider","content_type","thumb","meta","url","created_at"],"description":"Media resource."}}},"required":["media"],"description":"List media response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["media:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"media.upload","tags":["Media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1},"content_type":{"type":"string","minLength":1,"default":"application/octet-stream"},"bytes_base64":{"type":"string","minLength":1,"description":"Base64 encoded file bytes."}},"required":["filename","bytes_base64"],"description":"Upload media request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Media public UUID."},"filename":{"type":"string","description":"Stored filename."},"provider":{"type":"string","description":"Storage provider."},"content_type":{"type":"string","description":"Media content type."},"thumb":{"type":"string","description":"Thumbnail filename or identifier."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider metadata."},"url":{"type":"string","description":"Public media URL or path."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","filename","provider","content_type","thumb","meta","url","created_at"],"description":"Media resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["media:write"],"x-broadside-stability":"experimental"}},"/media/{media_id}":{"get":{"operationId":"media.get","tags":["Media"],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Media public UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Media public UUID."},"filename":{"type":"string","description":"Stored filename."},"provider":{"type":"string","description":"Storage provider."},"content_type":{"type":"string","description":"Media content type."},"thumb":{"type":"string","description":"Thumbnail filename or identifier."},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Provider metadata."},"url":{"type":"string","description":"Public media URL or path."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","filename","provider","content_type","thumb","meta","url","created_at"],"description":"Media resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["media:read"],"x-broadside-stability":"experimental"},"delete":{"operationId":"media.delete","tags":["Media"],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Media public UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"media_id":{"type":"string","format":"uuid","description":"Media public UUID."},"deleted":{"type":"boolean"}},"required":["media_id","deleted"],"description":"Delete media response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["media:write"],"x-broadside-stability":"experimental"}},"/roles/permissions":{"get":{"operationId":"roles.permissions.list","tags":["Roles"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"permission_groups":{"type":"array","items":{"type":"object","properties":{"group":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["group","permissions"],"description":"Permission group."}}},"required":["permission_groups"],"description":"Permission catalog response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["roles:read"],"x-broadside-stability":"experimental"}},"/roles/users":{"get":{"operationId":"roles.users.list","tags":["Roles"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."},"type":{"const":"user"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","type","name","permissions","created_at","updated_at"],"description":"User role resource."}}},"required":["roles"],"description":"List user roles response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["roles:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"roles.users.create","tags":["Roles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"permissions":{"type":"array","items":{"type":"string"},"default":[]}},"required":["name"],"description":"Create user role request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."},"type":{"const":"user"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","type","name","permissions","created_at","updated_at"],"description":"User role resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["roles:write"],"x-broadside-stability":"experimental"}},"/roles/users/{role_id}":{"get":{"operationId":"roles.users.get","tags":["Roles"],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."},"type":{"const":"user"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","type","name","permissions","created_at","updated_at"],"description":"User role resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["roles:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"roles.users.update","tags":["Roles"],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"permissions":{"type":"array","items":{"type":"string"},"default":[]}},"required":["name"],"description":"Update user role request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."},"type":{"const":"user"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","type","name","permissions","created_at","updated_at"],"description":"User role resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["roles:write"],"x-broadside-stability":"experimental"},"delete":{"operationId":"roles.users.delete","tags":["Roles"],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"role_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."},"deleted":{"type":"boolean"}},"required":["role_id","deleted"],"description":"Delete role response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["roles:write"],"x-broadside-stability":"experimental"}},"/roles/lists":{"get":{"operationId":"roles.lists.list","tags":["Roles"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."},"type":{"const":"list"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"lists":{"type":"array","items":{"type":"object","properties":{"list_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"permissions":{"type":"array","items":{"type":"string"}}},"required":["list_id","permissions"],"description":"List-scoped role grant."}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","type","name","permissions","lists","created_at","updated_at"],"description":"List role resource."}}},"required":["roles"],"description":"List list roles response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["roles:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"roles.lists.create","tags":["Roles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"lists":{"type":"array","items":{"type":"object","properties":{"list_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"permissions":{"type":"array","items":{"type":"string"}}},"required":["list_id","permissions"],"description":"List-scoped role grant."},"default":[]}},"required":["name"],"description":"Create list role request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."},"type":{"const":"list"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"lists":{"type":"array","items":{"type":"object","properties":{"list_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"permissions":{"type":"array","items":{"type":"string"}}},"required":["list_id","permissions"],"description":"List-scoped role grant."}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","type","name","permissions","lists","created_at","updated_at"],"description":"List role resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["roles:write"],"x-broadside-stability":"experimental"}},"/roles/lists/{role_id}":{"get":{"operationId":"roles.lists.get","tags":["Roles"],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."},"type":{"const":"list"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"lists":{"type":"array","items":{"type":"object","properties":{"list_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"permissions":{"type":"array","items":{"type":"string"}}},"required":["list_id","permissions"],"description":"List-scoped role grant."}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","type","name","permissions","lists","created_at","updated_at"],"description":"List role resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["roles:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"roles.lists.update","tags":["Roles"],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"lists":{"type":"array","items":{"type":"object","properties":{"list_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"permissions":{"type":"array","items":{"type":"string"}}},"required":["list_id","permissions"],"description":"List-scoped role grant."},"default":[]}},"required":["name"],"description":"Update list role request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."},"type":{"const":"list"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"lists":{"type":"array","items":{"type":"object","properties":{"list_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"permissions":{"type":"array","items":{"type":"string"}}},"required":["list_id","permissions"],"description":"List-scoped role grant."}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","type","name","permissions","lists","created_at","updated_at"],"description":"List role resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["roles:write"],"x-broadside-stability":"experimental"},"delete":{"operationId":"roles.lists.delete","tags":["Roles"],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"role_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Role numeric id."},"deleted":{"type":"boolean"}},"required":["role_id","deleted"],"description":"Delete role response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["roles:write"],"x-broadside-stability":"experimental"}},"/users":{"get":{"operationId":"users.list","tags":["Users"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"username":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["user","api"],"type":"string","description":"User account type."},"status":{"enum":["enabled","disabled"],"type":"string","description":"User status."},"password_login":{"type":"boolean"},"user_role_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"list_role_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},{"type":"null"}]},"twofa_type":{"enum":["none","totp"],"type":"string","description":"Configured 2FA type."},"has_password":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"last_login_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","username","email","name","avatar","type","status","password_login","user_role_id","list_role_id","twofa_type","has_password","created_at","updated_at","last_login_at"],"description":"Administrative user resource. Secrets and TOTP keys are never returned."}}},"required":["users"],"description":"List users response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["users:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"users.create","tags":["Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","minLength":1},"email":{"type":"string","format":"email"},"name":{"type":"string"},"password":{"anyOf":[{"type":"string"},{"type":"null"}]},"password_login":{"type":"boolean"},"type":{"enum":["user","api"],"type":"string","description":"User account type."},"status":{"enum":["enabled","disabled"],"type":"string","description":"User status."},"user_role_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"list_role_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},{"type":"null"}]}},"required":["username","email","user_role_id"],"description":"Create user request. Password is write-only."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"username":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["user","api"],"type":"string","description":"User account type."},"status":{"enum":["enabled","disabled"],"type":"string","description":"User status."},"password_login":{"type":"boolean"},"user_role_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"list_role_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},{"type":"null"}]},"twofa_type":{"enum":["none","totp"],"type":"string","description":"Configured 2FA type."},"has_password":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"last_login_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","username","email","name","avatar","type","status","password_login","user_role_id","list_role_id","twofa_type","has_password","created_at","updated_at","last_login_at"],"description":"Administrative user resource. Secrets and TOTP keys are never returned."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["users:write"],"x-broadside-stability":"experimental"}},"/users/{user_id}":{"get":{"operationId":"users.get","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"username":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["user","api"],"type":"string","description":"User account type."},"status":{"enum":["enabled","disabled"],"type":"string","description":"User status."},"password_login":{"type":"boolean"},"user_role_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"list_role_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},{"type":"null"}]},"twofa_type":{"enum":["none","totp"],"type":"string","description":"Configured 2FA type."},"has_password":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"last_login_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","username","email","name","avatar","type","status","password_login","user_role_id","list_role_id","twofa_type","has_password","created_at","updated_at","last_login_at"],"description":"Administrative user resource. Secrets and TOTP keys are never returned."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["users:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"users.update","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","minLength":1},"email":{"type":"string","format":"email"},"name":{"type":"string"},"password":{"anyOf":[{"type":"string"},{"type":"null"}]},"password_login":{"type":"boolean"},"status":{"enum":["enabled","disabled"],"type":"string","description":"User status."},"user_role_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"list_role_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},{"type":"null"}]}},"description":"Update user request. Password is write-only."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"username":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"enum":["user","api"],"type":"string","description":"User account type."},"status":{"enum":["enabled","disabled"],"type":"string","description":"User status."},"password_login":{"type":"boolean"},"user_role_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"list_role_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},{"type":"null"}]},"twofa_type":{"enum":["none","totp"],"type":"string","description":"Configured 2FA type."},"has_password":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"last_login_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","username","email","name","avatar","type","status","password_login","user_role_id","list_role_id","twofa_type","has_password","created_at","updated_at","last_login_at"],"description":"Administrative user resource. Secrets and TOTP keys are never returned."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["users:write"],"x-broadside-stability":"experimental"},"delete":{"operationId":"users.delete","tags":["Users"],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"User numeric id."},"deleted":{"type":"boolean"}},"required":["user_id","deleted"],"description":"Delete user response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["users:write"],"x-broadside-stability":"experimental"}},"/subscribers":{"get":{"operationId":"subscribers.list","tags":["Subscribers"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","schema":{"type":"string","description":"Optional email or name search query."},"allowEmptyValue":true,"allowReserved":true},{"name":"list_id","in":"query","schema":{"type":"string","format":"uuid","description":"Optional list UUID filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Optional subscriber status filter."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"subscribers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public subscriber UUID."},"email":{"type":"string","format":"email","description":"Subscriber email address."},"name":{"type":"string","description":"Subscriber display name."},"status":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"created_at":{"type":"string","format":"date-time","description":"Subscriber creation timestamp."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Subscriber update timestamp, if available."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Newsletter list UUIDs this subscriber belongs to."},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Custom subscriber attributes."}},"required":["id","email","name","status","created_at","updated_at","list_ids","attributes"],"description":"Subscriber resource."},"description":"Subscribers on this page."},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["subscribers","page_info"],"description":"List subscribers response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["subscribers:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"subscribers.create","tags":["Subscribers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","default":""},"status":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status.","default":"enabled"},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[]},"preconfirm_subscriptions":{"type":"boolean","default":false},"send_optin_confirmation":{"type":"boolean","default":false}},"required":["email"],"description":"Create or upsert a subscriber."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public subscriber UUID."},"email":{"type":"string","format":"email","description":"Subscriber email address."},"name":{"type":"string","description":"Subscriber display name."},"status":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"created_at":{"type":"string","format":"date-time","description":"Subscriber creation timestamp."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Subscriber update timestamp, if available."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Newsletter list UUIDs this subscriber belongs to."},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Custom subscriber attributes."}},"required":["id","email","name","status","created_at","updated_at","list_ids","attributes"],"description":"Subscriber resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["subscribers:write"],"x-broadside-stability":"experimental"}},"/subscribers/{subscriber_id}":{"get":{"operationId":"subscribers.get","tags":["Subscribers"],"parameters":[{"name":"subscriber_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public subscriber UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public subscriber UUID."},"email":{"type":"string","format":"email","description":"Subscriber email address."},"name":{"type":"string","description":"Subscriber display name."},"status":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"created_at":{"type":"string","format":"date-time","description":"Subscriber creation timestamp."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Subscriber update timestamp, if available."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Newsletter list UUIDs this subscriber belongs to."},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Custom subscriber attributes."}},"required":["id","email","name","status","created_at","updated_at","list_ids","attributes"],"description":"Subscriber resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["subscribers:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"subscribers.update","tags":["Subscribers"],"parameters":[{"name":"subscriber_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public subscriber UUID."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"},"status":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"merge_attributes":{"type":"boolean","default":true,"description":"When true, merge attributes with existing custom fields instead of replacing."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."}},"preconfirm_subscriptions":{"type":"boolean","default":false}},"description":"Update subscriber profile, status, custom fields, or list memberships."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public subscriber UUID."},"email":{"type":"string","format":"email","description":"Subscriber email address."},"name":{"type":"string","description":"Subscriber display name."},"status":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"created_at":{"type":"string","format":"date-time","description":"Subscriber creation timestamp."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Subscriber update timestamp, if available."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Newsletter list UUIDs this subscriber belongs to."},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Custom subscriber attributes."}},"required":["id","email","name","status","created_at","updated_at","list_ids","attributes"],"description":"Subscriber resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["subscribers:write"],"x-broadside-stability":"experimental"},"delete":{"operationId":"subscribers.delete","tags":["Subscribers"],"parameters":[{"name":"subscriber_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public subscriber UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"description":"Delete subscriber response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["subscribers:write"],"x-broadside-stability":"experimental"}},"/lists":{"get":{"operationId":"lists.list","tags":["Lists"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","schema":{"type":"string","description":"Optional name or description search."},"allowEmptyValue":true,"allowReserved":true},{"name":"type","in":"query","schema":{"enum":["public","private","temporary"],"type":"string","description":"Optional list type filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"optin","in":"query","schema":{"enum":["single","double"],"type":"string","description":"Optional opt-in mode filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["active","archived"],"type":"string","description":"Optional list status filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"tag","in":"query","schema":{"type":"array","items":{"type":"string"},"description":"Optional tag overlap filter."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"lists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public list UUID."},"name":{"type":"string","description":"Operator-facing list name."},"type":{"enum":["public","private","temporary"],"type":"string","description":"Newsletter list visibility and lifecycle type."},"optin":{"enum":["single","double"],"type":"string","description":"Opt-in flow for new subscribers on this list."},"status":{"enum":["active","archived"],"type":"string","description":"Whether the list is active or archived."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined list tags."},"description":{"type":"string","description":"Operator-facing list description."},"subscriber_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total memberships on the list."},"subscriber_statuses":{"type":"object","properties":{"confirmed":{"type":"integer","minimum":0,"maximum":9007199254740991},"unconfirmed":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["confirmed","unconfirmed","unsubscribed","total"],"description":"Subscriber membership counts by list subscription status."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","type","optin","status","tags","description","subscriber_count","subscriber_statuses","created_at","updated_at"],"description":"Newsletter list resource."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["lists","page_info"],"description":"List newsletter lists response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["lists:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"lists.create","tags":["Lists"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"enum":["public","private","temporary"],"type":"string","description":"Newsletter list visibility and lifecycle type.","default":"public"},"optin":{"enum":["single","double"],"type":"string","description":"Opt-in flow for new subscribers on this list.","default":"single"},"status":{"enum":["active","archived"],"type":"string","description":"Whether the list is active or archived.","default":"active"},"tags":{"type":"array","items":{"type":"string"},"default":[]},"description":{"type":"string","default":""}},"required":["name"],"description":"Create newsletter list request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public list UUID."},"name":{"type":"string","description":"Operator-facing list name."},"type":{"enum":["public","private","temporary"],"type":"string","description":"Newsletter list visibility and lifecycle type."},"optin":{"enum":["single","double"],"type":"string","description":"Opt-in flow for new subscribers on this list."},"status":{"enum":["active","archived"],"type":"string","description":"Whether the list is active or archived."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined list tags."},"description":{"type":"string","description":"Operator-facing list description."},"subscriber_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total memberships on the list."},"subscriber_statuses":{"type":"object","properties":{"confirmed":{"type":"integer","minimum":0,"maximum":9007199254740991},"unconfirmed":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["confirmed","unconfirmed","unsubscribed","total"],"description":"Subscriber membership counts by list subscription status."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","type","optin","status","tags","description","subscriber_count","subscriber_statuses","created_at","updated_at"],"description":"Newsletter list resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["lists:write"],"x-broadside-stability":"experimental"}},"/lists/{list_id}":{"get":{"operationId":"lists.get","tags":["Lists"],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public list UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public list UUID."},"name":{"type":"string","description":"Operator-facing list name."},"type":{"enum":["public","private","temporary"],"type":"string","description":"Newsletter list visibility and lifecycle type."},"optin":{"enum":["single","double"],"type":"string","description":"Opt-in flow for new subscribers on this list."},"status":{"enum":["active","archived"],"type":"string","description":"Whether the list is active or archived."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined list tags."},"description":{"type":"string","description":"Operator-facing list description."},"subscriber_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total memberships on the list."},"subscriber_statuses":{"type":"object","properties":{"confirmed":{"type":"integer","minimum":0,"maximum":9007199254740991},"unconfirmed":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["confirmed","unconfirmed","unsubscribed","total"],"description":"Subscriber membership counts by list subscription status."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","type","optin","status","tags","description","subscriber_count","subscriber_statuses","created_at","updated_at"],"description":"Newsletter list resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["lists:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"lists.update","tags":["Lists"],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public list UUID."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"enum":["public","private","temporary"],"type":"string","description":"Newsletter list visibility and lifecycle type."},"optin":{"enum":["single","double"],"type":"string","description":"Opt-in flow for new subscribers on this list."},"status":{"enum":["active","archived"],"type":"string","description":"Whether the list is active or archived."},"tags":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"description":"Update newsletter list request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public list UUID."},"name":{"type":"string","description":"Operator-facing list name."},"type":{"enum":["public","private","temporary"],"type":"string","description":"Newsletter list visibility and lifecycle type."},"optin":{"enum":["single","double"],"type":"string","description":"Opt-in flow for new subscribers on this list."},"status":{"enum":["active","archived"],"type":"string","description":"Whether the list is active or archived."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined list tags."},"description":{"type":"string","description":"Operator-facing list description."},"subscriber_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total memberships on the list."},"subscriber_statuses":{"type":"object","properties":{"confirmed":{"type":"integer","minimum":0,"maximum":9007199254740991},"unconfirmed":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["confirmed","unconfirmed","unsubscribed","total"],"description":"Subscriber membership counts by list subscription status."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","type","optin","status","tags","description","subscriber_count","subscriber_statuses","created_at","updated_at"],"description":"Newsletter list resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["lists:write"],"x-broadside-stability":"experimental"},"delete":{"operationId":"lists.delete","tags":["Lists"],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public list UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","description":"Whether a list was deleted."}},"required":["deleted"],"description":"Delete newsletter list response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["lists:write"],"x-broadside-stability":"experimental"}},"/public/archive":{"get":{"operationId":"public_archive.list","tags":["Public Archive"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"newsletter_key","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public campaign UUID."},"slug":{"type":"string","description":"Public archive slug."},"archive_url":{"type":"string","description":"Relative archive URL."},"title":{"type":"string"},"subject":{"type":"string"},"newsletter_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"published_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","slug","archive_url","title","subject","newsletter_key","published_at","created_at","updated_at","excerpt","tags","meta"],"description":"Public newsletter archive issue summary."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["issues","page_info"],"description":"Public newsletter archive issue list."}}}}},"security":[],"x-broadside-auth":"anonymous","x-broadside-rate-limit":"public","x-broadside-scopes":[],"x-broadside-stability":"experimental"}},"/public/archive/{slug}":{"get":{"operationId":"public_archive.get","tags":["Public Archive"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public campaign UUID."},"slug":{"type":"string","description":"Public archive slug."},"archive_url":{"type":"string","description":"Relative archive URL."},"title":{"type":"string"},"subject":{"type":"string"},"newsletter_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"published_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"body_html":{"type":"string"},"body_text":{"type":"string"},"issue_draft_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"issue_run_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string"},"rank":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"published_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["section","rank","title","url","summary","published_at","source_type"],"description":"Public issue item summary."}}},"required":["id","slug","archive_url","title","subject","newsletter_key","published_at","created_at","updated_at","excerpt","tags","meta","body_html","body_text","issue_draft_id","issue_run_id","items"],"description":"Public newsletter archive issue detail."}}}}},"security":[],"x-broadside-auth":"anonymous","x-broadside-rate-limit":"public","x-broadside-scopes":[],"x-broadside-stability":"experimental"}},"/public/stats":{"get":{"operationId":"public_stats.get","tags":["Public Stats"],"parameters":[{"name":"list_uuids","in":"query","schema":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Optional public list UUID filter."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"counts":{"type":"object","properties":{"confirmed_subscribers":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Confirmed, enabled, unsuppressed subscribers in active public lists."}},"required":["confirmed_subscribers"]},"evaluated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["counts","evaluated_at"],"description":"Public newsletter stats."}}}}},"security":[],"x-broadside-auth":"anonymous","x-broadside-rate-limit":"public","x-broadside-scopes":[],"x-broadside-stability":"experimental"}},"/automations/sequences":{"get":{"operationId":"automation_sequences.list","tags":["Automation Sequences"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["active","paused","archived"],"type":"string","description":"Automation sequence lifecycle status."},"allowEmptyValue":true,"allowReserved":true},{"name":"trigger_type","in":"query","schema":{"enum":["manual","subscriber_created","tag_added","purchase","segment_entry","link_click"],"type":"string","description":"Event type that can enroll subscribers in a sequence."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sequences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sequence UUID."},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"enum":["active","paused","archived"],"type":"string","description":"Automation sequence lifecycle status."},"trigger_type":{"enum":["manual","subscriber_created","tag_added","purchase","segment_entry","link_click"],"type":"string","description":"Event type that can enroll subscribers in a sequence."},"trigger_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"exit_rules":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string","minLength":1},"kind":{"enum":["email"],"type":"string","description":"Automation step action kind. The first implementation supports email steps.","default":"email"},"delay_seconds":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"messenger":{"type":"string","minLength":1,"default":"email"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"id":{"type":"string","format":"uuid","description":"Public step UUID."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["key","name","id","position","created_at","updated_at"],"description":"Automation sequence step."}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","key","name","description","status","trigger_type","trigger_config","exit_rules","steps","metadata","created_at","updated_at"],"description":"Automation sequence resource."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["sequences","page_info"],"description":"Automation sequence list."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["automations:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"automation_sequences.create","tags":["Automation Sequences"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string","default":""},"status":{"enum":["active","paused","archived"],"type":"string","description":"Automation sequence lifecycle status.","default":"active"},"trigger_type":{"enum":["manual","subscriber_created","tag_added","purchase","segment_entry","link_click"],"type":"string","description":"Event type that can enroll subscribers in a sequence.","default":"manual"},"trigger_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"exit_rules":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"kind":{"enum":["email"],"type":"string","description":"Automation step action kind. The first implementation supports email steps.","default":"email"},"delay_seconds":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"messenger":{"type":"string","minLength":1,"default":"email"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"required":["name"],"description":"Automation sequence step input."},"default":[]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"required":["key","name"],"description":"Create an automation sequence."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sequence UUID."},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"enum":["active","paused","archived"],"type":"string","description":"Automation sequence lifecycle status."},"trigger_type":{"enum":["manual","subscriber_created","tag_added","purchase","segment_entry","link_click"],"type":"string","description":"Event type that can enroll subscribers in a sequence."},"trigger_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"exit_rules":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string","minLength":1},"kind":{"enum":["email"],"type":"string","description":"Automation step action kind. The first implementation supports email steps.","default":"email"},"delay_seconds":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"messenger":{"type":"string","minLength":1,"default":"email"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"id":{"type":"string","format":"uuid","description":"Public step UUID."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["key","name","id","position","created_at","updated_at"],"description":"Automation sequence step."}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","key","name","description","status","trigger_type","trigger_config","exit_rules","steps","metadata","created_at","updated_at"],"description":"Automation sequence resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["automations:write"],"x-broadside-stability":"experimental"}},"/automations/sequences/{sequence_id}":{"get":{"operationId":"automation_sequences.get","tags":["Automation Sequences"],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sequence UUID."},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"enum":["active","paused","archived"],"type":"string","description":"Automation sequence lifecycle status."},"trigger_type":{"enum":["manual","subscriber_created","tag_added","purchase","segment_entry","link_click"],"type":"string","description":"Event type that can enroll subscribers in a sequence."},"trigger_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"exit_rules":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string","minLength":1},"kind":{"enum":["email"],"type":"string","description":"Automation step action kind. The first implementation supports email steps.","default":"email"},"delay_seconds":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"messenger":{"type":"string","minLength":1,"default":"email"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"id":{"type":"string","format":"uuid","description":"Public step UUID."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["key","name","id","position","created_at","updated_at"],"description":"Automation sequence step."}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","key","name","description","status","trigger_type","trigger_config","exit_rules","steps","metadata","created_at","updated_at"],"description":"Automation sequence resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["automations:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"automation_sequences.update","tags":["Automation Sequences"],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"enum":["active","paused","archived"],"type":"string","description":"Automation sequence lifecycle status."},"trigger_type":{"enum":["manual","subscriber_created","tag_added","purchase","segment_entry","link_click"],"type":"string","description":"Event type that can enroll subscribers in a sequence."},"trigger_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"exit_rules":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"kind":{"enum":["email"],"type":"string","description":"Automation step action kind. The first implementation supports email steps.","default":"email"},"delay_seconds":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"messenger":{"type":"string","minLength":1,"default":"email"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"required":["name"],"description":"Automation sequence step input."}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"description":"Update an automation sequence. Passing steps replaces the ordered step set."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sequence UUID."},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"status":{"enum":["active","paused","archived"],"type":"string","description":"Automation sequence lifecycle status."},"trigger_type":{"enum":["manual","subscriber_created","tag_added","purchase","segment_entry","link_click"],"type":"string","description":"Event type that can enroll subscribers in a sequence."},"trigger_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"exit_rules":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string","minLength":1},"kind":{"enum":["email"],"type":"string","description":"Automation step action kind. The first implementation supports email steps.","default":"email"},"delay_seconds":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"messenger":{"type":"string","minLength":1,"default":"email"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"id":{"type":"string","format":"uuid","description":"Public step UUID."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["key","name","id","position","created_at","updated_at"],"description":"Automation sequence step."}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","key","name","description","status","trigger_type","trigger_config","exit_rules","steps","metadata","created_at","updated_at"],"description":"Automation sequence resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["automations:write"],"x-broadside-stability":"experimental"}},"/automations/sequences/{sequence_id}/enrollments":{"post":{"operationId":"automation_sequences.enroll","tags":["Automation Sequences"],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscriber_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"trigger_event":{"type":"string","minLength":1,"default":"manual"},"restart_existing":{"type":"boolean","default":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"required":["subscriber_id"],"description":"Enroll a subscriber in an automation sequence."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public enrollment UUID."},"sequence_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"subscriber_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"current_step_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"status":{"enum":["active","completed","exited","cancelled"],"type":"string","description":"Subscriber enrollment status."},"trigger_event":{"type":"string"},"next_step_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"started_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"completed_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"exit_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","sequence_id","subscriber_id","current_step_id","status","trigger_event","next_step_at","started_at","completed_at","exit_reason","metadata","created_at","updated_at"],"description":"Subscriber enrollment in an automation sequence."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["automations:write"],"x-broadside-stability":"experimental"}},"/automations/sequences/{sequence_id}/bulk-enroll":{"post":{"operationId":"automation_sequences.bulk_enroll","tags":["Automation Sequences"],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"object","properties":{"segment_id":{"type":"string","format":"uuid","description":"Enroll current members of this segment."},"list_id":{"type":"string","format":"uuid","description":"Enroll current members of this list."},"subscriber_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Explicit subscriber UUIDs."}},"description":"Target cohort for bulk automation enrollment."},"trigger_event":{"type":"string","minLength":1,"default":"manual_bulk"},"restart_existing":{"type":"boolean","default":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"dry_run":{"type":"boolean","default":true},"confirm":{"type":"boolean","default":false},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":10000,"exclusiveMinimum":0,"default":10000}},"required":["target"],"description":"Bulk enroll a segment, list, or explicit subscribers in an automation sequence."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"type":"boolean"},"target_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"enrolled_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped_existing":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped_no_steps":{"type":"integer","minimum":0,"maximum":9007199254740991},"warnings":{"type":"array","items":{"type":"string"}}},"required":["dry_run","target_count","enrolled_count","skipped_existing","skipped_no_steps","warnings"],"description":"Bulk automation enrollment action result."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["automations:write"],"x-broadside-stability":"experimental"}},"/automations/enrollments":{"get":{"operationId":"automation_sequences.list_enrollments","tags":["Automation Sequences"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"sequence_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"subscriber_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["active","completed","exited","cancelled"],"type":"string","description":"Subscriber enrollment status."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enrollments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public enrollment UUID."},"sequence_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"subscriber_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"current_step_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"status":{"enum":["active","completed","exited","cancelled"],"type":"string","description":"Subscriber enrollment status."},"trigger_event":{"type":"string"},"next_step_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"started_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"completed_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"exit_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","sequence_id","subscriber_id","current_step_id","status","trigger_event","next_step_at","started_at","completed_at","exit_reason","metadata","created_at","updated_at"],"description":"Subscriber enrollment in an automation sequence."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["enrollments","page_info"],"description":"Automation enrollment list."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["automations:read"],"x-broadside-stability":"experimental"}},"/automations/sequences/{sequence_id}/reactivation-report":{"get":{"operationId":"automation_sequences.reactivation_report","tags":["Automation Sequences"],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sequence_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"enrolled":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"exited":{"type":"integer","minimum":0,"maximum":9007199254740991},"sunset_suppressed":{"type":"integer","minimum":0,"maximum":9007199254740991},"responders":{"type":"integer","minimum":0,"maximum":9007199254740991},"reactivated":{"type":"integer","minimum":0,"maximum":9007199254740991},"reactivation_rate":{"type":"number","minimum":0}},"required":["sequence_id","enrolled","completed","exited","sunset_suppressed","responders","reactivated","reactivation_rate"],"description":"Automation reactivation report."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["automations:read"],"x-broadside-stability":"experimental"}},"/automations/enrollments/{enrollment_id}/cancel":{"post":{"operationId":"automation_sequences.cancel_enrollment","tags":["Automation Sequences"],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"default":"manual"},"source":{"type":"string","minLength":1,"default":"api"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"description":"Cancel an active automation enrollment."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public enrollment UUID."},"sequence_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"subscriber_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"current_step_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"status":{"enum":["active","completed","exited","cancelled"],"type":"string","description":"Subscriber enrollment status."},"trigger_event":{"type":"string"},"next_step_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"started_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"completed_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"exit_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","sequence_id","subscriber_id","current_step_id","status","trigger_event","next_step_at","started_at","completed_at","exit_reason","metadata","created_at","updated_at"],"description":"Subscriber enrollment in an automation sequence."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["automations:write"],"x-broadside-stability":"experimental"}},"/segments":{"get":{"operationId":"segments.list","tags":["Segments"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","schema":{"type":"string","description":"Optional segment key/name search."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["active","archived"],"type":"string","description":"Optional segment status filter."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public segment UUID."},"key":{"type":"string","description":"Stable operator-defined segment key."},"name":{"type":"string","description":"Operator-facing segment name."},"description":{"type":"string"},"kind":{"enum":["dynamic"],"type":"string","description":"Segment evaluation mode. Dynamic segments are evaluated from current data."},"status":{"enum":["active","archived"],"type":"string","description":"Audience segment lifecycle status."},"rules":{"type":"object","properties":{"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Restrict membership to subscribers in any of these list UUIDs."},"subscription_statuses":{"type":"array","items":{"enum":["confirmed","unconfirmed","unsubscribed"],"type":"string","description":"Per-list subscription status."},"default":[],"description":"Restrict matching list memberships to these statuses."},"subscriber_statuses":{"type":"array","items":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"default":["enabled"],"description":"Restrict subscribers by account status."},"tags_any":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have at least one of these tags."},"tags_none":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have none of these tags."},"min_opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_open_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_click_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_engaged_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require a human open or click within this many days."},"last_engaged_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require no human open/click more recently than this many days."},"include_never_engaged":{"type":"boolean","default":true,"description":"Whether last_engaged_before_days includes subscribers with no open/click history."},"created_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"include_suppressed":{"type":"boolean","default":false,"description":"Whether active global suppressions may remain in the result."}},"description":"Typed dynamic segment rules for engagement/lifecycle cohorts."},"stats":{"type":"object","properties":{"subscriber_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"evaluated_at":{"type":"string","format":"date-time","description":"Timestamp when dynamic stats were evaluated."}},"required":["subscriber_count","evaluated_at"],"description":"Evaluated segment counters."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","key","name","description","kind","status","rules","stats","metadata","created_at","updated_at"],"description":"Audience segment resource."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["segments","page_info"],"description":"List segments response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["segments:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"segments.create","tags":["Segments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string","default":""},"rules":{"type":"object","properties":{"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Restrict membership to subscribers in any of these list UUIDs."},"subscription_statuses":{"type":"array","items":{"enum":["confirmed","unconfirmed","unsubscribed"],"type":"string","description":"Per-list subscription status."},"default":[],"description":"Restrict matching list memberships to these statuses."},"subscriber_statuses":{"type":"array","items":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"default":["enabled"],"description":"Restrict subscribers by account status."},"tags_any":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have at least one of these tags."},"tags_none":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have none of these tags."},"min_opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_open_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_click_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_engaged_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require a human open or click within this many days."},"last_engaged_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require no human open/click more recently than this many days."},"include_never_engaged":{"type":"boolean","default":true,"description":"Whether last_engaged_before_days includes subscribers with no open/click history."},"created_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"include_suppressed":{"type":"boolean","default":false,"description":"Whether active global suppressions may remain in the result."}},"description":"Typed dynamic segment rules for engagement/lifecycle cohorts."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"required":["key","name","rules"],"description":"Create a dynamic engagement segment."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public segment UUID."},"key":{"type":"string","description":"Stable operator-defined segment key."},"name":{"type":"string","description":"Operator-facing segment name."},"description":{"type":"string"},"kind":{"enum":["dynamic"],"type":"string","description":"Segment evaluation mode. Dynamic segments are evaluated from current data."},"status":{"enum":["active","archived"],"type":"string","description":"Audience segment lifecycle status."},"rules":{"type":"object","properties":{"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Restrict membership to subscribers in any of these list UUIDs."},"subscription_statuses":{"type":"array","items":{"enum":["confirmed","unconfirmed","unsubscribed"],"type":"string","description":"Per-list subscription status."},"default":[],"description":"Restrict matching list memberships to these statuses."},"subscriber_statuses":{"type":"array","items":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"default":["enabled"],"description":"Restrict subscribers by account status."},"tags_any":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have at least one of these tags."},"tags_none":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have none of these tags."},"min_opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_open_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_click_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_engaged_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require a human open or click within this many days."},"last_engaged_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require no human open/click more recently than this many days."},"include_never_engaged":{"type":"boolean","default":true,"description":"Whether last_engaged_before_days includes subscribers with no open/click history."},"created_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"include_suppressed":{"type":"boolean","default":false,"description":"Whether active global suppressions may remain in the result."}},"description":"Typed dynamic segment rules for engagement/lifecycle cohorts."},"stats":{"type":"object","properties":{"subscriber_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"evaluated_at":{"type":"string","format":"date-time","description":"Timestamp when dynamic stats were evaluated."}},"required":["subscriber_count","evaluated_at"],"description":"Evaluated segment counters."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","key","name","description","kind","status","rules","stats","metadata","created_at","updated_at"],"description":"Audience segment resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["segments:write"],"x-broadside-stability":"experimental"}},"/segments/engagement-summary":{"get":{"operationId":"segments.engagement_summary","tags":["Segments"],"parameters":[{"name":"list_ids","in":"query","schema":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Restrict the engagement summary to confirmed memberships in these lists."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"recent_days","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":3650,"exclusiveMinimum":0,"default":90,"description":"Tier A qualified activity window in days."},"allowEmptyValue":true,"allowReserved":true},{"name":"cooling_days","in":"query","schema":{"type":"integer","minimum":-9007199254740991,"maximum":3650,"exclusiveMinimum":0,"default":180,"description":"Tier B qualified activity window in days. Must be greater than recent_days."},"allowEmptyValue":true,"allowReserved":true},{"name":"include_suppressed","in":"query","schema":{"type":"boolean","default":false,"description":"Include active suppressions in the summary as never-send Tier D members."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"evaluated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"thresholds":{"type":"object","properties":{"recent_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"cooling_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0}},"required":["recent_days","cooling_days"]},"totals":{"type":"object","properties":{"evaluated_subscribers":{"type":"integer","minimum":0,"maximum":9007199254740991},"tiered_subscribers":{"type":"integer","minimum":0,"maximum":9007199254740991},"suppressed_subscribers":{"type":"integer","minimum":0,"maximum":9007199254740991},"suppressed_excluded":{"type":"integer","minimum":0,"maximum":9007199254740991},"missing_clear_consent":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["evaluated_subscribers","tiered_subscribers","suppressed_subscribers","suppressed_excluded","missing_clear_consent"]},"tiers":{"type":"array","items":{"type":"object","properties":{"tier":{"enum":["A","B","C","D"],"type":"string","description":"Consent-first engagement tier for confirmed subscribers."},"name":{"type":"string"},"description":{"type":"string"},"subscriber_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"recommended_send_policy":{"enum":["normal","reduced","repermission","never"],"type":"string","description":"Recommended newsletter send policy for this subscriber tier."},"segment_rules":{"anyOf":[{"type":"object","properties":{"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Restrict membership to subscribers in any of these list UUIDs."},"subscription_statuses":{"type":"array","items":{"enum":["confirmed","unconfirmed","unsubscribed"],"type":"string","description":"Per-list subscription status."},"default":[],"description":"Restrict matching list memberships to these statuses."},"subscriber_statuses":{"type":"array","items":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"default":["enabled"],"description":"Restrict subscribers by account status."},"tags_any":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have at least one of these tags."},"tags_none":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have none of these tags."},"min_opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_open_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_click_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_engaged_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require a human open or click within this many days."},"last_engaged_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require no human open/click more recently than this many days."},"include_never_engaged":{"type":"boolean","default":true,"description":"Whether last_engaged_before_days includes subscribers with no open/click history."},"created_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"include_suppressed":{"type":"boolean","default":false,"description":"Whether active global suppressions may remain in the result."}},"description":"Typed dynamic segment rules for engagement/lifecycle cohorts."},{"type":"null"}],"description":"Dynamic segment rules when this tier can be represented exactly by existing filters."},"reason_codes":{"type":"array","items":{"type":"string"},"description":"Primary policy reasons represented by this tier."}},"required":["tier","name","description","subscriber_count","recommended_send_policy","segment_rules","reason_codes"],"description":"Engagement tier summary row."}}},"required":["evaluated_at","thresholds","totals","tiers"],"description":"Consent-first engagement tier summary."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["segments:read"],"x-broadside-stability":"experimental"}},"/segments/{segment_id}":{"get":{"operationId":"segments.get","tags":["Segments"],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public segment UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public segment UUID."},"key":{"type":"string","description":"Stable operator-defined segment key."},"name":{"type":"string","description":"Operator-facing segment name."},"description":{"type":"string"},"kind":{"enum":["dynamic"],"type":"string","description":"Segment evaluation mode. Dynamic segments are evaluated from current data."},"status":{"enum":["active","archived"],"type":"string","description":"Audience segment lifecycle status."},"rules":{"type":"object","properties":{"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Restrict membership to subscribers in any of these list UUIDs."},"subscription_statuses":{"type":"array","items":{"enum":["confirmed","unconfirmed","unsubscribed"],"type":"string","description":"Per-list subscription status."},"default":[],"description":"Restrict matching list memberships to these statuses."},"subscriber_statuses":{"type":"array","items":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"default":["enabled"],"description":"Restrict subscribers by account status."},"tags_any":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have at least one of these tags."},"tags_none":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have none of these tags."},"min_opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_open_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_click_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_engaged_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require a human open or click within this many days."},"last_engaged_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require no human open/click more recently than this many days."},"include_never_engaged":{"type":"boolean","default":true,"description":"Whether last_engaged_before_days includes subscribers with no open/click history."},"created_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"include_suppressed":{"type":"boolean","default":false,"description":"Whether active global suppressions may remain in the result."}},"description":"Typed dynamic segment rules for engagement/lifecycle cohorts."},"stats":{"type":"object","properties":{"subscriber_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"evaluated_at":{"type":"string","format":"date-time","description":"Timestamp when dynamic stats were evaluated."}},"required":["subscriber_count","evaluated_at"],"description":"Evaluated segment counters."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","key","name","description","kind","status","rules","stats","metadata","created_at","updated_at"],"description":"Audience segment resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["segments:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"segments.update","tags":["Segments"],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public segment UUID."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"enum":["active","archived"],"type":"string","description":"Audience segment lifecycle status."},"rules":{"type":"object","properties":{"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Restrict membership to subscribers in any of these list UUIDs."},"subscription_statuses":{"type":"array","items":{"enum":["confirmed","unconfirmed","unsubscribed"],"type":"string","description":"Per-list subscription status."},"default":[],"description":"Restrict matching list memberships to these statuses."},"subscriber_statuses":{"type":"array","items":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"default":["enabled"],"description":"Restrict subscribers by account status."},"tags_any":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have at least one of these tags."},"tags_none":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have none of these tags."},"min_opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_open_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_click_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_engaged_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require a human open or click within this many days."},"last_engaged_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require no human open/click more recently than this many days."},"include_never_engaged":{"type":"boolean","default":true,"description":"Whether last_engaged_before_days includes subscribers with no open/click history."},"created_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"include_suppressed":{"type":"boolean","default":false,"description":"Whether active global suppressions may remain in the result."}},"description":"Typed dynamic segment rules for engagement/lifecycle cohorts."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"description":"Update a dynamic engagement segment."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public segment UUID."},"key":{"type":"string","description":"Stable operator-defined segment key."},"name":{"type":"string","description":"Operator-facing segment name."},"description":{"type":"string"},"kind":{"enum":["dynamic"],"type":"string","description":"Segment evaluation mode. Dynamic segments are evaluated from current data."},"status":{"enum":["active","archived"],"type":"string","description":"Audience segment lifecycle status."},"rules":{"type":"object","properties":{"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Restrict membership to subscribers in any of these list UUIDs."},"subscription_statuses":{"type":"array","items":{"enum":["confirmed","unconfirmed","unsubscribed"],"type":"string","description":"Per-list subscription status."},"default":[],"description":"Restrict matching list memberships to these statuses."},"subscriber_statuses":{"type":"array","items":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"default":["enabled"],"description":"Restrict subscribers by account status."},"tags_any":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have at least one of these tags."},"tags_none":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have none of these tags."},"min_opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_open_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_click_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_engaged_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require a human open or click within this many days."},"last_engaged_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require no human open/click more recently than this many days."},"include_never_engaged":{"type":"boolean","default":true,"description":"Whether last_engaged_before_days includes subscribers with no open/click history."},"created_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"include_suppressed":{"type":"boolean","default":false,"description":"Whether active global suppressions may remain in the result."}},"description":"Typed dynamic segment rules for engagement/lifecycle cohorts."},"stats":{"type":"object","properties":{"subscriber_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"evaluated_at":{"type":"string","format":"date-time","description":"Timestamp when dynamic stats were evaluated."}},"required":["subscriber_count","evaluated_at"],"description":"Evaluated segment counters."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","key","name","description","kind","status","rules","stats","metadata","created_at","updated_at"],"description":"Audience segment resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["segments:write"],"x-broadside-stability":"experimental"}},"/segments/{segment_id}/preview":{"get":{"operationId":"segments.preview","tags":["Segments"],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public segment UUID."}},{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"segment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public segment UUID."},"key":{"type":"string","description":"Stable operator-defined segment key."},"name":{"type":"string","description":"Operator-facing segment name."},"description":{"type":"string"},"kind":{"enum":["dynamic"],"type":"string","description":"Segment evaluation mode. Dynamic segments are evaluated from current data."},"status":{"enum":["active","archived"],"type":"string","description":"Audience segment lifecycle status."},"rules":{"type":"object","properties":{"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Restrict membership to subscribers in any of these list UUIDs."},"subscription_statuses":{"type":"array","items":{"enum":["confirmed","unconfirmed","unsubscribed"],"type":"string","description":"Per-list subscription status."},"default":[],"description":"Restrict matching list memberships to these statuses."},"subscriber_statuses":{"type":"array","items":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"default":["enabled"],"description":"Restrict subscribers by account status."},"tags_any":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have at least one of these tags."},"tags_none":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Subscriber must have none of these tags."},"min_opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_open_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_click_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"last_engaged_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require a human open or click within this many days."},"last_engaged_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Require no human open/click more recently than this many days."},"include_never_engaged":{"type":"boolean","default":true,"description":"Whether last_engaged_before_days includes subscribers with no open/click history."},"created_within_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"created_before_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"include_suppressed":{"type":"boolean","default":false,"description":"Whether active global suppressions may remain in the result."}},"description":"Typed dynamic segment rules for engagement/lifecycle cohorts."},"stats":{"type":"object","properties":{"subscriber_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"evaluated_at":{"type":"string","format":"date-time","description":"Timestamp when dynamic stats were evaluated."}},"required":["subscriber_count","evaluated_at"],"description":"Evaluated segment counters."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","key","name","description","kind","status","rules","stats","metadata","created_at","updated_at"],"description":"Audience segment resource."},"subscribers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public subscriber UUID."},"email":{"type":"string","format":"email","description":"Subscriber email address."},"name":{"type":"string","description":"Subscriber display name."},"status":{"enum":["enabled","disabled","blocklisted"],"type":"string","description":"Subscriber account status."},"created_at":{"type":"string","format":"date-time","description":"Subscriber creation timestamp."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Subscriber update timestamp, if available."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Newsletter list UUIDs this subscriber belongs to."},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Custom subscriber attributes."}},"required":["id","email","name","status","created_at","updated_at","list_ids","attributes"],"description":"Subscriber resource."}},"total_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["segment","subscribers","total_count","page_info"],"description":"Preview current segment members."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["segments:read"],"x-broadside-stability":"experimental"}},"/sending-profiles":{"get":{"operationId":"sending_profiles.list","tags":["Sending Profiles"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"profiles":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Stable sending profile key usable as campaign messenger."},"name":{"type":"string","description":"Operator-facing profile name."},"enabled":{"type":"boolean"},"provider":{"type":"string","description":"Provider label such as smtp, mailcow, resend, or postback."},"transport":{"enum":["smtp","resend_api","postback"],"type":"string","description":"Sending transport used by a profile."},"host":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"SMTP host or postback URL."},"port":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Username when configured; password/API keys are never returned."},"from_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Expected sender domain for this profile."},"allowed_purposes":{"anyOf":[{"type":"array","items":{"enum":["marketing","newsletter","automation","transactional","system","test"],"type":"string","description":"Email purposes a sending profile can be used for."}},{"type":"null"}],"description":"Allowed email purposes for this profile. Null means unrestricted."},"rate_limit_per_minute":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"daily_cap":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"warmup":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"start_daily_cap":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"increase_per_day":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"max_daily_cap":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]}},"description":"Non-secret warmup ramp settings for a sending profile."},{"type":"null"}]},"aliases":{"type":"array","items":{"type":"string"},"description":"Accepted messenger aliases for this profile."},"readiness":{"type":"object","properties":{"configured":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}}},"required":["configured","missing"],"description":"Non-secret readiness information for a sending profile."}},"required":["key","name","enabled","provider","transport","host","port","username","from_domain","allowed_purposes","rate_limit_per_minute","daily_cap","warmup","aliases","readiness"],"description":"Sanitized sending profile resource."}}},"required":["profiles"],"description":"List sending profiles response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["sending_profiles:read"],"x-broadside-stability":"experimental"}},"/sending-profiles/{profile_key}":{"get":{"operationId":"sending_profiles.get","tags":["Sending Profiles"],"parameters":[{"name":"profile_key","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Stable sending profile key usable as campaign messenger."},"name":{"type":"string","description":"Operator-facing profile name."},"enabled":{"type":"boolean"},"provider":{"type":"string","description":"Provider label such as smtp, mailcow, resend, or postback."},"transport":{"enum":["smtp","resend_api","postback"],"type":"string","description":"Sending transport used by a profile."},"host":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"SMTP host or postback URL."},"port":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Username when configured; password/API keys are never returned."},"from_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Expected sender domain for this profile."},"allowed_purposes":{"anyOf":[{"type":"array","items":{"enum":["marketing","newsletter","automation","transactional","system","test"],"type":"string","description":"Email purposes a sending profile can be used for."}},{"type":"null"}],"description":"Allowed email purposes for this profile. Null means unrestricted."},"rate_limit_per_minute":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"daily_cap":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"warmup":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"start_daily_cap":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"increase_per_day":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"max_daily_cap":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]}},"description":"Non-secret warmup ramp settings for a sending profile."},{"type":"null"}]},"aliases":{"type":"array","items":{"type":"string"},"description":"Accepted messenger aliases for this profile."},"readiness":{"type":"object","properties":{"configured":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}}},"required":["configured","missing"],"description":"Non-secret readiness information for a sending profile."}},"required":["key","name","enabled","provider","transport","host","port","username","from_domain","allowed_purposes","rate_limit_per_minute","daily_cap","warmup","aliases","readiness"],"description":"Sanitized sending profile resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["sending_profiles:read"],"x-broadside-stability":"experimental"}},"/campaigns":{"get":{"operationId":"campaigns.list","tags":["Campaigns"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","schema":{"type":"string","description":"Optional campaign name search."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"type":"array","items":{"enum":["draft","running","scheduled","paused","cancelled","finished"],"type":"string","description":"Campaign lifecycle status."},"description":"Optional status filter."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"type","in":"query","schema":{"enum":["regular","optin"],"type":"string","description":"Optional campaign type filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"tag","in":"query","schema":{"type":"array","items":{"type":"string"},"description":"Optional campaign tag filter."},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"campaigns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public campaign UUID."},"name":{"type":"string","description":"Operator-facing campaign name."},"subject":{"type":"string","description":"Email subject template."},"from_email":{"type":"string","format":"email","description":"Envelope/header From address."},"body_html":{"type":"string","description":"Rendered campaign body HTML."},"body_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Original markdown body, when available."},"altbody":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Plain-text body override."},"content_type":{"enum":["richtext","html","plain","markdown","visual"],"type":"string","description":"Stored campaign content type."},"send_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Scheduled send time, when set."},"status":{"enum":["draft","running","scheduled","paused","cancelled","finished"],"type":"string","description":"Campaign lifecycle status."},"type":{"enum":["regular","optin"],"type":"string","description":"Campaign audience mode."},"messenger":{"type":"string","description":"Sending profile or messenger alias, such as email, mailcow-smtp, or resend."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined campaign tags."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Audience list UUIDs targeted by the campaign."},"segment_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Dynamic audience segment UUIDs targeted by the campaign."},"stats":{"type":"object","properties":{"to_send":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounces":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["to_send","sent","opens","clicks","bounces"],"description":"Campaign delivery and engagement counters."},"archive":{"type":"boolean","description":"Whether the campaign should be publicly archived."},"archive_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public archive slug, when enabled."},"started_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","subject","from_email","body_html","body_markdown","altbody","content_type","send_at","status","type","messenger","tags","list_ids","segment_ids","stats","archive","archive_slug","started_at","created_at","updated_at"],"description":"Campaign resource."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["campaigns","page_info"],"description":"List campaigns response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["campaigns:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"campaigns.create","tags":["Campaigns"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"subject":{"type":"string","minLength":1},"from_email":{"type":"string","format":"email"},"body":{"type":"string","default":"","description":"Markdown campaign body."},"altbody":{"anyOf":[{"type":"string"},{"type":"null"}]},"send_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"type":{"enum":["regular","optin"],"type":"string","description":"Campaign audience mode.","default":"regular"},"tags":{"type":"array","items":{"type":"string"},"default":[]},"messenger":{"type":"string","minLength":1,"default":"email"},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[]},"segment_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[]},"archive":{"type":"boolean","default":false},"archive_slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"archive_meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"required":["name","subject","from_email"],"description":"Create a markdown-backed campaign."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public campaign UUID."},"name":{"type":"string","description":"Operator-facing campaign name."},"subject":{"type":"string","description":"Email subject template."},"from_email":{"type":"string","format":"email","description":"Envelope/header From address."},"body_html":{"type":"string","description":"Rendered campaign body HTML."},"body_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Original markdown body, when available."},"altbody":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Plain-text body override."},"content_type":{"enum":["richtext","html","plain","markdown","visual"],"type":"string","description":"Stored campaign content type."},"send_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Scheduled send time, when set."},"status":{"enum":["draft","running","scheduled","paused","cancelled","finished"],"type":"string","description":"Campaign lifecycle status."},"type":{"enum":["regular","optin"],"type":"string","description":"Campaign audience mode."},"messenger":{"type":"string","description":"Sending profile or messenger alias, such as email, mailcow-smtp, or resend."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined campaign tags."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Audience list UUIDs targeted by the campaign."},"segment_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Dynamic audience segment UUIDs targeted by the campaign."},"stats":{"type":"object","properties":{"to_send":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounces":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["to_send","sent","opens","clicks","bounces"],"description":"Campaign delivery and engagement counters."},"archive":{"type":"boolean","description":"Whether the campaign should be publicly archived."},"archive_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public archive slug, when enabled."},"started_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","subject","from_email","body_html","body_markdown","altbody","content_type","send_at","status","type","messenger","tags","list_ids","segment_ids","stats","archive","archive_slug","started_at","created_at","updated_at"],"description":"Campaign resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["campaigns:write"],"x-broadside-stability":"experimental"}},"/campaigns/{campaign_id}":{"get":{"operationId":"campaigns.get","tags":["Campaigns"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public campaign UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public campaign UUID."},"name":{"type":"string","description":"Operator-facing campaign name."},"subject":{"type":"string","description":"Email subject template."},"from_email":{"type":"string","format":"email","description":"Envelope/header From address."},"body_html":{"type":"string","description":"Rendered campaign body HTML."},"body_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Original markdown body, when available."},"altbody":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Plain-text body override."},"content_type":{"enum":["richtext","html","plain","markdown","visual"],"type":"string","description":"Stored campaign content type."},"send_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Scheduled send time, when set."},"status":{"enum":["draft","running","scheduled","paused","cancelled","finished"],"type":"string","description":"Campaign lifecycle status."},"type":{"enum":["regular","optin"],"type":"string","description":"Campaign audience mode."},"messenger":{"type":"string","description":"Sending profile or messenger alias, such as email, mailcow-smtp, or resend."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined campaign tags."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Audience list UUIDs targeted by the campaign."},"segment_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Dynamic audience segment UUIDs targeted by the campaign."},"stats":{"type":"object","properties":{"to_send":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounces":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["to_send","sent","opens","clicks","bounces"],"description":"Campaign delivery and engagement counters."},"archive":{"type":"boolean","description":"Whether the campaign should be publicly archived."},"archive_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public archive slug, when enabled."},"started_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","subject","from_email","body_html","body_markdown","altbody","content_type","send_at","status","type","messenger","tags","list_ids","segment_ids","stats","archive","archive_slug","started_at","created_at","updated_at"],"description":"Campaign resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["campaigns:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"campaigns.update","tags":["Campaigns"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public campaign UUID."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"subject":{"type":"string","minLength":1},"from_email":{"type":"string","format":"email"},"body":{"type":"string","description":"Markdown campaign body."},"altbody":{"anyOf":[{"type":"string"},{"type":"null"}]},"send_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"type":{"enum":["regular","optin"],"type":"string","description":"Campaign audience mode."},"tags":{"type":"array","items":{"type":"string"}},"messenger":{"type":"string","minLength":1},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."}},"segment_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."}},"archive":{"type":"boolean"},"archive_slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"archive_meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"description":"Update a draft or paused markdown-backed campaign."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public campaign UUID."},"name":{"type":"string","description":"Operator-facing campaign name."},"subject":{"type":"string","description":"Email subject template."},"from_email":{"type":"string","format":"email","description":"Envelope/header From address."},"body_html":{"type":"string","description":"Rendered campaign body HTML."},"body_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Original markdown body, when available."},"altbody":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Plain-text body override."},"content_type":{"enum":["richtext","html","plain","markdown","visual"],"type":"string","description":"Stored campaign content type."},"send_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Scheduled send time, when set."},"status":{"enum":["draft","running","scheduled","paused","cancelled","finished"],"type":"string","description":"Campaign lifecycle status."},"type":{"enum":["regular","optin"],"type":"string","description":"Campaign audience mode."},"messenger":{"type":"string","description":"Sending profile or messenger alias, such as email, mailcow-smtp, or resend."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined campaign tags."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Audience list UUIDs targeted by the campaign."},"segment_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Dynamic audience segment UUIDs targeted by the campaign."},"stats":{"type":"object","properties":{"to_send":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounces":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["to_send","sent","opens","clicks","bounces"],"description":"Campaign delivery and engagement counters."},"archive":{"type":"boolean","description":"Whether the campaign should be publicly archived."},"archive_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public archive slug, when enabled."},"started_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","subject","from_email","body_html","body_markdown","altbody","content_type","send_at","status","type","messenger","tags","list_ids","segment_ids","stats","archive","archive_slug","started_at","created_at","updated_at"],"description":"Campaign resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["campaigns:write"],"x-broadside-stability":"experimental"},"delete":{"operationId":"campaigns.delete","tags":["Campaigns"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public campaign UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"deleted":{"type":"boolean"}},"required":["campaign_id","deleted"],"description":"Campaign deletion result."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["campaigns:write"],"x-broadside-stability":"experimental"}},"/campaigns/{campaign_id}/results":{"get":{"operationId":"campaigns.results","tags":["Campaigns"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public campaign UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"generated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"audience_size":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivery_counts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","count"],"description":"Named campaign metric count."}},"stop_line":{"type":"object","properties":{"action":{"enum":["allow","slow_down","pause"],"type":"string","description":"Current campaign stop-line recommendation."},"reason":{"type":"string"},"recommended_backoff_until":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"metrics":{"type":"object","properties":{"attempted":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":0,"maximum":9007199254740991},"complaint_rate":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"rate":{"type":"number","minimum":0},"low_sample":{"type":"boolean"}},"required":["count","denominator","rate","low_sample"],"description":"Stop-line rate metric."},"hard_bounce_rate":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"rate":{"type":"number","minimum":0},"low_sample":{"type":"boolean"}},"required":["count","denominator","rate","low_sample"],"description":"Stop-line rate metric."},"deferred_rate":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"rate":{"type":"number","minimum":0},"low_sample":{"type":"boolean"}},"required":["count","denominator","rate","low_sample"],"description":"Stop-line rate metric."},"rate_limited_rate":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"rate":{"type":"number","minimum":0},"low_sample":{"type":"boolean"}},"required":["count","denominator","rate","low_sample"],"description":"Stop-line rate metric."},"rejected_rate":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"rate":{"type":"number","minimum":0},"low_sample":{"type":"boolean"}},"required":["count","denominator","rate","low_sample"],"description":"Stop-line rate metric."}},"required":["attempted","delivered","complaint_rate","hard_bounce_rate","deferred_rate","rate_limited_rate","rejected_rate"]},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"action":{"enum":["slow_down","pause"],"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"rate":{"type":"number","minimum":0},"threshold":{"type":"number","minimum":0},"min_sample_size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","action","count","denominator","rate","threshold","min_sample_size"],"description":"Stop-line threshold reason."}},"protected_reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"action":{"enum":["slow_down","pause"],"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"rate":{"type":"number","minimum":0},"threshold":{"type":"number","minimum":0},"min_sample_size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","action","count","denominator","rate","threshold","min_sample_size"],"description":"Stop-line threshold reason."}}},"required":["action","reason","recommended_backoff_until","metrics","reasons","protected_reasons"],"description":"Campaign-level deliverability stop-line evaluation."},"engagement":{"type":"object","properties":{"total_opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"unique_opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"unique_clickers":{"type":"integer","minimum":0,"maximum":9007199254740991},"open_rate":{"type":"number","minimum":0},"click_rate":{"type":"number","minimum":0},"click_to_open_rate":{"type":"number","minimum":0}},"required":["total_opens","unique_opens","total_clicks","unique_clickers","open_rate","click_rate","click_to_open_rate"],"description":"Campaign open/click engagement summary."},"links":{"type":"array","items":{"type":"object","properties":{"campaign_link_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"url":{"type":"string"},"total_clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"unique_clickers":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["campaign_link_id","url","total_clicks","unique_clickers"],"description":"Per-link click result for a campaign."}}},"required":["campaign_id","generated_at","audience_size","delivery_counts","stop_line","engagement","links"],"description":"Campaign delivery and engagement results."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["campaigns:read"],"x-broadside-stability":"experimental"}},"/campaigns/{campaign_id}/preview":{"post":{"operationId":"campaigns.preview","tags":["Campaigns"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public campaign UUID."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"Optional markdown body override."},"use_archive_template":{"type":"boolean","default":false}},"description":"Render a campaign preview without tracking."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"}},"required":["campaign_id","subject","html","text"],"description":"Rendered campaign preview."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["campaigns:read"],"x-broadside-stability":"experimental"}},"/campaigns/{campaign_id}/test":{"post":{"operationId":"campaigns.test_send","tags":["Campaigns"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public campaign UUID."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscribers":{"type":"array","minItems":1,"items":{"type":"string","format":"email"}},"dry_run":{"type":"boolean","default":true}},"required":["subscribers"],"description":"Render or send a campaign test message."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"to":{"type":"string","format":"email"},"sent":{"type":"boolean"},"reason":{"type":"string"},"subject":{"type":"string"}},"required":["to","sent","subject"]}}},"required":["dry_run","results"],"description":"Campaign test-send result."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["campaigns:send"],"x-broadside-stability":"experimental"}},"/campaigns/{campaign_id}/status":{"post":{"operationId":"campaigns.change_status","tags":["Campaigns"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public campaign UUID."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["draft","running","scheduled","paused","cancelled"],"type":"string","description":"Campaign status that can be requested by an operator or AI client."},"dry_run":{"type":"boolean","default":true,"description":"When true, validate and return the current campaign without mutating."},"confirm":{"type":"boolean","default":false,"description":"Required for irreversible or high-impact transitions such as running/cancelled."}},"required":["status"],"description":"Change campaign status with dry-run safety."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public campaign UUID."},"name":{"type":"string","description":"Operator-facing campaign name."},"subject":{"type":"string","description":"Email subject template."},"from_email":{"type":"string","format":"email","description":"Envelope/header From address."},"body_html":{"type":"string","description":"Rendered campaign body HTML."},"body_markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Original markdown body, when available."},"altbody":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Plain-text body override."},"content_type":{"enum":["richtext","html","plain","markdown","visual"],"type":"string","description":"Stored campaign content type."},"send_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Scheduled send time, when set."},"status":{"enum":["draft","running","scheduled","paused","cancelled","finished"],"type":"string","description":"Campaign lifecycle status."},"type":{"enum":["regular","optin"],"type":"string","description":"Campaign audience mode."},"messenger":{"type":"string","description":"Sending profile or messenger alias, such as email, mailcow-smtp, or resend."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined campaign tags."},"list_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Audience list UUIDs targeted by the campaign."},"segment_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"description":"Dynamic audience segment UUIDs targeted by the campaign."},"stats":{"type":"object","properties":{"to_send":{"type":"integer","minimum":0,"maximum":9007199254740991},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"opens":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounces":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["to_send","sent","opens","clicks","bounces"],"description":"Campaign delivery and engagement counters."},"archive":{"type":"boolean","description":"Whether the campaign should be publicly archived."},"archive_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public archive slug, when enabled."},"started_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","name","subject","from_email","body_html","body_markdown","altbody","content_type","send_at","status","type","messenger","tags","list_ids","segment_ids","stats","archive","archive_slug","started_at","created_at","updated_at"],"description":"Campaign resource."},"dry_run":{"type":"boolean"},"would_start_sender":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["campaign","dry_run","would_start_sender","warnings"],"description":"Campaign status action result."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["campaigns:send"],"x-broadside-stability":"experimental"}},"/subscriber-tags":{"get":{"operationId":"subscriber_tags.list","tags":["Subscriber Tags"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"subscriber_id","in":"query","schema":{"type":"string","format":"uuid","description":"Optional subscriber UUID filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"tag","in":"query","schema":{"type":"string","minLength":1,"description":"Optional exact tag filter."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable subscriber tag UUID."},"subscriber_id":{"type":"string","format":"uuid","description":"Tagged subscriber UUID."},"tag":{"type":"string","minLength":1,"description":"Normalized subscriber tag."},"source":{"type":"string","description":"Source that applied this tag."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Adapter-specific tag metadata."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","subscriber_id","tag","source","metadata","created_at","updated_at"],"description":"Subscriber tag resource."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["tags","page_info"],"description":"List subscriber tags response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["subscriber_tags:read"],"x-broadside-stability":"experimental"}},"/subscribers/{subscriber_id}/tags":{"post":{"operationId":"subscriber_tags.add","tags":["Subscriber Tags"],"parameters":[{"name":"subscriber_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Subscriber UUID to tag."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tag":{"type":"string","minLength":1,"description":"Tag to apply."},"source":{"type":"string","minLength":1,"default":"api","description":"Source label for audit."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"required":["tag"],"description":"Add subscriber tag request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable subscriber tag UUID."},"subscriber_id":{"type":"string","format":"uuid","description":"Tagged subscriber UUID."},"tag":{"type":"string","minLength":1,"description":"Normalized subscriber tag."},"source":{"type":"string","description":"Source that applied this tag."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Adapter-specific tag metadata."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."}},"required":["id","subscriber_id","tag","source","metadata","created_at","updated_at"],"description":"Subscriber tag resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["subscriber_tags:write"],"x-broadside-stability":"experimental"}},"/subscribers/{subscriber_id}/tags/{tag}":{"delete":{"operationId":"subscriber_tags.delete","tags":["Subscriber Tags"],"parameters":[{"name":"subscriber_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Subscriber UUID."}},{"name":"tag","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Tag to remove."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"description":"Delete subscriber tag response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["subscriber_tags:write"],"x-broadside-stability":"experimental"}},"/suppressions":{"get":{"operationId":"suppressions.list","tags":["Suppressions"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"email","in":"query","schema":{"type":"string","format":"email"},"allowEmptyValue":true,"allowReserved":true},{"name":"subscriber_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"reason","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"active","in":"query","schema":{"type":"boolean","default":true},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"suppressions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable suppression UUID."},"email":{"type":"string","format":"email","description":"Suppressed email address."},"subscriber_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Linked subscriber UUID, when available."},"reason":{"type":"string","description":"Suppression reason such as hard_bounce or complaint."},"source":{"type":"string","description":"Source that created or last updated the suppression."},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source-specific reference id."},"active":{"type":"boolean","description":"Whether the suppression is currently active."},"lifted_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","email","subscriber_id","reason","source","source_ref","active","lifted_at","created_at","updated_at","metadata"],"description":"Global suppression resource."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["suppressions","page_info"],"description":"List suppressions response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["suppressions:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"suppressions.create","tags":["Suppressions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to suppress."},"subscriber_id":{"type":"string","format":"uuid","description":"Subscriber UUID to suppress."},"reason":{"type":"string","minLength":1,"default":"manual","description":"Suppression reason."},"source":{"type":"string","minLength":1,"default":"api","description":"Audit source for the suppression."},"source_ref":{"type":"string","minLength":1,"description":"Optional source reference id."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"blocklist_subscriber":{"type":"boolean","default":true,"description":"When true, linked subscribers are marked blocklisted and unsubscribed."}},"description":"Create or update an active suppression."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable suppression UUID."},"email":{"type":"string","format":"email","description":"Suppressed email address."},"subscriber_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Linked subscriber UUID, when available."},"reason":{"type":"string","description":"Suppression reason such as hard_bounce or complaint."},"source":{"type":"string","description":"Source that created or last updated the suppression."},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source-specific reference id."},"active":{"type":"boolean","description":"Whether the suppression is currently active."},"lifted_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","email","subscriber_id","reason","source","source_ref","active","lifted_at","created_at","updated_at","metadata"],"description":"Global suppression resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["suppressions:write"],"x-broadside-stability":"experimental"}},"/suppressions/cohort":{"post":{"operationId":"suppressions.suppress_cohort","tags":["Suppressions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"object","properties":{"segment_id":{"type":"string","format":"uuid","description":"Suppress all current members of this segment."},"list_id":{"type":"string","format":"uuid","description":"Suppress all current members of this list."},"subscriber_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"default":[],"description":"Explicit subscriber UUIDs to suppress."}},"description":"Cohort target for bulk suppression."},"reason":{"type":"string","minLength":1,"default":"manual","description":"Suppression reason."},"source":{"type":"string","minLength":1,"default":"api","description":"Audit source for the suppression."},"source_ref":{"type":"string","minLength":1,"description":"Optional source reference id."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"blocklist_subscriber":{"type":"boolean","default":true},"dry_run":{"type":"boolean","default":true,"description":"When true, only counts the target cohort and does not suppress."},"confirm":{"type":"boolean","default":false,"description":"Must be true when dry_run is false."},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":10000,"exclusiveMinimum":0,"default":10000,"description":"Safety ceiling for resolved cohort members."}},"required":["target"],"description":"Suppress a segment, list, or explicit subscriber cohort."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"type":"boolean"},"target_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"suppressed_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"warnings":{"type":"array","items":{"type":"string"}}},"required":["dry_run","target_count","suppressed_count","warnings"],"description":"Bulk suppression action result."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["suppressions:write"],"x-broadside-stability":"experimental"}},"/suppressions/{suppression_id}/lift":{"post":{"operationId":"suppressions.lift","tags":["Suppressions"],"parameters":[{"name":"suppression_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Suppression UUID to lift."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","minLength":1,"default":"api","description":"Audit source for the lift action."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"description":"Lift an active suppression without deleting audit history."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable suppression UUID."},"email":{"type":"string","format":"email","description":"Suppressed email address."},"subscriber_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Linked subscriber UUID, when available."},"reason":{"type":"string","description":"Suppression reason such as hard_bounce or complaint."},"source":{"type":"string","description":"Source that created or last updated the suppression."},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source-specific reference id."},"active":{"type":"boolean","description":"Whether the suppression is currently active."},"lifted_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","email","subscriber_id","reason","source","source_ref","active","lifted_at","created_at","updated_at","metadata"],"description":"Global suppression resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["suppressions:write"],"x-broadside-stability":"experimental"}},"/migration/listmonk/import":{"post":{"operationId":"migration.listmonk.import","tags":["Migration"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"string","minLength":1,"description":"Raw listmonk subscriber export as JSON or CSV."},"format":{"enum":["auto","json","csv"],"type":"string","description":"Payload parser mode. Auto detects JSON by leading `{` or `[`; otherwise CSV.","default":"auto"},"dry_run":{"type":"boolean","default":true,"description":"When true, returns a reconciliation report without writing data."},"overwrite":{"type":"boolean","default":false,"description":"When true, existing Broadside subscribers are updated from listmonk rows."},"create_missing_lists":{"type":"boolean","default":false,"description":"When true, named listmonk lists without mappings are created as Broadside lists."},"default_list_id":{"type":"string","format":"uuid","description":"Broadside list UUID for flat CSV exports."},"source":{"type":"string","default":"listmonk-import","description":"Audit source for suppressions."},"list_mappings":{"type":"array","items":{"type":"object","properties":{"listmonk_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"listmonk_uuid":{"type":"string"},"listmonk_name":{"type":"string"},"broadside_list_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."}},"required":["broadside_list_id"],"description":"Maps a listmonk list identifier to an existing Broadside list UUID."},"default":[]}},"required":["payload"],"description":"Import listmonk subscribers with dry-run reconciliation."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dry_run":{"type":"boolean"},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"valid":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalid":{"type":"integer","minimum":0,"maximum":9007199254740991},"inserted":{"type":"integer","minimum":0,"maximum":9007199254740991},"updated":{"type":"integer","minimum":0,"maximum":9007199254740991},"unchanged":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":0,"maximum":9007199254740991},"lists_created":{"type":"integer","minimum":0,"maximum":9007199254740991},"lists_reused":{"type":"integer","minimum":0,"maximum":9007199254740991},"memberships_upserted":{"type":"integer","minimum":0,"maximum":9007199254740991},"suppressions_created":{"type":"integer","minimum":0,"maximum":9007199254740991},"suppressions_updated":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsubscribed_memberships":{"type":"integer","minimum":0,"maximum":9007199254740991},"status_counts":{"type":"object","propertyNames":{"enum":["enabled","disabled","blocklisted"],"type":"string"},"additionalProperties":{"type":"number"}},"subscription_status_counts":{"type":"object","propertyNames":{"enum":["confirmed","unconfirmed","unsubscribed"],"type":"string"},"additionalProperties":{"type":"number"}},"unmapped_lists":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["dry_run","total","valid","invalid","inserted","updated","unchanged","skipped","lists_created","lists_reused","memberships_upserted","suppressions_created","suppressions_updated","unsubscribed_memberships","status_counts","subscription_status_counts","unmapped_lists","errors","warnings"],"description":"Listmonk import reconciliation report."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["subscribers:import"],"x-broadside-stability":"experimental"}},"/issue-drafts":{"get":{"operationId":"issue_drafts.list","tags":["Issue Drafts"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["generating","reviewing","approved","converted","archived"],"type":"string","description":"Optional issue draft status filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"run_id","in":"query","schema":{"type":"string","format":"uuid","description":"Optional issue draft run UUID filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"list_id","in":"query","schema":{"type":"string","format":"uuid","description":"Optional newsletter list UUID filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"newsletter_key","in":"query","schema":{"type":"string","description":"Optional newsletter key filter."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"issue_drafts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public issue draft UUID."},"run_id":{"type":"string","format":"uuid","description":"Issue draft run UUID."},"list_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Newsletter list UUID targeted by this draft."},"newsletter_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Newsletter key targeted by this draft."},"status":{"enum":["generating","reviewing","approved","converted","archived"],"type":"string","description":"Issue draft workflow status."},"title":{"type":"string","minLength":1,"description":"Issue draft title."},"body_snapshot":{"type":"string","description":"Markdown body snapshot generated for review."},"render_artifact_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Rendered artifact UUID, if available."},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Campaign UUID created from this draft, if any."},"items":{"type":"array","items":{"type":"object","properties":{"input_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Opaque input item id represented by this item."},"section":{"type":"string","minLength":1,"description":"Issue section key."},"rank":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Rank within the issue draft."},"position":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Display position within the issue draft."},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Score used for ranking, if available."},"title":{"type":"string","minLength":1,"description":"Item title."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Canonical item URL, if available."},"snapshot":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Item snapshot captured when the issue draft was assembled."}},"required":["input_item_id","section","rank","position","score","title","url","snapshot"],"description":"Issue draft item resource."},"description":"Issue draft content items."},"created_at":{"type":"string","format":"date-time","description":"Issue draft creation timestamp."},"updated_at":{"type":"string","format":"date-time","description":"Issue draft update timestamp."}},"required":["id","run_id","list_id","newsletter_key","status","title","body_snapshot","render_artifact_id","campaign_id","items","created_at","updated_at"],"description":"Issue draft resource."},"description":"Issue drafts on this page."},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["issue_drafts","page_info"],"description":"List issue drafts response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["issue_drafts:read"],"x-broadside-stability":"experimental"}},"/issue-drafts/{issue_draft_id}":{"get":{"operationId":"issue_drafts.get","tags":["Issue Drafts"],"parameters":[{"name":"issue_draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public issue draft UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public issue draft UUID."},"run_id":{"type":"string","format":"uuid","description":"Issue draft run UUID."},"list_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Newsletter list UUID targeted by this draft."},"newsletter_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Newsletter key targeted by this draft."},"status":{"enum":["generating","reviewing","approved","converted","archived"],"type":"string","description":"Issue draft workflow status."},"title":{"type":"string","minLength":1,"description":"Issue draft title."},"body_snapshot":{"type":"string","description":"Markdown body snapshot generated for review."},"render_artifact_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Rendered artifact UUID, if available."},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Campaign UUID created from this draft, if any."},"items":{"type":"array","items":{"type":"object","properties":{"input_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Opaque input item id represented by this item."},"section":{"type":"string","minLength":1,"description":"Issue section key."},"rank":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Rank within the issue draft."},"position":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Display position within the issue draft."},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Score used for ranking, if available."},"title":{"type":"string","minLength":1,"description":"Item title."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Canonical item URL, if available."},"snapshot":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Item snapshot captured when the issue draft was assembled."}},"required":["input_item_id","section","rank","position","score","title","url","snapshot"],"description":"Issue draft item resource."},"description":"Issue draft content items."},"created_at":{"type":"string","format":"date-time","description":"Issue draft creation timestamp."},"updated_at":{"type":"string","format":"date-time","description":"Issue draft update timestamp."}},"required":["id","run_id","list_id","newsletter_key","status","title","body_snapshot","render_artifact_id","campaign_id","items","created_at","updated_at"],"description":"Issue draft resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["issue_drafts:read"],"x-broadside-stability":"experimental"}},"/issue-drafts/{issue_draft_id}/approve":{"post":{"operationId":"issue_drafts.approve","tags":["Issue Drafts"],"parameters":[{"name":"issue_draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public issue draft UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public issue draft UUID."},"run_id":{"type":"string","format":"uuid","description":"Issue draft run UUID."},"list_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Newsletter list UUID targeted by this draft."},"newsletter_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Newsletter key targeted by this draft."},"status":{"enum":["generating","reviewing","approved","converted","archived"],"type":"string","description":"Issue draft workflow status."},"title":{"type":"string","minLength":1,"description":"Issue draft title."},"body_snapshot":{"type":"string","description":"Markdown body snapshot generated for review."},"render_artifact_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Rendered artifact UUID, if available."},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Campaign UUID created from this draft, if any."},"items":{"type":"array","items":{"type":"object","properties":{"input_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Opaque input item id represented by this item."},"section":{"type":"string","minLength":1,"description":"Issue section key."},"rank":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Rank within the issue draft."},"position":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Display position within the issue draft."},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Score used for ranking, if available."},"title":{"type":"string","minLength":1,"description":"Item title."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Canonical item URL, if available."},"snapshot":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Item snapshot captured when the issue draft was assembled."}},"required":["input_item_id","section","rank","position","score","title","url","snapshot"],"description":"Issue draft item resource."},"description":"Issue draft content items."},"created_at":{"type":"string","format":"date-time","description":"Issue draft creation timestamp."},"updated_at":{"type":"string","format":"date-time","description":"Issue draft update timestamp."}},"required":["id","run_id","list_id","newsletter_key","status","title","body_snapshot","render_artifact_id","campaign_id","items","created_at","updated_at"],"description":"Issue draft resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["issue_drafts:write"],"x-broadside-stability":"experimental"}},"/issue-drafts/{issue_draft_id}/archive":{"post":{"operationId":"issue_drafts.archive","tags":["Issue Drafts"],"parameters":[{"name":"issue_draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public issue draft UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public issue draft UUID."},"run_id":{"type":"string","format":"uuid","description":"Issue draft run UUID."},"list_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Newsletter list UUID targeted by this draft."},"newsletter_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Newsletter key targeted by this draft."},"status":{"enum":["generating","reviewing","approved","converted","archived"],"type":"string","description":"Issue draft workflow status."},"title":{"type":"string","minLength":1,"description":"Issue draft title."},"body_snapshot":{"type":"string","description":"Markdown body snapshot generated for review."},"render_artifact_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Rendered artifact UUID, if available."},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Campaign UUID created from this draft, if any."},"items":{"type":"array","items":{"type":"object","properties":{"input_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Opaque input item id represented by this item."},"section":{"type":"string","minLength":1,"description":"Issue section key."},"rank":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Rank within the issue draft."},"position":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Display position within the issue draft."},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Score used for ranking, if available."},"title":{"type":"string","minLength":1,"description":"Item title."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Canonical item URL, if available."},"snapshot":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Item snapshot captured when the issue draft was assembled."}},"required":["input_item_id","section","rank","position","score","title","url","snapshot"],"description":"Issue draft item resource."},"description":"Issue draft content items."},"created_at":{"type":"string","format":"date-time","description":"Issue draft creation timestamp."},"updated_at":{"type":"string","format":"date-time","description":"Issue draft update timestamp."}},"required":["id","run_id","list_id","newsletter_key","status","title","body_snapshot","render_artifact_id","campaign_id","items","created_at","updated_at"],"description":"Issue draft resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["issue_drafts:write"],"x-broadside-stability":"experimental"}},"/issue-drafts/{issue_draft_id}/convert":{"post":{"operationId":"issue_drafts.convert","tags":["Issue Drafts"],"parameters":[{"name":"issue_draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public issue draft UUID."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"from_email":{"type":"string","format":"email","description":"Sender email for the generated campaign."},"messenger":{"type":"string","minLength":1,"description":"Campaign messenger key."},"subject":{"type":"string","minLength":1,"description":"Campaign subject override."},"template_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}],"description":"Campaign template id."},"tags":{"type":"array","items":{"type":"string","minLength":1},"description":"Additional campaign tags."},"send_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Optional campaign send time."},"archive":{"type":"boolean","description":"Whether to publish an archive for the campaign."},"archive_slug":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Archive slug override."},"archive_template_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}],"description":"Archive template id."},"archive_meta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Additional archive metadata."}},"description":"Convert issue draft request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"issue_draft":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public issue draft UUID."},"run_id":{"type":"string","format":"uuid","description":"Issue draft run UUID."},"list_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Newsletter list UUID targeted by this draft."},"newsletter_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Newsletter key targeted by this draft."},"status":{"enum":["generating","reviewing","approved","converted","archived"],"type":"string","description":"Issue draft workflow status."},"title":{"type":"string","minLength":1,"description":"Issue draft title."},"body_snapshot":{"type":"string","description":"Markdown body snapshot generated for review."},"render_artifact_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Rendered artifact UUID, if available."},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Campaign UUID created from this draft, if any."},"items":{"type":"array","items":{"type":"object","properties":{"input_item_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Opaque input item id represented by this item."},"section":{"type":"string","minLength":1,"description":"Issue section key."},"rank":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Rank within the issue draft."},"position":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Display position within the issue draft."},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Score used for ranking, if available."},"title":{"type":"string","minLength":1,"description":"Item title."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Canonical item URL, if available."},"snapshot":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Item snapshot captured when the issue draft was assembled."}},"required":["input_item_id","section","rank","position","score","title","url","snapshot"],"description":"Issue draft item resource."},"description":"Issue draft content items."},"created_at":{"type":"string","format":"date-time","description":"Issue draft creation timestamp."},"updated_at":{"type":"string","format":"date-time","description":"Issue draft update timestamp."}},"required":["id","run_id","list_id","newsletter_key","status","title","body_snapshot","render_artifact_id","campaign_id","items","created_at","updated_at"],"description":"Updated issue draft resource."},"campaign_id":{"type":"string","format":"uuid","description":"Public campaign UUID created or linked to this draft."}},"required":["issue_draft","campaign_id"],"description":"Convert issue draft response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["issue_drafts:write"],"x-broadside-stability":"experimental"}},"/sponsors":{"get":{"operationId":"sponsors.list","tags":["Sponsors"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","schema":{"type":"string","description":"Optional sponsor name or website search query."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["lead","active","paused","archived"],"type":"string","description":"Optional sponsor status filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"contract_status","in":"query","schema":{"enum":["none","negotiating","signed","expired"],"type":"string","description":"Optional contract status filter."},"allowEmptyValue":true,"allowReserved":true},{"name":"tag","in":"query","schema":{"type":"string","description":"Optional sponsor tag filter."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sponsors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sponsor UUID."},"name":{"type":"string","minLength":1,"description":"Sponsor company or organization name."},"website_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Sponsor website URL."},"status":{"enum":["lead","active","paused","archived"],"type":"string","description":"Sponsor lifecycle status."},"contract_status":{"enum":["none","negotiating","signed","expired"],"type":"string","description":"Sponsor contract status."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined sponsor tags."},"rate_card":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Sponsor rate card metadata."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private sponsor notes."},"contact_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of contacts on file."},"creative_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of creatives on file."},"created_at":{"type":"string","format":"date-time","description":"Sponsor creation timestamp."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Sponsor update timestamp, if available."}},"required":["id","name","website_url","status","contract_status","tags","rate_card","notes","contact_count","creative_count","created_at","updated_at"],"description":"Sponsor resource."},"description":"Sponsors on this page."},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["sponsors","page_info"],"description":"List sponsors response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["sponsors:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"sponsors.create","tags":["Sponsors"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"website_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"default":null},"status":{"enum":["lead","active","paused","archived"],"type":"string","description":"Sponsor lifecycle status.","default":"lead"},"contract_status":{"enum":["none","negotiating","signed","expired"],"type":"string","description":"Sponsor contract status.","default":"none"},"tags":{"type":"array","items":{"type":"string"},"default":[]},"rate_card":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null}},"required":["name"],"description":"Create sponsor request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sponsor UUID."},"name":{"type":"string","minLength":1,"description":"Sponsor company or organization name."},"website_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Sponsor website URL."},"status":{"enum":["lead","active","paused","archived"],"type":"string","description":"Sponsor lifecycle status."},"contract_status":{"enum":["none","negotiating","signed","expired"],"type":"string","description":"Sponsor contract status."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined sponsor tags."},"rate_card":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Sponsor rate card metadata."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private sponsor notes."},"contact_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of contacts on file."},"creative_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of creatives on file."},"created_at":{"type":"string","format":"date-time","description":"Sponsor creation timestamp."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Sponsor update timestamp, if available."}},"required":["id","name","website_url","status","contract_status","tags","rate_card","notes","contact_count","creative_count","created_at","updated_at"],"description":"Sponsor resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["sponsors:write"],"x-broadside-stability":"experimental"}},"/sponsors/{sponsor_id}":{"get":{"operationId":"sponsors.get","tags":["Sponsors"],"parameters":[{"name":"sponsor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public sponsor UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sponsor UUID."},"name":{"type":"string","minLength":1,"description":"Sponsor company or organization name."},"website_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Sponsor website URL."},"status":{"enum":["lead","active","paused","archived"],"type":"string","description":"Sponsor lifecycle status."},"contract_status":{"enum":["none","negotiating","signed","expired"],"type":"string","description":"Sponsor contract status."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined sponsor tags."},"rate_card":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Sponsor rate card metadata."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private sponsor notes."},"contact_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of contacts on file."},"creative_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of creatives on file."},"created_at":{"type":"string","format":"date-time","description":"Sponsor creation timestamp."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Sponsor update timestamp, if available."}},"required":["id","name","website_url","status","contract_status","tags","rate_card","notes","contact_count","creative_count","created_at","updated_at"],"description":"Sponsor resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["sponsors:read"],"x-broadside-stability":"experimental"},"patch":{"operationId":"sponsors.update","tags":["Sponsors"],"parameters":[{"name":"sponsor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public sponsor UUID."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"website_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"status":{"enum":["lead","active","paused","archived"],"type":"string","description":"Sponsor lifecycle status."},"contract_status":{"enum":["none","negotiating","signed","expired"],"type":"string","description":"Sponsor contract status."},"tags":{"type":"array","items":{"type":"string"}},"rate_card":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]}},"description":"Update sponsor request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sponsor UUID."},"name":{"type":"string","minLength":1,"description":"Sponsor company or organization name."},"website_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Sponsor website URL."},"status":{"enum":["lead","active","paused","archived"],"type":"string","description":"Sponsor lifecycle status."},"contract_status":{"enum":["none","negotiating","signed","expired"],"type":"string","description":"Sponsor contract status."},"tags":{"type":"array","items":{"type":"string"},"description":"Operator-defined sponsor tags."},"rate_card":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Sponsor rate card metadata."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private sponsor notes."},"contact_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of contacts on file."},"creative_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of creatives on file."},"created_at":{"type":"string","format":"date-time","description":"Sponsor creation timestamp."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Sponsor update timestamp, if available."}},"required":["id","name","website_url","status","contract_status","tags","rate_card","notes","contact_count","creative_count","created_at","updated_at"],"description":"Sponsor resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["sponsors:write"],"x-broadside-stability":"experimental"},"delete":{"operationId":"sponsors.delete","tags":["Sponsors"],"parameters":[{"name":"sponsor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public sponsor UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"description":"Delete sponsor response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["sponsors:write"],"x-broadside-stability":"experimental"}},"/sponsor-creatives":{"get":{"operationId":"sponsors.creatives.list","tags":["Sponsors"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"sponsor_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["draft","active","archived"],"type":"string","description":"Sponsor creative lifecycle status."},"allowEmptyValue":true,"allowReserved":true},{"name":"type","in":"query","schema":{"enum":["native","image","host_read","html"],"type":"string","description":"Sponsor creative type."},"allowEmptyValue":true,"allowReserved":true},{"name":"tag","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"creatives":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public creative UUID."},"sponsor_id":{"type":"string","format":"uuid","description":"Public sponsor UUID."},"title":{"type":"string","minLength":1},"type":{"enum":["native","image","host_read","html"],"type":"string","description":"Sponsor creative type."},"status":{"enum":["draft","active","archived"],"type":"string","description":"Sponsor creative lifecycle status."},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"cta_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"target_url":{"type":"string","format":"uri"},"host_read_script":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","sponsor_id","title","type","status","body","cta_text","target_url","host_read_script","tags","metadata","created_at","updated_at"],"description":"Sponsor creative resource."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["creatives","page_info"],"description":"List sponsor creatives response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["sponsors:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"sponsors.creatives.create","tags":["Sponsors"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sponsor_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"title":{"type":"string","minLength":1},"type":{"enum":["native","image","host_read","html"],"type":"string","description":"Sponsor creative type.","default":"native"},"status":{"enum":["draft","active","archived"],"type":"string","description":"Sponsor creative lifecycle status.","default":"draft"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"cta_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"target_url":{"type":"string","format":"uri"},"host_read_script":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"tags":{"type":"array","items":{"type":"string"},"default":[]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"required":["sponsor_id","title","target_url"],"description":"Create sponsor creative request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public creative UUID."},"sponsor_id":{"type":"string","format":"uuid","description":"Public sponsor UUID."},"title":{"type":"string","minLength":1},"type":{"enum":["native","image","host_read","html"],"type":"string","description":"Sponsor creative type."},"status":{"enum":["draft","active","archived"],"type":"string","description":"Sponsor creative lifecycle status."},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"cta_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"target_url":{"type":"string","format":"uri"},"host_read_script":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","sponsor_id","title","type","status","body","cta_text","target_url","host_read_script","tags","metadata","created_at","updated_at"],"description":"Sponsor creative resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["sponsors:write"],"x-broadside-stability":"experimental"}},"/sponsor-creatives/{creative_id}":{"patch":{"operationId":"sponsors.creatives.update","tags":["Sponsors"],"parameters":[{"name":"creative_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"type":{"enum":["native","image","host_read","html"],"type":"string","description":"Sponsor creative type."},"status":{"enum":["draft","active","archived"],"type":"string","description":"Sponsor creative lifecycle status."},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"cta_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"target_url":{"type":"string","format":"uri"},"host_read_script":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"description":"Update sponsor creative request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public creative UUID."},"sponsor_id":{"type":"string","format":"uuid","description":"Public sponsor UUID."},"title":{"type":"string","minLength":1},"type":{"enum":["native","image","host_read","html"],"type":"string","description":"Sponsor creative type."},"status":{"enum":["draft","active","archived"],"type":"string","description":"Sponsor creative lifecycle status."},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"cta_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"target_url":{"type":"string","format":"uri"},"host_read_script":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","sponsor_id","title","type","status","body","cta_text","target_url","host_read_script","tags","metadata","created_at","updated_at"],"description":"Sponsor creative resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["sponsors:write"],"x-broadside-stability":"experimental"}},"/sponsor-ad-slots":{"get":{"operationId":"sponsors.ad_slots.list","tags":["Sponsors"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["active","paused","archived"],"type":"string","description":"Ad slot lifecycle status."},"allowEmptyValue":true,"allowReserved":true},{"name":"kind","in":"query","schema":{"enum":["primary","secondary","sponsored_link","classified"],"type":"string","description":"Ad slot placement kind."},"allowEmptyValue":true,"allowReserved":true},{"name":"list_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ad_slots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public ad slot UUID."},"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"kind":{"enum":["primary","secondary","sponsored_link","classified"],"type":"string","description":"Ad slot placement kind."},"status":{"enum":["active","paused","archived"],"type":"string","description":"Ad slot lifecycle status."},"list_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Optional newsletter list UUID."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"default_price_cents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","key","name","kind","status","list_id","position","default_price_cents","constraints","created_at","updated_at"],"description":"Ad slot resource."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["ad_slots","page_info"],"description":"List ad slots response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["sponsors:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"sponsors.ad_slots.create","tags":["Sponsors"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"kind":{"enum":["primary","secondary","sponsored_link","classified"],"type":"string","description":"Ad slot placement kind."},"status":{"enum":["active","paused","archived"],"type":"string","description":"Ad slot lifecycle status.","default":"active"},"list_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"default":null},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"default_price_cents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"default":null},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}}},"required":["key","name","kind","position"],"description":"Create ad slot request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public ad slot UUID."},"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"kind":{"enum":["primary","secondary","sponsored_link","classified"],"type":"string","description":"Ad slot placement kind."},"status":{"enum":["active","paused","archived"],"type":"string","description":"Ad slot lifecycle status."},"list_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Optional newsletter list UUID."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"default_price_cents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"constraints":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","key","name","kind","status","list_id","position","default_price_cents","constraints","created_at","updated_at"],"description":"Ad slot resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["sponsors:write"],"x-broadside-stability":"experimental"}},"/sponsor-placements":{"get":{"operationId":"sponsors.placements.list","tags":["Sponsors"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"sponsor_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"campaign_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"issue_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["held","booked","placed","cancelled","completed"],"type":"string","description":"Sponsor placement lifecycle status."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"placements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sponsor placement UUID."},"sponsor_id":{"type":"string","format":"uuid","description":"Public sponsor UUID."},"sponsor_name":{"type":"string","minLength":1},"creative_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"creative_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ad_slot_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"ad_slot_key":{"type":"string"},"ad_slot_name":{"type":"string"},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"issue_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"issue_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","placed","cancelled","completed"],"type":"string","description":"Sponsor placement lifecycle status."},"source":{"enum":["manual","ai"],"type":"string","description":"Sponsor placement creation source."},"agreed_price_cents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"booked_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"placed_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"impressions":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenue_cents":{"type":"integer","minimum":0,"maximum":9007199254740991},"tracked_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"campaign_link_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","sponsor_id","sponsor_name","creative_id","creative_title","ad_slot_id","ad_slot_key","ad_slot_name","campaign_id","campaign_name","issue_id","issue_title","status","source","agreed_price_cents","booked_at","placed_at","impressions","clicks","revenue_cents","tracked_url","campaign_link_id","metadata","created_at","updated_at"],"description":"Sponsor placement resource with sponsor-ready metrics."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["placements","page_info"],"description":"List sponsor placements response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["sponsors:read"],"x-broadside-stability":"experimental"},"post":{"operationId":"sponsors.placements.create","tags":["Sponsors"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sponsor_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"ad_slot_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"creative_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"default":null},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"default":null},"issue_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"default":null},"status":{"enum":["held","booked","placed","cancelled","completed"],"type":"string","description":"Sponsor placement lifecycle status.","default":"held"},"source":{"enum":["manual","ai"],"type":"string","description":"Sponsor placement creation source.","default":"ai"},"agreed_price_cents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"default":null},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"default":{}},"tracked_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"default":null},"anchor_text":{"type":"string","minLength":1},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["sponsor_id","ad_slot_id"],"description":"Create sponsor placement request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sponsor placement UUID."},"sponsor_id":{"type":"string","format":"uuid","description":"Public sponsor UUID."},"sponsor_name":{"type":"string","minLength":1},"creative_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"creative_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ad_slot_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"ad_slot_key":{"type":"string"},"ad_slot_name":{"type":"string"},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"issue_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"issue_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","placed","cancelled","completed"],"type":"string","description":"Sponsor placement lifecycle status."},"source":{"enum":["manual","ai"],"type":"string","description":"Sponsor placement creation source."},"agreed_price_cents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"booked_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"placed_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"impressions":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenue_cents":{"type":"integer","minimum":0,"maximum":9007199254740991},"tracked_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"campaign_link_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","sponsor_id","sponsor_name","creative_id","creative_title","ad_slot_id","ad_slot_key","ad_slot_name","campaign_id","campaign_name","issue_id","issue_title","status","source","agreed_price_cents","booked_at","placed_at","impressions","clicks","revenue_cents","tracked_url","campaign_link_id","metadata","created_at","updated_at"],"description":"Sponsor placement resource with sponsor-ready metrics."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["sponsors:write"],"x-broadside-stability":"experimental"}},"/sponsor-placements/{placement_id}":{"patch":{"operationId":"sponsors.placements.update","tags":["Sponsors"],"parameters":[{"name":"placement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"creative_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"issue_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"status":{"enum":["held","booked","placed","cancelled","completed"],"type":"string","description":"Sponsor placement lifecycle status."},"agreed_price_cents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"tracked_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"anchor_text":{"type":"string","minLength":1},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"description":"Update sponsor placement request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public sponsor placement UUID."},"sponsor_id":{"type":"string","format":"uuid","description":"Public sponsor UUID."},"sponsor_name":{"type":"string","minLength":1},"creative_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"creative_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"ad_slot_id":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"ad_slot_key":{"type":"string"},"ad_slot_name":{"type":"string"},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"campaign_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"issue_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"issue_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["held","booked","placed","cancelled","completed"],"type":"string","description":"Sponsor placement lifecycle status."},"source":{"enum":["manual","ai"],"type":"string","description":"Sponsor placement creation source."},"agreed_price_cents":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"booked_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"placed_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]},"impressions":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenue_cents":{"type":"integer","minimum":0,"maximum":9007199254740991},"tracked_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"campaign_link_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"updated_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}]}},"required":["id","sponsor_id","sponsor_name","creative_id","creative_title","ad_slot_id","ad_slot_key","ad_slot_name","campaign_id","campaign_name","issue_id","issue_title","status","source","agreed_price_cents","booked_at","placed_at","impressions","clicks","revenue_cents","tracked_url","campaign_link_id","metadata","created_at","updated_at"],"description":"Sponsor placement resource with sponsor-ready metrics."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["sponsors:write"],"x-broadside-stability":"experimental"}},"/engagement/report-exports":{"post":{"operationId":"engagement_report_exports.create","tags":["Engagement Report Exports"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"report_type":{"enum":["overview","campaign_links","sponsor_placements","subscriber_tiers"],"type":"string","description":"Engagement report type to export.","default":"sponsor_placements"},"format":{"enum":["csv","json"],"type":"string","description":"Export file format.","default":"csv"},"filters":{"type":"object","properties":{"sponsor_id":{"type":"string","format":"uuid","description":"Optional sponsor UUID filter."},"issue_id":{"type":"string","format":"uuid","description":"Optional issue draft UUID filter."},"campaign_id":{"type":"string","format":"uuid","description":"Optional campaign UUID filter."},"list_id":{"type":"string","format":"uuid","description":"Optional newsletter list UUID filter."},"start_at":{"type":"string","format":"date-time","description":"Optional inclusive event timestamp start."},"end_at":{"type":"string","format":"date-time","description":"Optional exclusive event timestamp end."}},"description":"Report filters.","default":{}},"include_raw_events":{"type":"boolean","default":false,"description":"Whether to include raw event rows in the export."}},"description":"Create engagement report export request."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public engagement report export UUID."},"report_type":{"enum":["overview","campaign_links","sponsor_placements","subscriber_tiers"],"type":"string","description":"Engagement report type."},"format":{"enum":["csv","json"],"type":"string","description":"Engagement report export format."},"status":{"enum":["queued","running","completed","failed"],"type":"string","description":"Engagement report export status."},"filters":{"type":"object","properties":{"sponsor_id":{"type":"string","format":"uuid","description":"Optional sponsor UUID filter."},"issue_id":{"type":"string","format":"uuid","description":"Optional issue draft UUID filter."},"campaign_id":{"type":"string","format":"uuid","description":"Optional campaign UUID filter."},"list_id":{"type":"string","format":"uuid","description":"Optional newsletter list UUID filter."},"start_at":{"type":"string","format":"date-time","description":"Optional inclusive event timestamp start."},"end_at":{"type":"string","format":"date-time","description":"Optional exclusive event timestamp end."}},"description":"Engagement report export filters."},"include_raw_events":{"type":"boolean","description":"Whether raw event rows are included in the export."},"download_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Temporary download URL, if ready."},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export content type, if ready."},"byte_size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Export size in bytes, if ready."},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Download URL expiration timestamp, if any."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export error message, if failed."},"created_at":{"type":"string","format":"date-time","description":"Export creation timestamp."},"completed_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Export completion timestamp, if complete."}},"required":["id","report_type","format","status","filters","include_raw_events","download_url","content_type","byte_size","expires_at","error","created_at","completed_at"],"description":"Engagement report export resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["engagement_report_exports:write"],"x-broadside-stability":"experimental"}},"/engagement/report-exports/{export_id}":{"get":{"operationId":"engagement_report_exports.get","tags":["Engagement Report Exports"],"parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Public engagement report export UUID."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public engagement report export UUID."},"report_type":{"enum":["overview","campaign_links","sponsor_placements","subscriber_tiers"],"type":"string","description":"Engagement report type."},"format":{"enum":["csv","json"],"type":"string","description":"Engagement report export format."},"status":{"enum":["queued","running","completed","failed"],"type":"string","description":"Engagement report export status."},"filters":{"type":"object","properties":{"sponsor_id":{"type":"string","format":"uuid","description":"Optional sponsor UUID filter."},"issue_id":{"type":"string","format":"uuid","description":"Optional issue draft UUID filter."},"campaign_id":{"type":"string","format":"uuid","description":"Optional campaign UUID filter."},"list_id":{"type":"string","format":"uuid","description":"Optional newsletter list UUID filter."},"start_at":{"type":"string","format":"date-time","description":"Optional inclusive event timestamp start."},"end_at":{"type":"string","format":"date-time","description":"Optional exclusive event timestamp end."}},"description":"Engagement report export filters."},"include_raw_events":{"type":"boolean","description":"Whether raw event rows are included in the export."},"download_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Temporary download URL, if ready."},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export content type, if ready."},"byte_size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Export size in bytes, if ready."},"expires_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Download URL expiration timestamp, if any."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export error message, if failed."},"created_at":{"type":"string","format":"date-time","description":"Export creation timestamp."},"completed_at":{"anyOf":[{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},{"type":"null"}],"description":"Export completion timestamp, if complete."}},"required":["id","report_type","format","status","filters","include_raw_events","download_url","content_type","byte_size","expires_at","error","created_at","completed_at"],"description":"Engagement report export resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["engagement_report_exports:read"],"x-broadside-stability":"experimental"}},"/delivery/events":{"get":{"operationId":"delivery.events.list","tags":["Delivery"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"event_type","in":"query","schema":{"enum":["accepted","queued","scanned","sent","delivered","deferred","bounced","complained","opened","clicked","rejected","bounce_generated","delivered_local","auth","unknown"],"type":"string","description":"Normalized delivery event type."},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"source_provider","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"recipient_domain","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"campaign_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"subscriber_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","schema":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"allowEmptyValue":true,"allowReserved":true},{"name":"until","in":"query","schema":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"Stable numeric event id."},"event_id":{"type":"string","format":"uuid","description":"Stable event UUID."},"message_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Broadside delivery message UUID, when linked."},"campaign_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Campaign UUID, when linked."},"subscriber_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Subscriber UUID, when linked."},"source_provider":{"type":"string","description":"Normalized source provider such as postfix or rspamd."},"source_kind":{"type":"string","description":"Source kind such as mta_log or webhook."},"transport":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transport such as smtp or resend_api."},"event_type":{"enum":["accepted","queued","scanned","sent","delivered","deferred","bounced","complained","opened","clicked","rejected","bounce_generated","delivered_local","auth","unknown"],"type":"string","description":"Normalized delivery event type."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider-specific status, normalized where possible."},"queue_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"MTA queue id, when present."},"message_header_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RFC Message-ID header, when present."},"envelope_sender":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"SMTP envelope sender, when known."},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Recipient email, when scope allows raw recipient data."},"recipient_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Recipient domain."},"relay":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Remote relay/MX host, when present."},"smtp_code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"SMTP response code family or code."},"dsn_code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"DSN status code."},"delay_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"MTA-reported delivery delay in seconds."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Normalized reason classification."},"response":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Raw provider response, redacted by policy in callers."},"occurred_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Adapter-specific structured metadata."}},"required":["id","event_id","message_id","campaign_id","subscriber_id","source_provider","source_kind","transport","event_type","status","queue_id","message_header_id","envelope_sender","recipient","recipient_domain","relay","smtp_code","dsn_code","delay_seconds","reason","response","occurred_at","created_at","metadata"],"description":"A normalized email delivery telemetry event."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["events","page_info"],"description":"Paginated delivery events."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["delivery:read"],"x-broadside-stability":"experimental"}},"/delivery/summary":{"get":{"operationId":"delivery.summary","tags":["Delivery"],"parameters":[{"name":"recipient_domain","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"source_provider","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"campaign_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","schema":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"allowEmptyValue":true,"allowReserved":true},{"name":"until","in":"query","schema":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"total_events":{"type":"integer","minimum":0,"maximum":9007199254740991},"status_counts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","count"]}},"event_type_counts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","count"]}},"dsn_counts":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","count"]}},"domain_counts":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"sent":{"type":"integer","minimum":0,"maximum":9007199254740991},"deferred":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounced":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejected":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["domain","sent","deferred","bounced","rejected","total"]}}},"required":["total_events","status_counts","event_type_counts","dsn_counts","domain_counts"],"description":"Aggregated delivery telemetry counts."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["delivery:read"],"x-broadside-stability":"experimental"}},"/commerce/purchase-events":{"get":{"operationId":"commerce.purchase_events.list","tags":["Commerce"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","description":"Opaque cursor returned by a previous page."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of records to return."},"allowEmptyValue":true,"allowReserved":true},{"name":"provider","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"product_key","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"subscriber_id","in":"query","schema":{"type":"string","format":"uuid","description":"Stable UUID identifier."},"allowEmptyValue":true,"allowReserved":true},{"name":"email","in":"query","schema":{"type":"string","format":"email"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"purchase_events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable purchase event UUID."},"provider":{"type":"string","description":"Commerce provider, for example stripe."},"provider_event_id":{"type":"string","description":"Provider event id."},"subscriber_id":{"anyOf":[{"type":"string","format":"uuid","description":"Stable UUID identifier."},{"type":"null"}],"description":"Matched subscriber UUID, when available."},"email":{"type":"string","format":"email","description":"Buyer email."},"product_key":{"type":"string","description":"Internal product/course key."},"provider_product_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider_price_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount_total_cents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"Provider-normalized status such as completed or refunded."},"occurred_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","provider","provider_event_id","subscriber_id","email","product_key","provider_product_id","provider_price_id","amount_total_cents","currency","status","occurred_at","created_at","metadata"],"description":"Commerce purchase/conversion event."}},"page_info":{"type":"object","properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or null at the end."},"has_more":{"type":"boolean","description":"Whether another page is available."}},"required":["next_cursor","has_more"],"description":"Cursor pagination metadata."}},"required":["purchase_events","page_info"],"description":"List purchase events response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["commerce:read"],"x-broadside-stability":"experimental"}},"/commerce/funnel-report":{"get":{"operationId":"commerce.funnel_report","tags":["Commerce"],"parameters":[{"name":"product_key","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"source","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"landing","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","schema":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"allowEmptyValue":true,"allowReserved":true},{"name":"until","in":"query","schema":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"allowEmptyValue":true,"allowReserved":true},{"name":"group_by","in":"query","schema":{"enum":["source","landing","campaign","medium","product_key"],"type":"string","description":"Funnel report grouping dimension.","default":"source"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"generated_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp with timezone offset."},"group_by":{"enum":["source","landing","campaign","medium","product_key"],"type":"string","description":"Funnel report grouping dimension."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"totals":{"type":"object","properties":{"key":{"type":"string"},"subscribers":{"type":"integer","minimum":0,"maximum":9007199254740991},"leads":{"type":"integer","minimum":0,"maximum":9007199254740991},"customers":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenue_cents":{"type":"integer","minimum":0,"maximum":9007199254740991},"conversion_rate":{"type":"number","minimum":0}},"required":["key","subscribers","leads","customers","revenue_cents","conversion_rate"],"description":"Funnel report row."},"rows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"subscribers":{"type":"integer","minimum":0,"maximum":9007199254740991},"leads":{"type":"integer","minimum":0,"maximum":9007199254740991},"customers":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenue_cents":{"type":"integer","minimum":0,"maximum":9007199254740991},"conversion_rate":{"type":"number","minimum":0}},"required":["key","subscribers","leads","customers","revenue_cents","conversion_rate"],"description":"Funnel report row."}}},"required":["generated_at","group_by","currency","totals","rows"],"description":"Funnel report response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["commerce:read"],"x-broadside-stability":"experimental"}},"/courses":{"get":{"operationId":"courses.list","tags":["Courses"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"courses":{"type":"array","items":{"type":"object","properties":{"product_key":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"customer_tag":{"type":"string"},"lessons":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"}},"required":["slug","title"],"description":"Course lesson metadata."}},"lesson_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"has_code":{"type":"boolean"}},"required":["product_key","title","description","customer_tag","lessons","lesson_count","has_code"],"description":"Course manifest resource."}}},"required":["courses"],"description":"List courses response."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["courses:read"],"x-broadside-stability":"experimental"}},"/courses/{product_key}":{"get":{"operationId":"courses.get","tags":["Courses"],"parameters":[{"name":"product_key","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"product_key":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"customer_tag":{"type":"string"},"lessons":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"}},"required":["slug","title"],"description":"Course lesson metadata."}},"lesson_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"has_code":{"type":"boolean"}},"required":["product_key","title","description","customer_tag","lessons","lesson_count","has_code"],"description":"Course manifest resource."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_read","x-broadside-scopes":["courses:read"],"x-broadside-stability":"experimental"}},"/courses/{product_key}/access-link":{"post":{"operationId":"courses.send_access_link","tags":["Courses"],"parameters":[{"name":"product_key","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"ttl_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":2592000,"exclusiveMinimum":0}},"required":["email"],"description":"Send a course access magic link to an eligible customer."}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"boolean"},"skipped":{"type":"boolean","default":false},"reason":{"type":"string"}},"required":["sent"],"description":"Course access-link send result."}}}}},"security":[{"BroadsideApiKey":[]}],"x-broadside-auth":"api_key","x-broadside-rate-limit":"api_key_write","x-broadside-scopes":["courses:write"],"x-broadside-stability":"experimental"}}}}