{"openapi":"3.1.0","webhooks":{"contact.created":{"post":{"operationId":"contactCreatedEvent","summary":"contact.created","description":"A contact was created","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreatedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"contact.updated":{"post":{"operationId":"contactUpdatedEvent","summary":"contact.updated","description":"A contact’s fields or custom properties changed","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdatedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"contact.deleted":{"post":{"operationId":"contactDeletedEvent","summary":"contact.deleted","description":"A contact was deleted","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDeletedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"contact.subscribed":{"post":{"operationId":"contactSubscribedEvent","summary":"contact.subscribed","description":"A contact subscribed, to marketing email or to a mailing list","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSubscribedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"contact.unsubscribed":{"post":{"operationId":"contactUnsubscribedEvent","summary":"contact.unsubscribed","description":"A contact unsubscribed, or was unsubscribed, from marketing email or a mailing list","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUnsubscribedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"contact.tag_added":{"post":{"operationId":"contactTagAddedEvent","summary":"contact.tag_added","description":"A contact was tagged","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTagAddedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"contact.tag_removed":{"post":{"operationId":"contactTagRemovedEvent","summary":"contact.tag_removed","description":"A tag was removed from a contact","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactTagRemovedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"email.sent":{"post":{"operationId":"emailSentEvent","summary":"email.sent","description":"A campaign or workflow email was sent","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSentEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"email.delivered":{"post":{"operationId":"emailDeliveredEvent","summary":"email.delivered","description":"A campaign or workflow email was delivered","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDeliveredEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"email.opened":{"post":{"operationId":"emailOpenedEvent","summary":"email.opened","description":"A contact first opened an email","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailOpenedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"email.clicked":{"post":{"operationId":"emailClickedEvent","summary":"email.clicked","description":"A contact first clicked a link in an email","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailClickedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"email.bounced":{"post":{"operationId":"emailBouncedEvent","summary":"email.bounced","description":"An email bounced","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailBouncedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"email.complained":{"post":{"operationId":"emailComplainedEvent","summary":"email.complained","description":"A contact marked an email as spam","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailComplainedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"email.failed":{"post":{"operationId":"emailFailedEvent","summary":"email.failed","description":"An email couldn’t be sent","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailFailedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"campaign.sent":{"post":{"operationId":"campaignSentEvent","summary":"campaign.sent","description":"A campaign started sending","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSentEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"campaign.canceled":{"post":{"operationId":"campaignCanceledEvent","summary":"campaign.canceled","description":"A campaign was canceled","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCanceledEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"domain.verified":{"post":{"operationId":"domainVerifiedEvent","summary":"domain.verified","description":"A sending domain was verified","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerifiedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"contact_import.completed":{"post":{"operationId":"contactImportCompletedEvent","summary":"contact_import.completed","description":"A CSV import of contacts finished. Imported contacts send no contact events of their own","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactImportCompletedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}},"contact_import.failed":{"post":{"operationId":"contactImportFailedEvent","summary":"contact_import.failed","description":"A CSV import of contacts stopped with an error; rows written before it stay","tags":["Webhooks"],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event’s `id`: the same on every attempt and every endpoint","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"When this attempt was signed, in Unix seconds. Reject old ones to stop replays.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>`, keyed with the endpoint’s secret (`whsec_…`). For 24 hours after the secret is rotated, both secrets sign, separated by a space. Any Standard Webhooks library verifies it.","schema":{"type":"string"}},{"name":"Sendwing-Version","in":"header","required":true,"description":"The API version the body is in: the endpoint’s","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactImportFailedEvent"}}}},"responses":{"2XX":{"description":"Received. Any other status (redirects too), or no answer within 10 seconds, is tried again 9 times, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 12 hours, 12 hours, 12 hours (give or take 20%). A 429 or 503 can ask for a longer wait with `Retry-After`."}}}}},"info":{"title":"Sendwing API","description":"Sendwing's REST API: contacts, tags, mailing lists, events and webhooks.\n\nEvery request is JSON over HTTPS, to `https://api.sendwing.app/api`. Most routes act in one workspace, named in the path as `/organizations/{organizationId}`.\n\n## Authentication\n\nSend one of these:\n\n- **An API key**, in the `x-api-key` header. Create one in Sendwing under **Settings → API keys**. A key belongs to one workspace and has the permissions picked when it was made.\n- **An OAuth 2.0 access token**, as `Authorization: Bearer <token>`. Apps get one when a member connects them (\"Connect with Sendwing\"), using the authorization code flow with PKCE. The token acts in the workspace the member picked, with what both its scopes and the member's role allow. Access tokens last an hour; ask for the `offline_access` scope to get a refresh token, which lasts 90 days and is replaced each time it's used. The authorization server's metadata is at `https://api.sendwing.app/.well-known/oauth-authorization-server/api/auth`. OAuth apps are registered by Sendwing: contact support to get a client ID.\n\n## Versions\n\nResponses are shaped by an API version, a date like `2026-10-27` (the latest). Send it in the `Sendwing-Version` header to pin your integration to it; without the header, a request uses its API key's version, else the latest. Every response says its version in the same header. Old versions get `Deprecation` and `Sunset` headers at least six months before they're removed.\n\n## Errors\n\nErrors answer with an HTTP status and a JSON body like `{ \"error\": \"Contact not found\" }`. A 400 also lists each invalid field in `issues`, and a 5xx has a `requestId` to quote to support. A 429 says how many seconds to wait in `Retry-After`.\n\n## Lists\n\nLists are newest first and paginated by cursor: pass `limit` (1 to 100, 50 by default), then the response's `nextCursor` as `cursor` for the next page, until it's `null`.\n\n## Webhooks\n\nRegister an endpoint with `POST /organizations/{organizationId}/webhooks/endpoints` to get events as they happen. Each delivery is a `POST` with the event as its JSON body, in the same shape `GET …/webhooks/events` lists, signed with the endpoint's secret. Failed deliveries are retried, and events are kept for 30 days.","version":"2026-10-27","termsOfService":"https://sendwing.app/terms","contact":{"name":"Sendwing support","email":"support@sendwing.app","url":"https://sendwing.app"}},"servers":[{"url":"https://api.sendwing.app/api"}],"tags":[{"name":"Account","description":"Who the API key or access token is"},{"name":"Contacts","description":"The people you email"},{"name":"Events","description":"What contacts did, for their timelines and workflows"},{"name":"Tags","description":"Labels on contacts"},{"name":"Mailing lists","description":"Topics contacts subscribe to"},{"name":"Webhooks","description":"Events posted to your URL as they happen"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key"},"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://app.sendwing.app/core/api/auth/oauth2/authorize","tokenUrl":"https://api.sendwing.app/api/auth/oauth2/token","refreshUrl":"https://api.sendwing.app/api/auth/oauth2/token","scopes":{"contacts:read":"Read contacts, their custom properties, tags, mailing lists and segments","contacts:write":"Add and change contacts: their fields, tags (new ones too), lists, subscription and events","contacts:delete":"Delete contacts, and every record of them","audience:write":"Create, change and delete custom properties, tags, mailing lists and segments","templates:read":"Read email templates","templates:write":"Create, change and delete email templates","campaigns:read":"Read campaigns","campaigns:write":"Create, change and delete campaign drafts, without sending them","campaigns:send":"Send, schedule and cancel campaigns, and send test emails","workflows:read":"Read workflows","workflows:write":"Create, change and archive workflows, without publishing them","workflows:publish":"Publish, pause and resume workflows, and enroll contacts","emails:send":"Send one-off emails to any address with the emails API, and see what became of them","domains:read":"Read sending domains and the sending settings","domains:write":"Add, check and remove sending domains","webhooks":"Create, read and delete webhook endpoints, and read webhook events","offline_access":"Get a refresh token, to stay connected after the access token expires"}}}}},"schemas":{"Caller":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"apiKey"},"apiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"organizationId":{"type":"string","description":"The workspace the key belongs to"},"permissions":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}},"description":"What the caller can do, by resource, like `{ \"contact\": [\"read\", \"update\"] }`"},{"type":"null"}]}},"required":["id","name","organizationId"],"additionalProperties":false}},"required":["type","apiKey"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"app"},"connection":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string","description":"The workspace the member connected"},"organizationName":{"type":["string","null"]},"userId":{"type":"string","description":"The member who connected the app"},"email":{"description":"The member’s email","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"The scopes the member granted"},"permissions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}},"description":"What the app can do: what its scopes grant, within the member’s role"}},"required":["id","organizationId","organizationName","userId","email","scopes","permissions"],"additionalProperties":false}},"required":["type","connection"],"additionalProperties":false}]},"Error":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong, in words you can show people"},"issues":{"description":"For a 400: each invalid field, by its path in the request, like `events.0.name`","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"requestId":{"description":"For a 5xx: quote it when contacting support","type":"string"}},"required":["error"],"additionalProperties":false},"Contact":{"type":"object","properties":{"id":{"type":"string","description":"Like `con_…`"},"email":{"type":"string"},"externalId":{"description":"The contact’s ID in your own system","type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"status":{"type":"string","enum":["subscribed","pending","unsubscribed","bounced","complained"],"description":"Whether Sendwing emails the contact. `pending` waits for double opt-in; `bounced` and `complained` are set by delivery feedback and are never emailed again."},"source":{"type":"string","description":"Where the contact came from, like `api`, `import`, `form` or `zapier`"},"language":{"description":"A BCP 47 language tag, like `en` or `pt-BR`","type":["string","null"]},"timeZone":{"description":"An IANA time zone, like `Europe/Berlin`","type":["string","null"]},"country":{"description":"An ISO 3166-1 alpha-2 code, like `DE`","type":["string","null"]},"birthday":{"description":"`YYYY-MM-DD`, or `--MM-DD` when the year isn’t known","type":["string","null"]},"notes":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"Custom property values, by property key"},"subscribedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"signupIp":{"type":["string","null"]},"optedInAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the contact confirmed double opt-in"},"optInIp":{"type":["string","null"]},"statusChangedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastSentAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"lastOpenedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"lastClickedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"mailingLists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["subscribed","unsubscribed"]}},"required":["id","name","status"],"additionalProperties":false}},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","email","externalId","firstName","lastName","status","source","language","timeZone","country","birthday","notes","properties","subscribedAt","signupIp","optedInAt","optInIp","statusChangedAt","lastSentAt","lastOpenedAt","lastClickedAt","tags","mailingLists","createdAt","updatedAt"],"additionalProperties":false},"MailingList":{"type":"object","properties":{"id":{"type":"string","description":"Like `list_…`"},"name":{"type":"string"},"description":{"type":["string","null"]},"isPublic":{"type":"boolean","description":"Whether contacts can see and choose it in their email preferences"},"subscribedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many contacts are subscribed to it"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","description","isPublic","subscribedCount","createdAt","updatedAt"],"additionalProperties":false},"Tag":{"type":"object","properties":{"id":{"type":"string","description":"Like `tag_…`"},"name":{"type":"string"},"description":{"type":["string","null"]},"contactCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many contacts have the tag"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","description","contactCount","createdAt","updatedAt"],"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"Like `whep_…`"},"url":{"type":"string"},"description":{"type":["string","null"]},"eventTypes":{"type":"array","items":{"type":"string"},"description":"The event types it posts, like `contact.created`"},"status":{"type":"string","enum":["enabled","disabled"]},"disabledReason":{"anyOf":[{"type":"string","enum":["failing","feature_unavailable"]},{"type":"null"}],"description":"Why Sendwing disabled it: `failing` (every delivery failed for 3 days) or `feature_unavailable` (the plan no longer has webhooks)"},"apiVersion":{"type":"string","enum":["2026-10-27"],"description":"The API version its deliveries are in"},"failingSince":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When deliveries started failing, while they still are"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","url","description","eventTypes","status","disabledReason","apiVersion","failingSince","createdAt","updatedAt"],"additionalProperties":false},"WebhookEvent":{"oneOf":[{"$ref":"#/components/schemas/WebhookTestEvent"},{"$ref":"#/components/schemas/ContactCreatedEvent"},{"$ref":"#/components/schemas/ContactUpdatedEvent"},{"$ref":"#/components/schemas/ContactDeletedEvent"},{"$ref":"#/components/schemas/ContactSubscribedEvent"},{"$ref":"#/components/schemas/ContactUnsubscribedEvent"},{"$ref":"#/components/schemas/ContactTagAddedEvent"},{"$ref":"#/components/schemas/ContactTagRemovedEvent"},{"$ref":"#/components/schemas/EmailSentEvent"},{"$ref":"#/components/schemas/EmailDeliveredEvent"},{"$ref":"#/components/schemas/EmailOpenedEvent"},{"$ref":"#/components/schemas/EmailClickedEvent"},{"$ref":"#/components/schemas/EmailBouncedEvent"},{"$ref":"#/components/schemas/EmailComplainedEvent"},{"$ref":"#/components/schemas/EmailFailedEvent"},{"$ref":"#/components/schemas/CampaignSentEvent"},{"$ref":"#/components/schemas/CampaignCanceledEvent"},{"$ref":"#/components/schemas/DomainVerifiedEvent"},{"$ref":"#/components/schemas/ContactImportCompletedEvent"},{"$ref":"#/components/schemas/ContactImportFailedEvent"}]},"WebhookTestEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"webhook.test"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"message":{"type":"string"}},"required":["endpoint","message"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A test event, sent only when you ask for one, to that endpoint"},"ContactCreatedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"contact.created"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"}},"required":["contact"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A contact was created"},"ContactUpdatedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"contact.updated"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"changedFields":{"type":"array","items":{"type":"string"},"description":"The fields that changed, like `firstName` or `properties.plan`"}},"required":["contact","changedFields"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A contact’s fields or custom properties changed"},"ContactDeletedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"contact.deleted"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["contact"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A contact was deleted"},"ContactSubscribedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"contact.subscribed"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"source":{"type":"string","enum":["api","dashboard","import","form","double_opt_in","preference_center","unsubscribe_link","one_click_unsubscribe","bounce","complaint","workflow"],"description":"How the change happened"},"reason":{"description":"The reason the contact gave, or the bounce or complaint details","type":"string"},"mailingList":{"description":"The mailing list; when absent, it’s marketing email as a whole","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["contact","source"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A contact subscribed, to marketing email or to a mailing list"},"ContactUnsubscribedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"contact.unsubscribed"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"source":{"type":"string","enum":["api","dashboard","import","form","double_opt_in","preference_center","unsubscribe_link","one_click_unsubscribe","bounce","complaint","workflow"],"description":"How the change happened"},"reason":{"description":"The reason the contact gave, or the bounce or complaint details","type":"string"},"mailingList":{"description":"The mailing list; when absent, it’s marketing email as a whole","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["contact","source"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A contact unsubscribed, or was unsubscribed, from marketing email or a mailing list"},"ContactTagAddedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"contact.tag_added"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"tag":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["contact","tag"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A contact was tagged"},"ContactTagRemovedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"contact.tag_removed"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"tag":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["contact","tag"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A tag was removed from a contact"},"EmailSentEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"email.sent"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"campaign":{"description":"The campaign that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workflow":{"description":"The workflow that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["contact"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A campaign or workflow email was sent"},"EmailDeliveredEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"email.delivered"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"campaign":{"description":"The campaign that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workflow":{"description":"The workflow that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["contact"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A campaign or workflow email was delivered"},"EmailOpenedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"email.opened"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"campaign":{"description":"The campaign that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workflow":{"description":"The workflow that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["contact"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A contact first opened an email"},"EmailClickedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"email.clicked"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"campaign":{"description":"The campaign that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workflow":{"description":"The workflow that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["contact"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A contact first clicked a link in an email"},"EmailBouncedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"email.bounced"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"campaign":{"description":"The campaign that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workflow":{"description":"The workflow that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["contact"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"An email bounced"},"EmailComplainedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"email.complained"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"campaign":{"description":"The campaign that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workflow":{"description":"The workflow that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["contact"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A contact marked an email as spam"},"EmailFailedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"email.failed"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false,"description":"A contact deleted since"}],"description":"The contact as it is when the event is sent, seconds after the change"},"campaign":{"description":"The campaign that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workflow":{"description":"The workflow that sent the email","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"error":{"type":"string","description":"A code for why it couldn’t be sent"}},"required":["contact","error"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"An email couldn’t be sent"},"CampaignSentEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"campaign.sent"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["campaign"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A campaign started sending"},"CampaignCanceledEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"campaign.canceled"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["campaign"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A campaign was canceled"},"DomainVerifiedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"domain.verified"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"domain":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["domain"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A sending domain was verified"},"ContactImportCompletedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"contact_import.completed"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"import":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"}},"required":["id","fileName"],"additionalProperties":false},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rows read"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["import","rows","created","updated","skipped","failed"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A CSV import of contacts finished. Imported contacts send no contact events of their own"},"ContactImportFailedEvent":{"type":"object","properties":{"id":{"type":"string","description":"Like `evt_…`. The same on every delivery attempt: use it to skip duplicates"},"type":{"type":"string","const":"contact_import.failed"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened"},"data":{"type":"object","properties":{"import":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"}},"required":["id","fileName"],"additionalProperties":false},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rows read"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"description":"Why the import stopped","type":"string"}},"required":["import","rows","created","updated","skipped","failed"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false,"description":"A CSV import of contacts stopped with an error; rows written before it stay"}}},"security":[{"apiKey":[]},{"oauth2":[]}],"paths":{"/me":{"get":{"operationId":"getMe","tags":["Account"],"summary":"Get the caller","description":"Who the API key or access token is: the key and its workspace, or the connected app, the member who connected it and their workspace. Use it to check a credential, and to find the `organizationId` other routes need.","responses":{"200":{"description":"The caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Caller"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizations/{organizationId}/contacts":{"get":{"operationId":"listContacts","tags":["Contacts"],"summary":"List contacts","description":"Newest first. Filter by `email` or `externalId` to find one contact: each is unique in a workspace, and `email` is matched ignoring case. `search` matches part of an email or name.","responses":{"200":{"description":"A page of contacts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"nextCursor":{"description":"Pass as `cursor` to get the next page; null on the last page","type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"description":"How many items a page holds"},{"in":"query","name":"cursor","schema":{"type":"string"},"description":"The `nextCursor` of the previous page"},{"in":"query","name":"status","schema":{"type":"string","enum":["subscribed","pending","unsubscribed","bounced","complained"]},"description":"Only contacts with this status"},{"in":"query","name":"email","schema":{"type":"string"},"description":"The contact with this email, ignoring case"},{"in":"query","name":"externalId","schema":{"type":"string","minLength":1,"maxLength":255},"description":"The contact with this external ID"},{"in":"query","name":"tag","schema":{"type":"string"},"description":"Only contacts with this tag, by ID"},{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":100},"description":"Contacts whose email or name contains this, ignoring case"}],"security":[{"apiKey":[]},{"oauth2":["contacts:read"]}]},"put":{"operationId":"upsertContact","tags":["Contacts"],"summary":"Create or update a contact","description":"Matches the contact by `externalId` when you send one, else by `email`, so it can also change a contact’s email. Fields you leave out keep their value, and `null` clears one. Unknown fields are refused.\n\n`tags` are added by name: a name that isn’t a tag yet creates one, which needs the `tag: create` permission too. `mailingLists` subscribes the contact to lists by ID; lists it’s on stay as they are.\n\nConsent is enforced: a contact who unsubscribed themselves can only be subscribed again by themselves, and asking for it is refused with a 409.","responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace’s plan doesn’t allow this, like more contacts than it includes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state; `error` says how","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}}],"security":[{"apiKey":[]},{"oauth2":["contacts:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"description":"Matched ignoring case","type":"string"},"externalId":{"description":"The contact’s ID in your own system. Unique in the workspace, and matched before the email.","anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"status":{"description":"Whether to email the contact. New contacts start as `subscribed`. Only subscribe people who agreed to get email.","type":"string","enum":["subscribed","unsubscribed"]},"language":{"description":"A BCP 47 language tag, like `en` or `pt-BR`","anyOf":[{"type":"string","maxLength":35},{"type":"null"}]},"timeZone":{"description":"An IANA time zone, like `Europe/Berlin`","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"country":{"description":"An ISO 3166-1 alpha-2 code, like `DE`","type":["string","null"]},"birthday":{"description":"`YYYY-MM-DD`, or `--MM-DD` when you don’t know the year, like `1990-05-14` or `--05-14`","type":["string","null"]},"notes":{"description":"Notes for your team. Contacts never see them.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"properties":{"description":"Custom property values, by property key. Each must match its property’s type, and `null` removes a value.","type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"tags":{"description":"Tags to add, by name, ignoring case. The contact keeps the tags it has. A new name creates a tag, which also needs the `tag: create` permission.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"mailingLists":{"description":"Mailing lists to subscribe the contact to, by ID. Lists it’s on stay as they are. The contact must be subscribed.","maxItems":50,"type":"array","items":{"type":"string","description":"Like `list_…`"}},"source":{"description":"Where the contact came from, like `checkout` or `zapier`. Kept only when the contact is created.","type":"string","minLength":1,"maxLength":64}},"required":["email"],"additionalProperties":false}}}}}},"/organizations/{organizationId}/contacts/{contactId}":{"get":{"operationId":"getContact","tags":["Contacts"],"summary":"Get a contact","responses":{"200":{"description":"The contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}},{"in":"path","name":"contactId","schema":{"type":"string"},"required":true,"description":"Like `con_…`"}],"security":[{"apiKey":[]},{"oauth2":["contacts:read"]}]},"patch":{"operationId":"updateContact","tags":["Contacts"],"summary":"Update a contact","description":"Changes the fields you send, its email included; the rest keep their value, and `null` clears one. Send at least one field. `tags` and `mailingLists` add, as when creating or updating a contact, and the same consent rules apply.","responses":{"200":{"description":"The contact, updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The workspace’s plan doesn’t allow this, like more contacts than it includes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state; `error` says how","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}},{"in":"path","name":"contactId","schema":{"type":"string"},"required":true,"description":"Like `con_…`"}],"security":[{"apiKey":[]},{"oauth2":["contacts:write"]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"externalId":{"description":"The contact’s ID in your own system. Unique in the workspace, and matched before the email.","anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"status":{"description":"Whether to email the contact. New contacts start as `subscribed`. Only subscribe people who agreed to get email.","type":"string","enum":["subscribed","unsubscribed"]},"language":{"description":"A BCP 47 language tag, like `en` or `pt-BR`","anyOf":[{"type":"string","maxLength":35},{"type":"null"}]},"timeZone":{"description":"An IANA time zone, like `Europe/Berlin`","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"country":{"description":"An ISO 3166-1 alpha-2 code, like `DE`","type":["string","null"]},"birthday":{"description":"`YYYY-MM-DD`, or `--MM-DD` when you don’t know the year, like `1990-05-14` or `--05-14`","type":["string","null"]},"notes":{"description":"Notes for your team. Contacts never see them.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"properties":{"description":"Custom property values, by property key. Each must match its property’s type, and `null` removes a value.","type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"tags":{"description":"Tags to add, by name, ignoring case. The contact keeps the tags it has. A new name creates a tag, which also needs the `tag: create` permission.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"mailingLists":{"description":"Mailing lists to subscribe the contact to, by ID. Lists it’s on stay as they are. The contact must be subscribed.","maxItems":50,"type":"array","items":{"type":"string","description":"Like `list_…`"}}},"additionalProperties":false}}}}}},"/organizations/{organizationId}/events":{"post":{"operationId":"recordEvents","tags":["Events"],"summary":"Record events","description":"Records what contacts did, like `signed_up` or `order.paid`, up to 100 at a time. Each event goes on its contact’s timeline and starts the active workflows triggered by a custom event of that name. Name each contact by `contactId` or `email`. Events for contacts that don’t exist aren’t recorded: their positions in `events` come back in `notFound`. Nothing creates a contact.","responses":{"200":{"description":"What was recorded","content":{"application/json":{"schema":{"type":"object","properties":{"recorded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many events were recorded"},"notFound":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Positions in `events` (from 0) whose contact doesn’t exist"}},"required":["recorded","notFound"],"additionalProperties":false}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}}],"security":[{"apiKey":[]},{"oauth2":["contacts:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"contactId":{"description":"The contact, by ID. Send this or `email`.","type":"string"},"email":{"description":"The contact, by email. Send this or `contactId`.","type":"string"},"name":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,99}$","description":"What the contact did, like `signed_up` or `order.paid`: up to 100 letters, digits, `_`, `.`, `:` or `-`, starting with a letter or digit"},"properties":{"description":"Details shown on the contact’s timeline, like `{ \"plan\": \"pro\" }`. Up to 20, each value up to 500 characters.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"required":["name"],"additionalProperties":false}}},"required":["events"],"additionalProperties":false}}}}}},"/organizations/{organizationId}/mailing-lists":{"get":{"operationId":"listMailingLists","tags":["Mailing lists"],"summary":"List mailing lists","description":"Newest first, each with how many contacts are subscribed to it.","responses":{"200":{"description":"A page of mailing lists","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MailingList"}},"nextCursor":{"description":"Pass as `cursor` to get the next page; null on the last page","type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"description":"How many items a page holds"},{"in":"query","name":"cursor","schema":{"type":"string"},"description":"The `nextCursor` of the previous page"}],"security":[{"apiKey":[]},{"oauth2":["contacts:read"]}]}},"/organizations/{organizationId}/mailing-lists/{mailingListId}/contacts":{"post":{"operationId":"changeMailingListSubscriptions","tags":["Mailing lists"],"summary":"Subscribe or unsubscribe contacts","description":"Subscribes contacts to the list and unsubscribes them, by ID, up to 1000 at a time. Unsubscribing keeps the contact on the list as `unsubscribed`. A contact already in the state you ask for is left alone. Subscribing is refused, and listed in `refused` with the reason, for a contact whose own status isn’t `subscribed` and for one who unsubscribed from this list themselves: only they can subscribe again.","responses":{"200":{"description":"What changed","content":{"application/json":{"schema":{"type":"object","properties":{"subscribed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Contacts subscribed by this request"},"unsubscribed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Contacts unsubscribed by this request"},"refused":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"}},"required":["id","reason"],"additionalProperties":false},"description":"Contacts that can’t be subscribed, and why"},"notFound":{"type":"array","items":{"type":"string"},"description":"IDs that aren’t contacts in this workspace"}},"required":["subscribed","unsubscribed","refused","notFound"],"additionalProperties":false}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}},{"in":"path","name":"mailingListId","schema":{"type":"string"},"required":true,"description":"Like `list_…`"}],"security":[{"apiKey":[]},{"oauth2":["contacts:write"]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"subscribe":{"description":"Contacts to subscribe, by ID","maxItems":1000,"type":"array","items":{"type":"string","description":"Like `con_…`"}},"unsubscribe":{"description":"Contacts to unsubscribe, by ID","maxItems":1000,"type":"array","items":{"type":"string","description":"Like `con_…`"}}},"additionalProperties":false}}}}}},"/organizations/{organizationId}/tags":{"get":{"operationId":"listTags","tags":["Tags"],"summary":"List tags","description":"Newest first, each with how many contacts have it. `name` finds tags whose name starts with it, ignoring case.","responses":{"200":{"description":"A page of tags","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"nextCursor":{"description":"Pass as `cursor` to get the next page; null on the last page","type":["string","null"]}},"required":["data","nextCursor"],"additionalProperties":false}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"description":"How many items a page holds"},{"in":"query","name":"cursor","schema":{"type":"string"},"description":"The `nextCursor` of the previous page"},{"in":"query","name":"name","schema":{"type":"string","minLength":1,"maxLength":100},"description":"Tags whose name starts with this, ignoring case"}],"security":[{"apiKey":[]},{"oauth2":["contacts:read"]}]}},"/organizations/{organizationId}/tags/{tagId}/contacts":{"post":{"operationId":"changeTagContacts","tags":["Tags"],"summary":"Tag or untag contacts","description":"Adds the tag to contacts and removes it from others, by ID, up to 1000 at a time. Adding a tag a contact has, or removing one it doesn’t, changes nothing.","responses":{"200":{"description":"What changed","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Contacts tagged by this request"},"removed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Contacts untagged by this request"},"notFound":{"type":"array","items":{"type":"string"},"description":"IDs that aren’t contacts in this workspace"}},"required":["added","removed","notFound"],"additionalProperties":false}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}},{"in":"path","name":"tagId","schema":{"type":"string"},"required":true,"description":"Like `tag_…`"}],"security":[{"apiKey":[]},{"oauth2":["contacts:write"]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"add":{"description":"Contacts to tag, by ID","maxItems":1000,"type":"array","items":{"type":"string","description":"Like `con_…`"}},"remove":{"description":"Contacts to untag, by ID","maxItems":1000,"type":"array","items":{"type":"string","description":"Like `con_…`"}}},"additionalProperties":false}}}}}},"/organizations/{organizationId}/webhooks/endpoints":{"post":{"operationId":"createWebhookEndpoint","tags":["Webhooks"],"summary":"Create a webhook endpoint","description":"Starts posting the event types you list to `url`, from now on. Deliveries are in the API version you name in `apiVersion`, else the request’s. A workspace can have up to 25 endpoints.","responses":{"201":{"description":"The endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state; `error` says how","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}}],"security":[{"apiKey":[]},{"oauth2":["webhooks"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri","description":"Where to post events: an `https://` URL on the public internet"},"description":{"description":"A note to say what it’s for","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"eventTypes":{"description":"The event types to post","minItems":1,"type":"array","items":{"type":"string","enum":["contact.created","contact.updated","contact.deleted","contact.subscribed","contact.unsubscribed","contact.tag_added","contact.tag_removed","email.sent","email.delivered","email.opened","email.clicked","email.bounced","email.complained","email.failed","campaign.sent","campaign.canceled","domain.verified","contact_import.completed","contact_import.failed"]}},"apiVersion":{"description":"The API version to post events in; the request’s when left out","type":"string","enum":["2026-10-27"]}},"required":["url","eventTypes"],"additionalProperties":false}}}}}},"/organizations/{organizationId}/webhooks/endpoints/{endpointId}":{"delete":{"operationId":"deleteWebhookEndpoint","tags":["Webhooks"],"summary":"Delete a webhook endpoint","description":"Stops posting to it at once: deliveries not made yet are dropped.","responses":{"204":{"description":"Deleted"},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}},{"in":"path","name":"endpointId","schema":{"type":"string"},"required":true,"description":"Like `whep_…`"}],"security":[{"apiKey":[]},{"oauth2":["webhooks"]}]}},"/organizations/{organizationId}/webhooks/events":{"get":{"operationId":"listWebhookEvents","tags":["Webhooks"],"summary":"List webhook events","description":"The events of the last 30 days, newest first, as they were delivered: to catch up after your endpoint was down, or to load recent examples. Sendwing records an event only while an enabled endpoint in the workspace listens for its type.","responses":{"200":{"description":"A page of events","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEvent"}},"nextCursor":{"description":"Pass as `cursor` to get the next page; null on the last page","type":["string","null"]},"retentionDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many days events are kept"}},"required":["data","nextCursor","retentionDays"],"additionalProperties":false}}}},"400":{"description":"The request isn’t valid; `issues` lists each problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key or access token is missing, invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for the seconds in `Retry-After`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"organizationId","in":"path","required":true,"description":"The workspace, like `org_…`. An OAuth access token works in the one the member picked when connecting, which `GET /me` returns.","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"description":"How many items a page holds"},{"in":"query","name":"cursor","schema":{"type":"string"},"description":"The `nextCursor` of the previous page"},{"in":"query","name":"type","schema":{"type":"string","enum":["contact.created","contact.updated","contact.deleted","contact.subscribed","contact.unsubscribed","contact.tag_added","contact.tag_removed","email.sent","email.delivered","email.opened","email.clicked","email.bounced","email.complained","email.failed","campaign.sent","campaign.canceled","domain.verified","contact_import.completed","contact_import.failed","webhook.test"]},"description":"Only events of this type"}],"security":[{"apiKey":[]},{"oauth2":["webhooks"]}]}}}}