{"openapi":"3.1.0","info":{"title":"Lath API","version":"0.1.0","description":"Every operation is one POST. The same set is reachable over MCP, the SDK and the CLI; nothing is dashboard-only."},"servers":[{"url":"https://platform.trylath.com","description":"This deployment"}],"components":{"schemas":{"email_automation_create_input___schema0":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"wait"},"seconds":{"type":"integer","minimum":1,"maximum":7776000,"description":"Up to 90 days"}},"required":["type","seconds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"send"},"channel":{"default":"email","type":"string","enum":["email","sms"]},"template":{"type":"string","minLength":1,"maxLength":100},"topic":{"type":"string","minLength":1,"maxLength":100,"description":"The consent topic this message belongs to; the contact must have granted it on this channel"},"from":{"description":"Email only, and required there: an address on a verified sending domain. An SMS sends from the deployment's number.","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"subject":{"description":"Email only: overrides the template subject","type":"string","maxLength":300},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}}},"required":["type","template","topic"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"property.set"},"key":{"type":"string","minLength":1,"maxLength":100},"value":{"type":["string","number","boolean","null"]}},"required":["type","key","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"branch"},"if":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":200,"description":"properties.<key> on the contact, context.<key> from the triggering event, or consent.<topic> (true when granted). Consent is per channel: consent.<topic> and consent.email.<topic> both mean email, and consent.sms.<topic> means text."},"op":{"type":"string","enum":["eq","neq","exists","not_exists","gt","lt","contains"]},"value":{"description":"Omitted for exists/not_exists","type":["string","number","boolean"]}},"required":["field","op"],"additionalProperties":false},"then":{"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/email_automation_create_input___schema0"}},"else":{"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/email_automation_create_input___schema0"}}},"required":["type","if","then","else"],"additionalProperties":false}]},"email_automation_update_input___schema0":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"wait"},"seconds":{"type":"integer","minimum":1,"maximum":7776000,"description":"Up to 90 days"}},"required":["type","seconds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"send"},"channel":{"default":"email","type":"string","enum":["email","sms"]},"template":{"type":"string","minLength":1,"maxLength":100},"topic":{"type":"string","minLength":1,"maxLength":100,"description":"The consent topic this message belongs to; the contact must have granted it on this channel"},"from":{"description":"Email only, and required there: an address on a verified sending domain. An SMS sends from the deployment's number.","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"subject":{"description":"Email only: overrides the template subject","type":"string","maxLength":300},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}}},"required":["type","template","topic"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"property.set"},"key":{"type":"string","minLength":1,"maxLength":100},"value":{"type":["string","number","boolean","null"]}},"required":["type","key","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"branch"},"if":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":200,"description":"properties.<key> on the contact, context.<key> from the triggering event, or consent.<topic> (true when granted). Consent is per channel: consent.<topic> and consent.email.<topic> both mean email, and consent.sms.<topic> means text."},"op":{"type":"string","enum":["eq","neq","exists","not_exists","gt","lt","contains"]},"value":{"description":"Omitted for exists/not_exists","type":["string","number","boolean"]}},"required":["field","op"],"additionalProperties":false},"then":{"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/email_automation_update_input___schema0"}},"else":{"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/email_automation_update_input___schema0"}}},"required":["type","if","then","else"],"additionalProperties":false}]}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A Lath API key: lath_live_sk… or lath_test_sk… on a server, lath_live_pk… or lath_test_pk… in a browser."}}},"paths":{"/account/close":{"post":{"operationId":"account.close","summary":"account.close","description":"Closes the account. Nothing is deleted: messages, consent records and invoices outlive the closure, because a consent audit or a billing dispute arrives after someone leaves. Sending stops, and account.reopen undoes it.","tags":["account"],"x-lath-impact":{"destructive":true,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"account:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"country":{"type":["string","null"]},"heardFrom":{"anyOf":[{"type":"string","enum":["search","ai_assistant","social","referral","content","community","event","other"]},{"type":"null"}]},"heardFromDetail":{"type":["string","null"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"closedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"closedReason":{"type":["string","null"]}},"required":["id","name","country","heardFrom","heardFromDetail","createdAt","closedAt","closedReason"],"additionalProperties":{}}},"required":["account"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/get":{"post":{"operationId":"account.get","summary":"account.get","description":"Returns the account this key or member belongs to: its name, country, when it was created, and whether it has been closed. Reads nothing about other accounts, because there is no way to name one.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"account:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"country":{"type":["string","null"]},"heardFrom":{"anyOf":[{"type":"string","enum":["search","ai_assistant","social","referral","content","community","event","other"]},{"type":"null"}]},"heardFromDetail":{"type":["string","null"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"closedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"closedReason":{"type":["string","null"]}},"required":["id","name","country","heardFrom","heardFromDetail","createdAt","closedAt","closedReason"],"additionalProperties":{}},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":{}}},"memberCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["account","projects","memberCount"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/member/accept":{"post":{"operationId":"account.member.accept","summary":"account.member.accept","description":"Public, for the dashboard: accepts an invitation. The token from the invitation link names the invite; the dashboard access token proves the person holds the invited address. The member becomes active and can open the account.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"none","x-lath-scope":{"pretenant":true},"security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","pattern":"^lath_iv_[0-9A-Za-z]{43}$"},"accessToken":{"type":"string","minLength":20,"description":"The dashboard session of the person accepting"}},"required":["token","accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"activityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"member":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","viewer"]},"status":{"type":"string","enum":["invited","active","removed"]},"invitedBy":{"type":["string","null"]},"inviteExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"acceptedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","email","role","status","invitedBy","inviteExpiresAt","acceptedAt","createdAt"],"additionalProperties":{}},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["activityId","member","accountId"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/member/invite":{"post":{"operationId":"account.member.invite","summary":"account.member.invite","description":"Invites a person to the account by email with a role, and queues the invitation email (template account.member.invite). Inviting an address that is already invited re-sends the same link. The person becomes active when they accept in the dashboard with a sign-in on that address.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"account:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"default":"developer","type":"string","enum":["owner","admin","developer","viewer"]}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","viewer"]},"status":{"type":"string","enum":["invited","active","removed"]},"invitedBy":{"type":["string","null"]},"inviteExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"acceptedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","email","role","status","invitedBy","inviteExpiresAt","acceptedAt","createdAt"],"additionalProperties":{}},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"resent":{"type":"boolean"}},"required":["member","messageId","expiresAt","resent"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/member/list":{"post":{"operationId":"account.member.list","summary":"account.member.list","description":"Lists the account's members and pending invitations with their roles.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"account:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":{}},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","viewer"]},"status":{"type":"string","enum":["invited","active","removed"]},"invitedBy":{"type":["string","null"]},"inviteExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"acceptedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","email","role","status","invitedBy","inviteExpiresAt","acceptedAt","createdAt"],"additionalProperties":{}}},"roles":{"type":"array","items":{"type":"string"}}},"required":["account","members","roles"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/member/remove":{"post":{"operationId":"account.member.remove","summary":"account.member.remove","description":"Removes a member or withdraws a pending invitation. Refuses to remove the account's only active owner. Their dashboard sessions end.","tags":["account"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"account:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"memberId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["memberId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","viewer"]},"status":{"type":"string","enum":["invited","active","removed"]},"invitedBy":{"type":["string","null"]},"inviteExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"acceptedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","email","role","status","invitedBy","inviteExpiresAt","acceptedAt","createdAt"],"additionalProperties":{}}},"required":["member"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/member/update":{"post":{"operationId":"account.member.update","summary":"account.member.update","description":"Changes a member's role. Refuses to demote the account's only active owner.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"account:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"memberId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","enum":["owner","admin","developer","viewer"]}},"required":["memberId","role"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","viewer"]},"status":{"type":"string","enum":["invited","active","removed"]},"invitedBy":{"type":["string","null"]},"inviteExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"acceptedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","email","role","status","invitedBy","inviteExpiresAt","acceptedAt","createdAt"],"additionalProperties":{}}},"required":["member"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/reopen":{"post":{"operationId":"account.reopen","summary":"account.reopen","description":"Reopens a closed account and lets it send again. The closure and its reason stay in the event log.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"account:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"country":{"type":["string","null"]},"heardFrom":{"anyOf":[{"type":"string","enum":["search","ai_assistant","social","referral","content","community","event","other"]},{"type":"null"}]},"heardFromDetail":{"type":["string","null"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"closedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"closedReason":{"type":["string","null"]}},"required":["id","name","country","heardFrom","heardFromDetail","createdAt","closedAt","closedReason"],"additionalProperties":{}}},"required":["account"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/signup":{"post":{"operationId":"account.signup","summary":"account.signup","description":"Creates an account, a project, live and test environments, a secret and a publishable key per environment, and the owner's seat. Keys are returned once and never again and work immediately. The owner seat activates when the person accepts the returned (and emailed) link with a console sign-in on that address.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"none","x-lath-scope":{"pretenant":true},"security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"accountName":{"type":"string","minLength":1,"maxLength":80},"country":{"type":"string","minLength":2,"maxLength":2}},"required":["email","country"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"activityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"live":{"type":"object","properties":{"environmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":"string"},"publishableKey":{"type":"string"}},"required":["environmentId","key","publishableKey"],"additionalProperties":{}},"test":{"type":"object","properties":{"environmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":"string"},"publishableKey":{"type":"string"}},"required":["environmentId","key","publishableKey"],"additionalProperties":{}},"owner":{"type":"object","properties":{"email":{"type":"string"},"memberId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","const":"invited"},"acceptUrl":{"type":"string"},"acceptExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["email","memberId","status","acceptUrl","acceptExpiresAt","messageId"],"additionalProperties":{}},"agent":{}},"required":["activityId","accountId","projectId","live","test","owner","agent"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/theme/get":{"post":{"operationId":"account.theme.get","summary":"account.theme.get","description":"Returns the project's theme: the published version hosted pages render, the draft being edited, the effective values with defaults filled in, and `overrides` — only the keys this project has actually set, which is what an editor needs to tell a customisation from a default.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"account:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"published":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"copy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"overrides":{"type":"object","properties":{"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"copy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["tokens","copy"],"additionalProperties":{}},"publishedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["version","tokens","copy","overrides","publishedAt"],"additionalProperties":{}},{"type":"null"}]},"draft":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"copy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"overrides":{"type":"object","properties":{"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"copy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["tokens","copy"],"additionalProperties":{}},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["version","tokens","copy","overrides","createdAt"],"additionalProperties":{}},{"type":"null"}]},"defaults":{"type":"object","properties":{"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"copy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["tokens","copy"],"additionalProperties":{}},"tokenKeys":{"type":"array","items":{"type":"string"}},"copyKeys":{"type":"array","items":{"type":"string"}}},"required":["published","draft","defaults","tokenKeys","copyKeys"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/theme/publish":{"post":{"operationId":"account.theme.publish","summary":"account.theme.publish","description":"Makes the current draft the published theme. Hosted pages and components pick it up on their next request.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"account:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"published":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"publishedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"copy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["version","publishedAt","tokens","copy"],"additionalProperties":{}}},"required":["published"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/theme/reset":{"post":{"operationId":"account.theme.reset","summary":"account.theme.reset","description":"Discards the draft, or with `published: true` also unpublishes so end users see the defaults again.","tags":["account"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"account:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"published":{"default":false,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"archived":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["archived"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/theme/set":{"post":{"operationId":"account.theme.set","summary":"account.theme.set","description":"Writes a new draft of the project's theme by merging the given tokens and copy over the current draft (or the published version if no draft exists). A key you omit is left alone, a string sets it, and null removes that one override so the key goes back to the default. Refuses any text colour pair below WCAG AA and returns the nearest passing values. Nothing changes for end users until account.theme.publish.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"account:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tokens":{"type":"object","properties":{"bg-canvas":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"bg-surface":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"bg-surface-hover":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"bg-inset":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"border-hairline":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"border-strong":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"fg-primary":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"fg-secondary":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"fg-faint":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"action-primary-bg":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"fg-on-action":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"focus-ring":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"danger-fg":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"danger-bg":{"anyOf":[{"type":"string","pattern":"^#([0-9a-fA-F]{6})$"},{"type":"null"}]},"font-ui":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"font-mono":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"radius-sm":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}px$"},{"type":"null"}]},"radius-md":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}px$"},{"type":"null"}]},"radius-lg":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}px$"},{"type":"null"}]},"logo-url":{"anyOf":[{"anyOf":[{"type":"string","const":""},{"type":"string","format":"uri"}]},{"type":"null"}]}},"additionalProperties":false},"copy":{"type":"object","properties":{"signin.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.email.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.email.placeholder":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.phone.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.phone.placeholder":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.sms.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.code.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.code.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.code.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.code.resend":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.code.resend_in":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.code.expires_in":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.code.expired":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.link.sent":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.link.spent":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.link.again":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.google":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.microsoft":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.github":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.unsubscribe_all":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.saved":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"device.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"device.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"device.code.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"device.continue":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"device.email.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"device.approve":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"device.deny":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"device.approved":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"device.denied":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.addresses":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.primary":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.remove":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.last":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.add.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.add.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.add.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.added":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.removed":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.done":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.back":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.remove_label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.unavailable":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.unavailable_fix":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.method_off":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.method_off_fix":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.offline":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.offline_fix":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.phone.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.phone.placeholder":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.phone.use_phone":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.phone.use_email":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.phone.invalid":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.phone.invalid_fix":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.phone.code.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.phone.add.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"recovery.reauth":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.password.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.password.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.password.use":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.code.use":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.passkey.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.or":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.have_account":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.name.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.name.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.name.placeholder":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.password.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.passkey.offer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.passkey.add":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.finish":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.skip":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.done":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.code.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.recovery.use":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.recovery.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.recovery.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.code.use":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.enrol.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.enrol.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.enrol.secret":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.enrol.code.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.enrol.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.recovery.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.recovery.explain":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.recovery.saved":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.recovery.regenerate":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"mfa.recovery.left":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.name.label":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.name.save":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.addresses.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.addresses.add":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.addresses.primary":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.addresses.remove":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.passkeys.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.passkeys.empty":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.passkeys.add":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.passkeys.remove":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.passkeys.last_used":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.passkeys.never_used":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.password.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.password.none":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.password.set":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.password.change":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.password.remove":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.password.new":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.password.save":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.mfa.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.mfa.off":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.mfa.on":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.mfa.enable":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.mfa.disable":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.reauth":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.cancel":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"profile.saved":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.personal":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.switch":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.create":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.create.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.create.name":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.create.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.none":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.role.owner":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.role.admin":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.role.member":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.members":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invites":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invite.email":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invite.role":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invite.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invite.revoke":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.member.remove":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.member.you":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.leave":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.left":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.settings.mfa":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.mfa_required":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invite.accept.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invite.accept.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invite.accept.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invite.accept.signin":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invite.accept.done":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"orgs.invite.accept.joined":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"error.generic":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.signout":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.link.submit":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.offline":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.no_methods":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signup.closed":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"signin.signed_in_as":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"email.footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"email.legal_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"email.unsubscribe":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"email.preferences":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.save":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"page.lang":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.channel.email":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.channel.sms":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.no_topics":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.save_failed":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.invalid.title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.invalid.body":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"preferences.unsubscribed_all":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"draft":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"copy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["version","tokens","copy"],"additionalProperties":{}}},"required":["draft"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/account/update":{"post":{"operationId":"account.update","summary":"account.update","description":"Renames the account, corrects its country, or records how the account heard about Lath. The name appears on invoices and in the dashboard; the country decides carrier and tax treatment, so changing it does not re-file any registration already submitted.","tags":["account"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"account:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"country":{"type":"string","minLength":2,"maxLength":2},"heardFrom":{"description":"How the account heard about Lath: search, ai_assistant, social, referral, content, community, event, or other.","type":"string","enum":["search","ai_assistant","social","referral","content","community","event","other"]},"heardFromDetail":{"description":"Optional detail in the customer's own words — which podcast, which friend. Needs a heardFrom, given here or already stored. Null or empty clears it.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"country":{"type":["string","null"]},"heardFrom":{"anyOf":[{"type":"string","enum":["search","ai_assistant","social","referral","content","community","event","other"]},{"type":"null"}]},"heardFromDetail":{"type":["string","null"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"closedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"closedReason":{"type":["string","null"]}},"required":["id","name","country","heardFrom","heardFromDetail","createdAt","closedAt","closedReason"],"additionalProperties":{}}},"required":["account"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/consent/grant":{"post":{"operationId":"audience.consent.grant","summary":"audience.consent.grant","description":"Records that a contact opted in to a channel and topic, storing what they were shown and where. A fresh grant lifts an unsubscribe or STOP suppression on that address. It does not lift a bounce or a complaint: those are facts about deliverability rather than permission, and only the person acting through the preferences page can clear them.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"},"wording":{"type":"string","minLength":1,"maxLength":1000,"description":"The exact opt-in text the person agreed to"},"source":{"type":"string","minLength":1,"maxLength":200,"description":"Where consent was collected, e.g. 'checkout-newsletter-box'"},"ip":{"type":"string","maxLength":64}},"required":["contactId","channel","topic","wording","source"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string"},"status":{"type":"string","const":"granted"},"suppressionsLifted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["contactId","channel","topic","status","suppressionsLifted"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/consent/list":{"post":{"operationId":"audience.consent.list","summary":"audience.consent.list","description":"Returns the full consent history for a contact, newest first, for proving opt-in when asked.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"audience:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"history":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string"},"status":{"type":"string"},"wording":{"type":["string","null"]},"source":{"type":"string"},"ip":{"type":["string","null"]},"occurredAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["channel","topic","status","wording","source","ip","occurredAt"],"additionalProperties":{}}}},"required":["contactId","history"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/consent/revoke":{"post":{"operationId":"audience.consent.revoke","summary":"audience.consent.revoke","description":"Records that a contact opted out of a channel and topic. Appends to the history; the previous grant is not erased.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"},"source":{"type":"string","minLength":1,"maxLength":200}},"required":["contactId","channel","topic","source"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string"},"status":{"type":"string","const":"revoked"}},"required":["contactId","channel","topic","status"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/contact/create":{"post":{"operationId":"audience.contact.create","summary":"audience.contact.create","description":"Creates a contact with an email and/or phone, an optional language and optional properties. The language decides which template variant they receive. Consent is recorded separately with audience.consent.grant.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"locale":{"description":"The contact's language, e.g. 'fr' or 'pt-BR'. Templates with a variant for it are sent in it. Null means unknown.","anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"locale":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"userId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"consents":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"occurredAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["channel","topic","status","source","occurredAt"],"additionalProperties":{}}},"suppressions":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string"},"reason":{"type":"string"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["channel","address","reason","createdAt"],"additionalProperties":{}}}},"required":["id","email","phone","locale","properties","userId","createdAt","updatedAt","consents","suppressions"],"additionalProperties":{}}},"required":["contact"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/contact/delete":{"post":{"operationId":"audience.contact.delete","summary":"audience.contact.delete","description":"Deletes a contact. The row is kept for audit; its addresses are released and its consent history stays readable through the ledger.","tags":["audience"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deleted":{"type":"boolean"}},"required":["id","deleted"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/contact/export":{"post":{"operationId":"audience.contact.export","summary":"audience.contact.export","description":"Exports contacts in full — properties, locale, the linked user, and every consent record for each — oldest first, paging with `after` until it returns fewer than `limit`. An audience without its consent history cannot lawfully be mailed by anyone, so the two travel together.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"audience:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"after":{"description":"The `nextAfter` from the previous page; omit to start. Opaque — do not construct one.","type":"string","maxLength":200},"limit":{"default":200,"type":"integer","minimum":1,"maximum":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"locale":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"userId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"consents":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string"},"status":{"type":"string"},"wording":{"type":["string","null"]},"source":{"type":"string"},"occurredAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["channel","topic","status","wording","source","occurredAt"],"additionalProperties":{}}}},"required":["id","email","phone","locale","properties","userId","createdAt","updatedAt","consents"],"additionalProperties":{}}},"nextAfter":{"type":["string","null"]}},"required":["contacts","nextAfter"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/contact/get":{"post":{"operationId":"audience.contact.get","summary":"audience.contact.get","description":"Returns one contact with the current consent per channel and topic, and any active suppressions on its addresses.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"audience:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"locale":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"userId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"consents":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"occurredAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["channel","topic","status","source","occurredAt"],"additionalProperties":{}}},"suppressions":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string"},"reason":{"type":"string"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["channel","address","reason","createdAt"],"additionalProperties":{}}}},"required":["id","email","phone","locale","properties","userId","createdAt","updatedAt","consents","suppressions"],"additionalProperties":{}}},"required":["contact"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/contact/import":{"post":{"operationId":"audience.contact.import","summary":"audience.contact.import","description":"Imports up to 1,000 contacts, merging by email or phone. A row grants marketing consent only if it carries a consentSource or the batch carries an attestation; rows with neither import without consent and are counted. Purchased or scraped lists are prohibited.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":true,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rows":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"locale":{"description":"This contact's language, e.g. 'fr' or 'pt-BR'. Decides which template variant they receive.","type":"string","maxLength":20},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"additionalProperties":{}},"consentSource":{"type":"string","minLength":1,"maxLength":200},"consentWording":{"type":"string","maxLength":1000}},"additionalProperties":false}},"attestation":{"type":"string","minLength":1,"maxLength":500},"topics":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"channel":{"default":"email","type":"string","enum":["email","sms"]}},"required":["rows"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"withoutConsent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reason":{"type":"string"}},"required":["row","reason"],"additionalProperties":{}}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["created","updated","withoutConsent","skipped","total"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/contact/list":{"post":{"operationId":"audience.contact.list","summary":"audience.contact.list","description":"Lists contacts newest first. `query` matches the start of an email or phone.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"audience:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"locale":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"userId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","email","phone","locale","properties","userId","createdAt","updatedAt"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["contacts","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/contact/update":{"post":{"operationId":"audience.contact.update","summary":"audience.contact.update","description":"Changes a contact's email, phone, language or properties. Properties are merged key by key; set a key to null to remove it, and set locale to null to go back to not knowing.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},{"type":"null"}]},"locale":{"description":"The contact's language, e.g. 'fr' or 'pt-BR'. Templates with a variant for it are sent in it. Null means unknown.","anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"properties":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"additionalProperties":{}}},"required":["contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"locale":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"userId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"consents":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"occurredAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["channel","topic","status","source","occurredAt"],"additionalProperties":{}}},"suppressions":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string"},"reason":{"type":"string"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["channel","address","reason","createdAt"],"additionalProperties":{}}}},"required":["id","email","phone","locale","properties","userId","createdAt","updatedAt","consents","suppressions"],"additionalProperties":{}}},"required":["contact"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/optin/get":{"post":{"operationId":"audience.optin.get","summary":"audience.optin.get","description":"The complete opt-in record for one address: every consent grant and revocation with the wording shown, the source and the time; the suppression history including STOP, START, bounces and complaints; and whether a message may be sent right now for each topic, transactional and marketing. Keyed by the address rather than by a contact, because that is what a carrier audit or a complaint names — and an address with no contact still has a history worth showing.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"audience:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string","minLength":3,"maxLength":320,"description":"An email address, or a phone number in E.164"}},"required":["channel","address"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string"},"contactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"transactional":{"type":"object","properties":{"allowed":{"type":"boolean"}},"required":["allowed"],"additionalProperties":{}},"marketing":{},"consents":{"type":"array","items":{}},"suppressions":{"type":"array","items":{}}},"required":["channel","address","contactId","transactional","marketing","consents","suppressions"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/preferences/get":{"post":{"operationId":"audience.preferences.get","summary":"audience.preferences.get","description":"Public, for the hosted preferences page: given the token from a message's unsubscribe link, returns the project name, the contact's masked email and phone, and per channel — email and sms — every topic and whether the contact is subscribed to it. A channel the contact has no address for is still described, so a page can say so rather than imply the channel does not exist.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"none","x-lath-scope":{"pretenant":true},"security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","pattern":"^lath_pt_[0-9A-Za-z]{43}$","description":"The token from an unsubscribe or preferences link"}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"activityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"environmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectName":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"channels":{"type":"object","properties":{"email":{"type":"object","properties":{"topics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"subscribed":{"type":"boolean"}},"required":["key","name","description","subscribed"],"additionalProperties":{}}},"unsubscribedAll":{"type":"boolean"},"suppressionReason":{"type":["string","null"]}},"required":["topics","unsubscribedAll","suppressionReason"],"additionalProperties":{}},"sms":{"type":"object","properties":{"topics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"subscribed":{"type":"boolean"}},"required":["key","name","description","subscribed"],"additionalProperties":{}}},"unsubscribedAll":{"type":"boolean"},"suppressionReason":{"type":["string","null"]}},"required":["topics","unsubscribedAll","suppressionReason"],"additionalProperties":{}}},"required":["email","sms"],"additionalProperties":{}}},"required":["activityId","environmentId","projectName","email","phone","channels"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/preferences/set":{"post":{"operationId":"audience.preferences.set","summary":"audience.preferences.set","description":"Public, for the hosted preferences page and one-click unsubscribe: given the token from a message's link, subscribes or unsubscribes the contact per topic on either channel, or unsubscribes from all marketing on one. Every change is an appended consent record naming the preference page as its source. Subscribing here is the only thing that lifts a bounce or complaint suppression, because the token proves the person holds the address.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"none","x-lath-scope":{"pretenant":true},"security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","pattern":"^lath_pt_[0-9A-Za-z]{43}$","description":"The token from an unsubscribe or preferences link"},"email":{"type":"object","properties":{"topics":{"description":"topic key → subscribed","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"boolean"}},"unsubscribeAll":{"description":"true: revoke every topic on this channel and suppress the address for marketing; a later explicit subscribe lifts it","type":"boolean"}},"additionalProperties":false},"sms":{"type":"object","properties":{"topics":{"description":"topic key → subscribed","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"boolean"}},"unsubscribeAll":{"description":"true: revoke every topic on this channel and suppress the address for marketing; a later explicit subscribe lifts it","type":"boolean"}},"additionalProperties":false}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"activityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"environmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectName":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"channels":{"type":"object","properties":{"email":{"type":"object","properties":{"topics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"subscribed":{"type":"boolean"}},"required":["key","name","description","subscribed"],"additionalProperties":{}}},"unsubscribedAll":{"type":"boolean"},"suppressionReason":{"type":["string","null"]}},"required":["topics","unsubscribedAll","suppressionReason"],"additionalProperties":{}},"sms":{"type":"object","properties":{"topics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"subscribed":{"type":"boolean"}},"required":["key","name","description","subscribed"],"additionalProperties":{}}},"unsubscribedAll":{"type":"boolean"},"suppressionReason":{"type":["string","null"]}},"required":["topics","unsubscribedAll","suppressionReason"],"additionalProperties":{}}},"required":["email","sms"],"additionalProperties":{}}},"required":["activityId","environmentId","projectName","email","phone","channels"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/segment/create":{"post":{"operationId":"audience.segment.create","summary":"audience.segment.create","description":"Saves a segment: a named filter over contacts by property, address, consent and creation time.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"definition":{"type":"object","properties":{"all":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number","boolean"]}},"required":["property","op","value"],"additionalProperties":false},{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["exists","missing"]}},"required":["property","op"],"additionalProperties":false},{"type":"object","properties":{"has":{"type":"string","enum":["email","phone"]}},"required":["has"],"additionalProperties":false},{"type":"object","properties":{"consent":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["channel","topic"],"additionalProperties":false}},"required":["consent"],"additionalProperties":false},{"type":"object","properties":{"createdBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdBefore"],"additionalProperties":false},{"type":"object","properties":{"createdAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdAfter"],"additionalProperties":false}]}},"any":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number","boolean"]}},"required":["property","op","value"],"additionalProperties":false},{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["exists","missing"]}},"required":["property","op"],"additionalProperties":false},{"type":"object","properties":{"has":{"type":"string","enum":["email","phone"]}},"required":["has"],"additionalProperties":false},{"type":"object","properties":{"consent":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["channel","topic"],"additionalProperties":false}},"required":["consent"],"additionalProperties":false},{"type":"object","properties":{"createdBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdBefore"],"additionalProperties":false},{"type":"object","properties":{"createdAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdAfter"],"additionalProperties":false}]}},"none":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number","boolean"]}},"required":["property","op","value"],"additionalProperties":false},{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["exists","missing"]}},"required":["property","op"],"additionalProperties":false},{"type":"object","properties":{"has":{"type":"string","enum":["email","phone"]}},"required":["has"],"additionalProperties":false},{"type":"object","properties":{"consent":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["channel","topic"],"additionalProperties":false}},"required":["consent"],"additionalProperties":false},{"type":"object","properties":{"createdBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdBefore"],"additionalProperties":false},{"type":"object","properties":{"createdAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdAfter"],"additionalProperties":false}]}}},"additionalProperties":false}},"required":["name","definition"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"definition":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","definition","createdAt","updatedAt"],"additionalProperties":{}}},"required":["segment"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/segment/delete":{"post":{"operationId":"audience.segment.delete","summary":"audience.segment.delete","description":"Deletes a segment. Contacts are untouched.","tags":["audience"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["segmentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deleted":{"type":"boolean"}},"required":["id","deleted"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/segment/get":{"post":{"operationId":"audience.segment.get","summary":"audience.segment.get","description":"Returns one segment's name and definition.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"audience:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["segmentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"definition":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","definition","createdAt","updatedAt"],"additionalProperties":{}}},"required":["segment"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/segment/list":{"post":{"operationId":"audience.segment.list","summary":"audience.segment.list","description":"Lists this environment's segments.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"audience:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"definition":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","definition","createdAt","updatedAt"],"additionalProperties":{}}}},"required":["segments"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/segment/preview":{"post":{"operationId":"audience.segment.preview","summary":"audience.segment.preview","description":"Counts the contacts a segment matches and returns a small sample, without sending anything. Pass a saved segmentId or an inline definition.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"audience:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"definition":{"type":"object","properties":{"all":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number","boolean"]}},"required":["property","op","value"],"additionalProperties":false},{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["exists","missing"]}},"required":["property","op"],"additionalProperties":false},{"type":"object","properties":{"has":{"type":"string","enum":["email","phone"]}},"required":["has"],"additionalProperties":false},{"type":"object","properties":{"consent":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["channel","topic"],"additionalProperties":false}},"required":["consent"],"additionalProperties":false},{"type":"object","properties":{"createdBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdBefore"],"additionalProperties":false},{"type":"object","properties":{"createdAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdAfter"],"additionalProperties":false}]}},"any":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number","boolean"]}},"required":["property","op","value"],"additionalProperties":false},{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["exists","missing"]}},"required":["property","op"],"additionalProperties":false},{"type":"object","properties":{"has":{"type":"string","enum":["email","phone"]}},"required":["has"],"additionalProperties":false},{"type":"object","properties":{"consent":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["channel","topic"],"additionalProperties":false}},"required":["consent"],"additionalProperties":false},{"type":"object","properties":{"createdBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdBefore"],"additionalProperties":false},{"type":"object","properties":{"createdAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdAfter"],"additionalProperties":false}]}},"none":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number","boolean"]}},"required":["property","op","value"],"additionalProperties":false},{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["exists","missing"]}},"required":["property","op"],"additionalProperties":false},{"type":"object","properties":{"has":{"type":"string","enum":["email","phone"]}},"required":["has"],"additionalProperties":false},{"type":"object","properties":{"consent":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["channel","topic"],"additionalProperties":false}},"required":["consent"],"additionalProperties":false},{"type":"object","properties":{"createdBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdBefore"],"additionalProperties":false},{"type":"object","properties":{"createdAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdAfter"],"additionalProperties":false}]}}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sample":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","email","phone","properties"],"additionalProperties":{}}}},"required":["count","sample"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/segment/update":{"post":{"operationId":"audience.segment.update","summary":"audience.segment.update","description":"Changes a segment's name or definition.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":120},"definition":{"type":"object","properties":{"all":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number","boolean"]}},"required":["property","op","value"],"additionalProperties":false},{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["exists","missing"]}},"required":["property","op"],"additionalProperties":false},{"type":"object","properties":{"has":{"type":"string","enum":["email","phone"]}},"required":["has"],"additionalProperties":false},{"type":"object","properties":{"consent":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["channel","topic"],"additionalProperties":false}},"required":["consent"],"additionalProperties":false},{"type":"object","properties":{"createdBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdBefore"],"additionalProperties":false},{"type":"object","properties":{"createdAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdAfter"],"additionalProperties":false}]}},"any":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number","boolean"]}},"required":["property","op","value"],"additionalProperties":false},{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["exists","missing"]}},"required":["property","op"],"additionalProperties":false},{"type":"object","properties":{"has":{"type":"string","enum":["email","phone"]}},"required":["has"],"additionalProperties":false},{"type":"object","properties":{"consent":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["channel","topic"],"additionalProperties":false}},"required":["consent"],"additionalProperties":false},{"type":"object","properties":{"createdBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdBefore"],"additionalProperties":false},{"type":"object","properties":{"createdAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdAfter"],"additionalProperties":false}]}},"none":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number","boolean"]}},"required":["property","op","value"],"additionalProperties":false},{"type":"object","properties":{"property":{"type":"string","pattern":"^[a-zA-Z0-9_]{1,64}$"},"op":{"type":"string","enum":["exists","missing"]}},"required":["property","op"],"additionalProperties":false},{"type":"object","properties":{"has":{"type":"string","enum":["email","phone"]}},"required":["has"],"additionalProperties":false},{"type":"object","properties":{"consent":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"topic":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["channel","topic"],"additionalProperties":false}},"required":["consent"],"additionalProperties":false},{"type":"object","properties":{"createdBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdBefore"],"additionalProperties":false},{"type":"object","properties":{"createdAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["createdAfter"],"additionalProperties":false}]}}},"additionalProperties":false}},"required":["segmentId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"definition":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","definition","createdAt","updatedAt"],"additionalProperties":{}}},"required":["segment"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/suppression/add":{"post":{"operationId":"audience.suppression.add","summary":"audience.suppression.add","description":"Adds an address to the suppression list so no channel sends to it. Use for a manual do-not-contact or a recorded unsubscribe.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string","minLength":3,"maxLength":320},"reason":{"default":"manual","type":"string","enum":["manual","unsubscribe"]}},"required":["channel","address"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string"},"alreadySuppressed":{"type":"boolean"}},"required":["id","channel","address","alreadySuppressed"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/suppression/lift":{"post":{"operationId":"audience.suppression.lift","summary":"audience.suppression.lift","description":"Lifts a suppression you added by hand or from an unsubscribe. Bounce and complaint suppressions cannot be lifted this way: they lift only when the person opts in again through audience.consent.grant.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"suppressionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["suppressionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lifted":{"type":"boolean"},"alreadyLifted":{"type":"boolean"}},"required":["id","lifted","alreadyLifted"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/suppression/list":{"post":{"operationId":"audience.suppression.list","summary":"audience.suppression.list","description":"Lists active suppressions in this environment, newest first, optionally by channel or reason.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"audience:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"reason":{"type":"string","enum":["bounce","complaint","unsubscribe","stop","manual"]},"includeLifted":{"default":false,"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"suppressions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string"},"reason":{"type":"string"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"liftedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"liftedReason":{"type":["string","null"]}},"required":["id","channel","address","reason","createdAt","liftedAt","liftedReason"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["suppressions","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/topic/archive":{"post":{"operationId":"audience.topic.archive","summary":"audience.topic.archive","description":"Retires a topic: it disappears from lists, from the hosted preference page, and from what a broadcast may be sent to. Nothing is deleted — the key and every consent record naming it stay exactly as they are, because those are what proves somebody agreed to be mailed. audience.topic.restore brings it back.","tags":["audience"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["key"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"topic":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"archivedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","key","name","description","archivedAt"],"additionalProperties":{}}},"required":["topic"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/topic/create":{"post":{"operationId":"audience.topic.create","summary":"audience.topic.create","description":"Creates a subscription topic. A topic is a name to record consent against; creating one subscribes nobody. Every contact reached under it needs its own consent grant, because that is the only thing a send checks.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":400}},"required":["key","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"topic":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]}},"required":["id","key","name","description"],"additionalProperties":{}}},"required":["topic"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/topic/list":{"post":{"operationId":"audience.topic.list","summary":"audience.topic.list","description":"Lists this environment's subscription topics, each with how many contacts currently consent to it on each channel — the number that decides what a broadcast to it would actually reach, and which no surface reported.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"audience:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeArchived":{"default":false,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"topics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"archivedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"consenting":{"type":"object","properties":{"email":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["email","sms"],"additionalProperties":{}}},"required":["id","key","name","description","createdAt","archivedAt","consenting"],"additionalProperties":{}}}},"required":["topics"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/topic/restore":{"post":{"operationId":"audience.topic.restore","summary":"audience.topic.restore","description":"Brings an archived topic back. It keeps its original key, so the consent already recorded against it counts again exactly as it did before.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"}},"required":["key"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"topic":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"archivedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","key","name","description","archivedAt"],"additionalProperties":{}}},"required":["topic"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/audience/topic/update":{"post":{"operationId":"audience.topic.update","summary":"audience.topic.update","description":"Changes a topic's name or description. The key does not change.","tags":["audience"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"audience:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,63}$"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]}},"required":["key"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"topic":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]}},"required":["id","key","name","description"],"additionalProperties":{}}},"required":["topic"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/device/approve":{"post":{"operationId":"auth.device.approve","summary":"auth.device.approve","description":"Approves or denies a device sign-in by user code, on behalf of a signed-in person. The person's access token proves who is approving; the device then receives a session for that user on its next poll. Approving needs a recent sign-in, and a session that passed the second factor when the account has one, because it hands a session for the account to another machine. Denying needs neither: someone who did not start this sign-in should be able to stop it at once. Callable with a publishable key (the hosted approval page) or a secret key (your app's own approval screen).","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userCode":{"type":"string","minLength":8,"maxLength":9,"description":"The code the device displayed, like BDWP-HQPK"},"accessToken":{"type":"string","minLength":20,"description":"The approving person's current access token"},"decision":{"default":"approve","type":"string","enum":["approve","deny"]}},"required":["userCode","accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userCode":{"type":"string"},"decision":{"type":"string","enum":["approve","deny"]},"clientName":{"type":["string","null"]}},"required":["userCode","decision","clientName"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/device/describe":{"post":{"operationId":"auth.device.describe","summary":"auth.device.describe","description":"Public, for the hosted approval page: given a user code, returns the environment it belongs to, the device's name and when it expires, so the page can show the right brand and sign the person in.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"none","x-lath-scope":{"pretenant":true},"security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userCode":{"type":"string","minLength":8,"maxLength":9}},"required":["userCode"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"activityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userCode":{"type":"string"},"environmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"projectName":{"type":["string","null"]},"clientName":{"type":["string","null"]},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["activityId","userCode","environmentId","projectName","clientName","expiresAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/device/poll":{"post":{"operationId":"auth.device.poll","summary":"auth.device.poll","description":"Polls a device sign-in. Returns status pending, denied or expired, or approved with the session exactly once. Polling faster than the interval is refused with slow_down. Callable with a publishable key.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deviceCode":{"type":"string","pattern":"^lath_dc_[0-9A-Za-z]{43}$"}},"required":["deviceCode"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","expired","denied"]}},"required":["status"],"additionalProperties":{}},{"type":"object","properties":{"status":{"type":"string","const":"approved"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"refreshToken":{"type":"string"},"refreshExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","accessToken","accessExpiresAt","refreshToken","refreshExpiresAt"],"additionalProperties":{}}},"required":["status","userId","session"],"additionalProperties":{}}]}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/device/start":{"post":{"operationId":"auth.device.start","summary":"auth.device.start","description":"Starts a device sign-in for a CLI or a device without a browser. Returns a secret device code to poll with, a short user code to show the person, and the hosted URL where they approve it. Callable with a publishable key.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clientName":{"description":"Shown to the person approving, e.g. 'acme CLI on Sean's laptop'","type":"string","minLength":1,"maxLength":80}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deviceCode":{"type":"string"},"userCode":{"type":"string"},"verificationUrl":{"type":"string"},"verificationUrlComplete":{"type":"string"},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"expiresIn":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["deviceCode","userCode","verificationUrl","verificationUrlComplete","expiresAt","expiresIn","interval"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/factor/list":{"post":{"operationId":"auth.factor.list","summary":"auth.factor.list","description":"Lists the signed-in user's second factors with their status and how many recovery codes remain.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20}},"required":["accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"factors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"activatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastUsedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"recoveryCodesLeft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","type","name","status","createdAt","activatedAt","lastUsedAt","recoveryCodesLeft"],"additionalProperties":{}}},"mfaVerified":{"type":"boolean"}},"required":["factors","mfaVerified"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/factor/recovery/regenerate":{"post":{"operationId":"auth.factor.recovery.regenerate","summary":"auth.factor.recovery.regenerate","description":"Replaces the recovery codes of the active factor with eight new ones, shown once. Needs a recent sign-in that passed the second factor.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20}},"required":["accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"factorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recoveryCodes":{"type":"array","items":{"type":"string"}}},"required":["factorId","recoveryCodes"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/factor/remove":{"post":{"operationId":"auth.factor.remove","summary":"auth.factor.remove","description":"Turns off a second factor. Needs a recent sign-in that itself passed the second factor (or a passkey), so a stolen first factor cannot switch MFA off. Refused while this environment or one of the user's organizations requires MFA.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"factorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["accessToken","factorId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"factors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"activatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastUsedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"recoveryCodesLeft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","type","name","status","createdAt","activatedAt","lastUsedAt","recoveryCodesLeft"],"additionalProperties":{}}}},"required":["factors"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/factor/totp/activate":{"post":{"operationId":"auth.factor.totp.activate","summary":"auth.factor.totp.activate","description":"Completes enrolment with the first code the app shows. From now on every sign-in asks for a code. Returns eight one-time recovery codes; they are shown once and never again. When called with an mfaToken (a sign-in that had to enrol), also returns the session.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"mfaToken":{"type":"string","minLength":20},"factorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string","minLength":6,"maxLength":8,"description":"The six digits the authenticator app shows"},"userAgent":{"type":"string","maxLength":400}},"required":["factorId","code"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"factor":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":"string"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"activatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastUsedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"recoveryCodesLeft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","type","name","status","createdAt","activatedAt","lastUsedAt","recoveryCodesLeft"],"additionalProperties":{}},"recoveryCodes":{"type":"array","items":{"type":"string"}}},"required":["factor","recoveryCodes"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/factor/totp/enroll":{"post":{"operationId":"auth.factor.totp.enroll","summary":"auth.factor.totp.enroll","description":"Starts enrolling an authenticator app: returns a fresh secret and an otpauth URI to show as a QR code. Nothing counts until auth.factor.totp.activate proves the app shows the right code. Accepts an access token, or the mfaToken of a sign-in that was told to enrol.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"mfaToken":{"type":"string","minLength":20},"name":{"description":"A label such as the app or phone name","type":"string","minLength":1,"maxLength":60}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"factorId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"secret":{"type":"string"},"otpauthUrl":{"type":"string"},"digits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"period":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["factorId","secret","otpauthUrl","digits","period"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/identity/add":{"post":{"operationId":"auth.identity.add","summary":"auth.identity.add","description":"Starts attaching a new address to the signed-in user: an email (a code is sent to it) or a phone number in E.164 (a code by SMS, once the environment's number has an active carrier registration; until then channel_unavailable names the fix). Exactly one of email or phone. The user's access token is the proof. An address that already belongs to another user is refused with identity_taken, which tells a signed-in user that the address is registered; that is accepted here because the caller is already a member and limited to 5 attempts an hour. This is how account recovery works: sign in with an address you still control, add the new one, then remove the lost one.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":true,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"email":{"type":"string"},"phone":{"type":"string"}},"required":["accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"delivery":{"type":"string","const":"queued"},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["challengeId","expiresAt","delivery","messageId"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/identity/remove":{"post":{"operationId":"auth.identity.remove","summary":"auth.identity.remove","description":"Removes one of the signed-in user's addresses. Needs a session opened in the last 15 minutes (reauth_required otherwise): a stolen access token must not be enough to lock the owner out. The last remaining address can never be removed, whatever passkeys or password the account has. If the removed address was the primary email, another email identity becomes primary, and every other address is told.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"identityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["accessToken","identityId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"identities":{"type":"array","items":{}}},"required":["userId","identities"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/identity/verify":{"post":{"operationId":"auth.identity.verify","summary":"auth.identity.verify","description":"Completes attaching a new address with the code that was sent to it. The address becomes a verified identity of the signed-in user and, if the user had no email, their primary email.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"secret":{"type":"string","minLength":4,"maxLength":8}},"required":["accessToken","challengeId","secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"identities":{"type":"array","items":{}}},"required":["userId","identities"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/link/complete":{"post":{"operationId":"auth.link.complete","summary":"auth.link.complete","description":"Completes a magic-link sign-in from the hosted landing page using the link token as the credential. Returns where to send the user and a one-time code appended to it as lath_code, which their app exchanges for the session with auth.session.exchange; or, when a second factor is owed, an mfaToken the landing page finishes with auth.mfa.verify.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"none","x-lath-scope":{"pretenant":true},"security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"token":{"type":"string","minLength":20,"maxLength":64},"userAgent":{"type":"string","maxLength":400}},"required":["challengeId","token"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"activityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"redirectTo":{"type":"string"},"environmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expiresInSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["activityId","redirectTo","environmentId","expiresInSeconds"],"additionalProperties":{}},{"type":"object","properties":{"activityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"environmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mfa":{"type":"object","properties":{"required":{"type":"boolean","const":true},"mfaToken":{"type":"string"},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"methods":{"type":"array","items":{"type":"string"}}},"required":["required","mfaToken","expiresAt","methods"],"additionalProperties":{}}},"required":["activityId","environmentId","mfa"],"additionalProperties":{}}]}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/mfa/verify":{"post":{"operationId":"auth.mfa.verify","summary":"auth.mfa.verify","description":"Finishes a sign-in that returned mfaToken: takes the six digits from the authenticator app, or one of the recovery codes, and issues the session (or, for a magic link, the redirect with the one-time code). Five attempts, then the sign-in must start again. A used recovery code never works twice; a TOTP step never works twice.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mfaToken":{"type":"string","minLength":20},"code":{"type":"string","minLength":6,"maxLength":16,"description":"Six digits from the app, or a recovery code like ABCDE-FGHJK"},"userAgent":{"type":"string","maxLength":400}},"required":["mfaToken","code"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"isNew":{"type":"boolean"}},"required":["id","primaryEmail","primaryPhone","isNew"],"additionalProperties":{}},"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"refreshToken":{"type":"string"},"refreshExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","accessToken","accessExpiresAt","refreshToken","refreshExpiresAt"],"additionalProperties":{}}},"required":["user","session"],"additionalProperties":{}},{"type":"object","properties":{"redirectTo":{"type":"string"},"expiresInSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["redirectTo","expiresInSeconds"],"additionalProperties":{}}]}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/oauth/app/list":{"post":{"operationId":"auth.oauth.app.list","summary":"auth.oauth.app.list","description":"Lists every provider, whether it is turned on, whether this project uses its own app or the deployment's shared one, and the exact callback URL to register with the provider. Secrets are never returned.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"enabled":{"type":"boolean"},"source":{"type":"string","enum":["own","shared"]},"clientId":{"type":["string","null"]},"updatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"callbackUrl":{"type":"string"}},"required":["provider","enabled","source","clientId","updatedAt","callbackUrl"],"additionalProperties":{}}}},"required":["providers"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/oauth/app/remove":{"post":{"operationId":"auth.oauth.app.remove","summary":"auth.oauth.app.remove","description":"Removes this project's own OAuth app for a provider and mode. Sign-in with that provider keeps working through the deployment's shared app, so this is a change of branding rather than a switch-off.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string","enum":["google","microsoft","github"]},"mode":{"type":"string","enum":["live","test"]}},"required":["provider","mode"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"removed":{"type":"boolean"},"source":{"type":"string","const":"shared"}},"required":["provider","mode","removed","source"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/oauth/app/set":{"post":{"operationId":"auth.oauth.app.set","summary":"auth.oauth.app.set","description":"Gives this project its own OAuth app for a provider, so the consent screen shows the customer's name instead of Lath's. Registered per mode, because live and test send people back to different addresses. The secret is stored sealed and never returned. Without one, the deployment's shared app is used.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string","enum":["google","microsoft","github"]},"mode":{"type":"string","enum":["live","test"],"description":"Which rung this app is registered for; its redirect URI must match that rung's callback"},"clientId":{"type":"string","minLength":1,"maxLength":500},"clientSecret":{"type":"string","minLength":1,"maxLength":500}},"required":["provider","mode","clientId","clientSecret"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"clientId":{"type":"string"},"source":{"type":"string","const":"own"},"callbackUrl":{"type":"string"}},"required":["provider","mode","clientId","source","callbackUrl"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/oauth/complete":{"post":{"operationId":"auth.oauth.complete","summary":"auth.oauth.complete","description":"Finishes a sign-in the provider sent back. Exchanges the code, reads the profile, then creates the user and identity on first sign-in and issues a session, returning a one-time handoff code on the customer's redirect URL exactly as a magic link does. An existing account is joined only when the provider states the email is verified; otherwise a new user is created rather than letting an unverified address take over an account. Returns mfa instead when a second factor is owed.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"none","x-lath-scope":{"pretenant":true},"security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","minLength":1,"maxLength":500},"code":{"type":"string","minLength":1,"maxLength":4000},"userAgent":{"type":"string","maxLength":400}},"required":["challengeId","state","code"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"activityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"environmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string"},"redirectTo":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"isNew":{"type":"boolean"}},"required":["id","isNew"],"additionalProperties":{}},"expiresInSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["activityId","environmentId","provider","redirectTo","user","expiresInSeconds"],"additionalProperties":{}},{"type":"object","properties":{"activityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"environmentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string"},"mfa":{"type":"object","properties":{"required":{"type":"boolean","const":true},"mfaToken":{"type":"string"},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"methods":{"type":"array","items":{"type":"string"}}},"required":["required","mfaToken","expiresAt","methods"],"additionalProperties":{}}},"required":["activityId","environmentId","provider","mfa"],"additionalProperties":{}}]}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/oauth/start":{"post":{"operationId":"auth.oauth.start","summary":"auth.oauth.start","description":"Begins a sign-in with Google, Microsoft or GitHub. Returns the URL to send the person to, and the challenge id the callback needs. The state is single-use and bound to this environment and this provider; the PKCE verifier never leaves Lath. Refuses when the method is turned off for this environment, or when neither this project nor the deployment has an app registered for that provider.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string","enum":["google","microsoft","github"]},"redirectTo":{"description":"Where to send the person after sign-in; must be an allowed origin","type":"string","maxLength":2000}},"required":["provider"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"state":{"type":"string"},"provider":{"type":"string"},"expiresInSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["challengeId","url","state","provider","expiresInSeconds"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/create":{"post":{"operationId":"auth.org.create","summary":"auth.org.create","description":"Creates an organization with the signed-in user as its owner, switches the session into it, and returns a fresh access token carrying it.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"name":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9-]+$"}},"required":["accessToken","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"settings":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"role":{"type":"string","const":"owner"}},"required":["id","name","slug","settings","createdAt","updatedAt","role"],"additionalProperties":{}},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["organization","accessToken","accessExpiresAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/delete":{"post":{"operationId":"auth.org.delete","summary":"auth.org.delete","description":"Deletes an organization. The owner only, and only with a recent sign-in, because it removes every member's access at once and cannot be undone. Members are removed, outstanding invitations are revoked, and any session currently acting in the organization is moved out of it rather than left holding a token that names something gone. The users themselves are untouched: they keep their accounts and any other organization they belong to.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":120,"description":"The organization's exact name, as confirmation"}},"required":["accessToken","organizationId","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"deleted":{"type":"boolean","const":true},"membersRemoved":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["organizationId","name","deleted","membersRemoved"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/get":{"post":{"operationId":"auth.org.get","summary":"auth.org.get","description":"Returns one organization the signed-in user belongs to, with its members and pending invitations (invitations only for admins and owners).","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["accessToken","organizationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"settings":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["id","name","slug","settings","createdAt","updatedAt","role"],"additionalProperties":{}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"email":{"type":["string","null"]},"displayName":{"type":["string","null"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["userId","role","joinedAt","email","displayName","id"],"additionalProperties":{}}},"invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","email","role","expiresAt","createdAt"],"additionalProperties":{}}}},"required":["organization","members","invites"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/invite/accept":{"post":{"operationId":"auth.org.invite.accept","summary":"auth.org.invite.accept","description":"Joins the organization named by an invitation token. The signed-in user must hold the invited email address as a verified identity; the token is spent on use. Switches the session into the organization.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"token":{"type":"string","minLength":20,"maxLength":64}},"required":["accessToken","token"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"settings":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["id","name","slug","settings","createdAt","updatedAt","role"],"additionalProperties":{}},"switched":{"type":"boolean"},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["organization","switched"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/invite/create":{"post":{"operationId":"auth.org.invite.create","summary":"auth.org.invite.create","description":"Invites an email address into the organization with a role, by an emailed link to the hosted accept page (seven days). Admins and owners only; only an owner may invite an owner. Inviting the same address again re-sends.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":true,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"default":"member","type":"string","enum":["owner","admin","member"]}},"required":["accessToken","organizationId","email"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"invite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","email","role","expiresAt"],"additionalProperties":{}},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["invite","messageId"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/invite/revoke":{"post":{"operationId":"auth.org.invite.revoke","summary":"auth.org.invite.revoke","description":"Cancels a pending invitation. Admins and owners only.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"inviteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["accessToken","organizationId","inviteId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inviteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revoked":{"type":"boolean","const":true}},"required":["inviteId","revoked"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/list":{"post":{"operationId":"auth.org.list","summary":"auth.org.list","description":"Lists the organizations the signed-in user belongs to, with their role in each and which one the session is acting in.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20}},"required":["accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"settings":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"role":{"type":"string","enum":["owner","admin","member"]},"memberCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","slug","settings","createdAt","updatedAt","role","memberCount"],"additionalProperties":{}}},"activeOrganizationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["organizations","activeOrganizationId"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/member/remove":{"post":{"operationId":"auth.org.member.remove","summary":"auth.org.member.remove","description":"Removes a member (admins and owners), or, with your own user id, leaves the organization. The last owner cannot leave or be removed. Sessions acting in the organization are moved out of it.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["accessToken","organizationId","userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"removed":{"type":"boolean","const":true},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["organizationId","userId","removed"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/member/update":{"post":{"operationId":"auth.org.member.update","summary":"auth.org.member.update","description":"Changes a member's role. Admins may set admin or member; only owners may grant or remove owner. The last owner cannot be demoted.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["accessToken","organizationId","userId","role"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["organizationId","userId","role"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/switch":{"post":{"operationId":"auth.org.switch","summary":"auth.org.switch","description":"Makes the session act in one of the user's organizations (or in none, with null) and returns a fresh access token carrying the org claim. Refused with mfa_required when the organization requires two-step sign-in and this session has not passed it.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"organizationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["accessToken","organizationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"activeOrganizationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"role":{"anyOf":[{"type":"string","enum":["owner","admin","member"]},{"type":"null"}]},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["activeOrganizationId","role","accessToken","accessExpiresAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/org/update":{"post":{"operationId":"auth.org.update","summary":"auth.org.update","description":"Renames an organization or changes its settings (mfaRequired: members must pass two-step sign-in to act in it). Admins and owners only.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":120},"settings":{"type":"object","properties":{"mfaRequired":{"type":"boolean"}},"additionalProperties":false}},"required":["accessToken","organizationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"settings":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["id","name","slug","settings","createdAt","updatedAt","role"],"additionalProperties":{}}},"required":["organization"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/organization/get":{"post":{"operationId":"auth.organization.get","summary":"auth.organization.get","description":"Returns one end-user organization with its members and their roles.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organizationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["organizationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"settings":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","slug","settings","createdAt","updatedAt"],"additionalProperties":{}},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"email":{"type":["string","null"]},"displayName":{"type":["string","null"]}},"required":["userId","role","joinedAt","email","displayName"],"additionalProperties":{}}}},"required":["organization","members"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/organization/list":{"post":{"operationId":"auth.organization.list","summary":"auth.organization.list","description":"Lists the environment's end-user organizations newest first with member counts. `query` matches the start of a name or slug. Pages with `before`, like every other list here.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","maxLength":120},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"settings":{},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"memberCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","slug","settings","createdAt","updatedAt","memberCount"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["organizations","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/passkey/list":{"post":{"operationId":"auth.passkey.list","summary":"auth.passkey.list","description":"Lists the signed-in user's passkeys: name, device type, whether it is synced, when it was last used.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20}},"required":["accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"passkeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":["string","null"]},"credentialId":{"type":"string"},"deviceType":{"type":["string","null"]},"backedUp":{"type":["boolean","null"]},"transports":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastUsedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","name","credentialId","deviceType","backedUp","transports","createdAt","lastUsedAt"],"additionalProperties":{}}}},"required":["passkeys"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/passkey/register/start":{"post":{"operationId":"auth.passkey.register.start","summary":"auth.passkey.register.start","description":"Starts adding a passkey to the signed-in user: returns WebAuthn creation options for navigator.credentials.create, bound to the project's configured origin, excluding passkeys the user already has. The access token is the proof.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"name":{"description":"A label the person will recognise, e.g. the device name; defaults to the date","type":"string","minLength":1,"maxLength":60}},"required":["accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"options":{},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["challengeId","options","expiresAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/passkey/register/verify":{"post":{"operationId":"auth.passkey.register.verify","summary":"auth.passkey.register.verify","description":"Completes adding a passkey with the authenticator's response from navigator.credentials.create. Stores the public key and tells the account's other addresses.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"response":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":2048},"rawId":{"type":"string","minLength":1,"maxLength":2048},"type":{"type":"string","const":"public-key"},"response":{"type":"object","properties":{"clientDataJSON":{"type":"string","minLength":1,"maxLength":8192},"attestationObject":{"type":"string","minLength":1,"maxLength":65536},"authenticatorData":{"type":"string","maxLength":65536},"transports":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":32}},"publicKeyAlgorithm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"publicKey":{"type":"string","maxLength":4096}},"required":["clientDataJSON","attestationObject"],"additionalProperties":false},"authenticatorAttachment":{"type":"string","enum":["platform","cross-platform"]},"clientExtensionResults":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","rawId","type","response"],"additionalProperties":false,"description":"The PublicKeyCredential from the browser, serialised as JSON (startRegistration from @simplewebauthn/browser)"}},"required":["accessToken","challengeId","response"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"passkey":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":["string","null"]},"credentialId":{"type":"string"},"deviceType":{"type":["string","null"]},"backedUp":{"type":["boolean","null"]},"transports":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastUsedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","name","credentialId","deviceType","backedUp","transports","createdAt","lastUsedAt"],"additionalProperties":{}}},"required":["passkey"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/passkey/remove":{"post":{"operationId":"auth.passkey.remove","summary":"auth.passkey.remove","description":"Removes one of the signed-in user's passkeys. Needs a recent sign-in. A passkey that is the user's only way in cannot be removed.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"passkeyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["accessToken","passkeyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"passkeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":["string","null"]},"credentialId":{"type":"string"},"deviceType":{"type":["string","null"]},"backedUp":{"type":["boolean","null"]},"transports":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastUsedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","name","credentialId","deviceType","backedUp","transports","createdAt","lastUsedAt"],"additionalProperties":{}}}},"required":["passkeys"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/passkey/signin/start":{"post":{"operationId":"auth.passkey.signin.start","summary":"auth.passkey.signin.start","description":"Starts a passkey sign-in: returns WebAuthn request options for navigator.credentials.get. Every Lath passkey is discoverable, so the browser offers the person's own; the optional identifier is recorded on the challenge as a hint and never changes the options, so nothing about whether an address exists leaks.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"identifier":{"description":"Email or phone; omit for a discoverable (username-less) sign-in","type":"string","minLength":3,"maxLength":320}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"options":{},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["challengeId","options","expiresAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/passkey/signin/verify":{"post":{"operationId":"auth.passkey.signin.verify","summary":"auth.passkey.signin.verify","description":"Completes a passkey sign-in with the authenticator's response from navigator.credentials.get and issues a session. User verification is required, so a passkey sign-in counts as two factors and never asks for a code afterwards.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"response":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":2048},"rawId":{"type":"string","minLength":1,"maxLength":2048},"type":{"type":"string","const":"public-key"},"response":{"type":"object","properties":{"clientDataJSON":{"type":"string","minLength":1,"maxLength":8192},"authenticatorData":{"type":"string","minLength":1,"maxLength":65536},"signature":{"type":"string","minLength":1,"maxLength":4096},"userHandle":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]}},"required":["clientDataJSON","authenticatorData","signature"],"additionalProperties":false},"authenticatorAttachment":{"type":"string","enum":["platform","cross-platform"]},"clientExtensionResults":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","rawId","type","response"],"additionalProperties":false,"description":"The PublicKeyCredential from the browser, serialised as JSON (startAuthentication from @simplewebauthn/browser)"},"userAgent":{"type":"string","maxLength":400}},"required":["challengeId","response"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"isNew":{"type":"boolean"}},"required":["id","primaryEmail","primaryPhone","isNew"],"additionalProperties":{}},"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"refreshToken":{"type":"string"},"refreshExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","accessToken","accessExpiresAt","refreshToken","refreshExpiresAt"],"additionalProperties":{}}},"required":["user","session"],"additionalProperties":{}},{"type":"object","properties":{"mfa":{"type":"object","properties":{"required":{"type":"boolean","const":true},"mfaToken":{"type":"string"},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"methods":{"type":"array","items":{"type":"string"}}},"required":["required","mfaToken","expiresAt","methods"],"additionalProperties":{}}},"required":["mfa"],"additionalProperties":{}}]}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/password/remove":{"post":{"operationId":"auth.password.remove","summary":"auth.password.remove","description":"Removes the signed-in user's password so only codes, links and passkeys sign them in. Needs a recent sign-in.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20}},"required":["accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"hasPassword":{"type":"boolean","const":false}},"required":["userId","hasPassword"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/password/set":{"post":{"operationId":"auth.password.set","summary":"auth.password.set","description":"Sets or replaces the signed-in user's password after checking the environment's rules (length) and, unless turned off, the breach corpus through a k-anonymity range lookup. Needs a recent sign-in when a password already exists. Every other address on the account is told.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"password":{"type":"string","minLength":1,"maxLength":256}},"required":["accessToken","password"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"hasPassword":{"type":"boolean","const":true},"changed":{"type":"boolean"}},"required":["userId","hasPassword","changed"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/password/signin":{"post":{"operationId":"auth.password.signin","summary":"auth.password.signin","description":"Signs in with an email or phone and a password. An unknown address and a wrong password get the same answer. Rate limited per address and per IP. Returns a session, or mfa.mfaToken when a second factor is owed.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"identifier":{"type":"string","minLength":3,"maxLength":320},"password":{"type":"string","minLength":1,"maxLength":256},"userAgent":{"type":"string","maxLength":400}},"required":["identifier","password"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"isNew":{"type":"boolean"}},"required":["id","primaryEmail","primaryPhone","isNew"],"additionalProperties":{}},"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"refreshToken":{"type":"string"},"refreshExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","accessToken","accessExpiresAt","refreshToken","refreshExpiresAt"],"additionalProperties":{}}},"required":["user","session"],"additionalProperties":{}},{"type":"object","properties":{"mfa":{"type":"object","properties":{"required":{"type":"boolean","const":true},"mfaToken":{"type":"string"},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"methods":{"type":"array","items":{"type":"string"}}},"required":["required","mfaToken","expiresAt","methods"],"additionalProperties":{}}},"required":["mfa"],"additionalProperties":{}}]}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/session/exchange":{"post":{"operationId":"auth.session.exchange","summary":"auth.session.exchange","description":"Exchanges the one-time code from a hosted sign-in for the session tokens. The code works once and expires two minutes after it was issued. Callable with the publishable key, because the code is the credential: it is what the browser at the end of a magic link is holding.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":20,"maxLength":80}},"required":["code"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"refreshToken":{"type":"string"},"refreshExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","accessToken","accessExpiresAt","refreshToken","refreshExpiresAt"],"additionalProperties":{}}},"required":["userId","session"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/session/list":{"post":{"operationId":"auth.session.list","summary":"auth.session.list","description":"Lists a user's sessions, live and revoked, newest first, with device and network facts.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"familyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ip":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastSeenAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"rotatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"revokedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"revokedReason":{"type":["string","null"]},"refreshExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","familyId","ip","userAgent","createdAt","lastSeenAt","rotatedAt","revokedAt","revokedReason","refreshExpiresAt"],"additionalProperties":{}}}},"required":["sessions"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/session/mine":{"post":{"operationId":"auth.session.mine","summary":"auth.session.mine","description":"Lists the signed-in end user's own sessions, newest first, marking which one is making the request. The access token is the proof, so a browser or app calls this with the publishable key. Only live sessions: a revoked one is not somewhere they are still signed in.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"limit":{"default":50,"type":"integer","minimum":1,"maximum":100}},"required":["accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"familyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userAgent":{"type":["string","null"]},"signedInAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastSeenAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"current":{"type":"boolean"}},"required":["familyId","userAgent","signedInAt","lastSeenAt","expiresAt","current"],"additionalProperties":{}}}},"required":["sessions"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/session/refresh":{"post":{"operationId":"auth.session.refresh","summary":"auth.session.refresh","description":"Exchanges a refresh token for a new access token and a new refresh token. Presenting a refresh token that was already exchanged revokes every session in its family, because a reused token may have leaked.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"refreshToken":{"type":"string","minLength":20,"maxLength":80},"userAgent":{"type":"string","maxLength":400}},"required":["refreshToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"refreshToken":{"type":"string"},"refreshExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","accessToken","accessExpiresAt","refreshToken","refreshExpiresAt"],"additionalProperties":{}},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["session","userId"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/session/revoke":{"post":{"operationId":"auth.session.revoke","summary":"auth.session.revoke","description":"Revokes a session by id (including every refresh it has rotated into since sign-in), or every live session of a user. Revoked refresh tokens stop working immediately; access tokens expire within their lifetime.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionId":{"description":"Revoke this one session","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"description":"Or revoke every live session of this user","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","maxLength":120}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revoked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["revoked"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/session/revokeMine":{"post":{"operationId":"auth.session.revokeMine","summary":"auth.session.revokeMine","description":"Ends one of the signed-in end user's own sessions, named by the family id auth.session.mine returns, or every session except the one making the request. The access token is the proof. Refusing to touch anyone else's sessions is structural: there is no way to name them.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"familyId":{"description":"End this one sign-in","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"othersOnly":{"description":"Or end every sign-in except the one asking","type":"boolean"}},"required":["accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revoked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["revoked"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/session/signout":{"post":{"operationId":"auth.session.signout","summary":"auth.session.signout","description":"Signs the end user out of the session whose refresh token is presented: that session and every refresh it has rotated into are revoked. Possession of the refresh token is the proof, so a browser or app calls this with the publishable key. Nothing is revealed about a token that does not exist.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"refreshToken":{"type":"string","minLength":20,"maxLength":80}},"required":["refreshToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"signedOut":{"type":"boolean","const":true}},"required":["signedOut"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/settings/get":{"post":{"operationId":"auth.settings.get","summary":"auth.settings.get","description":"Returns this environment's sign-in settings with defaults filled in: enabled methods and whether each is available today (and why not), code and link lifetimes, session lifetimes, allowed redirect origins, signup policy and rate limits. Also shows exactly what the public settings endpoint tells a browser.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settings":{},"customised":{"type":"array","items":{"type":"string"}},"updatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"defaults":{},"methods":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"available":{"type":"boolean"},"reason":{"type":["string","null"]},"offered":{"type":"boolean"}},"required":["enabled","available","reason","offered"],"additionalProperties":{}}},"public":{}},"required":["settings","customised","updatedAt","defaults","methods","public"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/settings/reset":{"post":{"operationId":"auth.settings.reset","summary":"auth.settings.reset","description":"Returns every sign-in setting in this environment to its default, including the allowed redirect origins.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settings":{},"customised":{"type":"array","items":{"type":"string"}},"updatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"defaults":{},"methods":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"available":{"type":"boolean"},"reason":{"type":["string","null"]},"offered":{"type":"boolean"}},"required":["enabled","available","reason","offered"],"additionalProperties":{}}},"public":{}},"required":["settings","customised","updatedAt","defaults","methods","public"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/settings/set":{"post":{"operationId":"auth.settings.set","summary":"auth.settings.set","description":"Changes sign-in settings for this environment. Objects merge key by key; redirect.allowedOrigins replaces the whole list. Takes effect on the next request. Ranges: code.length 4–8, code.ttlSeconds 60–1800, code.maxAttempts 3–10, link.ttlSeconds 60–3600, session.accessTtlSeconds 300–3600, session.refreshTtlSeconds 3600–31536000.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"methods":{"type":"object","properties":{"emailCode":{"type":"boolean"},"emailLink":{"type":"boolean"},"smsCode":{"type":"boolean"},"google":{"type":"boolean"},"microsoft":{"type":"boolean"},"github":{"type":"boolean"},"passkey":{"type":"boolean"},"password":{"type":"boolean"}},"additionalProperties":false},"code":{"type":"object","properties":{"length":{"type":"integer","minimum":4,"maximum":8},"ttlSeconds":{"type":"integer","minimum":60,"maximum":1800},"maxAttempts":{"type":"integer","minimum":3,"maximum":10}},"additionalProperties":false},"link":{"type":"object","properties":{"ttlSeconds":{"type":"integer","minimum":60,"maximum":3600}},"additionalProperties":false},"session":{"type":"object","properties":{"accessTtlSeconds":{"type":"integer","minimum":300,"maximum":3600},"refreshTtlSeconds":{"type":"integer","minimum":3600,"maximum":31536000}},"additionalProperties":false},"redirect":{"type":"object","properties":{"allowedOrigins":{"description":"Replaces the whole list","maxItems":50,"type":"array","items":{"type":"string","maxLength":300}}},"additionalProperties":false},"passkey":{"type":"object","properties":{"rpId":{"description":"The WebAuthn relying party id; null derives it from the first allowed redirect origin","anyOf":[{"type":"string","maxLength":253,"pattern":"^[a-z0-9.-]+$"},{"type":"null"}]},"origins":{"description":"Origins allowed to create and use passkeys; empty means the redirect origins","maxItems":50,"type":"array","items":{"type":"string","maxLength":300}}},"additionalProperties":false},"password":{"type":"object","properties":{"minLength":{"type":"integer","minimum":8,"maximum":64},"maxLength":{"type":"integer","minimum":64,"maximum":256},"breachCheck":{"type":"boolean"}},"additionalProperties":false},"mfa":{"type":"object","properties":{"required":{"type":"boolean"}},"additionalProperties":false},"signup":{"type":"object","properties":{"allow":{"type":"boolean"}},"additionalProperties":false},"botProtection":{"type":"object","properties":{"enabled":{"type":"boolean"},"blockDisposableEmail":{"type":"boolean"},"blockedDomains":{"maxItems":200,"type":"array","items":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"}},"signupPerIp":{"type":"object","properties":{"max":{"type":"integer","minimum":1,"maximum":100},"windowSeconds":{"type":"integer","minimum":60,"maximum":86400}},"additionalProperties":false},"minChallengeAgeSeconds":{"type":"integer","minimum":0,"maximum":60}},"additionalProperties":false},"rateLimits":{"type":"object","properties":{"startPerIdentifier":{"type":"object","properties":{"max":{"type":"integer","minimum":1,"maximum":100},"windowSeconds":{"type":"integer","minimum":60,"maximum":86400}},"additionalProperties":false},"startPerIp":{"type":"object","properties":{"max":{"type":"integer","minimum":1,"maximum":100},"windowSeconds":{"type":"integer","minimum":60,"maximum":86400}},"additionalProperties":false},"completePerIp":{"type":"object","properties":{"max":{"type":"integer","minimum":1,"maximum":100},"windowSeconds":{"type":"integer","minimum":60,"maximum":86400}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settings":{},"customised":{"type":"array","items":{"type":"string"}},"updatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"defaults":{},"methods":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"available":{"type":"boolean"},"reason":{"type":["string","null"]},"offered":{"type":"boolean"}},"required":["enabled","available","reason","offered"],"additionalProperties":{}}},"public":{}},"required":["settings","customised","updatedAt","defaults","methods","public"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/signin/start":{"post":{"operationId":"auth.signin.start","summary":"auth.signin.start","description":"Begins a sign-in for an end user: creates a one-time code or link, queues the message from the project's default sender, and returns the challenge id. Never reveals whether the user already exists.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":true,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"method":{"type":"string","enum":["email_code","email_link","sms_code"]},"identifier":{"type":"string","minLength":3,"maxLength":320,"description":"The email address, or the E.164 phone number for sms_code"},"redirectTo":{"description":"For email_link: where the hosted landing page sends the user afterwards","type":"string","format":"uri"},"locale":{"description":"Send the sign-in message in this language, if a variant of the template exists for it. Omit to use the user's recorded language, which a first-time visitor does not yet have.","type":"string","maxLength":20}},"required":["method","identifier"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"method":{"type":"string"},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"delivery":{"type":"string","const":"queued"},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["challengeId","method","expiresAt","delivery","messageId"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/signin/verify":{"post":{"operationId":"auth.signin.verify","summary":"auth.signin.verify","description":"Completes a sign-in with the code or link token. Creates the user and a verified identity on first sign-in, then issues a session: a short-lived access token and a rotating refresh token. When the user has a second factor (or the environment requires one), returns mfa.mfaToken instead of a session; finish with auth.mfa.verify.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"challengeId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"secret":{"type":"string","minLength":6,"maxLength":64,"description":"The 6-digit code, or the token from the link"},"userAgent":{"type":"string","maxLength":400}},"required":["challengeId","secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"user":{},"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"refreshToken":{"type":"string"},"refreshExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","accessToken","accessExpiresAt","refreshToken","refreshExpiresAt"],"additionalProperties":{}},"redirectTo":{"type":["string","null"]}},"required":["user","session","redirectTo"],"additionalProperties":{}},{"type":"object","properties":{"mfa":{"type":"object","properties":{"required":{"type":"boolean","const":true},"mfaToken":{"type":"string"},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"methods":{"type":"array","items":{"type":"string"}}},"required":["required","mfaToken","expiresAt","methods"],"additionalProperties":{}},"redirectTo":{"type":["string","null"]}},"required":["mfa","redirectTo"],"additionalProperties":{}}]}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/signingKey/list":{"post":{"operationId":"auth.signingKey.list","summary":"auth.signingKey.list","description":"Lists the environment's JWT signing keys, newest first: which one is signing now, which are still accepted for verification, and which are retired. Never returns a private key.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"kid":{"type":"string"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"retiredAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["kid","createdAt","retiredAt","active"],"additionalProperties":{}}},"jwksUrl":{"type":"string"}},"required":["keys","jwksUrl"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/signingKey/retire":{"post":{"operationId":"auth.signingKey.retire","summary":"auth.signingKey.retire","description":"Retires a signing key: it leaves the JWKS and any access token still signed by it stops verifying at once. Do this an access-token lifetime after rotating for routine hygiene, or immediately if the key may have been exposed. The active key cannot be retired.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kid":{"type":"string","minLength":1,"maxLength":120}},"required":["kid"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kid":{"type":"string"},"retired":{"type":"boolean","const":true}},"required":["kid","retired"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/signingKey/rotate":{"post":{"operationId":"auth.signingKey.rotate","summary":"auth.signingKey.rotate","description":"Mints a new JWT signing key and signs everything from now on with it. Nobody is signed out: tokens signed by the previous key keep verifying until that key is retired, which is a separate act. Rotating twice in a row leaves three keys in the JWKS, which is fine and is why retire exists.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kid":{"type":"string"},"previousKid":{"type":["string","null"]},"retirePreviousAfterSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kid","previousKid","retirePreviousAfterSeconds"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/ban":{"post":{"operationId":"auth.user.ban","summary":"auth.user.ban","description":"Bans a user: every session is revoked now and sign-in is refused until unbanned.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","maxLength":200}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"displayName":{"type":["string","null"]},"locale":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"bannedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"bannedReason":{"type":["string","null"]},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string"},"subject":{"type":"string"},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","provider","subject","verifiedAt","createdAt"],"additionalProperties":{}}},"credentials":{"type":"object","properties":{"passkeys":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"authenticators":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"password":{"type":"boolean"},"recoveryCodesLeft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["passkeys","authenticators","password","recoveryCodesLeft"],"additionalProperties":{}}},"required":["id","primaryEmail","primaryPhone","displayName","locale","custom","bannedAt","bannedReason","deletedAt","createdAt","updatedAt","identities","credentials"],"additionalProperties":{}},"sessionsRevoked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["user","sessionsRevoked"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/create":{"post":{"operationId":"auth.user.create","summary":"auth.user.create","description":"Creates an end user with a verified email and/or phone identity, without a sign-in. Use it to import users or pre-provision accounts.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"displayName":{"type":"string","maxLength":120},"locale":{"description":"The user's language, e.g. 'fr' or 'pt-BR'. Sign-in and other templated messages use the variant for it. Null means unknown.","anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"custom":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"displayName":{"type":["string","null"]},"locale":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"bannedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"bannedReason":{"type":["string","null"]},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string"},"subject":{"type":"string"},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","provider","subject","verifiedAt","createdAt"],"additionalProperties":{}}},"credentials":{"type":"object","properties":{"passkeys":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"authenticators":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"password":{"type":"boolean"},"recoveryCodesLeft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["passkeys","authenticators","password","recoveryCodesLeft"],"additionalProperties":{}}},"required":["id","primaryEmail","primaryPhone","displayName","locale","custom","bannedAt","bannedReason","deletedAt","createdAt","updatedAt","identities","credentials"],"additionalProperties":{}}},"required":["user"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/delete":{"post":{"operationId":"auth.user.delete","summary":"auth.user.delete","description":"Deletes a user: sessions revoked, identities released so the email or phone can sign up again as a new person, the row kept for audit and hidden from reads.","tags":["auth"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"displayName":{"type":["string","null"]},"locale":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"bannedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"bannedReason":{"type":["string","null"]},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string"},"subject":{"type":"string"},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","provider","subject","verifiedAt","createdAt"],"additionalProperties":{}}},"credentials":{"type":"object","properties":{"passkeys":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"authenticators":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"password":{"type":"boolean"},"recoveryCodesLeft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["passkeys","authenticators","password","recoveryCodesLeft"],"additionalProperties":{}}},"required":["id","primaryEmail","primaryPhone","displayName","locale","custom","bannedAt","bannedReason","deletedAt","createdAt","updatedAt","identities","credentials"],"additionalProperties":{}},"sessionsRevoked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["user","sessionsRevoked"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/export":{"post":{"operationId":"auth.user.export","summary":"auth.user.export","description":"Exports users in full — identities, custom fields, ban state and organization memberships — oldest first, paging with `after` until it returns fewer than `limit`. Credentials are never included: password hashes, passkeys and authenticator secrets belong to the person and are useless anywhere else. Deleted users are excluded unless asked for.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"after":{"description":"The `nextAfter` from the previous page; omit to start. Opaque — do not construct one.","type":"string","maxLength":200},"limit":{"default":200,"type":"integer","minimum":1,"maximum":500},"includeDeleted":{"default":false,"description":"Include soft-deleted users, whose personal fields are already cleared","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"displayName":{"type":["string","null"]},"locale":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"bannedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"bannedReason":{"type":["string","null"]},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"identities":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"subject":{"type":"string"},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["provider","subject","verifiedAt","createdAt"],"additionalProperties":{}}},"organizations":{"type":"array","items":{}}},"required":["id","primaryEmail","primaryPhone","displayName","locale","custom","bannedAt","bannedReason","deletedAt","createdAt","updatedAt","identities","organizations"],"additionalProperties":{}}},"nextAfter":{"type":["string","null"]}},"required":["users","nextAfter"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/get":{"post":{"operationId":"auth.user.get","summary":"auth.user.get","description":"Returns one user with their identities, and a count of what they can sign in with: passkeys, active authenticators, whether a password is set, and how many recovery codes remain. Those are read-only here — adding or removing any of them is the person's own act, through an access token they hold.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"displayName":{"type":["string","null"]},"locale":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"bannedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"bannedReason":{"type":["string","null"]},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string"},"subject":{"type":"string"},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","provider","subject","verifiedAt","createdAt"],"additionalProperties":{}}},"credentials":{"type":"object","properties":{"passkeys":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"authenticators":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"password":{"type":"boolean"},"recoveryCodesLeft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["passkeys","authenticators","password","recoveryCodesLeft"],"additionalProperties":{}}},"required":["id","primaryEmail","primaryPhone","displayName","locale","custom","bannedAt","bannedReason","deletedAt","createdAt","updatedAt","identities","credentials"],"additionalProperties":{}}},"required":["user"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/impersonate":{"post":{"operationId":"auth.user.impersonate","summary":"auth.user.impersonate","description":"Issues an access token that acts as this user, for support. A reason is required and is recorded on the session and in the audit trail. The session says 'impersonation' in the token's amr, never carries the user's MFA state, lasts at most thirty minutes whatever the environment's session lifetime is, and cannot be refreshed — impersonate again to continue. A banned or deleted user cannot be impersonated.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","minLength":8,"maxLength":300,"description":"Why, in a sentence. Stored on the session and shown wherever it appears."}},"required":["userId","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"accessToken":{"type":"string"},"accessExpiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"endsAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","accessToken","accessExpiresAt","endsAt"],"additionalProperties":{}},"impersonating":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"displayName":{"type":["string","null"]}},"required":["userId","primaryEmail","displayName"],"additionalProperties":{}},"reason":{"type":"string"}},"required":["session","impersonating","reason"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/list":{"post":{"operationId":"auth.user.list","summary":"auth.user.list","description":"Lists users newest first. `query` matches the start of an email, phone or display name.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"displayName":{"type":["string","null"]},"locale":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"bannedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"bannedReason":{"type":["string","null"]},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","primaryEmail","primaryPhone","displayName","locale","custom","bannedAt","bannedReason","deletedAt","createdAt","updatedAt"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["users","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/me":{"post":{"operationId":"auth.user.me","summary":"auth.user.me","description":"Returns the signed-in end user behind an access token: id, email, phone, display name, custom fields and identities. The token is the proof, so a browser or app calls this with the publishable key. A revoked session is refused.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20}},"required":["accessToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"displayName":{"type":["string","null"]},"locale":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string"},"subject":{"type":"string"},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","provider","subject","verifiedAt","createdAt"],"additionalProperties":{}}}},"required":["id","primaryEmail","primaryPhone","displayName","locale","custom","createdAt","identities"],"additionalProperties":{}},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expiresAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["user","sessionId","expiresAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/unban":{"post":{"operationId":"auth.user.unban","summary":"auth.user.unban","description":"Lifts a ban. Existing sessions stay revoked; the user signs in again.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"displayName":{"type":["string","null"]},"locale":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"bannedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"bannedReason":{"type":["string","null"]},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string"},"subject":{"type":"string"},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","provider","subject","verifiedAt","createdAt"],"additionalProperties":{}}},"credentials":{"type":"object","properties":{"passkeys":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"authenticators":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"password":{"type":"boolean"},"recoveryCodesLeft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["passkeys","authenticators","password","recoveryCodesLeft"],"additionalProperties":{}}},"required":["id","primaryEmail","primaryPhone","displayName","locale","custom","bannedAt","bannedReason","deletedAt","createdAt","updatedAt","identities","credentials"],"additionalProperties":{}}},"required":["user"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/update":{"post":{"operationId":"auth.user.update","summary":"auth.user.update","description":"Changes a user's display name, language or custom fields. Custom fields are replaced as a whole; set locale to null to go back to not knowing.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"displayName":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"locale":{"description":"The user's language, e.g. 'fr' or 'pt-BR'. Sign-in and other templated messages use the variant for it. Null means unknown.","anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"custom":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{}}},"required":["userId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"displayName":{"type":["string","null"]},"locale":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"bannedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"bannedReason":{"type":["string","null"]},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string"},"subject":{"type":"string"},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","provider","subject","verifiedAt","createdAt"],"additionalProperties":{}}},"credentials":{"type":"object","properties":{"passkeys":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"authenticators":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"password":{"type":"boolean"},"recoveryCodesLeft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["passkeys","authenticators","password","recoveryCodesLeft"],"additionalProperties":{}}},"required":["id","primaryEmail","primaryPhone","displayName","locale","custom","bannedAt","bannedReason","deletedAt","createdAt","updatedAt","identities","credentials"],"additionalProperties":{}}},"required":["user"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/auth/user/updateMe":{"post":{"operationId":"auth.user.updateMe","summary":"auth.user.updateMe","description":"Lets the signed-in end user change their own display name and language. Custom fields stay the application's to set (auth.user.update with a key). The access token is the proof.","tags":["auth"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"auth:public","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accessToken":{"type":"string","minLength":20},"displayName":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"locale":{"description":"The user's language, e.g. 'fr' or 'pt-BR'. Sign-in and other templated messages use the variant for it. Null means unknown.","anyOf":[{"type":"string","maxLength":20},{"type":"null"}]}},"required":["accessToken","displayName"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"primaryEmail":{"type":["string","null"]},"primaryPhone":{"type":["string","null"]},"displayName":{"type":["string","null"]},"locale":{"type":["string","null"]},"custom":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"provider":{"type":"string"},"subject":{"type":"string"},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","provider","subject","verifiedAt","createdAt"],"additionalProperties":{}}}},"required":["id","primaryEmail","primaryPhone","displayName","locale","custom","createdAt","identities"],"additionalProperties":{}}},"required":["user"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/cap/get":{"post":{"operationId":"billing.cap.get","summary":"billing.cap.get","description":"Returns the project's monthly spending cap in cents (null when none), this month's live metered spend so far (emails and SMS segments; active users are billed monthly and cannot be refused, so they are outside the cap), and whether the cap is currently enforced. A cap is enforced only when the deployment has published rates for every metered send; until then it is recorded and reported, never guessed at.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"billing:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monthlyCapCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"updatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"period":{"type":"string"},"spentCents":{"type":["number","null"]},"remainingCents":{"type":["number","null"]},"enforced":{"type":"boolean"},"reason":{"type":["string","null"]}},"required":["projectId","monthlyCapCents","updatedAt","period","spentCents","remainingCents","enforced"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/cap/set":{"post":{"operationId":"billing.cap.set","summary":"billing.cap.set","description":"Sets or clears the project's monthly spending cap on metered sends (emails and SMS segments). With a cap set and rates published, any send or broadcast that would carry the live environment past the cap is refused with spending_cap_reached and nothing is queued. Pass null to remove the cap.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"billing:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"monthlyCapCents":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000000},{"type":"null"}],"description":"Whole cents for the calendar month, or null for no cap"}},"required":["monthlyCapCents"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"monthlyCapCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"enforced":{"type":"boolean"},"reason":{"type":["string","null"]}},"required":["projectId","monthlyCapCents","enforced"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/credit/list":{"post":{"operationId":"billing.credit.list","summary":"billing.credit.list","description":"Lists this account's credits, refunds and adjustments, newest first, with what each one reverses. `outstandingCents` is what is left to come off future invoices: credits that have not been reversed and are not tied to a month already invoiced.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"billing:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"credits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","enum":["credit","refund","adjustment"]},"reason":{"type":"string"},"period":{"type":["string","null"]},"reversesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","amountCents","kind","reason","period","reversesId","createdAt"],"additionalProperties":{}}},"outstandingCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["credits","outstandingCents","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/credit/record":{"post":{"operationId":"billing.credit.record","summary":"billing.credit.record","description":"Records a credit, refund or adjustment against this account. Append-only: nothing here is edited or deleted, and a mistake is corrected by recording its reverse. The amount is always positive; the kind says which direction it goes.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"billing:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"amountCents":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"kind":{"type":"string","enum":["credit","refund","adjustment"],"description":"credit: off a future invoice. refund: money already taken, returned. adjustment: a correction to what was counted."},"reason":{"type":"string","minLength":3,"maxLength":500},"period":{"description":"The month it belongs to. Omitted means the next invoice, which is what most goodwill credits mean.","type":"string","pattern":"^\\d{4}-\\d{2}$"}},"required":["amountCents","kind","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"credit":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","enum":["credit","refund","adjustment"]},"reason":{"type":"string"},"period":{"type":["string","null"]},"reversesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","amountCents","kind","reason","period","reversesId","createdAt"],"additionalProperties":{}}},"required":["credit"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/credit/reverse":{"post":{"operationId":"billing.credit.reverse","summary":"billing.credit.reverse","description":"Reverses a credit that should not have been given, by recording its opposite and joining the two. Neither row is altered: the ledger shows what was decided, then what was decided instead. A credit can be reversed once.","tags":["billing"],"x-lath-impact":{"destructive":true,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"billing:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"creditId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["creditId","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"credit":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","enum":["credit","refund","adjustment"]},"reason":{"type":"string"},"period":{"type":["string","null"]},"reversesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","amountCents","kind","reason","period","reversesId","createdAt"],"additionalProperties":{}},"reversed":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","enum":["credit","refund","adjustment"]},"reason":{"type":"string"},"period":{"type":["string","null"]},"reversesId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","amountCents","kind","reason","period","reversesId","createdAt"],"additionalProperties":{}}},"required":["credit","reversed"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/invoice/get":{"post":{"operationId":"billing.invoice.get","summary":"billing.invoice.get","description":"Returns one invoice by calendar month: the amount, the priced lines it was built from, its status, and any reason the last collection attempt failed.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"billing:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["period"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"invoice":{}},"required":["invoice"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/invoice/list":{"post":{"operationId":"billing.invoice.list","summary":"billing.invoice.list","description":"Lists this account's invoices, newest period first: what was owed for each calendar month, the priced lines that produced it, and what became of the collection attempt. Statuses are open (owed, not yet attempted), paid, failed (the card refused; it will be retried), uncollectible (out of retries) and void (nothing was owed). The lines are frozen as they were priced, so a later rate change does not restate an old month.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"billing:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":24,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"invoices":{"type":"array","items":{}}},"required":["accountId","invoices"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/passthrough/list":{"post":{"operationId":"billing.passthrough.list","summary":"billing.passthrough.list","description":"Lists the pass-through fees recorded for a period, newest first, with the provider reference behind each — so a line on a bill can be traced to the charges that made it.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"billing:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"description":"Calendar month, UTC, as YYYY-MM. Defaults to the current month.","type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"type":"string"},"fees":{"type":"array","items":{}},"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["period","fees","totalCents"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/passthrough/record":{"post":{"operationId":"billing.passthrough.record","summary":"billing.passthrough.record","description":"Records a fee the carrier charged, to be passed through at cost on this environment's bill for the period. Used for carrier registration fees, which have no unit price — the amount is what was actually charged. Recording the same providerRef twice is refused rather than billed twice. This does not move money: it adds a line to the month, which is collected when the period closes.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"billing:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"metric":{"type":"string","enum":["sms.registration"],"description":"Which pass-through line this belongs to"},"description":{"type":"string","minLength":1,"maxLength":200,"description":"What the fee was for, as it should read on the bill"},"amountCents":{"type":"integer","minimum":0,"maximum":1000000,"description":"The amount actually charged, in cents. Zero is allowed: a waived fee is still worth showing."},"providerRef":{"description":"The carrier's own reference. Recording the same one twice is refused, which is what makes a retry safe.","type":"string","minLength":1,"maxLength":200},"period":{"description":"Calendar month, UTC, as YYYY-MM. Defaults to the current month.","type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["metric","description","amountCents"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"recorded":{"type":"boolean"},"reason":{"type":"string","const":"already_recorded"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"period":{"type":"string"}},"required":["recorded","id","amountCents","period"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/payment/get":{"post":{"operationId":"billing.payment.get","summary":"billing.payment.get","description":"Returns what card is on file for this account — brand, last four digits and expiry — and whether it is currently working. `status` is none when no card has been added, ok when the last charge went through or none has been attempted, and past_due when a charge was refused. Card numbers are never stored or returned.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"billing:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"collecting":{"type":"boolean"},"status":{"type":"string"},"card":{},"detail":{"type":"string"}},"required":["accountId","collecting","status","card"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/payment/refresh":{"post":{"operationId":"billing.payment.refresh","summary":"billing.payment.refresh","description":"Re-reads the card on file from the payment processor and updates what Lath shows. The processor's callback normally does this within seconds of a card being added; call this to confirm immediately rather than waiting, or after changing the card elsewhere.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"billing:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paymentMethodId":{"type":"string","minLength":1,"maxLength":120,"description":"The payment method the processor returned"}},"required":["paymentMethodId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string"},"card":{}},"required":["accountId","status","card"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/payment/setup":{"post":{"operationId":"billing.payment.setup","summary":"billing.payment.setup","description":"Starts adding a card to this account. Returns a URL on the payment processor's own hosted page where the card is entered; nothing is charged there, and the card details never reach Lath. Open the URL, complete it, then call billing.payment.get to confirm what is on file. The link is single-use and expires; call this again for a fresh one.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"billing:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"successUrl":{"type":"string","maxLength":2000,"format":"uri","description":"Where the processor sends the person after the card is saved"},"cancelUrl":{"description":"Where they go if they back out; defaults to successUrl","type":"string","maxLength":2000,"format":"uri"}},"required":["successUrl"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string"},"sessionId":{"type":"string"},"currentCard":{}},"required":["url","sessionId","currentCard"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/billing/usage/get":{"post":{"operationId":"billing.usage.get","summary":"billing.usage.get","description":"Returns this project's usage for one calendar month, per environment: emails accepted for sending (sign-in codes, invitations, transactional sends, broadcasts and automations alike), SMS segments, and monthly active end users, each with the published unit rate and amount. Test mode is counted and shown but never billed, so its amounts are null. A line whose rate is not yet published has a null amount, and the total is null until every line is priced; nothing is estimated.","tags":["billing"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"billing:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"period":{"description":"Calendar month, UTC, as YYYY-MM. Defaults to the current month.","type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"period":{"type":"string"},"currency":{"type":"string"},"rates":{},"environments":{"type":"array","items":{}},"totalCents":{"type":["number","null"]}},"required":["projectId","period","currency","rates","environments","totalCents"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/activity/list":{"post":{"operationId":"developers.activity.list","summary":"developers.activity.list","description":"Lists what happened in this environment, newest first, with who or which key did it.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"developers:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"actorType":{"type":"string"},"actorId":{"type":"string"},"actorLabel":{"type":["string","null"]},"operation":{"type":"string"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","actorType","actorId","actorLabel","operation","createdAt"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["items","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/agent/config":{"post":{"operationId":"developers.agent.config","summary":"developers.agent.config","description":"Returns the ways an agent connects: the MCP endpoint and header, ready-made Claude Code and Cursor snippets, the CLI install line, and the OpenAPI URL. Contains a placeholder, never a real key.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"developers:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mcp":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":{}},"claudeCode":{"type":"object","properties":{"command":{"type":"string"}},"required":["command"],"additionalProperties":{}},"cursor":{},"cli":{"type":"object","properties":{"install":{"type":"string"},"init":{"type":"string"}},"required":["install","init"],"additionalProperties":{}},"openapi":{"type":"string"},"hostedPages":{"type":"object","properties":{"recover":{"type":"string"},"deviceApproval":{"type":"string"},"preferences":{"type":"string"},"note":{"type":"string"}},"required":["recover","deviceApproval","preferences","note"],"additionalProperties":{}}},"required":["mcp","claudeCode","cursor","cli","openapi","hostedPages"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/agent/prompt":{"post":{"operationId":"developers.agent.prompt","summary":"developers.agent.prompt","description":"Returns the paste-in instructions for an agent without MCP: every operation with its fields, how to authenticate, the error shape, worked examples, and this environment's current state. Regenerated on every call.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"developers:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"client":{"description":"Which client is reading this, so the connect step is written for it. Omit if unsure and every path is shown.","type":"string","enum":["claude-code","claude-desktop","cursor","windsurf","zed","cline","opencode","codex","grok","deepseek","replit","lovable","bolt","v0","other"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"markdown":{"type":"string"},"generatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"operationCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["markdown","generatedAt","operationCount"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/events/list":{"post":{"operationId":"developers.events.list","summary":"developers.events.list","description":"Lists state-change events in this environment, newest first, optionally filtered by type and by the subject they are about — pass `subjectId` with a message, contact, user, broadcast or endpoint id to get that thing's timeline rather than the environment's.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"developers:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"type":{"type":"string","minLength":1},"subjectId":{"description":"The id of the thing the events are about: a message, contact, user, broadcast, endpoint or run.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"activityId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","activityId","type","payload","createdAt"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["items","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/events/types":{"post":{"operationId":"developers.events.types","summary":"developers.events.types","description":"Lists every event type Lath emits, grouped by product, with the wildcard term that covers each group. These are exactly the values developers.webhook.create accepts — anything else is refused rather than silently never delivered.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"developers:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string"},"wildcard":{"type":"string"},"types":{"type":"array","items":{"type":"string"}}},"required":["product","wildcard","types"],"additionalProperties":{}}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"wildcards":{"type":"string"}},"required":["products","total","wildcards"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/key/create":{"post":{"operationId":"developers.key.create","summary":"developers.key.create","description":"Creates a key in this environment. A secret key carries the named permissions and stays on your server. A publishable key (kind: publishable, no permissions) is safe in a browser or CLI: it reaches only the end-user sign-in operations. The plaintext is returned once and never again.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"kind":{"default":"secret","type":"string","enum":["secret","publishable"]},"permissions":{"description":"Required for a secret key; not allowed for a publishable key","minItems":1,"type":"array","items":{"type":"string","enum":["account:read","account:write","auth:read","auth:write","email:read","email:write","sms:read","sms:write","audience:read","audience:write","developers:read","developers:write","billing:read","billing:write"]}}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"prefix":{"type":"string"},"kind":{"type":"string","enum":["secret","publishable"]},"plaintext":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["id","prefix","kind","plaintext","permissions"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/key/list":{"post":{"operationId":"developers.key.list","summary":"developers.key.list","description":"Lists the keys in this environment, including revoked ones. Never returns a plaintext or a hash.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"developers:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"prefix":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastUsedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastIp":{"type":["string","null"]},"revokedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","name","prefix","permissions","createdAt","lastUsedAt","lastIp","revokedAt"],"additionalProperties":{}}}},"required":["keys"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/key/revoke":{"post":{"operationId":"developers.key.revoke","summary":"developers.key.revoke","description":"Revokes a key immediately. Refused if it is the last key with developers:write in this environment.","tags":["developers"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["keyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revokedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","revokedAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/key/rotate":{"post":{"operationId":"developers.key.rotate","summary":"developers.key.rotate","description":"Issues a new key with the same name and permissions and revokes the old one in the same transaction. The new plaintext is returned once.","tags":["developers"],"x-lath-impact":{"destructive":true,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["keyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"prefix":{"type":"string"},"plaintext":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["id","prefix","plaintext","permissions"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/key/update":{"post":{"operationId":"developers.key.update","summary":"developers.key.update","description":"Renames a key or changes the permissions it carries, in place. The key itself is untouched, so nothing has to be redeployed and no request fails while it happens. The new permissions take effect on the next request. A publishable key's one permission cannot be changed, permissions can only be set to what this caller itself holds, and the last key with developers:write cannot have it taken away.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":60},"permissions":{"description":"Replaces the key's permissions outright; not allowed on a publishable key","minItems":1,"type":"array","items":{"type":"string","enum":["account:read","account:write","auth:read","auth:write","email:read","email:write","sms:read","sms:write","audience:read","audience:write","developers:read","developers:write","billing:read","billing:write"]}}},"required":["keyId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"prefix":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["id","name","prefix","permissions"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/create":{"post":{"operationId":"developers.webhook.create","summary":"developers.webhook.create","description":"Registers a webhook endpoint for this environment. Empty eventTypes means every event. The signing secret is returned once and never again.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"eventTypes":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"description":{"type":"string","maxLength":200}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"]},"disabledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"secret":{"type":"string"}},"required":["id","url","eventTypes","description","disabledAt","createdAt","secret"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/deliveries/list":{"post":{"operationId":"developers.webhook.deliveries.list","summary":"developers.webhook.deliveries.list","description":"Lists webhook deliveries in this environment, newest first, with status, attempt count and the last response.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"developers:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","delivering","delivered","failed","dead"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["items","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/delivery/get":{"post":{"operationId":"developers.webhook.delivery.get","summary":"developers.webhook.delivery.get","description":"Returns one webhook delivery by the id in its lath-delivery-id header: which endpoint and event it is for, its status, when it will next be attempted, and every attempt made on it with the response code, the error and how long the receiver took. The event's own type and payload come with it, so a receiver that lost a request can see exactly what was sent.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"developers:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deliveryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["deliveryId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema"}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/disable":{"post":{"operationId":"developers.webhook.disable","summary":"developers.webhook.disable","description":"Disables a webhook endpoint: no new deliveries are created for it, and any already queued or waiting to retry stop being attempted. They stay readable, and re-enabling the endpoint lets them resume. Returns how many were holding.","tags":["developers"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["endpointId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"disabledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"holding":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","disabledAt","holding"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/enable":{"post":{"operationId":"developers.webhook.enable","summary":"developers.webhook.enable","description":"Re-enables a disabled webhook endpoint. New events reach it again, and any deliveries that were holding while it was off are attempted from now — they were kept, not discarded. Returns how many resume.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["endpointId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"disabledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"resumed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","disabledAt","resumed"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/list":{"post":{"operationId":"developers.webhook.list","summary":"developers.webhook.list","description":"Lists webhook endpoints in this environment, including disabled ones. Never returns a secret.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"developers:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"]},"disabledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","url","eventTypes","description","disabledAt","createdAt"],"additionalProperties":{}}}},"required":["endpoints"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/replay":{"post":{"operationId":"developers.webhook.replay","summary":"developers.webhook.replay","description":"Requeues a failed or dead delivery for immediate retry with a fresh attempt count. Refused while its endpoint is disabled, since the point of disabling one is that nothing more reaches it.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deliveryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["deliveryId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema"}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/replayDead":{"post":{"operationId":"developers.webhook.replayDead","summary":"developers.webhook.replayDead","description":"Requeues dead deliveries in bulk after an endpoint has recovered, oldest first, with a fresh attempt count. Bounded per call — pointing an entire backlog at an endpoint that has just come back is how a recovery becomes a second outage — and the reply says how many remain so the rest can follow at your own pace. Refused while the endpoint is disabled, since the point of disabling one is that nothing more reaches it.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpointId":{"description":"Only this endpoint's dead deliveries; omit for every endpoint in the environment","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"since":{"description":"Only deliveries that died at or after this moment","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"limit":{"default":200,"description":"How many to requeue in this call","type":"integer","minimum":1,"maximum":1000}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requeued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["requeued","remaining"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/secret/rotate":{"post":{"operationId":"developers.webhook.secret.rotate","summary":"developers.webhook.secret.rotate","description":"Issues a new signing secret for a webhook endpoint and returns it once, exactly as create does. The old secret stops verifying immediately: signing happens when a delivery is attempted, so everything after this — including retries of earlier failures — carries the new one. Update your receiver promptly; deliveries that fail in the gap retry on the usual backoff and succeed once it is updated. The endpoint keeps its id, its URL, its event filter and everything already queued against it.","tags":["developers"],"x-lath-impact":{"destructive":true,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["endpointId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"secret":{"type":"string"},"rotatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","url","secret","rotatedAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/test":{"post":{"operationId":"developers.webhook.test","summary":"developers.webhook.test","description":"Emits a developers.webhook.test event so the endpoint receives one real, signed delivery through the normal path. Returns the event id to look for.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["endpointId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"eventId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["endpointId","eventId"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/developers/webhook/update":{"post":{"operationId":"developers.webhook.update","summary":"developers.webhook.update","description":"Changes a webhook endpoint's URL, event filter or description. The secret does not change.","tags":["developers"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"developers:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpointId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string","format":"uri"},"eventTypes":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["endpointId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"]},"disabledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","url","eventTypes","description","disabledAt","createdAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/automation/activate":{"post":{"operationId":"email.automation.activate","summary":"email.automation.activate","description":"Turns an automation on. Refused with the first readiness problem while any send in it cannot go out. From then on every matching event enrols its contact and the worker advances runs.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["automationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"triggerEvent":{"type":"string"},"triggerFilter":{"anyOf":[{},{"type":"null"}]},"steps":{"type":"array","items":{}},"reenter":{"type":"boolean"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","triggerEvent","triggerFilter","steps","reenter","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["automation"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/automation/archive":{"post":{"operationId":"email.automation.archive","summary":"email.automation.archive","description":"Retires an automation: no new enrolments, every run in progress is cancelled, the definition and history stay readable.","tags":["email"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["automationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"triggerEvent":{"type":"string"},"triggerFilter":{"anyOf":[{},{"type":"null"}]},"steps":{"type":"array","items":{}},"reenter":{"type":"boolean"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","triggerEvent","triggerFilter","steps","reenter","status","createdAt","updatedAt"],"additionalProperties":{}},"runsCancelled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["automation","runsCancelled"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/automation/create":{"post":{"operationId":"email.automation.create","summary":"email.automation.create","description":"Creates an automation as a draft: an event that enrols a contact, an optional payload filter, and a tree of steps (wait, send, branch on a contact property, consent or event field, property.set). Returns readiness problems (unverified sender, unknown topic, unpublished template, missing legal address) so they can be fixed before email.automation.activate. Nothing runs until activated.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"trigger":{"type":"object","properties":{"event":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","description":"The event type that enrols a contact. The event payload's contactId names the contact."},"filter":{"description":"Only events whose payload contains these keys and values enrol (jsonb containment).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["event"],"additionalProperties":false},"steps":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/email_automation_create_input___schema0"},"description":"A tree of steps: wait {seconds}, send {template, topic, from}, branch {if, then, else}, property.set {key, value}."},"reenter":{"description":"May a contact be enrolled again after an earlier run? Default false.","type":"boolean"}},"required":["name","trigger","steps"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"triggerEvent":{"type":"string"},"triggerFilter":{"anyOf":[{},{"type":"null"}]},"steps":{"type":"array","items":{}},"reenter":{"type":"boolean"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","triggerEvent","triggerFilter","steps","reenter","status","createdAt","updatedAt"],"additionalProperties":{}},"readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message","fix"],"additionalProperties":{}}}},"required":["ok","problems"],"additionalProperties":{}}},"required":["automation","readiness"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/automation/get":{"post":{"operationId":"email.automation.get","summary":"email.automation.get","description":"Returns one automation with its readiness and run counts by status.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["automationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"triggerEvent":{"type":"string"},"triggerFilter":{"anyOf":[{},{"type":"null"}]},"steps":{"type":"array","items":{}},"reenter":{"type":"boolean"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","triggerEvent","triggerFilter","steps","reenter","status","createdAt","updatedAt"],"additionalProperties":{}},"readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message","fix"],"additionalProperties":{}}}},"required":["ok","problems"],"additionalProperties":{}},"runs":{"type":"object","properties":{"running":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"waiting":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["running","waiting","completed","failed","cancelled"],"additionalProperties":{}}},"required":["automation","readiness","runs"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/automation/list":{"post":{"operationId":"email.automation.list","summary":"email.automation.list","description":"Lists automations newest first, archived ones only when asked.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"includeArchived":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"triggerEvent":{"type":"string"},"triggerFilter":{"anyOf":[{},{"type":"null"}]},"steps":{"type":"array","items":{}},"reenter":{"type":"boolean"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","triggerEvent","triggerFilter","steps","reenter","status","createdAt","updatedAt"],"additionalProperties":{}}}},"required":["automations"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/automation/pause":{"post":{"operationId":"email.automation.pause","summary":"email.automation.pause","description":"Stops new enrolments and freezes runs in progress where they are; activate again to resume them.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["automationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"triggerEvent":{"type":"string"},"triggerFilter":{"anyOf":[{},{"type":"null"}]},"steps":{"type":"array","items":{}},"reenter":{"type":"boolean"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","triggerEvent","triggerFilter","steps","reenter","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["automation"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/automation/run/cancel":{"post":{"operationId":"email.automation.run.cancel","summary":"email.automation.run.cancel","description":"Stops one contact's run where it is. Messages already queued by earlier steps are not recalled.","tags":["email"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["runId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"automationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"triggerEventId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"position":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","enum":["then","else"]}]}},{"type":"null"}]},"context":{},"status":{"type":"string","enum":["running","waiting","completed","failed","cancelled"]},"wakeAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"stepsDone":{"type":"array","items":{}},"error":{"type":["string","null"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","automationId","contactId","triggerEventId","position","context","status","wakeAt","stepsDone","error","createdAt","updatedAt"],"additionalProperties":{}}},"required":["run"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/automation/run/list":{"post":{"operationId":"email.automation.run.list","summary":"email.automation.run.list","description":"Lists runs newest first, filtered by automation, contact or status. Each run carries its position in the step tree and the log of every step taken with its outcome.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["running","waiting","completed","failed","cancelled"]},"limit":{"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"automationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"triggerEventId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"position":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","enum":["then","else"]}]}},{"type":"null"}]},"context":{},"status":{"type":"string","enum":["running","waiting","completed","failed","cancelled"]},"wakeAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"stepsDone":{"type":"array","items":{}},"error":{"type":["string","null"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","automationId","contactId","triggerEventId","position","context","status","wakeAt","stepsDone","error","createdAt","updatedAt"],"additionalProperties":{}}}},"required":["runs"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/automation/update":{"post":{"operationId":"email.automation.update","summary":"email.automation.update","description":"Changes an automation's name, trigger, steps or re-entry rule. Runs already in progress keep the steps they started with only until their next step, so change an active automation with care; pause it first if the tree changes shape.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"trigger":{"type":"object","properties":{"event":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$","description":"The event type that enrols a contact. The event payload's contactId names the contact."},"filter":{"description":"Only events whose payload contains these keys and values enrol (jsonb containment).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["event"],"additionalProperties":false},"steps":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/email_automation_update_input___schema0"},"description":"A tree of steps: wait {seconds}, send {template, topic, from}, branch {if, then, else}, property.set {key, value}."},"reenter":{"description":"May a contact be enrolled again after an earlier run? Default false.","type":"boolean"},"automationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["automationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"automation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"triggerEvent":{"type":"string"},"triggerFilter":{"anyOf":[{},{"type":"null"}]},"steps":{"type":"array","items":{}},"reenter":{"type":"boolean"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","triggerEvent","triggerFilter","steps","reenter","status","createdAt","updatedAt"],"additionalProperties":{}},"readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message","fix"],"additionalProperties":{}}}},"required":["ok","problems"],"additionalProperties":{}}},"required":["automation","readiness"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/broadcast/cancel":{"post":{"operationId":"email.broadcast.cancel","summary":"email.broadcast.cancel","description":"Cancels a broadcast: a draft is closed, and any of its messages still queued (not yet handed to delivery) are cancelled. Messages already sent are not recalled.","tags":["email"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"string"},"subject":{"type":["string","null"]}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt","from","subject"],"additionalProperties":{}},"cancelledMessages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["broadcast","cancelledMessages"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/broadcast/create":{"post":{"operationId":"email.broadcast.create","summary":"email.broadcast.create","description":"Creates a marketing broadcast as a draft: a published template sent from a verified domain to every contact with current consent for a topic, optionally narrowed by a segment. Returns readiness problems (unverified sender, missing legal address, unknown topic) so they can be fixed before email.broadcast.send.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"template":{"type":"string","minLength":1,"maxLength":120,"description":"A published template name"},"from":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"An address on the project's own sending domain (email.sender.get) or on one of its verified domains"},"subject":{"description":"Overrides the template's subject","type":"string","minLength":1,"maxLength":998},"topic":{"type":"string","minLength":1,"maxLength":64,"description":"The consent topic: only contacts with current granted consent for it receive the broadcast"},"segmentId":{"description":"Narrow the audience to a segment","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"variables":{"default":{},"description":"Values shared by every recipient; contact properties are added per recipient","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{}},"scheduledAt":{"description":"Leave unset to send as soon as email.broadcast.send is called","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["name","template","from","topic"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"string"},"subject":{"type":["string","null"]}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt","from","subject"],"additionalProperties":{}},"readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message","fix"],"additionalProperties":{}}}},"required":["ok","problems"],"additionalProperties":{}}},"required":["broadcast","readiness"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/broadcast/get":{"post":{"operationId":"email.broadcast.get","summary":"email.broadcast.get","description":"Returns a broadcast with its status, the fan-out counts (recipients, queued, suppressed, held), and — once sent — `progress`: what has actually become of its messages, counted live from the messages themselves, so delivered and bounced totals keep moving as receipts arrive. For drafts, returns what still blocks sending.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"string"},"subject":{"type":["string","null"]}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt","from","subject"],"additionalProperties":{}},"readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message","fix"],"additionalProperties":{}}}},"required":["ok","problems"],"additionalProperties":{}},"progress":{"type":"object","properties":{"inFlight":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"done":{"type":"boolean"}},"required":["inFlight","done"],"additionalProperties":{}}},"required":["broadcast"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/broadcast/list":{"post":{"operationId":"email.broadcast.list","summary":"email.broadcast.list","description":"Lists broadcasts newest first.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcasts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"string"},"subject":{"type":["string","null"]}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt","from","subject"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["broadcasts","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/broadcast/pause":{"post":{"operationId":"email.broadcast.pause","summary":"email.broadcast.pause","description":"Holds a broadcast that is sending: its messages that have not yet been handed to delivery stop, and nothing else about it changes. Messages already sent are not recalled. email.broadcast.resume releases them.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"string"},"subject":{"type":["string","null"]}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt","from","subject"],"additionalProperties":{}},"pausedMessages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["broadcast","pausedMessages"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/broadcast/resume":{"post":{"operationId":"email.broadcast.resume","summary":"email.broadcast.resume","description":"Releases a paused broadcast: its held messages go back in the queue and send from where they stopped. Nobody is sent to twice — the messages that already went are untouched, and the audience policy is checked again for each one at send.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"string"},"subject":{"type":["string","null"]}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt","from","subject"],"additionalProperties":{}},"resumedMessages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["broadcast","resumedMessages"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/broadcast/send":{"post":{"operationId":"email.broadcast.send","summary":"email.broadcast.send","description":"Sends a draft broadcast: refuses unless the sender is on a verified domain, the template is published, the topic exists and the footer has a postal address; then queues one message per consenting, unsuppressed contact with the contact's properties as variables and a personal unsubscribe link. Scheduled broadcasts are queued now and released at the scheduled time.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":true,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"string"},"subject":{"type":["string","null"]}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt","from","subject"],"additionalProperties":{}},"counts":{},"sendAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["broadcast","counts","sendAfter"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/broadcast/update":{"post":{"operationId":"email.broadcast.update","summary":"email.broadcast.update","description":"Changes a draft broadcast. Sent or cancelled broadcasts cannot change. An omitted field keeps its stored value; the three optional ones — subject, segmentId and scheduledAt — accept null to clear them, which is how a schedule is cancelled or a segment widened back to everyone with consent for the topic.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"template":{"type":"string","minLength":1,"maxLength":120,"description":"A published template name"},"from":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"An address on the project's own sending domain (email.sender.get) or on one of its verified domains"},"subject":{"anyOf":[{"type":"string","minLength":1,"maxLength":998},{"type":"null"}]},"topic":{"type":"string","minLength":1,"maxLength":64,"description":"The consent topic: only contacts with current granted consent for it receive the broadcast"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{"default":{},"description":"Values shared by every recipient; contact properties are added per recipient","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{}},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"from":{"type":"string"},"subject":{"type":["string","null"]}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt","from","subject"],"additionalProperties":{}},"readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message","fix"],"additionalProperties":{}}}},"required":["ok","problems"],"additionalProperties":{}}},"required":["broadcast","readiness"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/domain/add":{"post":{"operationId":"email.domain.add","summary":"email.domain.add","description":"Adds a domain you own for sending. Returns the DNS records to create: three required (DKIM, return-path MX, return-path SPF) and two recommended (SPF, DMARC). Verify with email.domain.verify once they resolve; marketing sends need a verified domain.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"description":"Bare domain, like mail.example.com"}},"required":["domain"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"domain":{"type":"string"},"status":{"type":"string","enum":["pending","verified","failed"]},"providerStatus":{"type":"string"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":{}}},"receiving":{"type":"boolean"},"blocker":{"type":["string","null"]},"lastCheck":{"anyOf":[{},{"type":"null"}]},"lastCheckedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","domain","status","providerStatus","records","receiving","blocker","lastCheck","lastCheckedAt","verifiedAt","createdAt"],"additionalProperties":{}},"next":{"type":"string"}},"required":["domain","next"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/domain/get":{"post":{"operationId":"email.domain.get","summary":"email.domain.get","description":"Returns one sending domain: status, the DNS records to create, the last check per record, and the blocker if any.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domainId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["domainId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"domain":{"type":"string"},"status":{"type":"string","enum":["pending","verified","failed"]},"providerStatus":{"type":"string"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":{}}},"receiving":{"type":"boolean"},"blocker":{"type":["string","null"]},"lastCheck":{"anyOf":[{},{"type":"null"}]},"lastCheckedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","domain","status","providerStatus","records","receiving","blocker","lastCheck","lastCheckedAt","verifiedAt","createdAt"],"additionalProperties":{}}},"required":["domain"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/domain/list":{"post":{"operationId":"email.domain.list","summary":"email.domain.list","description":"Lists the project's sending identities: the default identity every project has, and every added domain with its status.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"default":{"type":"object","properties":{"address":{"type":"string"},"status":{"type":"string"},"allowedFor":{"type":"array","items":{"type":"string"}},"notAllowedFor":{"type":"array","items":{"type":"string"}}},"required":["address","status","allowedFor","notAllowedFor"],"additionalProperties":{}},"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"domain":{"type":"string"},"status":{"type":"string"},"providerStatus":{"type":"string"},"blocker":{"type":["string","null"]},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","domain","status","providerStatus","blocker","verifiedAt"],"additionalProperties":{}}}},"required":["default","domains"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/domain/receiving/set":{"post":{"operationId":"email.domain.receiving.set","summary":"email.domain.receiving.set","description":"Turns receiving on or off for a verified domain. Turning it on adds one more DNS record — an MX on the domain itself — and returns it. That record replaces wherever this domain's mail goes today: every message anybody sends to any address at this domain arrives at Lath, is stored, and reaches your webhooks as email.inbound.received. Turning it off stops Lath accepting mail for it; delete the MX record afterwards.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domainId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"enabled":{"type":"boolean","description":"true adds the receiving MX record and starts accepting mail for this domain"}},"required":["domainId","enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"domain":{"type":"string"},"status":{"type":"string","enum":["pending","verified","failed"]},"providerStatus":{"type":"string"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":{}}},"receiving":{"type":"boolean"},"blocker":{"type":["string","null"]},"lastCheck":{"anyOf":[{},{"type":"null"}]},"lastCheckedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","domain","status","providerStatus","records","receiving","blocker","lastCheck","lastCheckedAt","verifiedAt","createdAt"],"additionalProperties":{}},"record":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":{}},{"type":"null"}]},"next":{"type":"string"}},"required":["domain","record","next"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/domain/remove":{"post":{"operationId":"email.domain.remove","summary":"email.domain.remove","description":"Retires a sending domain. Messages already queued from it are unaffected; new sends from it are refused. The DNS records can be deleted afterwards.","tags":["email"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domainId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["domainId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"removed":{"type":"boolean"},"domain":{"type":"string"}},"required":["removed","domain"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/domain/verify":{"post":{"operationId":"email.domain.verify","summary":"email.domain.verify","description":"Looks the domain's DNS records up right now and reports each one. Flips the domain to verified when every required record resolves, or names exactly what is missing.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domainId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["domainId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"domain":{"type":"string"},"status":{"type":"string","enum":["pending","verified","failed"]},"providerStatus":{"type":"string"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":{}}},"receiving":{"type":"boolean"},"blocker":{"type":["string","null"]},"lastCheck":{"anyOf":[{},{"type":"null"}]},"lastCheckedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"verifiedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","domain","status","providerStatus","records","receiving","blocker","lastCheck","lastCheckedAt","verifiedAt","createdAt"],"additionalProperties":{}},"check":{}},"required":["domain","check"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/inbound/delete":{"post":{"operationId":"email.inbound.delete","summary":"email.inbound.delete","description":"Deletes a received message's contents: bodies, headers, attachments and every recipient beyond the one it was addressed to. The record that it arrived — from whom, to what, and when — is kept, because that is what answers a later question about whether it was received. It disappears from email.inbound.list and email.inbound.get.","tags":["email"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inboundId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["inboundId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inboundId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deleted":{"type":"boolean","const":true},"alreadyDeleted":{"type":"boolean"}},"required":["inboundId","deleted","alreadyDeleted"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/inbound/get":{"post":{"operationId":"email.inbound.get","summary":"email.inbound.get","description":"Returns one received message in full: text and HTML bodies, every header, every recipient, and attachments with their content as base64.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inboundId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["inboundId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{}},"required":["message"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/inbound/list":{"post":{"operationId":"email.inbound.list","summary":"email.inbound.list","description":"Lists messages received on this project's verified domains, newest first, as summaries: sender, recipient, subject, attachment count, a text preview. Filter by domain, recipient or sender.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domainId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"to":{"description":"Only messages addressed to this recipient on your domain","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"from":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"before":{"description":"Page: only messages received before this time","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))$"},"limit":{"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"domainId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string"},"fromName":{"type":["string","null"]},"to":{"type":"string"},"subject":{"type":["string","null"]},"messageId":{"type":["string","null"]},"inReplyTo":{"type":["string","null"]},"attachmentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hasHtml":{"type":"boolean"},"textPreview":{"type":"string"},"rawSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"receivedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","domainId","from","fromName","to","subject","messageId","inReplyTo","attachmentCount","hasHtml","textPreview","rawSize","sentAt","receivedAt"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["messages","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/message/cancel":{"post":{"operationId":"email.message.cancel","summary":"email.message.cancel","description":"Stops an email that has not left yet. A queued message — including one held by sendAfter — is cancelled and never sent. A message already handed to the mail provider cannot be recalled and is refused with its current status, since saying otherwise would be a lie about something the recipient may already have read.","tags":["email"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["messageId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","const":"cancelled"},"cancelled":{"type":"boolean"}},"required":["messageId","status","cancelled"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/message/get":{"post":{"operationId":"email.message.get","summary":"email.message.get","description":"Returns one email message: recipient, sender, subject, template, current status, any error, and the rendered bodies. A message reaches 'sent' when the provider accepts it, and 'delivered', 'bounced' or 'complained' when the provider's notification says what became of it; deliveredAt, vendorStatus and bounceKind carry that answer. A hard bounce or a complaint also suppresses the address.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"includeBody":{"default":true,"type":"boolean"}},"required":["messageId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string"},"to":{"type":"string"},"from":{"type":"string"},"replyTo":{"type":["string","null"]},"subject":{"type":["string","null"]},"template":{"type":["string","null"]},"templateVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"templateLocale":{"type":["string","null"]},"status":{"type":"string"},"error":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"contactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"vendorRef":{"type":["string","null"]},"fromName":{"type":["string","null"]},"deliveredAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"vendorStatus":{"type":["string","null"]},"bounceKind":{"type":["string","null"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"text":{"type":["string","null"]},"html":{"type":["string","null"]}},"required":["id","channel","to","from","replyTo","subject","template","templateVersion","templateLocale","status","error","metadata","contactId","vendorRef","fromName","deliveredAt","vendorStatus","bounceKind","createdAt","updatedAt"],"additionalProperties":{}}},"required":["message"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/message/list":{"post":{"operationId":"email.message.list","summary":"email.message.list","description":"Lists email messages newest first, optionally filtered by status, recipient, template, broadcast or contact. `contactId` matches mail linked to that contact and mail merely addressed to their email, which is how a message sent before the contact existed is still theirs. Bodies are not included; use email.message.get.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["queued","sent","delivered","opened","clicked","bounced","complained","failed","suppressed","cancelled"]},"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"to":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"template":{"type":"string","maxLength":120},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string"},"to":{"type":"string"},"from":{"type":"string"},"replyTo":{"type":["string","null"]},"subject":{"type":["string","null"]},"template":{"type":["string","null"]},"templateVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"templateLocale":{"type":["string","null"]},"status":{"type":"string"},"error":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"contactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"vendorRef":{"type":["string","null"]},"fromName":{"type":["string","null"]},"deliveredAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"vendorStatus":{"type":["string","null"]},"bounceKind":{"type":["string","null"]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","channel","to","from","replyTo","subject","template","templateVersion","templateLocale","status","error","metadata","contactId","vendorRef","fromName","deliveredAt","vendorStatus","bounceKind","createdAt","updatedAt"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["messages","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/send":{"post":{"operationId":"email.send","summary":"email.send","description":"Sends one transactional email to one recipient, from the project's default sender, either from a named template with variables or from inline subject and body. Asks the audience policy first: a suppressed address is recorded as suppressed, not sent. Returns the message id and its status.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":true,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"One recipient"},"template":{"description":"A template name; provide variables with it","type":"string","minLength":1,"maxLength":120},"locale":{"description":"Send the template's variant for this language, falling back to the broader language and then the default. Omit to use the recipient's own locale if one is recorded.","type":"string","maxLength":20},"variables":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{}},"subject":{"description":"Inline send: the subject (with template, overrides the template's subject)","type":"string","minLength":1,"maxLength":998},"html":{"description":"Inline send: the HTML body","type":"string","maxLength":200000},"text":{"description":"Inline send: the plain-text body; derived from html when omitted","type":"string","maxLength":100000},"layout":{"default":"brand","description":"Inline send only: wrap the HTML in the project's themed frame","type":"string","enum":["brand","none"]},"from":{"description":"The project's default sender (omit) or any address on one of its verified domains","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"replyTo":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"fromName":{"description":"The name shown in the inbox beside the address. Defaults to the project's name; pass an empty string to send the bare address.","type":"string","maxLength":120},"sendAfter":{"description":"Hold the message until this moment; omit to send now. Until it is sent it can be stopped with email.message.cancel.","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"metadata":{"description":"Up to 20 key/values echoed on every webhook about this message","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"}]}},"attachments":{"description":"Files to attach. Base64 content, at most 10 MB across all of them.","maxItems":10,"type":"array","items":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":200},"contentType":{"default":"application/octet-stream","type":"string","maxLength":200,"pattern":"^[a-zA-Z0-9!#$&^_.+-]+\\/[a-zA-Z0-9!#$&^_.+-]+(\\s*;\\s*[a-zA-Z0-9!#$&^_.+-]+=[^\\r\\n;]{1,80})*$"},"content":{"type":"string","format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$","description":"The file's bytes, base64 encoded"}},"required":["filename","content"],"additionalProperties":false}}},"required":["to"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","suppressed"]},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["filename","contentType","sizeBytes"],"additionalProperties":{}}},"to":{"type":"string"},"from":{"type":"string"},"fromName":{"type":["string","null"]},"subject":{"type":["string","null"]},"template":{"type":["string","null"]},"templateVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"templateLocale":{"type":["string","null"]},"sendAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"suppressed":{"type":"object","properties":{"reason":{"type":"string"},"detail":{"type":"string"}},"required":["reason","detail"],"additionalProperties":{}}},"required":["messageId","status","attachments","to","from","fromName","subject","template","templateVersion","templateLocale","sendAfter"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/sender/get":{"post":{"operationId":"email.sender.get","summary":"email.sender.get","description":"Returns the project's own sending identity on the shared parent: the full address, its local part, the subdomain it sits on, and the display name that appears beside it. Any address on this subdomain may be used as a sender without verifying anything, because the parent is already a verified identity. This is separate from email.domain.*, which is for domains you own.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"address":{"type":"string"},"local":{"type":"string"},"domain":{"type":"string"},"label":{"type":"string"},"parent":{"type":"string"},"name":{"type":"string"},"nameIsDefault":{"type":"boolean"}},"required":["address","local","domain","label","parent","name","nameIsDefault"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/sender/set":{"post":{"operationId":"email.sender.set","summary":"email.sender.set","description":"Changes the project's sending identity on the shared parent: the local part before the @, the subdomain label, and the display name. Every field is optional; omitted fields are left alone. Changing the label changes the address every future message comes from, and frees the old one for reuse by another project, so it is a live change rather than an alias.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"local":{"description":"The part before the @, like \"hello\" or \"team\". Letters, digits, dot, hyphen and underscore.","type":"string","minLength":1,"maxLength":64},"label":{"description":"The subdomain label under the sending parent. Must be unused by any other project.","type":"string","minLength":1,"maxLength":63},"name":{"description":"The display name beside the address. Pass null to follow the project name.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"address":{"type":"string"},"local":{"type":"string"},"domain":{"type":"string"},"label":{"type":"string"},"parent":{"type":"string"},"name":{"type":"string"},"nameIsDefault":{"type":"boolean"}},"required":["address","local","domain","label","parent","name","nameIsDefault"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/template/delete":{"post":{"operationId":"email.template.delete","summary":"email.template.delete","description":"Removes a custom template (all versions become history). Without a `locale` it removes every language variant; with one it removes only that translation and the others keep sending. A reserved name goes back to its built-in default. Messages already queued keep the body they were rendered with.","tags":["email"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*$","description":"The template name. Reserved names (auth.signin.code, auth.signin.link) override the built-in sign-in messages."},"locale":{"description":"Remove only this language variant. Omit to remove every variant of the template.","type":"string","maxLength":20}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema"}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/template/get":{"post":{"operationId":"email.template.get","summary":"email.template.get","description":"Returns a named template: the published version and draft of one language variant, every locale that has a variant, and for reserved names the built-in default and the variables it needs.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*$","description":"The template name. Reserved names (auth.signin.code, auth.signin.link) override the built-in sign-in messages."},"locale":{"description":"Which language variant to read. Omit for the default variant.","type":"string","maxLength":20}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema"}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/template/list":{"post":{"operationId":"email.template.list","summary":"email.template.list","description":"Lists every email template in the project, including the reserved sign-in templates, whether each is the default or a custom version, and which language variants exist. Version and draft numbers describe the default variant; `locales` names the translations.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"locales":{"type":"array","items":{"type":"string"}}},"required":["name","locales"],"additionalProperties":{}}}},"required":["templates"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/template/preview":{"post":{"operationId":"email.template.preview","summary":"email.template.preview","description":"Renders a template with the given variables exactly as email.send would, including the brand frame, without sending. Give a `locale` to see what a recipient in that language gets, including which variant the fallback chose. Reports any variables the template needs that were not supplied.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"email:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*$","description":"The template name. Reserved names (auth.signin.code, auth.signin.link) override the built-in sign-in messages."},"locale":{"description":"Preview as a recipient in this language. Falls back the same way a real send does.","type":"string","maxLength":20},"variables":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{},"description":"Values for the template's variables"},"version":{"default":"published","description":"draft previews unpublished changes; published (or the default) is what sends today","type":"string","enum":["published","draft"]}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema"}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/template/publish":{"post":{"operationId":"email.template.publish","summary":"email.template.publish","description":"Makes the draft of a named template the version email.send and sign-in messages use from now on. Publishes one language variant; the others are untouched. The previous published version is kept as history.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*$","description":"The template name. Reserved names (auth.signin.code, auth.signin.link) override the built-in sign-in messages."},"locale":{"description":"Which language variant to publish. Omit for the default variant.","type":"string","maxLength":20}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"published":{}},"required":["name","published"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/email/template/set":{"post":{"operationId":"email.template.set","summary":"email.template.set","description":"Saves a new draft version of a named email template: subject, HTML and text with {{variables}}, {{#if}} and {{#each}}. Give a `locale` to write that language's variant; each language has its own versions and publishes on its own. Refuses syntax errors with line numbers. Nothing is sent from a draft until email.template.publish.","tags":["email"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"email:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*$","description":"The template name. Reserved names (auth.signin.code, auth.signin.link) override the built-in sign-in messages."},"locale":{"description":"Language variant, e.g. 'fr' or 'pt-BR'. Omit for the default variant used when nothing more specific fits the recipient.","type":"string","maxLength":20},"subject":{"description":"Required for a template that has never been published","type":"string","minLength":1,"maxLength":998},"html":{"type":"string","maxLength":200000},"text":{"description":"Plain-text part; derived from html when omitted","type":"string","maxLength":100000},"layout":{"description":"brand wraps the HTML in the project's themed frame (default); none sends the HTML as written","type":"string","enum":["brand","none"]}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"draft":{},"reserved":{"type":"boolean"}},"required":["name","draft","reserved"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/broadcast/cancel":{"post":{"operationId":"sms.broadcast.cancel","summary":"sms.broadcast.cancel","description":"Cancels an SMS broadcast: a draft is closed, and any of its messages still queued (not yet handed to the carrier) are cancelled. Messages already sent cannot be recalled.","tags":["sms"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt"],"additionalProperties":{}},"cancelledMessages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["broadcast","cancelledMessages"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/broadcast/create":{"post":{"operationId":"sms.broadcast.create","summary":"sms.broadcast.create","description":"Creates an SMS marketing broadcast as a draft: a published SMS template sent to every contact with current SMS consent for a topic, optionally narrowed by a segment. There is no sender to choose — the number belongs to the deployment. Returns readiness problems (unknown topic, unpublished template, no STOP wording) so they can be fixed before sms.broadcast.send.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"template":{"type":"string","minLength":1,"maxLength":120,"description":"A published SMS template name (sms.template.list)"},"topic":{"type":"string","minLength":1,"maxLength":64,"description":"The consent topic: only contacts with current granted SMS consent for it receive the broadcast"},"segmentId":{"description":"Narrow the audience to a segment","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"variables":{"default":{},"description":"Values shared by every recipient; contact properties are added per recipient","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{}},"scheduledAt":{"description":"Leave unset to send as soon as sms.broadcast.send is called","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["name","template","topic"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt"],"additionalProperties":{}},"readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message","fix"],"additionalProperties":{}}}},"required":["ok","problems"],"additionalProperties":{}}},"required":["broadcast","readiness"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/broadcast/get":{"post":{"operationId":"sms.broadcast.get","summary":"sms.broadcast.get","description":"Reads one SMS broadcast with its readiness problems and, once sent, its counts.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt"],"additionalProperties":{}},"readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message","fix"],"additionalProperties":{}}}},"required":["ok","problems"],"additionalProperties":{}}},"required":["broadcast","readiness"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/broadcast/list":{"post":{"operationId":"sms.broadcast.list","summary":"sms.broadcast.list","description":"Lists SMS broadcasts, newest first. Email broadcasts are not included; they are email.broadcast.list.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"before":{"description":"Page back: the createdAt of the oldest row you have","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcasts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["broadcasts","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/broadcast/pause":{"post":{"operationId":"sms.broadcast.pause","summary":"sms.broadcast.pause","description":"Holds an SMS broadcast that is sending: its messages not yet handed to the carrier stop, and nothing else about it changes. Messages already sent cannot be recalled. sms.broadcast.resume releases them.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt"],"additionalProperties":{}},"pausedMessages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["broadcast","pausedMessages"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/broadcast/resume":{"post":{"operationId":"sms.broadcast.resume","summary":"sms.broadcast.resume","description":"Releases a paused SMS broadcast: its held messages go back in the queue. A message a quiet-hours rule had held until morning keeps that time — resuming does not send a text at midnight.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt"],"additionalProperties":{}},"resumedMessages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["broadcast","resumedMessages"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/broadcast/send":{"post":{"operationId":"sms.broadcast.send","summary":"sms.broadcast.send","description":"Sends a draft SMS broadcast: refuses unless the template is published, carries STOP wording and fits in the segment limit, and the topic exists; then queues one message per consenting, unsuppressed contact with a phone number, using the contact's properties as variables. Billing counts real segments, so the whole audience is rendered before anything is queued and the spending cap is checked against the true total. Scheduled broadcasts are queued now and released at the scheduled time.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":true,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt"],"additionalProperties":{}},"counts":{},"segments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sendAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["broadcast","counts","segments","sendAfter"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/broadcast/update":{"post":{"operationId":"sms.broadcast.update","summary":"sms.broadcast.update","description":"Changes a draft SMS broadcast. A broadcast that has been sent or cancelled cannot change; create a new one.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcastId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":120},"template":{"type":"string","minLength":1,"maxLength":120},"topic":{"type":"string","minLength":1,"maxLength":64},"segmentId":{"description":"null clears the segment, widening the audience to every consenting contact","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{}},"scheduledAt":{"description":"null clears the schedule","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["broadcastId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"broadcast":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"template":{"type":"string"},"topic":{"type":"string"},"segmentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"variables":{},"scheduledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","queued","paused","sent","cancelled"]},"counts":{"anyOf":[{},{"type":"null"}]},"sentAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"completedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","name","template","topic","segmentId","variables","scheduledAt","status","counts","sentAt","completedAt","createdAt","updatedAt"],"additionalProperties":{}},"readiness":{"type":"object","properties":{"ok":{"type":"boolean"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"fix":{"type":"string"}},"required":["code","message","fix"],"additionalProperties":{}}}},"required":["ok","problems"],"additionalProperties":{}}},"required":["broadcast","readiness"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/conversation/get":{"post":{"operationId":"sms.conversation.get","summary":"sms.conversation.get","description":"Reads one SMS conversation: every message exchanged with one number, oldest first, with the direction of each. Reply with sms.send to the same number — a reply is an ordinary message, and routing it through the same operation keeps consent, segment counting and quiet hours in one place.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"phone":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$","description":"The other party, E.164"},"after":{"description":"Page forward: the createdAt of the newest message you have","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200}},"required":["phone"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["inbound","outbound"]},"body":{"type":["string","null"]},"status":{"type":"string"},"error":{"type":["string","null"]},"topic":{"type":["string","null"]},"contactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"deliveredAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["id","direction","body","status","error","topic","contactId","createdAt","deliveredAt"],"additionalProperties":{}}},"nextAfter":{"type":["string","null"]},"phone":{"type":"string"},"contactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"suppressed":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"since":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["reason","since"],"additionalProperties":{}},{"type":"null"}]}},"required":["messages","nextAfter","phone","contactId","suppressed"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/conversation/list":{"post":{"operationId":"sms.conversation.list","summary":"sms.conversation.list","description":"Lists SMS conversations, most recently active first: one row per number this environment has exchanged messages with, carrying the latest message, its direction, and how many have gone each way. A conversation with an unanswered inbound message is the one worth looking at, so `awaitingReply` says whether the last word was theirs.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"awaitingReply":{"description":"Only conversations whose most recent message came from the other person","type":"boolean"},"before":{"description":"Page back: the lastMessageAt of the oldest row you have","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{"counterparty":{"type":"string"},"lastMessageAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"inbound":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outbound":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastBody":{"type":["string","null"]},"lastDirection":{"type":"string","enum":["inbound","outbound"]},"contactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"awaitingReply":{"type":"boolean"}},"required":["counterparty","lastMessageAt","inbound","outbound","lastBody","lastDirection","contactId","awaitingReply"],"additionalProperties":{}}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["conversations","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/message/cancel":{"post":{"operationId":"sms.message.cancel","summary":"sms.message.cancel","description":"Stops a message that has not left yet. A queued message — including one held by sendAfter — is cancelled and never sent, and its billing counter is credited back. A message already handed to the carrier cannot be recalled and is refused with its current status, since saying otherwise would be a lie about something the customer's user has already read.","tags":["sms"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["messageId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","const":"cancelled"},"cancelled":{"type":"boolean"}},"required":["messageId","status","cancelled"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/message/get":{"post":{"operationId":"sms.message.get","summary":"sms.message.get","description":"Returns one SMS: recipient, body, current status, the carrier's reference once it has one, how many attempts it has taken, and any error in the carrier's own words. A message reaches 'sent' when the carrier accepts it and 'delivered' or 'bounced' when the carrier's status callback says what became of it; deliveredAt, vendorStatus and bounceKind carry that answer.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["messageId"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{}},"required":["message"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/message/list":{"post":{"operationId":"sms.message.list","summary":"sms.message.list","description":"Lists SMS newest first, optionally filtered by status or recipient. `nextBefore` continues from where a page ended.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["queued","sending","sent","delivered","bounced","failed","suppressed"]},"to":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"before":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messages":{"type":"array","items":{}},"nextBefore":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["messages","nextBefore"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/number/list":{"post":{"operationId":"sms.number.list","summary":"sms.number.list","description":"Lists the phone numbers this environment sends from, including one still being assigned. A number belongs to one environment, which is how an inbound message — a STOP, a HELP, a reply — is attributed to the right tenant. Status is `pending` while the carrier is being asked, `active` once it can send and receive, and `failed` with the reason when the carrier refused.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"numbers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"phoneNumber":{"type":["string","null"]},"status":{"type":"string"},"provider":{"type":"string"},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"type":["string","null"]}},"required":["id","phoneNumber","status","provider","createdAt","attempts","error"],"additionalProperties":{}}}},"required":["numbers"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/registration/get":{"post":{"operationId":"sms.registration.get","summary":"sms.registration.get","description":"Returns this project's carrier registration and, in one field, what is stopping SMS from sending. 'blocker' is null only when the registration is active.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"registration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"brandType":{"type":"string","enum":["standard","sole_proprietor"]},"status":{"type":"string","enum":["draft","registering","action_needed","active","failed"]},"blocker":{"type":["string","null"]},"detail":{},"submittedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastCheckedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","brandType","status","blocker","detail","submittedAt","lastCheckedAt","createdAt"],"additionalProperties":{}},{"type":"null"}]},"blocker":{"type":["string","null"]}},"required":["registration","blocker"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/registration/submit":{"post":{"operationId":"sms.registration.submit","summary":"sms.registration.submit","description":"Files this project's carrier registration, or refiles it when the carrier asked for changes. US carriers refuse application-to-person traffic from an unregistered sender, so SMS cannot send until this reaches 'active'. A sole_proprietor brand needs no tax id and carries lower throughput; a standard brand needs a registered legal entity and its tax id. Refiling replaces the previous submission rather than adding a second one.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brandType":{"type":"string","enum":["standard","sole_proprietor"]},"legalName":{"type":"string","minLength":1,"maxLength":200},"taxId":{"type":"string","minLength":1,"maxLength":40},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":5,"maxLength":30},"address":{"type":"string","minLength":1,"maxLength":300},"website":{"type":"string","format":"uri"},"useCase":{"type":"string","minLength":20,"maxLength":2000},"sampleMessages":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}}},"required":["brandType","legalName","email","phone","address","useCase","sampleMessages"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"registration":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"brandType":{"type":"string","enum":["standard","sole_proprietor"]},"status":{"type":"string","enum":["draft","registering","action_needed","active","failed"]},"blocker":{"type":["string","null"]},"detail":{},"submittedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"lastCheckedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","brandType","status","blocker","detail","submittedAt","lastCheckedAt","createdAt"],"additionalProperties":{}}},"required":["registration"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/send":{"post":{"operationId":"sms.send","summary":"sms.send","description":"Sends one SMS to one number in E.164 form, from the environment's configured sender. The body may carry {{variables}}. Asks the audience policy first: a number that has replied STOP is recorded as suppressed, not sent. Billing counts segments, not messages — a body outside the GSM alphabet costs more than twice as much per character, and the reply says how many segments were counted. If the environment cannot text anyone yet (no active carrier registration, or no number to send from) the message is still stored and the reply carries `blocked` saying why — do not wait on a status that cannot change until that clears.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":true,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$","description":"One recipient, E.164, e.g. +14155550100"},"template":{"description":"An SMS template name; provide variables with it. Use instead of body, not with it.","type":"string","minLength":1,"maxLength":120},"locale":{"description":"Send the template's variant for this language, falling back to the broader language and then the default. Omit to use the recipient's own locale if one is recorded.","type":"string","maxLength":20},"body":{"description":"Inline send: the message; may reference {{variables}}","type":"string","minLength":1,"maxLength":1600},"variables":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{}},"sendAfter":{"description":"Hold the message until this moment; omit to send now. Until it is sent it can be stopped with sms.message.cancel.","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"topic":{"description":"A consent topic for marketing; omit for transactional, which only a suppression stops","type":"string","minLength":1,"maxLength":64},"metadata":{"description":"Up to 20 key/values echoed on every webhook about this message","type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"}]}}},"required":["to"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["queued","suppressed"]},"to":{"type":"string"},"segments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"encoding":{"type":"string"},"template":{"type":["string","null"]},"templateVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"templateLocale":{"type":["string","null"]},"sendAfter":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"suppressed":{"type":"object","properties":{"reason":{"type":"string"},"detail":{"type":"string"}},"required":["reason","detail"],"additionalProperties":{}},"blocked":{"type":"object","properties":{"reason":{"type":"string"},"fix":{"type":"string"}},"required":["reason","fix"],"additionalProperties":{}}},"required":["messageId","status","to","segments","encoding","template","templateVersion","templateLocale","sendAfter"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/settings/get":{"post":{"operationId":"sms.settings.get","summary":"sms.settings.get","description":"Returns this environment's SMS settings with defaults filled in. Quiet hours are the window in which marketing texts are held rather than sent, judged in the recipient's own timezone (their contact property if set, otherwise the environment's). Transactional messages — anything sent without a consent topic — are never held.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settings":{"type":"object","properties":{"quietHours":{"type":"object","properties":{"enabled":{"type":"boolean"},"start":{"type":"string"},"end":{"type":"string"},"timezone":{"type":["string","null"]}},"required":["enabled","start","end","timezone"],"additionalProperties":{}},"keywordReplies":{"type":"object","properties":{"stop":{"type":["string","null"]},"help":{"type":["string","null"]},"start":{"type":["string","null"]}},"required":["stop","help","start"],"additionalProperties":{}}},"required":["quietHours","keywordReplies"],"additionalProperties":{}},"defaults":{"type":"object","properties":{"quietHours":{"type":"object","properties":{"enabled":{"type":"boolean"},"start":{"type":"string"},"end":{"type":"string"},"timezone":{"type":["string","null"]}},"required":["enabled","start","end","timezone"],"additionalProperties":{}},"keywordReplies":{"type":"object","properties":{"stop":{"type":["string","null"]},"help":{"type":["string","null"]},"start":{"type":["string","null"]}},"required":["stop","help","start"],"additionalProperties":{}}},"required":["quietHours","keywordReplies"],"additionalProperties":{}},"suggested":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"updatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"ready":{"anyOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":{}},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"problem":{"type":"string"},"fix":{"type":"string"}},"required":["ok","problem","fix"],"additionalProperties":{}}]}},"required":["settings","defaults","suggested","updatedAt","ready"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/settings/reset":{"post":{"operationId":"sms.settings.reset","summary":"sms.settings.reset","description":"Returns every SMS setting in this environment to its default. Quiet hours go back to on, 21:00–08:00, with no timezone — which stops marketing sends until one is set.","tags":["sms"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settings":{"type":"object","properties":{"quietHours":{"type":"object","properties":{"enabled":{"type":"boolean"},"start":{"type":"string"},"end":{"type":"string"},"timezone":{"type":["string","null"]}},"required":["enabled","start","end","timezone"],"additionalProperties":{}},"keywordReplies":{"type":"object","properties":{"stop":{"type":["string","null"]},"help":{"type":["string","null"]},"start":{"type":["string","null"]}},"required":["stop","help","start"],"additionalProperties":{}}},"required":["quietHours","keywordReplies"],"additionalProperties":{}},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["settings","updatedAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/settings/set":{"post":{"operationId":"sms.settings.set","summary":"sms.settings.set","description":"Changes SMS settings for this environment; keys not mentioned are left alone. Quiet hours hold marketing texts until the window opens in the recipient's local time rather than dropping them; times are 24-hour HH:MM and the window may wrap midnight, and setting timezone to null clears it, which stops marketing sends while quiet hours are enabled. keywordReplies set what Lath texts back to STOP, HELP and START — null for each means Lath says nothing, which is the default because the carrier answers these itself unless its own automatic opt-out handling is turned off. Setting one without turning that off sends the person two replies. {{project}} is the only variable, and a reply is billed as the segment it is.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"quietHours":{"type":"object","properties":{"enabled":{"type":"boolean"},"start":{"description":"When quiet begins, local 24-hour HH:MM, e.g. 21:00","type":"string"},"end":{"description":"When quiet ends, local 24-hour HH:MM, e.g. 08:00","type":"string"},"timezone":{"description":"IANA zone for contacts whose own is unknown, e.g. America/Los_Angeles. null clears it, which stops marketing sends while quiet hours are on.","type":["string","null"]}},"additionalProperties":false},"keywordReplies":{"type":"object","properties":{"stop":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"help":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"start":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settings":{"type":"object","properties":{"quietHours":{"type":"object","properties":{"enabled":{"type":"boolean"},"start":{"type":"string"},"end":{"type":"string"},"timezone":{"type":["string","null"]}},"required":["enabled","start","end","timezone"],"additionalProperties":{}},"keywordReplies":{"type":"object","properties":{"stop":{"type":["string","null"]},"help":{"type":["string","null"]},"start":{"type":["string","null"]}},"required":["stop","help","start"],"additionalProperties":{}}},"required":["quietHours","keywordReplies"],"additionalProperties":{}},"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["settings","updatedAt"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/template/delete":{"post":{"operationId":"sms.template.delete","summary":"sms.template.delete","description":"Removes an SMS template. Without a `locale` it removes every language variant; with one it removes only that translation and the others keep sending. A reserved name reverts to the built-in text rather than disappearing, since the message it carries still has to be sent. Versions already used by messages are kept; only the template stops being resolvable.","tags":["sms"],"x-lath-impact":{"destructive":true,"retrySafe":true,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*$","description":"The template name. The reserved name auth.signin.sms overrides the built-in sign-in text."},"locale":{"description":"Remove only this language variant. Omit to remove every variant of the template.","type":"string","maxLength":20}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"locale":{"type":["string","null"]},"deleted":{"type":"boolean","const":true},"revertedToDefault":{"type":"boolean"}},"required":["name","locale","deleted","revertedToDefault"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/template/get":{"post":{"operationId":"sms.template.get","summary":"sms.template.get","description":"Returns one SMS template: the published version and unpublished draft of one language variant, every locale that has a variant, the variables each references, and the segment count each costs. A reserved name with nothing saved returns the built-in default, marked as such, so it can be read before it is overridden.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*$","description":"The template name. The reserved name auth.signin.sms overrides the built-in sign-in text."},"locale":{"description":"Which language variant to read. Omit for the default variant.","type":"string","maxLength":20}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema"}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/template/list":{"post":{"operationId":"sms.template.list","summary":"sms.template.list","description":"Lists this project's SMS templates with the published version and any unpublished draft, which language variants exist, and includes reserved names that have not been overridden so the built-in sign-in text is visible rather than invisible. Version numbers describe the default variant; `locales` names the translations.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"locales":{"type":"array","items":{"type":"string"}}},"required":["name","locales"],"additionalProperties":{}}}},"required":["templates"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/template/preview":{"post":{"operationId":"sms.template.preview","summary":"sms.template.preview","description":"Renders an SMS template with the variables given and returns the exact body that would be sent, its encoding and its segment count, without sending anything or spending anything. Names any variable the template needs and the call did not supply.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":true,"billable":false,"read":true},"x-lath-permission":"sms:read","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*$","description":"The template name. The reserved name auth.signin.sms overrides the built-in sign-in text."},"locale":{"description":"Preview as a recipient in this language. Falls back the same way a real send does.","type":"string","maxLength":20},"variables":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"additionalProperties":{},"description":"Values for the template's variables"},"draft":{"default":false,"description":"Preview the unpublished draft instead of the published version","type":"boolean"}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"locale":{"type":["string","null"]},"resolvedLocale":{"type":["string","null"]},"origin":{"type":"string"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"text":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}},"segments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"encoding":{"type":"string"},"units":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","resolvedLocale","origin","version","text","missing","segments","encoding","units"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/template/publish":{"post":{"operationId":"sms.template.publish","summary":"sms.template.publish","description":"Publishes the current draft of an SMS template. From then on sms.send with this template name uses it. Publishes one language variant; the others are untouched. The previously published version is archived and kept.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*$","description":"The template name. The reserved name auth.signin.sms overrides the built-in sign-in text."},"locale":{"description":"Which language variant to publish. Omit for the default variant.","type":"string","maxLength":20}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"published":{},"previousVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","published","previousVersion"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/sms/template/set":{"post":{"operationId":"sms.template.set","summary":"sms.template.set","description":"Saves a new draft version of a named SMS template: one body with {{variables}}, {{#if}} and {{#each}}. Give a `locale` to write that language's variant; each language has its own versions and publishes on its own. Refuses syntax errors with line numbers. Reports the segment count the body will cost, since that is what a message is billed by and it is decided by the wording — and a translation is very often the one that crosses into a second segment. Nothing is sent from a draft until sms.template.publish.","tags":["sms"],"x-lath-impact":{"destructive":false,"retrySafe":false,"billable":false,"read":false},"x-lath-permission":"sms:write","x-lath-scope":{"environment":true},"security":[{"bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Replays the stored response for the same key and input; refuses different input."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)*$","description":"The template name. The reserved name auth.signin.sms overrides the built-in sign-in text."},"locale":{"description":"Language variant, e.g. 'fr' or 'pt-BR'. Omit for the default variant used when nothing more specific fits the recipient.","type":"string","maxLength":20},"text":{"type":"string","minLength":1,"maxLength":1600,"description":"The message body; may reference {{variables}}"}},"required":["name","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ activityId, result }. activityId is empty for reads.","content":{"application/json":{"schema":{"type":"object","properties":{"activityId":{"type":"string","description":"The activity this call created, or empty for a read."},"result":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"draft":{},"segments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"encoding":{"type":"string"},"units":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reserved":{"type":"boolean"}},"required":["name","draft","segments","encoding","units","reserved"],"additionalProperties":{}}},"required":["activityId","result"]}}}},"400":{"description":"invalid_input or invalid_json"},"401":{"description":"unauthenticated"},"403":{"description":"forbidden"},"404":{"description":"not_found"},"409":{"description":"conflict: idempotency_mismatch, email_taken, last_key"},"413":{"description":"body_too_large"},"429":{"description":"rate_limited"}}}},"/health":{"get":{"operationId":"get_health","summary":"Liveness and database reachability","description":"Answers 200 with { ok, database } when the database answers, and 503 when it does not. No credential.","tags":["platform"],"x-lath-auth":"none","security":[],"responses":{"200":{"description":"ok"},"503":{"description":"the database is unreachable"}}}},"/openapi.json":{"get":{"operationId":"get_openapi_json","summary":"This document","description":"The OpenAPI description of every route on this deployment.","tags":["platform"],"x-lath-auth":"none","security":[],"responses":{"200":{"description":"ok"}}}},"/mcp":{"post":{"operationId":"post_mcp","summary":"Model Context Protocol endpoint","description":"The same operations as tools, over MCP. Authenticated with a Lath key like any other route.","tags":["platform"],"x-lath-auth":"bearer","security":[],"responses":{"200":{"description":"ok"}}}},"/pricing":{"get":{"operationId":"get_pricing","summary":"The rate book","description":"What each metered line costs, read from the same `billing_rates` rows an invoice is drawn from, so the published price and the charge cannot disagree. Public and unauthenticated because prices are the same for everybody and because deciding whether to use Lath should not require an account. `published: false` means no rate has been set yet — usage is measured and nothing is charged.","tags":["platform"],"x-lath-auth":"none","security":[],"responses":{"200":{"description":"ok"}}}},"/auth/jwks/{environmentId}":{"get":{"operationId":"get_auth_jwks_environmentId_","summary":"Public keys for verifying access tokens","description":"The JSON Web Key Set an environment's ES256 access tokens are verified against, so a customer's server verifies locally with no round trip.","tags":["platform"],"x-lath-auth":"none","security":[],"parameters":[{"name":"environmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The environment this is read for."}],"responses":{"200":{"description":"ok"}}}},"/auth/theme/{environmentId}":{"get":{"operationId":"get_auth_theme_environmentId_","summary":"The environment's published theme","description":"The tokens and copy the hosted pages and drop-in components render with. Public because a browser needs it before anyone has signed in.","tags":["platform"],"x-lath-auth":"none","security":[],"parameters":[{"name":"environmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The environment this is read for."}],"responses":{"200":{"description":"ok"}}}},"/auth/settings/{environmentId}":{"get":{"operationId":"get_auth_settings_environmentId_","summary":"The public subset of sign-in settings","description":"Which methods a browser should offer, code length and lifetimes, and whether sign-up is open. Public for the same reason as the theme.","tags":["platform"],"x-lath-auth":"none","security":[],"parameters":[{"name":"environmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The environment this is read for."}],"responses":{"200":{"description":"ok"}}}},"/console/config":{"get":{"operationId":"get_console_config","summary":"Console bootstrap","description":"What the dashboard needs before anyone has signed in.","tags":["platform"],"x-lath-auth":"console session","security":[],"responses":{"200":{"description":"ok"}}}},"/console/accounts":{"get":{"operationId":"get_console_accounts","summary":"Accounts this person can open","description":"The accounts, projects and environments behind the signed-in console session.","tags":["platform"],"x-lath-auth":"console session","security":[],"responses":{"200":{"description":"ok"}}}},"/v1/inbound/ingest":{"post":{"operationId":"post_v1_inbound_ingest","summary":"The receiving edge","description":"Raw RFC 822 mail pushed in by the receiving infrastructure, authenticated with a deployment secret. No customer key reaches it.","tags":["platform"],"x-lath-auth":"deployment secret","security":[],"responses":{"200":{"description":"ok"},"403":{"description":"the shared secret did not match"}}}},"/v1/callbacks/email":{"post":{"operationId":"post_v1_callbacks_email","summary":"Delivery, bounce and complaint notifications","description":"The mail provider's notifications about what became of a message, relayed by its notification service. The signature is verified against a certificate fetched from an allow-listed host; unsigned requests are refused.","tags":["platform"],"x-lath-auth":"provider signature","security":[],"responses":{"200":{"description":"ok"},"403":{"description":"the signature did not verify"}}}},"/v1/callbacks/email-inbound":{"post":{"operationId":"post_v1_callbacks_email_inbound","summary":"Mail received on a customer's domain","description":"Messages delivered to a domain a customer has turned receiving on for, relayed by the mail provider's notification service. The signature is verified the same way as the delivery topic; unsigned requests are refused. Stored and fanned out as email.inbound.received.","tags":["platform"],"x-lath-auth":"provider signature","security":[],"responses":{"200":{"description":"ok"},"403":{"description":"the signature did not verify"}}}},"/v1/callbacks/payments":{"post":{"operationId":"post_v1_callbacks_payments","summary":"Payment processor events","description":"A card added, a payment settled, a payment failed. The signature is verified against the raw body with the deployment's webhook secret; there is no development bypass.","tags":["platform"],"x-lath-auth":"processor signature","security":[],"responses":{"200":{"description":"ok"},"403":{"description":"the signature did not verify"}}}},"/v1/sms/status":{"post":{"operationId":"post_v1_sms_status","summary":"Carrier delivery receipts","description":"The carrier's status callbacks, verified with the account auth token against the reconstructed request URL.","tags":["platform"],"x-lath-auth":"carrier signature","security":[],"responses":{"200":{"description":"ok"},"403":{"description":"the signature did not verify"}}}},"/v1/sms/inbound":{"post":{"operationId":"post_v1_sms_inbound","summary":"Inbound SMS","description":"STOP, HELP and START from a handset, verified the same way, and answered in the markup the carrier expects.","tags":["platform"],"x-lath-auth":"carrier signature","security":[],"responses":{"200":{"description":"ok"},"403":{"description":"the signature did not verify"}}}}}}