{"openapi":"3.0.0","paths":{"/v1/emails":{"post":{"operationId":"EmailsController_send[0]","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeating a request with the same key within 24 hours returns the first response.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Send an email","tags":["Emails"]},"get":{"operationId":"EmailsController_list[0]","parameters":[{"name":"tag","required":false,"in":"query","description":"\"name\" or \"name:value\"","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"The id of the last email of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List emails sent through the API and campaigns","tags":["Emails"]}},"/v1/emails/batch":{"post":{"operationId":"EmailsController_batch[0]","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Repeating a request with the same key within 24 hours returns the first response.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBatchDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Send up to 100 emails; nothing is sent unless all are valid","tags":["Emails"]}},"/v1/emails/{id}":{"get":{"operationId":"EmailsController_get[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get an email with per-recipient events, and its content while retained","tags":["Emails"]},"patch":{"operationId":"EmailsController_reschedule[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescheduleDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Reschedule a scheduled email","tags":["Emails"]}},"/v1/emails/{id}/cancel":{"post":{"operationId":"EmailsController_cancel[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Cancel a scheduled email","tags":["Emails"]}},"/v1/templates":{"get":{"operationId":"TemplatesController_list[0]","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Templates"]},"post":{"operationId":"TemplatesController_create[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplateDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create a template with its first version","tags":["Templates"]}},"/v1/templates/render":{"post":{"operationId":"TemplatesController_render[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Render unsaved template content (editor preview)","tags":["Templates"]}},"/v1/templates/{id}":{"get":{"operationId":"TemplatesController_get[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get a template by id or alias, with its versions","tags":["Templates"]},"patch":{"operationId":"TemplatesController_update[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTemplateDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Templates"]},"delete":{"operationId":"TemplatesController_remove[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"tags":["Templates"]}},"/v1/templates/{id}/versions":{"post":{"operationId":"TemplatesController_addVersion[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateContentDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Save a new draft version","tags":["Templates"]}},"/v1/templates/{id}/publish":{"post":{"operationId":"TemplatesController_publish[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Make a version the one used by sends","tags":["Templates"]}},"/v1/templates/{id}/preview":{"post":{"operationId":"TemplatesController_preview[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Render a saved version","tags":["Templates"]}},"/v1/webhooks":{"get":{"operationId":"WebhooksController_list[0]","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Webhooks"]},"post":{"operationId":"WebhooksController_create[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create an endpoint; the response includes its signing secret","tags":["Webhooks"]}},"/v1/webhooks/{id}":{"get":{"operationId":"WebhooksController_get[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Webhooks"]},"patch":{"operationId":"WebhooksController_update[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update an endpoint; enabling it again clears its failure state","tags":["Webhooks"]},"delete":{"operationId":"WebhooksController_remove[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"tags":["Webhooks"]}},"/v1/webhooks/{id}/secret":{"get":{"operationId":"WebhooksController_secret[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Reveal the signing secret","tags":["Webhooks"]}},"/v1/webhooks/{id}/secret/rotate":{"post":{"operationId":"WebhooksController_rotate[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Replace the signing secret","tags":["Webhooks"]}},"/v1/webhooks/{id}/test":{"post":{"operationId":"WebhooksController_test[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Send a webhook.test event now and return the result","tags":["Webhooks"]}},"/v1/webhooks/{id}/deliveries":{"get":{"operationId":"WebhooksController_deliveries[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Delivery attempts with request payload and response","tags":["Webhooks"]}},"/v1/webhooks/{id}/deliveries/{deliveryId}/replay":{"post":{"operationId":"WebhooksController_replay[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"deliveryId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Send a delivered or failed event again","tags":["Webhooks"]}},"/v1/webhooks/{id}/replay":{"post":{"operationId":"WebhooksController_replayFailed[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayRangeDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Replay all failed deliveries in a time range","tags":["Webhooks"]}},"/v1/contacts":{"get":{"operationId":"ContactsController_list[0]","parameters":[{"name":"search","required":false,"in":"query","description":"Matches email, first or last name.","schema":{"type":"string"}},{"name":"list_id","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":50,"type":"number"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List contacts","tags":["Contacts"]},"post":{"operationId":"ContactsController_upsert[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertContactDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create a contact, or update the contact with this email (201 when created)","tags":["Contacts"]}},"/v1/contacts/{idOrEmail}":{"get":{"operationId":"ContactsController_get[0]","parameters":[{"name":"idOrEmail","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get a contact by id or email, with lists, suppression and recent activity","tags":["Contacts"]},"patch":{"operationId":"ContactsController_update[0]","parameters":[{"name":"idOrEmail","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update a contact","tags":["Contacts"]},"delete":{"operationId":"ContactsController_remove[0]","parameters":[{"name":"idOrEmail","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"summary":"Delete a contact","tags":["Contacts"]}},"/v1/contacts/{idOrEmail}/lists/{listId}":{"put":{"operationId":"ContactsController_subscribe[0]","parameters":[{"name":"idOrEmail","required":true,"in":"path","schema":{"type":"string"}},{"name":"listId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Subscribe a contact to a list (resubscribes after an unsubscribe)","tags":["Contacts"]},"delete":{"operationId":"ContactsController_unsubscribe[0]","parameters":[{"name":"idOrEmail","required":true,"in":"path","schema":{"type":"string"}},{"name":"listId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Unsubscribe a contact from a list","tags":["Contacts"]}},"/v1/contact-imports":{"post":{"operationId":"ImportsController_create[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateImportDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Import contacts from CSV in the background; poll the import for progress and errors","tags":["Contacts"]},"get":{"operationId":"ImportsController_list[0]","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List recent imports","tags":["Contacts"]}},"/v1/contact-imports/{id}":{"get":{"operationId":"ImportsController_get[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get an import with its progress and the first 100 row errors","tags":["Contacts"]}},"/v1/lists":{"get":{"operationId":"ListsController_list[0]","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List contact lists with subscriber counts","tags":["Lists"]},"post":{"operationId":"ListsController_create[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create a list","tags":["Lists"]}},"/v1/lists/{id}":{"get":{"operationId":"ListsController_get[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get a list","tags":["Lists"]},"patch":{"operationId":"ListsController_update[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateListDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Rename or describe a list","tags":["Lists"]},"delete":{"operationId":"ListsController_remove[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"summary":"Delete a list (contacts are kept)","tags":["Lists"]}},"/v1/lists/{id}/contacts":{"post":{"operationId":"ListsController_addContacts[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddListContactsDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Upsert up to 1000 contacts and subscribe them to the list","tags":["Lists"]}},"/v1/segments":{"get":{"operationId":"SegmentsController_list[0]","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List segments","tags":["Segments"]},"post":{"operationId":"SegmentsController_create[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create a segment","tags":["Segments"]}},"/v1/segments/preview":{"post":{"operationId":"SegmentsController_preview[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewSegmentDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Count the contacts a filter matches without saving it","tags":["Segments"]}},"/v1/segments/{id}":{"get":{"operationId":"SegmentsController_get[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get a segment with its current contact count","tags":["Segments"]},"patch":{"operationId":"SegmentsController_update[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSegmentDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update a segment","tags":["Segments"]},"delete":{"operationId":"SegmentsController_remove[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"summary":"Delete a segment","tags":["Segments"]}},"/v1/campaigns":{"get":{"operationId":"CampaignsController_list[0]","parameters":[{"name":"status","required":false,"in":"query","schema":{"enum":["draft","scheduled","sending","paused","sent","canceled"],"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List campaigns","tags":["Campaigns"]},"post":{"operationId":"CampaignsController_create[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create a draft campaign","tags":["Campaigns"]}},"/v1/campaigns/audience/count":{"post":{"operationId":"CampaignsController_audienceCount[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceCountDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Count the contacts an audience would reach now","tags":["Campaigns"]}},"/v1/campaigns/{id}":{"get":{"operationId":"CampaignsController_get[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get a campaign","tags":["Campaigns"]},"patch":{"operationId":"CampaignsController_update[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignFieldsDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update a draft, scheduled or paused campaign","tags":["Campaigns"]},"delete":{"operationId":"CampaignsController_remove[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"summary":"Delete a campaign that is not scheduled or sending","tags":["Campaigns"]}},"/v1/campaigns/{id}/schedule":{"post":{"operationId":"CampaignsController_schedule[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCampaignDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Schedule a draft, or start it now when scheduled_at is omitted","tags":["Campaigns"]}},"/v1/campaigns/{id}/pause":{"post":{"operationId":"CampaignsController_pause[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Pause a scheduled or sending campaign after the current batch","tags":["Campaigns"]}},"/v1/campaigns/{id}/resume":{"post":{"operationId":"CampaignsController_resume[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Resume a paused campaign where it stopped","tags":["Campaigns"]}},"/v1/campaigns/{id}/cancel":{"post":{"operationId":"CampaignsController_cancel[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Cancel a campaign; emails already queued are still delivered","tags":["Campaigns"]}},"/v1/campaigns/{id}/test":{"post":{"operationId":"CampaignsController_test[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCampaignDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Send a test to up to 5 addresses with sample contact data","tags":["Campaigns"]}},"/v1/campaigns/{id}/report":{"get":{"operationId":"CampaignsController_report[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Delivery and engagement counts, with proxy opens separated, and top links","tags":["Campaigns"]}},"/v1/marketing/settings":{"get":{"operationId":"MarketingSettingsController_get[0]","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get marketing settings","tags":["Campaigns"]},"put":{"operationId":"MarketingSettingsController_set[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingSettingsDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Set the postal address required in marketing email","tags":["Campaigns"]}},"/v1/inbound-routes":{"get":{"operationId":"InboundRoutesController_list[0]","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Inbound"]},"post":{"operationId":"InboundRoutesController_create[0]","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRouteDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Route mail for addresses without a mailbox to a webhook endpoint","tags":["Inbound"]}},"/v1/inbound-routes/{id}":{"get":{"operationId":"InboundRoutesController_get[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Inbound"]},"patch":{"operationId":"InboundRoutesController_update[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRouteDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"tags":["Inbound"]},"delete":{"operationId":"InboundRoutesController_remove[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"tags":["Inbound"]}},"/v1/inbound":{"get":{"operationId":"InboundController_list[0]","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Routed inbound messages, newest first","tags":["Inbound"]}},"/v1/inbound/{id}":{"get":{"operationId":"InboundController_get[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"The parsed inbound.received payload and its webhook deliveries","tags":["Inbound"]}},"/v1/inbound/{id}/raw":{"get":{"operationId":"InboundController_raw[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"The original message (message/rfc822); also reachable through the signed raw_url","tags":["Inbound"]}},"/v1/inbound/{id}/attachments/{index}":{"get":{"operationId":"InboundController_attachment[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"index","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"One attachment by index; also reachable through its signed url","tags":["Inbound"]}},"/v1/inbound/{id}/replay":{"post":{"operationId":"InboundController_replay[0]","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayDto"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Send inbound.received again","tags":["Inbound"]}}},"info":{"title":"Voozin API","description":"Transactional, marketing and inbound email. Authenticate with `Authorization: Bearer ic_live_...`.","version":"1","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"API key"}},"schemas":{"AttachmentDto":{"type":"object","properties":{"filename":{"type":"string","example":"invoice.pdf"},"content":{"type":"string","description":"Base64-encoded content. Give either content or path."},"path":{"type":"string","description":"An https URL the platform downloads the attachment from."},"content_type":{"type":"string","example":"application/pdf"},"content_id":{"type":"string","description":"Content-ID for inline images referenced as cid:..."}},"required":["filename"]},"SendEmailDto":{"type":"object","properties":{"from":{"type":"string","example":"Acme <billing@acme.com>"},"to":{"example":["jane@example.com"],"description":"A string or up to 50 addresses.","type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"reply_to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string","description":"Required unless a template provides it."},"html":{"type":"string"},"text":{"type":"string"},"template_id":{"type":"string","description":"Template id or alias; the published version is used unless template_version is set."},"template_version":{"type":"number"},"variables":{"type":"object","additionalProperties":true,"description":"Template variables."},"attachments":{"description":"Up to 20 MB in total (decoded).","type":"array","items":{"$ref":"#/components/schemas/AttachmentDto"}},"headers":{"type":"object","additionalProperties":{"type":"string"}},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Up to 10 name/value pairs for filtering, e.g. {\"category\": \"receipt\"}. Resend-style [{name, value}] is accepted."},"metadata":{"type":"object","additionalProperties":true,"description":"Returned in webhooks; up to 10 keys."},"scheduled_at":{"type":"string","description":"ISO 8601 time up to 30 days ahead."},"track_opens":{"type":"boolean","description":"Defaults to the domain setting."},"track_clicks":{"type":"boolean","description":"Defaults to the domain setting."},"stream":{"type":"string","enum":["transactional","marketing"],"default":"transactional"},"unsubscribe":{"type":"boolean","description":"Adds List-Unsubscribe headers (always on for marketing)."}},"required":["from","to"]},"SendBatchDto":{"type":"object","properties":{"emails":{"type":"array","items":{"$ref":"#/components/schemas/SendEmailDto"}}},"required":["emails"]},"RescheduleDto":{"type":"object","properties":{"scheduled_at":{"type":"string"}},"required":["scheduled_at"]},"CreateTemplateDto":{"type":"object","properties":{"subject":{"type":"string","example":"Your receipt from {{ company }}"},"html":{"type":"string"},"text":{"type":"string"},"sample_data":{"type":"object","additionalProperties":true,"description":"Sample variables for previews."},"name":{"type":"string","example":"Receipt"},"alias":{"type":"string","example":"receipt","description":"Stable identifier for API calls."},"publish":{"type":"boolean","description":"Publish version 1 right away."}},"required":["subject","name","alias"]},"RenderDto":{"type":"object","properties":{"subject":{"type":"string","example":"Your receipt from {{ company }}"},"html":{"type":"string"},"text":{"type":"string"},"sample_data":{"type":"object","additionalProperties":true,"description":"Sample variables for previews."}},"required":["subject"]},"UpdateTemplateDto":{"type":"object","properties":{}},"TemplateContentDto":{"type":"object","properties":{"subject":{"type":"string","example":"Your receipt from {{ company }}"},"html":{"type":"string"},"text":{"type":"string"},"sample_data":{"type":"object","additionalProperties":true,"description":"Sample variables for previews."}},"required":["subject"]},"PublishDto":{"type":"object","properties":{"version":{"type":"number"}},"required":["version"]},"PreviewDto":{"type":"object","properties":{"version":{"type":"number","description":"Defaults to the latest version."},"variables":{"type":"object","additionalProperties":true,"description":"Defaults to the version's sample data."}}},"CreateWebhookDto":{"type":"object","properties":{"url":{"type":"string","example":"https://example.com/webhooks/inboxcluster"},"description":{"type":"string"},"events":{"type":"array","description":"Empty or omitted means every event type.","items":{"type":"string","enum":["email.sent","email.scheduled","email.canceled","email.delivered","email.delivery_delayed","email.bounced","email.complained","email.opened","email.clicked","email.unsubscribed","contact.created","contact.updated","contact.unsubscribed","inbound.received"]}}},"required":["url"]},"UpdateWebhookDto":{"type":"object","properties":{}},"ReplayRangeDto":{"type":"object","properties":{"after":{"type":"string","description":"Defaults to 24 hours ago."},"before":{"type":"string","description":"Defaults to now."}}},"UpsertContactDto":{"type":"object","properties":{"first_name":{"type":"object"},"last_name":{"type":"object"},"attributes":{"type":"object","description":"Custom fields available in templates and segments. Merged into existing attributes; null removes a key.","example":{"plan":"pro","seats":5}},"lists":{"description":"List ids to subscribe the contact to.","type":"array","items":{"type":"string"}},"email":{"type":"string","example":"ada@example.com"}},"required":["email"]},"UpdateContactDto":{"type":"object","properties":{"first_name":{"type":"object"},"last_name":{"type":"object"},"attributes":{"type":"object","description":"Custom fields available in templates and segments. Merged into existing attributes; null removes a key.","example":{"plan":"pro","seats":5}},"lists":{"description":"List ids to subscribe the contact to.","type":"array","items":{"type":"string"}},"email":{"type":"string"}}},"ImportMappingDto":{"type":"object","properties":{"email":{"type":"string","description":"CSV column holding the email address."},"first_name":{"type":"string"},"last_name":{"type":"string"},"attributes":{"type":"object","description":"CSV column → attribute name.","example":{"Plan":"plan"}}},"required":["email"]},"CreateImportDto":{"type":"object","properties":{"csv":{"type":"string","description":"CSV text with a header row, up to 20 MB."},"mapping":{"$ref":"#/components/schemas/ImportMappingDto"},"list_id":{"type":"string","description":"List to subscribe imported contacts to."}},"required":["csv","mapping"]},"ListDto":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"object"}},"required":["name"]},"UpdateListDto":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"object"}}},"AddListContactsDto":{"type":"object","properties":{"contacts":{"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/UpsertContactDto"}}},"required":["contacts"]},"SegmentFilterDto":{"type":"object","properties":{"match":{"type":"string","enum":["all","any"],"default":"all"},"conditions":{"description":"Conditions: `email`, `first_name`, `last_name` and `attributes.<name>` (eq, neq, contains, not_contains, starts_with, ends_with, exists, not_exists; attributes also gt, gte, lt, lte), `list` (in, not_in a list id), `created_at` (before, after, within_days), `opened` and `clicked` (within_days, not_within_days).","example":[{"field":"attributes.plan","op":"eq","value":"pro"}],"type":"array","items":{"type":"string"}}},"required":["conditions"]},"SegmentDto":{"type":"object","properties":{"name":{"type":"string"},"filter":{"$ref":"#/components/schemas/SegmentFilterDto"}},"required":["name","filter"]},"PreviewSegmentDto":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/SegmentFilterDto"}},"required":["filter"]},"UpdateSegmentDto":{"type":"object","properties":{"name":{"type":"string"},"filter":{"$ref":"#/components/schemas/SegmentFilterDto"}}},"AudienceDto":{"type":"object","properties":{"lists":{"type":"array","items":{"type":"string"}},"segments":{"type":"array","items":{"type":"string"}},"exclude_lists":{"type":"array","items":{"type":"string"}}}},"CreateCampaignDto":{"type":"object","properties":{"name":{"type":"string"},"from":{"type":"string","example":"Acme <news@acme.com>"},"reply_to":{"type":"object"},"subject":{"type":"string","description":"Overrides the template subject. Supports template variables."},"template_id":{"type":"object","description":"Template id or alias; otherwise give html and/or text."},"template_version":{"type":"object","description":"Defaults to the published version at send time."},"html":{"type":"object","description":"Template syntax; contact fields are variables, e.g. {{ first_name }}."},"text":{"type":"object"},"audience":{"$ref":"#/components/schemas/AudienceDto"},"track_opens":{"type":"boolean","default":true},"track_clicks":{"type":"boolean","default":true}}},"AudienceCountDto":{"type":"object","properties":{"audience":{"$ref":"#/components/schemas/AudienceDto"}},"required":["audience"]},"CampaignFieldsDto":{"type":"object","properties":{"name":{"type":"string"},"from":{"type":"string","example":"Acme <news@acme.com>"},"reply_to":{"type":"object"},"subject":{"type":"string","description":"Overrides the template subject. Supports template variables."},"template_id":{"type":"object","description":"Template id or alias; otherwise give html and/or text."},"template_version":{"type":"object","description":"Defaults to the published version at send time."},"html":{"type":"object","description":"Template syntax; contact fields are variables, e.g. {{ first_name }}."},"text":{"type":"object"},"audience":{"$ref":"#/components/schemas/AudienceDto"},"track_opens":{"type":"boolean","default":true},"track_clicks":{"type":"boolean","default":true}}},"ScheduleCampaignDto":{"type":"object","properties":{"scheduled_at":{"type":"string","description":"Omit to start now."}}},"TestCampaignDto":{"type":"object","properties":{"to":{"maxItems":5,"type":"array","items":{"type":"string"}}},"required":["to"]},"MarketingSettingsDto":{"type":"object","properties":{"postal_address":{"type":"string","description":"Physical mailing address shown in marketing email (CAN-SPAM)."}},"required":["postal_address"]},"CreateRouteDto":{"type":"object","properties":{"domain_id":{"type":"string"},"pattern":{"type":"string","example":"support","description":"A local part, a prefix ending in \"*\" (\"support+*\"), or \"*\" for every other address."},"endpoint_id":{"type":"object","description":"Webhook endpoint that receives inbound.received."},"mailbox_id":{"type":"object","description":"Also deliver a copy to this mailbox."}},"required":["domain_id","pattern"]},"UpdateRouteDto":{"type":"object","properties":{}},"ReplayDto":{"type":"object","properties":{"endpoint_id":{"type":"string","description":"Defaults to the route's endpoint."}}}}}}