{"openapi":"3.1.0","info":{"title":"AgentSend API","version":"1.0.0","description":"Transactional and marketing email for AI agents. An agent can create its own sandbox account (POST /accounts with a proof-of-work solution); a human claims it before live sending. Every refusal is {error: {code, reason, fix}}. Agent guide: /llms.txt."},"servers":[{"url":"https://agentsend.co/api/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key (as_...): `Authorization: Bearer <api key>`."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","reason","fix"],"properties":{"code":{"type":"string"},"reason":{"type":"string"},"fix":{"type":"string"},"retryable":{"type":"boolean"},"pow":{"$ref":"#/components/schemas/PowChallenge","description":"On pow_required and pow_invalid: a fresh challenge to solve."}}}}},"PowChallenge":{"type":"object","required":["challenge","difficulty","expires_at","algorithm"],"properties":{"challenge":{"type":"string"},"difficulty":{"type":"integer","description":"Leading zero bits sha256(challenge + nonce) must have."},"expires_at":{"type":"string","format":"date-time"},"algorithm":{"const":"sha256"}}},"CreatedAccount":{"type":"object","required":["object","id","api_key","api_key_id","status","claimed","claim_url","expires_at","limits","next_steps"],"properties":{"object":{"const":"account"},"id":{"type":"string"},"api_key":{"type":"string","description":"Full access; shown only here."},"api_key_id":{"type":"string"},"status":{"const":"sandbox"},"claimed":{"const":false},"claim_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"},"limits":{"type":"object","properties":{"emails_per_month":{"type":"integer"},"emails_per_day":{"type":["integer","null"]},"domains":{"type":["integer","null"],"description":"1 while an agent account is unclaimed."},"contacts":{"type":"integer"},"log_retention_days":{"type":"integer"},"real_recipients":{"enum":["refused","simulated","delivered"],"description":"Mail to addresses outside @simulator.agentsend.co: refused (unclaimed or not approved for live sending), simulated (sandbox deployment), or delivered."}}},"next_steps":{"type":"array","items":{"type":"string"}}}},"Account":{"type":"object","required":["object","id","status","claimed","plan","limits","usage"],"properties":{"object":{"const":"account"},"id":{"type":"string","description":"After a claim, the claiming person's account id."},"status":{"enum":["sandbox","live","paused"]},"claimed":{"type":"boolean"},"expires_at":{"type":"string","format":"date-time","description":"Only while unclaimed: the account is deleted then."},"plan":{"enum":["free","pro","scale"]},"limits":{"type":"object","properties":{"emails_per_month":{"type":"integer"},"emails_per_day":{"type":["integer","null"]},"domains":{"type":["integer","null"],"description":"1 while an agent account is unclaimed."},"contacts":{"type":"integer"},"log_retention_days":{"type":"integer"},"real_recipients":{"enum":["refused","simulated","delivered"],"description":"Mail to addresses outside @simulator.agentsend.co: refused (unclaimed or not approved for live sending), simulated (sandbox deployment), or delivered."}}},"usage":{"type":"object","properties":{"emails_this_month":{"type":"integer"},"emails_last_24h":{"type":"integer"},"domains":{"type":"integer"},"contacts":{"type":"integer"}}}}},"ClaimLink":{"type":"object","required":["claim_url","expires_at"],"properties":{"claim_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}}},"EmailRequest":{"type":"object","required":["from","to","subject"],"properties":{"from":{"type":"string","description":"e.g. \"Acme <hello@mail.acme.com>\""},"to":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"cc":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"bcc":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"reply_to":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"tags":{"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"attachments":{"type":"array","items":{"type":"object","required":["filename","content"],"properties":{"filename":{"type":"string"},"content":{"type":"string","description":"Base64."},"content_type":{"type":"string"}}}},"scheduled_at":{"type":"string","format":"date-time"}}}}},"paths":{"/accounts":{"post":{"summary":"Create an account (agent self-signup)","description":"No API key. Solve a challenge from GET /accounts/pow: find a decimal-string nonce where sha256(challenge + nonce) has `difficulty` leading zero bits. Each challenge works once; at most 3 signups per hour and 10 per day per IP. The account sends only to @simulator.agentsend.co until a person opens claim_url, and is deleted at expires_at if unclaimed. Errors: pow_required, pow_invalid, signup_rate_limited, signup_disabled.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["pow"],"properties":{"name":{"type":"string","maxLength":80},"owner_email":{"type":"string","description":"Your human's address; the claim link is emailed there."},"pow":{"type":"object","required":["challenge","nonce"],"properties":{"challenge":{"type":"string"},"nonce":{"type":"string"}}}}}}}},"responses":{"201":{"description":"The new account and its API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedAccount"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/pow":{"get":{"summary":"Get a signup proof-of-work challenge","security":[],"responses":{"200":{"description":"A challenge, valid for 5 minutes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PowChallenge"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account":{"get":{"summary":"Get this key's account","responses":{"200":{"description":"Status, claim state, plan, limits, and usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account/claim-link":{"post":{"summary":"Get a new claim link","description":"Unclaimed agent accounts only. Replaces earlier links. With owner_email, also emails it there (3 per hour, 10 per day).","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"owner_email":{"type":"string"}}}}}},"responses":{"200":{"description":"The new link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimLink"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/emails":{"post":{"summary":"Send an email","description":"Every guardrail runs first. `Idempotency-Key` header for safe retries; `?dry_run=true` lints without sending.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}},{"name":"dry_run","in":"query","required":false,"description":"true: lint only.","schema":{"type":"boolean"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequest"}}}},"responses":{"201":{"description":"The stored email (`status`, `warnings`).","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List emails","parameters":[{"name":"limit","in":"query","required":false,"description":"1-100.","schema":{"type":"integer"}},{"name":"before","in":"query","required":false,"description":"next_cursor of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/emails/batch":{"post":{"summary":"Send up to 100 emails (all or nothing)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailRequest"},"maxItems":100}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/emails/{id}":{"get":{"summary":"Get an email","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Reschedule a scheduled email","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scheduled_at"],"properties":{"scheduled_at":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/emails/{id}/cancel":{"post":{"summary":"Cancel a scheduled email","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/domains":{"post":{"summary":"Add a sending domain","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}},"responses":{"201":{"description":"The domain and the DNS records to publish.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List domains","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/domains/{id}":{"get":{"summary":"Get a domain","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a domain","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/domains/{id}/verify":{"post":{"summary":"Check the domain's DNS now","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"responses":{"200":{"description":"`status` and `missing_records`.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/audiences":{"post":{"summary":"Create an audience","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}},"responses":{"201":{"description":"The audience.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List audiences","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/audiences/{id}":{"delete":{"summary":"Delete an audience and its contacts","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/audiences/{id}/contacts":{"post":{"summary":"Add a contact","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}},"responses":{"201":{"description":"The contact.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List an audience's contacts","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/audiences/{id}/contacts/{contact_id}":{"patch":{"summary":"Update a contact","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}},{"name":"contact_id","in":"path","required":true,"description":"The contact id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"unsubscribed":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove a contact","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}},{"name":"contact_id","in":"path","required":true,"description":"The contact id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/broadcasts":{"post":{"summary":"Draft a broadcast","description":"html or text must contain {{unsubscribe_url}}.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["audience_id","from","subject"],"properties":{"audience_id":{"type":"string"},"from":{"type":"string"},"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"},"name":{"type":"string"},"reply_to":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}}}}},"responses":{"201":{"description":"The draft.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List broadcasts","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/broadcasts/{id}":{"get":{"summary":"Get a broadcast","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/broadcasts/{id}/send":{"post":{"summary":"Send a broadcast now or at scheduled_at","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"scheduled_at":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"post":{"summary":"Create a webhook","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["endpoint"],"properties":{"endpoint":{"type":"string","format":"uri"},"events":{"type":"array","items":{"enum":["email.sent","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.failed","contact.unsubscribed","guardrail.blocked","account.sending_warned","account.sending_paused","webhook.disabled","suppression.removed","account.claimed","ops.alert"]}}}}}}},"responses":{"201":{"description":"The webhook and its signing secret (shown once).","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List webhooks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"patch":{"summary":"Enable or disable a webhook","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a webhook","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"summary":"Send a signed webhook.test delivery","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"get":{"summary":"List a webhook's latest deliveries","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1-100.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries/{delivery_id}/retry":{"post":{"summary":"Attempt one delivery now","parameters":[{"name":"id","in":"path","required":true,"description":"The resource id.","schema":{"type":"string"}},{"name":"delivery_id","in":"path","required":true,"description":"The delivery id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suppressions":{"get":{"summary":"List suppressed addresses","parameters":[{"name":"email","in":"query","required":false,"description":"Substring of the address.","schema":{"type":"string"}},{"name":"scope","in":"query","required":false,"description":"all or marketing.","schema":{"type":"string"}},{"name":"reason","in":"query","required":false,"description":"hard_bounce, complaint, unsubscribe, or manual.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"next_cursor of the previous page.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1-100.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suppressions/{email}":{"delete":{"summary":"Remove a suppression","parameters":[{"name":"email","in":"path","required":true,"description":"The address, URL-encoded.","schema":{"type":"string"}},{"name":"scope","in":"query","required":false,"description":"One scope; every scope when omitted.","schema":{"type":"string"}},{"name":"confirm","in":"query","required":false,"description":"`complaint` to lift a complaint.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"summary":"List events after a cursor","parameters":[{"name":"since","in":"query","required":false,"description":"next_cursor of the previous call; omit for the latest.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Comma-separated: email.sent, email.delivered, email.delivery_delayed, email.bounced, email.complained, email.opened, email.clicked, email.failed, contact.unsubscribed, guardrail.blocked, account.sending_warned, account.sending_paused, webhook.disabled, suppression.removed, account.claimed, ops.alert.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1-100.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/budget":{"get":{"summary":"Get the calling key's effective budget","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Set a send budget","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["per_minute","per_day","max_recipients_per_send"],"properties":{"per_minute":{"type":"integer","minimum":1},"per_day":{"type":"integer","minimum":1},"max_recipients_per_send":{"type":"integer","minimum":1,"maximum":50},"api_key_id":{"type":"string"},"account":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"summary":"This OpenAPI document","security":[],"responses":{"200":{"description":"OpenAPI 3.1.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Refusal or failure: `{error: {code, reason, fix}}`. Apply `fix` and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}