{"openapi":"3.0.3","info":{"title":"SendTrix API","version":"1","description":"Send email and read delivery data. Authenticate with `Authorization: Bearer st_live_…` (or a `st_test_…` key: captured in the Test inbox, never delivered)."},"servers":[{"url":"https://control.sendtrix.io"}],"security":[{"bearer":[]}],"paths":{"/v1/send":{"post":{"tags":["Sending"],"summary":"Send an email","description":"One message to up to 1000 recipients. Add `send_at` to schedule (max 7 days ahead), `stream` to pick a message stream, `topic` to honour preference-centre opt-outs, or `template_id` + `variables` to use a template.","operationId":"post_v_send","x-scope":"send","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"},"example":{"from":{"email":"hello@mail.example.com","name":"Example"},"to":["alice@gmail.com"],"subject":"Your receipt","html":"<p>Thanks for your order!</p>","text":"Thanks for your order!","tags":["receipt"]}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"example":{"id":"Abc123…","accepted":["alice@gmail.com"],"rejected":[],"suppressed":[]},"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/send/batch":{"post":{"tags":["Sending"],"summary":"Send personalised copies (batch)","description":"Common fields once, then up to 500 `messages` each with its own `to` and `variables`.","operationId":"post_v_send_batch","x-scope":"send","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["from","messages"],"properties":{"from":{"$ref":"#/components/schemas/Address"},"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"},"template_id":{"type":"string"},"stream":{"type":"string"},"topic":{"type":"string"},"messages":{"type":"array","maxItems":500,"items":{"type":"object","required":["to"],"properties":{"to":{"type":"string","format":"email"},"variables":{"type":"object"}}}}}},"example":{"from":{"email":"hello@mail.example.com"},"subject":"Hi {{name}}","text":"Hello {{name}}","messages":[{"to":"a@gmail.com","variables":{"name":"Ann"}},{"to":"b@yahoo.com","variables":{"name":"Bob"}}]}}}},"responses":{"202":{"description":"Accepted per message","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduled":{"get":{"tags":["Sending"],"summary":"List scheduled sends","operationId":"get_v_scheduled","x-scope":"send","responses":{"200":{"description":"Scheduled messages","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduled/{id}":{"delete":{"tags":["Sending"],"summary":"Cancel a scheduled send","operationId":"delete_v_scheduled_id_","x-scope":"send","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates":{"get":{"tags":["Templates"],"summary":"List published templates","operationId":"get_v_templates","x-scope":"send","responses":{"200":{"description":"Templates","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events":{"get":{"tags":["Events"],"summary":"Delivery events (delivered, bounced, opened, …)","operationId":"get_v_events","x-scope":"events","parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["delivered","bounce","deferred","complaint","open","click","unsubscribe"]}},{"name":"message_id","in":"query","schema":{"type":"string"}},{"name":"rcpt","in":"query","schema":{"type":"string"}},{"name":"domain","in":"query","schema":{"type":"string"}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":1000}}],"responses":{"200":{"description":"Events","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/suppressions":{"get":{"tags":["Suppressions"],"summary":"List suppressed addresses","operationId":"get_v_suppressions","x-scope":"send","parameters":[{"name":"email","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}},{"name":"offset","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Suppressions","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Suppressions"],"summary":"Add addresses to the suppression list","operationId":"post_v_suppressions","x-scope":"send","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emails"],"properties":{"emails":{"type":"array","items":{"type":"string"},"maxItems":10000},"reason":{"type":"string","enum":["manual","unsubscribe"]}}},"example":{"emails":["old@example.com"],"reason":"manual"}}}},"responses":{"200":{"description":"Added","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/suppressions/{email}":{"delete":{"tags":["Suppressions"],"summary":"Remove an address from the suppression list","operationId":"delete_v_suppressions_email_","x-scope":"send","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","format":"email"}}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/preferences":{"get":{"tags":["Preferences"],"summary":"Preference-centre changes since a time","operationId":"get_v_preferences","x-scope":"send","parameters":[{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Changes","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/preferences/{email}":{"get":{"tags":["Preferences"],"summary":"One recipient's preferences","operationId":"get_v_preferences_email_","x-scope":"send","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","format":"email"}}],"responses":{"200":{"description":"Preferences","content":{"application/json":{"example":{"email":"a@gmail.com","unsubscribed":false,"topics_off":["promo"],"frequency":"less"},"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/validate":{"post":{"tags":["Validation"],"summary":"Validate an email address","operationId":"post_v_validate","x-scope":"send","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},"example":{"email":"someone@gmial.com"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"example":{"email":"someone@gmial.com","result":"risky","did_you_mean":"someone@gmail.com"},"schema":{"type":"object"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key from the portal → API & SMTP"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}},"Address":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"}}},"Recipient":{"oneOf":[{"type":"string","format":"email"},{"$ref":"#/components/schemas/Address"}]},"Message":{"type":"object","required":["from","to"],"properties":{"from":{"$ref":"#/components/schemas/Address"},"to":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/Recipient"}},"cc":{"type":"array","items":{"$ref":"#/components/schemas/Recipient"}},"bcc":{"type":"array","items":{"$ref":"#/components/schemas/Recipient"}},"replyTo":{"type":"string","format":"email"},"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"},"template_id":{"type":"string"},"variables":{"type":"object"},"stream":{"type":"string"},"topic":{"type":"string"},"campaign":{"type":"string","description":"Groups bulk sends; SendTrix can pause or cancel a campaign"},"unsubscribe":{"type":"boolean"},"send_at":{"type":"string","format":"date-time"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Only X- headers"},"tags":{"type":"array","items":{"type":"string"},"maxItems":10},"attachments":{"type":"array","items":{"type":"object","required":["filename","content"],"properties":{"filename":{"type":"string"},"content":{"type":"string","description":"base64"},"contentType":{"type":"string"}}}}}}}}}