{"openapi":"3.1.0","info":{"title":"Channel Manager","description":"Channel configuration and Twilio Trust Hub verification","version":"1.0.0"},"paths":{"/v1/twilio-setup":{"post":{"tags":["Twilio Setups"],"summary":"Create Twilio Setup","description":"Create a Twilio setup: subaccount, customer profile, and Trust Hub entities, then submit for review.\n\nAll-or-nothing; a failure unwinds every Twilio resource. STIR/CNAM/regulatory\nbundles come later, once the profile is approved.\n\nRequires the `twilio-setup:create` OAuth2 scope (resource-less — satisfied only by a first-party `\"*\"` setup grant).","operationId":"create-twilio-setup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__create_twilio_setup__Request"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioSetupResponse"}}}},"422":{"description":"Twilio's pre-submission evaluation returned noncompliant for the supplied business info."}},"security":[{"HTTPBearer":[]}]}},"/v1/twilio-setup/{setup_id}":{"get":{"tags":["Twilio Setups"],"summary":"Get Twilio Setup Status","description":"Fetch a Twilio setup's current review status from the database (advanced by webhooks).\n\nRequires the `twilio-setup:read` OAuth2 scope on the target setup.","operationId":"get-twilio-setup-status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioSetupResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Twilio Setups"],"summary":"Update Twilio Setup","description":"Update a rejected Twilio business profile and submit it again for review.\n\nProfiles in other states return 409. Invalid business information returns 422. Requires the `twilio-setup:write` scope on the setup.","operationId":"update-twilio-setup","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__update_twilio_setup__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioSetupResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found."},"409":{"description":"Customer profile is not in TWILIO_REJECTED status — Trust Hub bundles cannot be edited while approved or under review."},"422":{"description":"Twilio's pre-submission evaluation returned noncompliant for the supplied business info / authorized rep / address. Failure details on customer_profile_last_failure (also returned in the response body)."}}}},"/v1/twilio-setup/{setup_id}/verify-webhook":{"post":{"tags":["Twilio Setups"],"summary":"Validate Twilio Webhook","description":"Check a Twilio webhook signature for this setup.\n\nReturn `valid: true` or `valid: false` for the supplied URL, parameters, and signature. Requires the `twilio-setup:verify-webhook` scope on the setup.","operationId":"validate-twilio-webhook","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__validate_twilio_webhook__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__validate_twilio_webhook__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks twilio-setup:verify-webhook scope / access to this setup."},"404":{"description":"Twilio setup not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/twilio-setup/{setup_id}/regulation":{"get":{"tags":["Twilio Setups"],"summary":"Get Regulation","description":"Return the business and document requirements for buying a phone number.\n\nSelect a country and number type. A combination with no requirements returns 404.\nRequires the `compliance:regulatory:read` scope on the setup.","operationId":"get-regulation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"iso_country","in":"query","required":true,"schema":{"type":"string","pattern":"^\\w{2}$","title":"Iso Country"}},{"name":"number_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/TwilioNumberType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__get_regulation__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found, no regulation matches the (iso_country, number_type) tuple, or the regulation has no end_user or supporting_document requirements (no bundle needed)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/twilio-setup/{setup_id}/bundle/shaken-stir":{"post":{"tags":["Twilio Setups"],"summary":"Submit Shaken Stir","description":"Submit the SHAKEN/STIR bundle for a setup, once.\n\nNo resubmit path: once a bundle row exists this 409s. Fix a rejected bundle by\nupdating the customer profile, which re-triggers Twilio review.\n\nRequires the `compliance:voice:write` OAuth2 scope on the target setup.","operationId":"submit-shaken-stir","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioSetupBundleResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found."},"409":{"description":"Customer profile is not approved, or a SHAKEN/STIR bundle already exists. Bundle is not editable post-creation; fix rejections via the customer profile."},"422":{"description":"Twilio's pre-submission evaluation returned noncompliant for the customer profile."}}}},"/v1/twilio-setup/{setup_id}/bundle/cnam":{"post":{"tags":["Twilio Setups"],"summary":"Submit Cnam","description":"Create or resubmit the CNAM caller-ID-name bundle for US/CA outbound calls.\n\nFirst call creates; a rejected bundle resubmits with a new display name. Approved\nor in-review bundles are locked (409).\n\nRequires the `compliance:voice:write` OAuth2 scope on the target setup.","operationId":"submit-cnam","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__submit_cnam__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioSetupBundleResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found."},"409":{"description":"Customer profile is not approved, bundle is in a non-rejected state (approved / in-review / pending-review), or the supplied display_name matches the stored value (nothing to change)."},"422":{"description":"Twilio's pre-submission evaluation returned noncompliant for the supplied display_name."}}}},"/v1/twilio-setup/{setup_id}/bundle/a2p-messaging-profile":{"post":{"tags":["Twilio Setups"],"summary":"Submit A2P Messaging Profile","description":"Create or resubmit the A2P Messaging Profile bundle, the Trust Hub prerequisite for brand registration.\n\nFirst call creates; a rejected bundle resubmits after a content change. Approved or\nin-review bundles are locked (409). Standard tier only.\n\nRequires the `compliance:sms:write` OAuth2 scope on the target setup.","operationId":"submit-a2p-messaging-profile","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__submit_a2p_messaging_profile__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioSetupBundleResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found."},"409":{"description":"Customer profile is not approved, bundle is in a non-rejected state (approved / in-review / pending-review), or the supplied attributes match the stored values (nothing to change)."},"422":{"description":"Twilio's pre-submission evaluation returned noncompliant for the supplied messaging-profile attributes."}}}},"/v1/twilio-setup/{setup_id}/bundle/regulatory":{"post":{"tags":["Twilio Setups"],"summary":"Submit Regulatory Bundle","description":"Submit or resubmit a regulatory bundle for Twilio review.\n\nRequires an approved business profile. Provide the required business details\nand one JPEG, PNG, or PDF file per document (up to 5 MiB each). Only rejected\nbundles can be resubmitted.\nRequires the `compliance:regulatory:write` scope on the setup.","operationId":"submit-regulatory-bundle","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit-regulatory-bundle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioSetupBundleResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found, no regulation for this country and number type, or it has no end_user or supporting_document requirements (no bundle to submit)."},"409":{"description":"Customer profile is not approved, or a bundle for this regulation exists in a non-rejected state (pending-review / in-review / twilio-approved)."},"413":{"description":"A file exceeds 5 MiB."},"415":{"description":"A file's Content-Type is not JPEG/PNG/PDF."},"422":{"description":"Invalid end_users / supporting_documents JSON, file count mismatch, invalid `address` sub-shape, or Twilio's pre-submission evaluation returned noncompliant."}}}},"/v1/twilio-setup/{setup_id}/bundle/a2p-brand-registration":{"post":{"tags":["Twilio Setups"],"summary":"Submit A2P Brand Registration","description":"Create or resubmit a setup's A2P 10DLC brand registration.\n\nFirst call creates; a call against an unverified brand resubmits (Twilio caps\nresubmits at 3). Needs an approved customer profile and an A2P Messaging Profile\nbundle. 409 in any other brand state.\n\nRequires the `compliance:sms:write` OAuth2 scope on the target setup.","operationId":"submit-a2p-brand-registration","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__submit_a2p_brand_registration__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/A2PBrandRegistrationResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found."},"409":{"description":"Customer profile not approved, A2P Messaging Profile bundle missing, or existing brand row is in a non-resubmittable state."},"422":{"description":"Tier mismatch (LVS for non-profit / government), brand_type change attempted on resubmit, resubmit limit exceeded, or Twilio rejected the create / update with an actionable 400."}}},"get":{"tags":["Twilio Setups"],"summary":"Get A2P Brand Registration","description":"Read a setup's A2P 10DLC brand registration state. 404 if none.\n\nA verified brand with an SMS use case also returns its available campaign\ncategories.\n\nRequires the `compliance:sms:read` OAuth2 scope on the target setup.","operationId":"get-a2p-brand-registration","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/A2PBrandRegistrationResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup or A2P brand registration not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/twilio-setup/{setup_id}/bundle":{"get":{"tags":["Twilio Setups"],"summary":"List Twilio Setup Bundles","description":"List a setup's Trust Hub and regulatory bundles.\n\nFilter by bundle kind or by country and number type; these filters cannot be\ncombined. The response includes only bundle categories the caller may read.\nRequires at least one of the\n`compliance:voice:read`, `compliance:sms:read`, or\n`compliance:regulatory:read` scopes on the setup.","operationId":"list-twilio-setup-bundles","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"bundle_kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BundleKind"},{"type":"null"}],"title":"Bundle Kind"}},{"name":"iso_country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\w{2}$"},{"type":"null"}],"title":"Iso Country"}},{"name":"number_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/TwilioNumberType"},{"type":"null"}],"title":"Number Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__list_twilio_setup_bundles__Response"}}}},"404":{"description":"Twilio setup not found."},"422":{"description":"Mutually exclusive query params (policy_sid alongside iso_country/number_type) or only one of (iso_country, number_type) supplied."}}}},"/v1/twilio-setup/{setup_id}/phone-number/available":{"get":{"tags":["Twilio Setups"],"summary":"List Available Phone Numbers","description":"Search Twilio for purchasable phone numbers of a country and type.\n\nResults are narrowed to numbers the setup can actually provision given its\naddress. area_code applies only to local numbers (422 otherwise).\n\nRequires the `twilio-phone-number:read` OAuth2 scope on the target setup.","operationId":"list-available-phone-numbers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"country","in":"query","required":true,"schema":{"type":"string","description":"ISO 3166-1 alpha-2 country code.","pattern":"^\\w{2}$","title":"Country"},"description":"ISO 3166-1 alpha-2 country code."},{"name":"number_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/TwilioNumberType","description":"Phone number type: local, mobile, toll-free, or national."},"description":"Phone number type: local, mobile, toll-free, or national."},{"name":"area_code","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Area code filter. Only valid when number_type='local' (NANP concept).","title":"Area Code"},"description":"Area code filter. Only valid when number_type='local' (NANP concept)."},{"name":"capabilities","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/TwilioPhoneNumberCapability"}},{"type":"null"}],"description":"Required capabilities; repeat query param for multiple values","title":"Capabilities"},"description":"Required capabilities; repeat query param for multiple values"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Maximum results to return","default":10,"title":"Limit"},"description":"Maximum results to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__list_available_phone_numbers__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found."},"409":{"description":"Customer profile is not approved."},"422":{"description":"Query parameter failed validation (e.g. area_code on a non-local number_type)."}}}},"/v1/twilio-setup/{setup_id}/phone-number":{"post":{"tags":["Twilio Setups"],"summary":"Provision Phone Number","description":"Purchase a phone number for a Twilio setup.\n\nRequired compliance bundles must be approved. An address-requirement mismatch\nreturns 422. Requires the `twilio-phone-number:write` scope on the setup.","operationId":"provision-phone-number","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__provision_phone_number__Request"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioPhoneNumberResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found."},"409":{"description":"Phone number is already owned, the customer profile is not approved, or required Trust Hub / regulatory bundles are missing or unapproved."},"422":{"description":"Body country / number_type does not match the setup, or the chosen number's address requirements do not match the setup."}}},"get":{"tags":["Twilio Setups"],"summary":"List Phone Numbers","description":"List a setup's provisioned phone numbers, optionally filtered by country or use case.\n\nPass use_case_id=\"unassigned\" for numbers with no assignment.\n\nRequires the `twilio-phone-number:read` OAuth2 scope on the target setup.","operationId":"list-phone-numbers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\w{2}$"},{"type":"null"}],"description":"Filter by ISO 3166-1 alpha-2 country code","title":"Country"},"description":"Filter by ISO 3166-1 alpha-2 country code"},{"name":"use_case_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"const":"unassigned","type":"string"},{"type":"null"}],"description":"Filter by top-level use case UUID, or the literal \"unassigned\" for numbers with no assignments.","title":"Use Case Id"},"description":"Filter by top-level use case UUID, or the literal \"unassigned\" for numbers with no assignments."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__twilio__list_phone_numbers__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/twilio-setup/{setup_id}/phone-number/{phone_number_id}":{"delete":{"tags":["Twilio Setups"],"summary":"Delete Phone Number","description":"Release a phone number from a Twilio setup.\n\nUnassign it from all use cases first. A toll-free verification under review\nalso blocks release.\n\nRequires the `twilio-phone-number:write` OAuth2 scope on the target setup.","operationId":"delete-phone-number","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup or phone number not found under the setup."},"409":{"description":"Phone number still has use-case assignments; unassign them first."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/twilio-setup/{setup_id}/phone-number/{phone_number_id}/tollfree-verification":{"post":{"tags":["Twilio Setups"],"summary":"Submit Tollfree Verification","description":"Submit or resubmit verification for a US or Canadian toll-free number.\n\nProvide opt-in proof images. Only a rejected verification can be\nresubmitted; one already under review returns 409. Requires the\n`compliance:sms:write` scope on the setup.","operationId":"submit-tollfree-verification","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit-tollfree-verification"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TollfreeVerificationResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup or phone number not found."},"409":{"description":"Verification is in a non-rejected state (pending-review / in-review / twilio-approved)."},"413":{"description":"An opt-in proof file exceeds 5 MiB."},"415":{"description":"An opt-in proof file's Content-Type is not JPEG/PNG."},"422":{"description":"Phone number is not US or CA toll-free, or invalid form input."}}},"get":{"tags":["Twilio Setups"],"summary":"Get Tollfree Verification","description":"Read a phone number's toll-free verification state. 404 if none.\n\nRequires the `compliance:sms:read` OAuth2 scope on the target setup.","operationId":"get-tollfree-verification","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TollfreeVerificationResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup, phone number, or verification not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/twilio-setup/{setup_id}/phone-number/{phone_number_id}/tollfree-verification/opt-in-proof/{filename}":{"get":{"tags":["Twilio Setups"],"summary":"Get Tollfree Opt In Proof","description":"Stream an uploaded opt-in proof image. Unauthenticated — Twilio's TFV reviewer fetches it.\n\nStreams the bytes directly rather than redirecting, so the URL stays valid across\na multi-day review window. 404 for any key the verification didn't write.","operationId":"get-tollfree-opt-in-proof","parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"The opt-in proof image bytes, streamed from S3 with stored Content-Type.","content":{"application/json":{"schema":{}},"image/jpeg":{},"image/png":{}}},"404":{"description":"Setup or phone number not found, or no opt-in proof with this filename exists."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/twilio-setup/{setup_id}/phone-number/{phone_number_id}/use-case/{use_case_id}":{"put":{"tags":["Twilio Setups"],"summary":"Assign Phone Number","description":"Assign a phone number to a use case (idempotent).\n\nInbound-voice assignment rewrites the number's voice_url and fallback. SMS assignment adds the\nnumber to the Messaging Service pool, gated by TFV approval (US/CA toll-free) or a\nverified A2P campaign (US long-code).\n\nRequires the `twilio-phone-number:write` OAuth2 scope on the target setup.","operationId":"assign-phone-number","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}},{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Setup, phone number, or use case not found; or use case has no Twilio binding bound to this setup."},"409":{"description":"Phone number is already assigned to another use case on this channel, or required Trust Hub bundles are missing."},"422":{"description":"Use case channel is not Twilio-served, or input failed validation."}}},"delete":{"tags":["Twilio Setups"],"summary":"Unassign Phone Number","description":"Unassign a phone number from a use case.\n\nInbound-voice unassignment clears the number's voice_url and fallback. SMS unassignment detaches\nit from the Messaging Service pool.\n\nRequires the `twilio-phone-number:write` OAuth2 scope on the target setup.","operationId":"unassign-phone-number","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}},{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Setup, phone number, use case, or assignment not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ses-setup":{"post":{"tags":["SES Setups"],"summary":"Create Ses Setup","description":"Create a SES setup: tenant, domain identity, and custom MAIL FROM.\n\nThe customer publishes the returned DNS records, then refreshes verification via\nGET. 409 on a domain that already has a setup.\n\nRequires the `ses-setup:create` OAuth2 scope (resource-less — satisfied only by a first-party `\"*\"` setup grant).","operationId":"create-ses-setup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__ses_setup__create_ses_setup__Request"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SesSetupDetailResponse"}}}},"409":{"description":"SES tenant or email identity with this name already exists."},"422":{"description":"Request body failed validation (tenant_name pattern, or domain_identity is not a valid domain name)."}},"security":[{"HTTPBearer":[]}]}},"/v1/ses-setup/{setup_id}":{"get":{"tags":["SES Setups"],"summary":"Get Ses Setup","description":"Fetch a SES setup with a live DNS refresh that self-heals a FAILED DKIM / MAIL FROM\naxis (see module docstring). Tombstoned setups return cached state.\n\nRequires the `ses-setup:read` OAuth2 scope on the target setup.","operationId":"get-ses-setup","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SesSetupDetailResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"SES setup not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SES Setups"],"summary":"Delete Ses Setup","description":"Delete an SES setup and its email domain configuration.\n\nActive use cases must be deleted first. Requires the `ses-setup:write` scope on the setup.","operationId":"delete-ses-setup","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"SES setup not found (already deleted, or never existed)."},"409":{"description":"Live use cases still reference this setup; delete them first."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/use-case":{"post":{"tags":["Use Cases"],"summary":"Create Use Case","description":"Create a use case on a setup; the channel selects the body variant.\n\nMints the channel's backing resource: a Messaging Service for SMS, a SES\nconfiguration set for email. Voice needs none — channel-manager renders the\nmedia leg from the setup's shared TwiML App. Email requires a DNS-verified\nSES setup. Requires the `use-case:write` OAuth2 scope on the target setup.","operationId":"create-use-case","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__use_case__create_use_case__Request"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__use_case__create_use_case__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Twilio setup, SES setup, or SendBlue setup not found."},"409":{"description":"Customer profile not approved, SES setup DNS not verified, or (entity_name, name) / configuration set name / sender address already in use."},"422":{"description":"Request body failed validation (e.g. sender domain does not match the SES setup's domain identity, or marketing email_type without unsubscribable=true)."}}},"get":{"tags":["Use Cases"],"summary":"List Use Cases","description":"List use cases for a setup.\n\nFilter by entity, channel, or deletion state. Requires the `use-case:read` scope on the setup.","operationId":"list-use-cases","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Filter to use cases bound to this setup.","title":"Setup Id"},"description":"Filter to use cases bound to this setup."},{"name":"entity_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"Filter to use cases belonging to this entity.","title":"Entity Name"},"description":"Filter to use cases belonging to this entity."},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Channel"},{"type":"null"}],"description":"Filter by channel.","title":"Channel"},"description":"Filter by channel."},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","description":"Include soft-deleted use cases (audit trail). Defaults to live only.","default":false,"title":"Include Deleted"},"description":"Include soft-deleted use cases (audit trail). Defaults to live only."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__use_case__list_use_cases__Response"}}}},"422":{"description":"Query parameter failed validation."}}}},"/v1/use-case/{use_case_id}":{"get":{"tags":["Use Cases"],"summary":"Get Use Case","description":"Return an active use case with its channel-specific settings.\n\nDeleted or unknown use cases return 404. Requires the `use-case:read` scope on the setup.","operationId":"get-use-case","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseCaseResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"Use case not found (or soft-deleted)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Use Cases"],"summary":"Update Use Case","description":"Update a use case's editable settings.\n\nThe request channel must match the existing use case. Changes to an inbound voice URL apply to its assigned numbers; a changed webhook URL returns a new signing secret once. Requires the `use-case:write` scope on the setup.","operationId":"update-use-case","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__use_case__update_use_case__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__use_case__update_use_case__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"Use case not found (or soft-deleted)."},"409":{"description":"Body `channel` does not match the use case's immutable channel."},"422":{"description":"Request body failed validation (no updatable field besides `channel`, description too long, invalid webhook_url, or sender_email_alias out of range)."}}},"delete":{"tags":["Use Cases"],"summary":"Delete Use Case","description":"Soft-delete a use case and its channel binding, tearing down the backing vendor resource.\n\n409 while phone numbers or lines are still assigned (unassign first), or while\nemail templates still exist.\n\nRequires the `use-case:write` OAuth2 scope on the target setup.","operationId":"delete-use-case","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"Use case not found (already deleted, or never existed)."},"409":{"description":"Twilio-served or iMessage use case still has phone numbers assigned. Unassign them before deleting."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/use-case/{use_case_id}/webhook-secret":{"post":{"tags":["Use Cases"],"summary":"Rotate Webhook Secret","description":"Rotate a messaging use case's webhook signing secret.\n\nReturn the new secret once; the old secret remains valid for 30 minutes.\nVoice use cases are not supported. Requires the `use-case:write` scope on the setup.","operationId":"rotate-use-case-webhook-secret","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__use_case__rotate_webhook_secret__Response"}}}},"400":{"description":"Use case is a voice channel (no webhook secret)."},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"Use case not found (or soft-deleted)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/use-case/{use_case_id}/hold-music":{"put":{"tags":["Use Cases"],"summary":"Upload Hold Music","description":"Upload a voice use case's hold music (MP3 or WAV, 10 KiB to 5 MiB), replacing any earlier one.\n\n400 for non-voice use cases.\n\nRequires the `use-case:write` OAuth2 scope on the target setup.","operationId":"upload-use-case-hold-music","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload-use-case-hold-music"}}}},"responses":{"204":{"description":"Successful Response"},"400":{"description":"Use case is not a voice channel."},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"Use case not found (or soft-deleted)."},"422":{"description":"hold_music is not MP3 / WAV, or not 10 KiB to 5 MiB."}}},"delete":{"tags":["Use Cases"],"summary":"Delete Hold Music","description":"Clear a voice use case's hold music. 404 when it has none; 400 for non-voice use cases.\n\nRequires the `use-case:write` OAuth2 scope on the target setup.","operationId":"delete-use-case-hold-music","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"description":"Use case is not a voice channel."},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"Use case not found (or soft-deleted), or it has no hold music."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/use-case/{use_case_id}/a2p-campaign":{"post":{"tags":["Use Cases"],"summary":"Submit A2P Campaign","description":"Create the A2P 10DLC campaign that gates long-code SMS for an SMS use case.\n\nNeeds a verified brand registration on the setup. 409 if a campaign already\nexists. 422 if the requested use-case code isn't allowed for the brand.\n\nRequires the `compliance:sms:write` OAuth2 scope on the target setup.","operationId":"submit-a2p-campaign","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__use_case__submit_a2p_campaign__Request"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/A2PCampaignResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"SMS use case not found."},"409":{"description":"A2P Messaging Profile bundle missing or not approved, brand registration missing or not in a vetted state, or a campaign already exists for this SMS use case."},"422":{"description":"us_app_to_person_usecase not in the brand's allowed set, missing CTIA-required STOP/HELP keywords, or Twilio rejected the create with an actionable 400."}}},"get":{"tags":["Use Cases"],"summary":"Get A2P Campaign","description":"Read an SMS use case's A2P 10DLC campaign state. 404 if none.\n\nRequires the `compliance:sms:read` OAuth2 scope on the target setup.","operationId":"get-a2p-campaign","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/A2PCampaignResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"A2P campaign not found for this SMS use case."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Use Cases"],"summary":"Update A2P Campaign","description":"Update an A2P campaign's message and consent information.\n\nA failed campaign can be resubmitted when its rejection is remediable.\nCampaigns under review return 409. Requires the `compliance:sms:write` scope on the setup.","operationId":"update-a2p-campaign","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__use_case__update_a2p_campaign__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/A2PCampaignResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"A2P campaign not found for this SMS use case."},"409":{"description":"Campaign is IN_PROGRESS or SUSPENDED — not updatable in the current state."},"422":{"description":"Caller tried to change a boolean on a VERIFIED campaign, or the row's errors contain a non-remediable code."}}},"delete":{"tags":["Use Cases"],"summary":"Delete A2P Campaign","description":"Delete an SMS use case's A2P 10DLC campaign.\n\nA campaign under review cannot be deleted; retry after review is complete.\n\nRequires the `compliance:sms:write` OAuth2 scope on the target setup.","operationId":"delete-a2p-campaign","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"responses":{"204":{"description":"Campaign deleted."},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"A2P campaign not found for this SMS use case."},"409":{"description":"Campaign is IN_PROGRESS and cannot be deleted."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/outbound-voice/phone-number/select":{"post":{"tags":["Outbound Voice"],"summary":"Select Phone Number","description":"Pick a random From number from an outbound-voice use case's pool.\n\nRequires the `outbound-voice:send` OAuth2 scope on the target setup.","operationId":"select-outbound-voice-phone-number","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__outbound_voice__select_outbound_voice_phone_number__Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioPhoneNumberResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks outbound-voice:send scope / access to this setup."},"404":{"description":"Use case not found (or not bound to outbound_voice), or has no assigned phone numbers."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/voice-call/":{"post":{"tags":["Voice Calls"],"summary":"Create Voice Call","description":"Create a call for an outbound-voice use case and select its caller ID.\n\nA repeated idempotency key returns the existing call. Requires the\n`voice:call` scope on the setup.","operationId":"create-voice-call","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__voice__create_voice_call__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__voice__create_voice_call__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks voice:call scope / access to this setup."},"404":{"description":"Use case not found (or not outbound_voice), or has no assigned phone numbers."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Voice Calls"],"summary":"List Voice Calls","description":"List calls for a setup, newest first, with optional filters and pagination.\n\nRequires the `voice:read` scope on the setup.","operationId":"list-voice-calls","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Twilio setup whose calls are listed.","title":"Setup Id"},"description":"Twilio setup whose calls are listed."},{"name":"use_case_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Restrict results to one voice use case.","title":"Use Case Id"},"description":"Restrict results to one voice use case."},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/VoiceCallDirection"},{"type":"null"}],"description":"Filter by inbound or outbound direction.","title":"Direction"},"description":"Filter by inbound or outbound direction."},{"name":"peer_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"phone"},{"type":"null"}],"description":"Filter by the other party's E.164 phone number.","title":"Peer Number"},"description":"Filter by the other party's E.164 phone number."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive upper bound on call creation time.","title":"Created Before"},"description":"Exclusive upper bound on call creation time."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive lower bound on call creation time.","title":"Created After"},"description":"Inclusive lower bound on call creation time."},{"name":"sort_by","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Sort axes left-to-right; `+field` asc, `-field` desc. Default `-created_at`.","default":[],"title":"Sort By"},"description":"Sort axes left-to-right; `+field` asc, `-field` desc. Default `-created_at`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"exclusiveMinimum":0,"description":"Maximum number of calls to return.","default":50,"title":"Limit"},"description":"Maximum number of calls to return."},{"name":"continuation_token","in":"query","required":false,"schema":{"description":"Opaque cursor from a prior response; round-trip it, don't construct it.","title":"Continuation Token"},"description":"Opaque cursor from a prior response; round-trip it, don't construct it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__voice__list_voice_calls__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks voice:read scope / access to this setup."},"422":{"description":"Malformed sort_by, or unparseable continuation_token."}}}},"/v1/voice-call/{call_ref}":{"get":{"tags":["Voice Calls"],"summary":"Get Voice Call","description":"Return a call and its participants.\n\nRequires the `voice:read` scope on the call's setup.","operationId":"get-voice-call","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__voice__get_voice_call__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks voice:read scope / access to this setup."},"404":{"description":"Call not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Voice Calls"],"summary":"Delete Voice Call","description":"End a voice call and disconnect its participants.\n\nRequires the `voice:call` scope on the setup.","operationId":"delete-voice-call","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks voice:call scope / access to this setup."},"404":{"description":"Call not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/voice-call/{call_ref}/participant":{"post":{"tags":["Voice Calls"],"summary":"Add Voice Call Participant","description":"Add a dialed participant or media stream to a voice call.\n\nAn ended call returns 409. Requires the `voice:call` scope on the setup.","operationId":"add-voice-call-participant","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Ref"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MediaParticipant"},{"$ref":"#/components/schemas/DialParticipant"}],"discriminator":{"propertyName":"kind","mapping":{"media":"#/components/schemas/MediaParticipant","dial":"#/components/schemas/DialParticipant"}},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__voice__add_voice_call_participant__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks voice:call scope / access to this setup."},"404":{"description":"Call not found."},"409":{"description":"Call has already ended."},"422":{"description":"Twilio rejected the dial target, or an operator / transfer_target leg targets a number not in the use case's allowed_forwarding_numbers."}}}},"/v1/voice-call/{call_ref}/participant/{participant_ref}":{"put":{"tags":["Voice Calls"],"summary":"Update Voice Call Participant","description":"Change a participant's hold, mute, or end-call-on-exit setting.\n\nRequires the `voice:call` scope on the call's setup.","operationId":"update-voice-call-participant","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Ref"}},{"name":"participant_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Participant Ref"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__voice__update_voice_call_participant__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks voice:call scope / access to this setup."},"404":{"description":"Call or participant not found."},"409":{"description":"Participant is not (or no longer) in the conference."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Voice Calls"],"summary":"Delete Voice Call Participant","description":"Remove a participant from a call; a participant already removed returns 204.\n\nRequires the `voice:call` scope on the call's setup.","operationId":"delete-voice-call-participant","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Ref"}},{"name":"participant_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Participant Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks voice:call scope / access to this setup."},"404":{"description":"Call or participant not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/voice-call/{call_ref}/participant/{participant_ref}/redirect":{"post":{"tags":["Voice Calls"],"summary":"Redirect Voice Call Participant","description":"Redirect a connected call participant to another number or a farewell message.\n\nRequires the `voice:call` scope on the setup.","operationId":"redirect-voice-call-participant","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Ref"}},{"name":"participant_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Participant Ref"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DialRedirect"},{"$ref":"#/components/schemas/FarewellRedirect"}],"discriminator":{"propertyName":"kind","mapping":{"dial":"#/components/schemas/DialRedirect","farewell":"#/components/schemas/FarewellRedirect"}},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks voice:call scope / access to this setup."},"404":{"description":"Call or participant not found."},"409":{"description":"Participant is not (or no longer) connected."},"422":{"description":"Dial redirect target is not in the use case's allowed_forwarding_numbers."}}}},"/v1/voice-call/{call_ref}/participant/{participant_ref}/media-stream":{"post":{"tags":["Voice Calls"],"summary":"Start Participant Media Stream","description":"Stream a connected participant's inbound audio to a secure WebSocket URL.\n\nA participant who has not joined or is already streaming returns 409. Requires the `voice:call` scope on the setup.","operationId":"start-participant-media-stream","security":[{"HTTPBearer":[]}],"parameters":[{"name":"call_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Ref"}},{"name":"participant_ref","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Participant Ref"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__voice__start_participant_media_stream__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks voice:call scope / access to this setup."},"404":{"description":"Call or participant not found."},"409":{"description":"Participant not yet joined, already left, or a stream is already running."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/":{"post":{"tags":["Emails"],"summary":"Send Email","description":"Send one email through SES, from an inline HTML body or a stored template.\n\nraw_html mode needs subject and body_html; template mode needs template_id and\ntemplate_parameters covering every declared variable. Unsubscribe links are\ninjected by the send path, never the caller. The use case's setup must be\nDNS-verified.\n\nRequires the `email:send` OAuth2 scope on the target setup.","operationId":"send-email","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send-email"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__email__send_email__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"Use case not found, or has no live SES binding."},"409":{"description":"Recipient is on the per-use-case or per-setup unsubscribe list."},"413":{"description":"Body or any attachment exceeds the size limit (5 MiB per attachment)."},"422":{"description":"Body or attachment failed validation: invalid HTML template, invalid filename, empty attachment, more than 5 attachments, SES rejected the message, or reply_to_inbound_email_id does not reference an inbound email under the same use case + setup."}},"security":[{"HTTPBearer":[]}]}},"/v1/email/event":{"get":{"tags":["Emails"],"summary":"List email events","description":"List SES events matching the request filters. At least one of `use_case_id` or `setup_id` is required so the underlying `emails` join lands on a leading index. Other filters (`email_id`, `event_type`, `event_at_after`, `event_at_before`) narrow within that scope. Sort via repeated `sort_by` query params; each entry is `+field` or `-field` (allowed field: event_at). Default: `-event_at`. Cursor opaque — round-trip `continuation_token` unchanged with the same `sort_by`.","operationId":"list-email-events","security":[{"HTTPBearer":[]}],"parameters":[{"name":"use_case_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter to events for emails sent through this use case.","title":"Use Case Id"},"description":"Filter to events for emails sent through this use case."},{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Filter to events for emails sent from this SES setup.","title":"Setup Id"},"description":"Filter to events for emails sent from this SES setup."},{"name":"email_id","in":"query","required":false,"schema":{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"description":"Narrow to one or more emails' event timelines (set semantics: any match).","default":[],"title":"Email Id"},"description":"Narrow to one or more emails' event timelines (set semantics: any match)."},{"name":"event_type","in":"query","required":false,"schema":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/EventType"},"description":"Filter to one or more SES event types (set semantics: any match).","default":[],"title":"Event Type"},"description":"Filter to one or more SES event types (set semantics: any match)."},{"name":"event_at_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive lower bound on event_at.","title":"Event At After"},"description":"Inclusive lower bound on event_at."},{"name":"event_at_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive upper bound on event_at.","title":"Event At Before"},"description":"Exclusive upper bound on event_at."},{"name":"sort_by","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Sort axes applied left-to-right; `+field`/`-field`. Default `-event_at` (newest first).","default":[],"title":"Sort By"},"description":"Sort axes applied left-to-right; `+field`/`-field`. Default `-event_at` (newest first)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"exclusiveMinimum":0,"description":"The maximum number of events to return.","default":50,"title":"Limit"},"description":"The maximum number of events to return."},{"name":"continuation_token","in":"query","required":false,"schema":{"description":"Opaque continuation token from a prior response; treat as a black box.","title":"Continuation Token"},"description":"Opaque continuation token from a prior response; treat as a black box."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__email__list_email_events__Response"}}}},"422":{"description":"Query parameter failed validation, neither use_case_id nor setup_id was supplied, or continuation_token is unparseable."}}}},"/v1/email/unsubscribe/{token}":{"get":{"tags":["Emails"],"summary":"Get Email Unsubscribe Form","description":"Render the unsubscribe confirmation page.\n\nVerifies the token but writes nothing — the form POSTs back to record the\nunsubscribe, so a scanner pre-fetching the link can't opt anyone out. 403 on a\nforged token.","operationId":"get-email-unsubscribe-form","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Confirmation form (HTML). GET never mutates.","content":{"application/json":{"schema":{}}}},"403":{"description":"Token failed parse or HMAC verification."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Emails"],"summary":"Confirm Email Unsubscribe","description":"Record an unsubscribe from the RFC 8058 one-click handshake or the confirmation form.\n\nIdempotent: repeat clicks collapse to one row. A tombstoned target is a silent\nsuccess page, not an error. Returns 403 on a forged token before any lookup.","operationId":"confirm-email-unsubscribe","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Unsubscribe recorded (or silently skipped for tombstoned target).","content":{"application/json":{"schema":{}}}},"403":{"description":"Token failed parse or HMAC verification."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/template":{"post":{"tags":["Emails"],"summary":"Create Email Template","description":"Create a reusable subject/body Jinja template owned by a SES use case.\n\nRequires the `email:template:write` OAuth2 scope on the target setup.","operationId":"create-email-template","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__email__create_email_template__Request"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__email__create_email_template__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"SES use case not found, or soft-deleted."},"409":{"description":"Template name already exists within the SES use case."},"422":{"description":"Subject or body template failed validation: Jinja syntax error, subject references unsubscribe variables, or body's unsubscribe-variable usage does not match the use case's unsubscribable flag."}}},"get":{"tags":["Emails"],"summary":"List Email Templates","description":"List a SES use case's email templates, summary fields only.\n\nRequires the `email:template:read` OAuth2 scope on the target setup.","operationId":"list-email-templates","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ses_use_case_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Ses Use Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__email__list_email_templates__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"SES use case not found, or soft-deleted."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/template/{email_template_id}":{"get":{"tags":["Emails"],"summary":"Get Email Template","description":"Fetch one email template, including its declared subject and body variables.\n\nRequires the `email:template:read` OAuth2 scope on the target setup.","operationId":"get-email-template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email_template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Email Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__email__get_email_template__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Email template not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Emails"],"summary":"Update Email Template","description":"Patch an email template's name, description, or subject/body.\n\nRequires the `email:template:write` OAuth2 scope on the target setup.","operationId":"update-email-template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email_template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Email Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__email__update_email_template__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__email__update_email_template__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Email template not found."},"409":{"description":"New template name already exists within the SES use case."},"422":{"description":"No fields provided, or subject/body template failed validation: Jinja syntax error, subject references unsubscribe variables, or body's unsubscribe-variable usage does not match the use case's unsubscribable flag."}}},"delete":{"tags":["Emails"],"summary":"Delete Email Template","description":"Delete an email template.\n\nRequires the `email:template:write` scope on its setup.","operationId":"delete-email-template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email_template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Email Template Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Email template not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email":{"get":{"tags":["Emails"],"summary":"List emails","description":"List emails matching the request filters. At least one of `use_case_id` or `setup_id` is required so the query stays on a leading index. Other filters (`to_address`, `created_after`, `created_before`, `state`) narrow within that scope. Sort via repeated `sort_by` query params; each entry is `+field` or `-field` (allowed field: created_at). Default: `-created_at`. Cursor opaque — round-trip `continuation_token` unchanged with the same `sort_by`.","operationId":"list-emails","security":[{"HTTPBearer":[]}],"parameters":[{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"enum":["inbound","outbound"],"type":"string"},{"type":"null"}],"description":"Filter by inbound or outbound direction.","title":"Direction"},"description":"Filter by inbound or outbound direction."},{"name":"use_case_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter to this email use case. At least one of use_case_id or setup_id is required.","title":"Use Case Id"},"description":"Filter to this email use case. At least one of use_case_id or setup_id is required."},{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Filter to emails sent from this SES setup. At least one of use_case_id or setup_id is required.","title":"Setup Id"},"description":"Filter to emails sent from this SES setup. At least one of use_case_id or setup_id is required."},{"name":"peer_address","in":"query","required":false,"schema":{"type":"array","uniqueItems":true,"items":{"type":"string","format":"email"},"description":"Filter to emails delivered to one or more recipient addresses (set\nsemantics: any match).","default":[],"title":"Peer Address"},"description":"Filter to emails delivered to one or more recipient addresses (set\nsemantics: any match)."},{"name":"in_reply_to_email_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter to emails that are replies to this specific outbound/inbound.","title":"In Reply To Email Id"},"description":"Filter to emails that are replies to this specific outbound/inbound."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive lower bound on created_at.","title":"Created After"},"description":"Inclusive lower bound on created_at."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive upper bound on created_at.","title":"Created Before"},"description":"Exclusive upper bound on created_at."},{"name":"state","in":"query","required":false,"schema":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/State"},"description":"Filter to one or more derived states (set semantics: any match).","default":[],"title":"State"},"description":"Filter to one or more derived states (set semantics: any match)."},{"name":"sort_by","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Sort axes, applied left-to-right. ``+field`` ascending, ``-field``\ndescending. Defaults to ``[(\"created_at\", -1)]`` (newest first).","default":[],"title":"Sort By"},"description":"Sort axes, applied left-to-right. ``+field`` ascending, ``-field``\ndescending. Defaults to ``[(\"created_at\", -1)]`` (newest first)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"exclusiveMinimum":0,"description":"The maximum number of emails to return.","default":50,"title":"Limit"},"description":"The maximum number of emails to return."},{"name":"continuation_token","in":"query","required":false,"schema":{"description":"Opaque continuation token from a prior response. Treat as a\nblack box — the server decodes it.","title":"Continuation Token"},"description":"Opaque continuation token from a prior response. Treat as a\nblack box — the server decodes it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__email__list_emails__Response"}}}},"422":{"description":"Query parameter failed validation, neither use_case_id nor setup_id was supplied, or continuation_token is unparseable."}}}},"/v1/email/{email_id}":{"get":{"tags":["Emails"],"summary":"Get Email","description":"Fetch one email by id, inbound or outbound.\n\nRequires the `email:read` OAuth2 scope on the target setup.","operationId":"get-email","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Email Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__email__get_email__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Email not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/{email_id}/body":{"get":{"tags":["Emails"],"summary":"Get Email Body","description":"Return an inbound or outbound email's body.\n\nThe response is HTML or plain text, according to the email's body format.\n\nRequires the `email:read` OAuth2 scope on the target setup.","operationId":"get-email-body","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Email Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Email not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/{email_id}/attachment/{filename}":{"get":{"tags":["Emails"],"summary":"Get Email Attachment","description":"Redirect to a presigned URL for one email attachment.\n\nThe filename must be listed on the row, so a caller can't sign a URL for an\narbitrary key under the email's S3 prefix. 404 if the email or filename is unknown.\n\nRequires the `email:read` OAuth2 scope on the target setup.","operationId":"get-email-attachment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Email Id"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"307":{"description":"Redirect to a short-lived S3 presigned URL for the attachment."},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Email not found, or attachment with this filename does not exist on the email."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/email/{email_id}/raw":{"get":{"tags":["Emails"],"summary":"Get Email Raw","description":"Redirect to a download URL for an inbound email's original MIME message.\n\nOutbound emails return 404. Requires the `email:read` scope on the setup.","operationId":"get-email-raw","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Email Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"307":{"description":"Redirect to a short-lived S3 presigned URL for the raw MIME bundle."},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"No inbound email with this id (outbound emails retain no raw bundle)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sendblue-setup":{"post":{"tags":["SendBlue Setups"],"summary":"Create Sendblue Setup","description":"Create a SendBlue subaccount with one synchronously-assigned line and register webhooks.\n\n503 when SendBlue has no area-code inventory: it would leak an unusable subaccount\nthat has no teardown API.\n\nRequires the `sendblue-setup:create` OAuth2 scope (resource-less — satisfied only by a first-party `\"*\"` setup grant).","operationId":"create-sendblue-setup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__sendblue__create_sendblue_setup__Request"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBlueSetupResponse"}}}},"503":{"description":"SendBlue has no available line inventory to assign; retry later."},"500":{"description":"SendBlue parent-account auth failed, SendBlue upstream error, or AWS Secrets Manager failure."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/sendblue-setup/{setup_id}":{"get":{"tags":["SendBlue Setups"],"summary":"Get Sendblue Setup","description":"Fetch one SendBlue setup with its sendable (unblocked) lines.\n\nRequires the `sendblue-setup:read` OAuth2 scope on the target setup.","operationId":"get-sendblue-setup","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBlueSetupResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"SendBlue setup not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sendblue-setup/{setup_id}/phone-number":{"get":{"tags":["SendBlue Setups"],"summary":"List Sendblue Phone Numbers","description":"List a SendBlue setup's phone lines, including blocked lines.\n\nOptionally filter by status. Requires the `sendblue-phone-number:read` scope on the setup.","operationId":"list-sendblue-phone-numbers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"array","uniqueItems":true,"items":{"enum":["assigned","blocked"],"type":"string"},"description":"Repeat to include multiple statuses. Defaults to both.","default":["assigned","blocked"],"title":"Status"},"description":"Repeat to include multiple statuses. Defaults to both."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__sendblue__list_phone_numbers__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"SendBlue setup not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sendblue-setup/{setup_id}/phone-number/{phone_number_id}/use-case/{use_case_id}":{"put":{"tags":["SendBlue Setups"],"summary":"Assign Phone Number","description":"Assign a SendBlue line to an iMessage use case.\n\nA line serves at most one use case. 404 if the use case has no SendBlue binding\nor belongs to a different setup.\n\nRequires the `sendblue-phone-number:write` OAuth2 scope on the target setup.","operationId":"assign-sendblue-phone-number","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}},{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Setup, phone number, or iMessage use case not found."},"409":{"description":"Phone number is blocked, or already assigned to this use case."},"422":{"description":"Phone number or binding belongs to a different SendBlue setup."}}},"delete":{"tags":["SendBlue Setups"],"summary":"Unassign Phone Number","description":"Unassign a SendBlue line from an iMessage use case.\n\nRequires the `sendblue-phone-number:write` OAuth2 scope on the target setup.","operationId":"unassign-sendblue-phone-number","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Phone Number Id"}},{"name":"use_case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Use Case Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"Setup, phone number, iMessage use case, or assignment not found."},"422":{"description":"Phone number or binding belongs to a different SendBlue setup."}}}},"/v1/whatsapp-setup":{"post":{"tags":["WhatsApp Setups"],"summary":"Create Whatsapp Setup","description":"Register a business identity and return its Hosted Embedded Signup URL.\n\nRequires the `whatsapp-setup:create` OAuth2 scope (action-only, resource `\"*\"` —\nno setup exists yet, so only a first-party `[\"*\"]` grant passes).","operationId":"create-whatsapp-setup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__whatsapp_setup__create_whatsapp_setup__Request"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__whatsapp_setup__create_whatsapp_setup__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the whatsapp-setup:create scope."},"409":{"description":"A live WhatsApp setup already exists for this Meta business portfolio."},"422":{"description":"friendly_name or meta_business_portfolio_id failed validation."}},"security":[{"HTTPBearer":[]}]}},"/v1/whatsapp-setup/{setup_id}":{"get":{"tags":["WhatsApp Setups"],"summary":"Get Whatsapp Setup","description":"Return a WhatsApp setup's name and current setup details.\n\nRequires the `whatsapp-setup:read` scope on the setup.","operationId":"get-whatsapp-setup","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__whatsapp_setup__get_whatsapp_setup__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"WhatsApp setup not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["WhatsApp Setups"],"summary":"Delete Whatsapp Setup","description":"Delete a WhatsApp setup and stop receiving its account updates.\n\nDelete active WhatsApp use cases first. Requires the `whatsapp-setup:write` scope on the setup.","operationId":"delete-whatsapp-setup","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Setup Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"WhatsApp setup not found (already deleted, or never existed)."},"500":{"description":"AWS Secrets Manager failure, or Meta Graph returned 5xx on the unsubscribe."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/imessage/":{"post":{"tags":["iMessages"],"summary":"Send Imessage","description":"Send text or one media attachment through an iMessage use case.\n\nBefore the recipient replies, send at most six text-only messages per line,\neach up to 300 characters and without links or contact details. Opted-out\nrecipients cannot be messaged. Requires the `imessage:send` scope on the setup.","operationId":"send-imessage","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send-imessage"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__imessage__messages__OutboundMessage"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"Use case not found, or has no live SendBlue binding."},"413":{"description":"media file exceeds the 20 MiB limit."},"422":{"description":"Body / media failed validation: empty content + no media, invalid filename, empty media file, no live SendBlue lines available, a SendBlue before-the-first-reply limit (message count, length, media, or a link / phone number / email address), or SendBlue rejected the send."}},"security":[{"HTTPBearer":[]}]}},"/v1/imessage":{"get":{"tags":["iMessages"],"summary":"List iMessages","description":"List inbound + outbound iMessages, interleaved chronologically. At least one of `use_case_id`, `peer_number`, or `our_number` is required so the query stays on a leading index per leg. Optional `direction=inbound|outbound` prunes one leg. Sort via repeated `sort_by` query params; each entry is `+field` or `-field` (allowed field: occurred_at, the UNION-projected column that maps to `sent_at` on outbound and `received_at` on inbound). Default: `-occurred_at`. Cursor opaque — round-trip `continuation_token` unchanged with the same `sort_by`.","operationId":"list-imessages","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"SendBlue setup whose messages are listed.","title":"Setup Id"},"description":"SendBlue setup whose messages are listed."},{"name":"use_case_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter to one top-level use case.","title":"Use Case Id"},"description":"Filter to one top-level use case."},{"name":"peer_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"phone"},{"type":"null"}],"description":"E.164 peer; matches inbound `from_number` and outbound `to_number`.","title":"Peer Number"},"description":"E.164 peer; matches inbound `from_number` and outbound `to_number`."},{"name":"our_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"phone"},{"type":"null"}],"description":"E.164 line of ours; matches inbound `to_number` and outbound `from_number`.","title":"Our Number"},"description":"E.164 line of ours; matches inbound `to_number` and outbound `from_number`."},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"enum":["inbound","outbound"],"type":"string"},{"type":"null"}],"description":"Restrict to one direction. None returns both, interleaved.","title":"Direction"},"description":"Restrict to one direction. None returns both, interleaved."},{"name":"sort_by","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Sort axes applied left-to-right; `+occurred_at` / `-occurred_at`. Default `-occurred_at`.","default":[],"title":"Sort By"},"description":"Sort axes applied left-to-right; `+occurred_at` / `-occurred_at`. Default `-occurred_at`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"exclusiveMinimum":0,"description":"Maximum number of messages to return per page.","default":50,"title":"Limit"},"description":"Maximum number of messages to return per page."},{"name":"continuation_token","in":"query","required":false,"schema":{"description":"Opaque continuation token from a prior response; the server decodes it.","title":"Continuation Token"},"description":"Opaque continuation token from a prior response; the server decodes it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__imessage__list_messages__Response"}}}},"422":{"description":"Query parameter failed validation, none of use_case_id / peer_number / our_number was supplied, or continuation_token is unparseable."}}}},"/v1/imessage/{message_id}/media":{"get":{"tags":["iMessages"],"summary":"Get Message Media","description":"Redirect to a download URL for an iMessage attachment.\n\nReturn 404 when the message has no attachment. Requires the `imessage:read` scope on the setup.","operationId":"get-imessage-media","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"307":{"description":"Redirect to a short-lived (5-minute) S3 presigned URL for the media artifact."},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"iMessage not found, or the row exists but carries no media artifact."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/imessage/{message_id}":{"get":{"tags":["iMessages"],"summary":"Get Message","description":"Fetch one iMessage by id, inbound or outbound.\n\nRequires the `imessage:read` OAuth2 scope on the target setup.","operationId":"get-imessage","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"iMessage not found in either the inbound or outbound table."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/whatsapp/template":{"post":{"tags":["WhatsApp Messages"],"summary":"Create Whatsapp Message Template","description":"Create a WhatsApp message template for the setup's business account.\n\nRequires the `whatsapp:template:write` OAuth2 scope on the target setup.","operationId":"create-whatsapp-message-template","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/src__routes__whatsapp_message__create_whatsapp_message_template__Request"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__whatsapp_message__create_whatsapp_message_template__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"WhatsApp setup not found, or soft-deleted."},"409":{"description":"A live template with this name and language already exists on the setup."},"422":{"description":"Request failed validation: header media missing, of an unsupported type, or oversized; header media supplied for a non-media header; or the header/body text placeholders do not match the declared parameter names."}},"security":[{"HTTPBearer":[]}]}},"/v1/whatsapp/":{"post":{"tags":["WhatsApp Messages"],"summary":"Send Whatsapp Message","description":"Send a WhatsApp message from a use case's number to a BSUID-addressed recipient.\n\nFree-form only (no templates): the recipient must have messaged this use case\nwithin 23 hours (one hour inside Meta's 24, so an accepted send can't die at the\nwindow edge). Requires the `whatsapp:send` OAuth2 scope on the target setup.","operationId":"send-whatsapp-message","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TextMessageRequest"},{"$ref":"#/components/schemas/ImageMessageRequest"},{"$ref":"#/components/schemas/VideoMessageRequest"},{"$ref":"#/components/schemas/AudioMessageRequest"},{"$ref":"#/components/schemas/DocumentMessageRequest"},{"$ref":"#/components/schemas/StickerMessageRequest"},{"$ref":"#/components/schemas/ReactionMessageRequest"}],"title":"Request","discriminator":{"propertyName":"message_type","mapping":{"text":"#/components/schemas/TextMessageRequest","image":"#/components/schemas/ImageMessageRequest","video":"#/components/schemas/VideoMessageRequest","audio":"#/components/schemas/AudioMessageRequest","document":"#/components/schemas/DocumentMessageRequest","sticker":"#/components/schemas/StickerMessageRequest","reaction":"#/components/schemas/ReactionMessageRequest"}}}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__whatsapp_message__send_whatsapp_message__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"WhatsApp use case not found, or target message not found for this recipient."},"422":{"description":"Request failed validation, or the send was rejected: no inbound message from this recipient in the last 23 hours, Meta refused the media upload, the recipient cannot receive the message, Meta rejected a parameter, or a reaction removal targeted a message with no reaction."}},"security":[{"HTTPBearer":[]}]}},"/v1/sms/":{"post":{"tags":["SMS"],"summary":"Send Sms Message","description":"Send an SMS or MMS from one of the use case's numbers.\n\nA2P and toll-free senders only reach recipients who've opted in, and never\nanyone who's opted out.\n\nRequires the `sms:send` OAuth2 scope on the target setup.","operationId":"send-sms-message","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send-sms-message"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__sms__send_sms_message__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"SMS use case not found."},"422":{"description":"Request rejected: no phone number assigned, no verified A2P campaign for a US long-code sender pool, no recorded opt-in for a US/CA toll-free or US long-code sender pool, message content does not match the registered use case, invalid recipient, recipient opted out, destination region not permitted, or A2P brand suspended."}},"security":[{"HTTPBearer":[]}]}},"/v1/sms/opt-in":{"post":{"tags":["SMS"],"summary":"Send Sms Opt In Message","description":"Send the registered consent message and record the recipient's opt-in.\n\nRequires a verified A2P campaign or approved toll-free verification. Repeated\nsends to the same recipient have no additional effect; an active opt-out blocks\nthe send. Requires the `sms:consent:write` scope on the setup.","operationId":"send-sms-opt-in-message","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__sms__send_sms_opt_in_message__Request"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this use case."},"404":{"description":"SMS use case not found."},"409":{"description":"The recipient has a live setup-wide opt-out (a prior STOP); an opt-in cannot reverse it."},"422":{"description":"Neither a verified A2P campaign nor an approved US/CA toll-free verification backs the SMS use case, or Twilio rejected the destination (invalid / landline / opted out / region not permitted / brand suspended)."}},"security":[{"HTTPBearer":[]}]}},"/v1/sms/remove-setup-opt-out":{"post":{"tags":["SMS"],"summary":"Remove Sms Setup Opt Out","description":"Operator-clear a setup-wide SMS opt-out, recording the reason for audit.\n\nThe only way to re-enable sending after a STOP. 409 while a live toll-free\nopt-out for the recipient remains: route them through START/UNSTOP first.\n\nRequires the `sms:consent:write` OAuth2 scope on the target setup.","operationId":"remove-sms-setup-opt-out","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__sms__remove_sms_setup_opt_out__Request"}}},"required":true},"responses":{"204":{"description":"Opt-out cleared; the recipient can be sent to again on this setup."},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"No live setup-wide opt-out exists for this setup and phone number."},"409":{"description":"A live toll-free opt-out exists for this recipient under the setup; clear it via a recipient-initiated START/UNSTOP first."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/sms/opt-out":{"get":{"tags":["SMS"],"summary":"List SMS setup opt-outs","description":"List setup-wide SMS opt-outs (STOP records) for the setup given by the required `setup_id` query parameter. Live rows only by default; pass `include_deleted=true` for the cleared/audit history. Optional `user_phone_number` exact-match filter. Sort via repeated `sort_by` query params; each entry is `+field` or `-field` (allowed field: created_at). Default: `-created_at`. Cursor opaque — round-trip `continuation_token` unchanged with the same `sort_by`.","operationId":"list-sms-setup-opt-outs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Twilio setup whose opt-outs are listed.","title":"Setup Id"},"description":"Twilio setup whose opt-outs are listed."},{"name":"user_phone_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"phone"},{"type":"null"}],"description":"Optional exact-match filter — the opted-out recipient's E.164 number.","title":"User Phone Number"},"description":"Optional exact-match filter — the opted-out recipient's E.164 number."},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","description":"Include cleared (soft-deleted) opt-outs. Default False → live rows only.","default":false,"title":"Include Deleted"},"description":"Include cleared (soft-deleted) opt-outs. Default False → live rows only."},{"name":"sort_by","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Sort axes, applied left-to-right. ``+field`` ascending, ``-field``\ndescending. Defaults to ``[(\"created_at\", -1)]`` (newest first).","default":[],"title":"Sort By"},"description":"Sort axes, applied left-to-right. ``+field`` ascending, ``-field``\ndescending. Defaults to ``[(\"created_at\", -1)]`` (newest first)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"exclusiveMinimum":0,"description":"The maximum number of opt-outs to return.","default":50,"title":"Limit"},"description":"The maximum number of opt-outs to return."},{"name":"continuation_token","in":"query","required":false,"schema":{"description":"Opaque continuation token from a prior response. Treat as a\nblack box — the server decodes it.","title":"Continuation Token"},"description":"Opaque continuation token from a prior response. Treat as a\nblack box — the server decodes it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__sms__list_sms_setup_opt_outs__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"422":{"description":"A query parameter failed validation, or continuation_token is unparseable."}}}},"/v1/sms":{"get":{"tags":["SMS"],"summary":"List SMS messages","description":"List inbound + outbound SMS messages, interleaved chronologically. At least one of `use_case_id` or `peer_phone_number` is required so the query stays on a leading index per leg. Optional `direction=inbound|outbound` prunes one leg. Sort via repeated `sort_by` query params; each entry is `+field` or `-field` (allowed field: created_at). Default: `-created_at`. Cursor opaque — round-trip `continuation_token` unchanged with the same `sort_by`.","operationId":"list-sms-messages","security":[{"HTTPBearer":[]}],"parameters":[{"name":"setup_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Twilio setup whose messages are listed.","title":"Setup Id"},"description":"Twilio setup whose messages are listed."},{"name":"use_case_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Restrict results to one SMS use case.","title":"Use Case Id"},"description":"Restrict results to one SMS use case."},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"enum":["inbound","outbound"],"type":"string"},{"type":"null"}],"description":"Filter by inbound or outbound direction.","title":"Direction"},"description":"Filter by inbound or outbound direction."},{"name":"peer_phone_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"phone"},{"type":"null"}],"description":"Filter by recipient on outbound or sender on inbound messages.","title":"Peer Phone Number"},"description":"Filter by recipient on outbound or sender on inbound messages."},{"name":"is_mms","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter to MMS when true or text-only SMS when false.","title":"Is Mms"},"description":"Filter to MMS when true or text-only SMS when false."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive upper bound on message creation time.","title":"Created Before"},"description":"Exclusive upper bound on message creation time."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive lower bound on message creation time.","title":"Created After"},"description":"Inclusive lower bound on message creation time."},{"name":"sort_by","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Sort axes, applied left-to-right. ``+field`` ascending, ``-field``\ndescending. Defaults to ``[(\"created_at\", -1)]`` (newest first).","default":[],"title":"Sort By"},"description":"Sort axes, applied left-to-right. ``+field`` ascending, ``-field``\ndescending. Defaults to ``[(\"created_at\", -1)]`` (newest first)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"exclusiveMinimum":0,"description":"The maximum number of SMS messages to return.","default":50,"title":"Limit"},"description":"The maximum number of SMS messages to return."},{"name":"continuation_token","in":"query","required":false,"schema":{"description":"Opaque continuation token from a prior response. Treat as a\nblack box — the server decodes it.","title":"Continuation Token"},"description":"Opaque continuation token from a prior response. Treat as a\nblack box — the server decodes it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__sms__list_sms_messages__Response"}}}},"422":{"description":"Query parameter failed validation, neither use_case_id nor peer_phone_number was supplied, or continuation_token is unparseable."}}}},"/v1/sms/public/{attachment_id}":{"get":{"tags":["SMS"],"summary":"Get Sms Message Attachment Publicly","description":"Redirect to a presigned URL for the public MMS media Twilio fetches.\n\nUnauthenticated: attachment_id is an unguessable capability hash, so there's no\nDB lookup and a forged id resolves to a 404 at S3. The public copy is ephemeral.","operationId":"get-sms-message-attachment-publicly","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"307":{"description":"Redirect to a short-lived S3 presigned URL for the public media object."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sms/{sms_id}/attachment/{attachment_name}":{"get":{"tags":["SMS"],"summary":"Get Sms Message Attachment","description":"Redirect to a presigned URL for one MMS attachment, the retained private copy.\n\nThe name must be listed on the row, so a caller can't sign a URL for an arbitrary\nkey. 404 if the message or name is unknown.\n\nRequires the `sms:read` OAuth2 scope on the target setup.","operationId":"get-sms-message-attachment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sms_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Sms Id"}},{"name":"attachment_name","in":"path","required":true,"schema":{"type":"string","title":"Attachment Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"307":{"description":"Redirect to a short-lived S3 presigned URL for the attachment."},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"SMS message not found, or no attachment with this name on the message."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sms/{message_id}":{"get":{"tags":["SMS"],"summary":"Get Sms Message","description":"Fetch one SMS or MMS by id, inbound or outbound.\n\nRequires the `sms:read` OAuth2 scope on the target setup.","operationId":"get-sms-message","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__sms__get_sms_message__Response"}}}},"401":{"description":"Missing, expired, or invalid bearer token."},"403":{"description":"Token lacks the required scope or access to this setup."},"404":{"description":"SMS message not found in either the inbound or outbound table."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/oauth/token":{"post":{"tags":["OAuth2"],"summary":"Get Token","description":"Exchange client credentials for a 1-hour access token (client_credentials grant).\n\nAuthenticate via HTTP Basic or client credentials in the form body. The token\nincludes only scopes granted to the client; no refresh token is issued.","operationId":"oauth2-token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/src__routes__auth__get_token__Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__auth__get_token__Response"}}}},"401":{"description":"Missing client credentials."},"403":{"description":"Invalid client credentials."},"422":{"description":"Malformed token request (e.g. unsupported grant_type)."}},"security":[{"HTTPBasic":[]}]}},"/v1/oauth/client":{"post":{"tags":["OAuth2"],"summary":"Create Oauth2 Client","description":"Create an OAuth2 client and return its ID and secret.\n\nThe secret is shown only in this response. Requires the `clients:admin` scope.","operationId":"create-oauth2-client","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__auth__create_oauth2_client__Request"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__auth__create_oauth2_client__Response"}}}},"404":{"description":"One or more allowed_setup_ids do not exist."},"422":{"description":"Request body failed validation (name pattern, or empty scopes/setups)."}},"security":[{"HTTPBearer":[]}]}},"/v1/oauth/client/{client_id}":{"put":{"tags":["OAuth2"],"summary":"Update Oauth2 Client","description":"Patch an OAuth2 client's grants. The secret is never changed here — rotate it instead.\n\nRequires the `clients:admin` OAuth2 scope (resource-less; exact-name grant only — not matched by a wildcard scope).","operationId":"update-oauth2-client","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__auth__update_oauth2_client__Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__auth__update_oauth2_client__Response"}}}},"404":{"description":"OAuth2 client not found, or an allowed_setup_id does not exist."},"422":{"description":"No fields supplied, or a field failed validation."}}},"delete":{"tags":["OAuth2"],"summary":"Delete Oauth2 Client","description":"Revoke an OAuth2 client (tombstone for audit); it can no longer obtain tokens.\n\nRequires the `clients:admin` OAuth2 scope (resource-less; exact-name grant only — not matched by a wildcard scope).","operationId":"delete-oauth2-client","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Client Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"OAuth2 client not found (already revoked, or never existed)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/oauth/client/{client_id}/rotate-secret":{"post":{"tags":["OAuth2"],"summary":"Rotate Oauth2 Client Secret","description":"Replace an OAuth2 client's secret and return the replacement once.\n\nThe previous secret stops working immediately. Requires the `clients:admin` scope.","operationId":"rotate-oauth2-client-secret","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__auth__rotate_oauth2_client_secret__Response"}}}},"404":{"description":"OAuth2 client not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["Health","skip_maintenance"],"summary":"Health","description":"Return the service health status.","operationId":"health-check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}}},"webhooks":{"inbound-turn":{"post":{"summary":"Inbound Turn","description":"Posted to a messaging use case's configured webhook_url on every inbound SMS,\nemail, or iMessage turn.\n\nThe body is the exact bytes signed by X-AMIGO-CHANNEL-MANAGER-WEBHOOK-SIGNATURE\n(HMAC-SHA256, hex). For 30 minutes after a secret rotation, two signature headers\nare sent (current and previous secret); verify either. Return 2xx, or the turn is\nrolled back and the provider retries.","operationId":"inbound_turninbound_turn_post","parameters":[{"required":true,"schema":{"type":"string","title":"X-Amigo-Channel-Manager-Webhook-Signature"},"name":"X-AMIGO-CHANNEL-MANAGER-WEBHOOK-SIGNATURE","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalInboundEnvelopePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"A2PBrandRegistrationError":{"properties":{"registrationerrorcode":{"type":"integer","title":"Registrationerrorcode","description":"Twilio brand-registration error code."},"registrationerrordescription":{"type":"string","title":"Registrationerrordescription","description":"Explanation of the registration error."}},"type":"object","required":["registrationerrorcode","registrationerrordescription"],"title":"A2PBrandRegistrationError","description":"Entry in `brandregistrationerrors`. Field names mirror Twilio's wire shape\n(not re-keyed on write), so the JSONB column reads 1:1 with the Event Streams\nschema."},"A2PBrandRegistrationPrimaryVettingStatus":{"type":"string","enum":["pending","verified","unverified"],"title":"A2PBrandRegistrationPrimaryVettingStatus","description":"Identity-vetting axis. Driven only by primary events, never\nauto-transitioned from a secondary event."},"A2PBrandRegistrationResponse":{"properties":{"setup_id":{"type":"string","title":"Setup Id","description":"Twilio setup whose business is registered."},"brand_type":{"$ref":"#/components/schemas/A2PBrandRegistrationType","description":"A2P brand category selected for registration."},"primary_vetting_status":{"$ref":"#/components/schemas/A2PBrandRegistrationPrimaryVettingStatus","description":"Identity vetting outcome."},"secondary_vetting_status":{"$ref":"#/components/schemas/A2PBrandRegistrationSecondaryVettingStatus","description":"SEC / sanctions vetting outcome; always `skipped` for low-volume-standard brands."},"primary_vetting_errors":{"items":{"$ref":"#/components/schemas/A2PBrandRegistrationError"},"type":"array","title":"Primary Vetting Errors","description":"Identity-vetting errors; cleared on a successful resubmit."},"secondary_vetting_errors":{"items":{"$ref":"#/components/schemas/A2PBrandRegistrationError"},"type":"array","title":"Secondary Vetting Errors","description":"SEC-vetting errors; cleared on a successful resubmit."},"resubmit_count":{"type":"integer","title":"Resubmit Count","description":"Number of brand resubmissions; Twilio permits at most three."},"allowed_campaign_usecases":{"anyOf":[{"items":{"$ref":"#/components/schemas/CampaignUseCase"},"type":"array"},{"type":"null"}],"title":"Allowed Campaign Usecases","description":"On GET, campaign categories for a verified brand with an SMS use case; otherwise null."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this A2P brand registration was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this A2P brand registration was last changed."}},"type":"object","required":["setup_id","brand_type","primary_vetting_status","secondary_vetting_status","primary_vetting_errors","secondary_vetting_errors","resubmit_count","created_at","updated_at"],"title":"A2PBrandRegistrationResponse","description":"The status and available campaign categories of an A2P brand registration."},"A2PBrandRegistrationSecondaryVettingStatus":{"type":"string","enum":["pending","verified","failed","skipped"],"title":"A2PBrandRegistrationSecondaryVettingStatus","description":"Secondary (SEC) vetting axis, driven only by secondary events. LVS rows\ncarry `skipped` permanently from insert."},"A2PBrandRegistrationType":{"type":"string","enum":["standard","low-volume-standard"],"title":"A2PBrandRegistrationType","description":"DB enum for a US 10DLC brand, collapsing Twilio's two-flag wire shape\n(brandType + skip_automatic_sec_vet), translated in submit_brand_registration.\nSOLE_PROPRIETOR is out of scope."},"A2PCampaignResponse":{"properties":{"sms_use_case_id":{"type":"string","format":"uuid","title":"Sms Use Case Id","description":"SMS use case this campaign belongs to."},"setup_id":{"type":"string","format":"uuid","title":"Setup Id","description":"Twilio setup under which this campaign is registered."},"us_app_to_person_usecase":{"type":"string","title":"Us App To Person Usecase","description":"TCR campaign use-case code (e.g. \"MARKETING\", \"2FA\")."},"description":{"type":"string","title":"Description","description":"Purpose and expected content of the campaign."},"message_samples":{"items":{"type":"string"},"type":"array","title":"Message Samples","description":"Examples of messages this campaign will send."},"message_flow":{"type":"string","title":"Message Flow","description":"How recipients consent to receive campaign messages."},"has_embedded_links":{"type":"boolean","title":"Has Embedded Links","description":"Whether campaign messages may contain URLs."},"has_embedded_phone":{"type":"boolean","title":"Has Embedded Phone","description":"Whether campaign messages may contain phone numbers."},"age_gated":{"type":"boolean","title":"Age Gated","description":"Whether campaign content is age restricted."},"direct_lending":{"type":"boolean","title":"Direct Lending","description":"Whether the campaign promotes direct lending."},"opt_in_message":{"type":"string","title":"Opt In Message","description":"Confirmation message sent when a recipient opts in."},"opt_in_keywords":{"items":{"type":"string"},"type":"array","title":"Opt In Keywords","description":"Keywords recipients may text to opt in."},"opt_out_message":{"type":"string","title":"Opt Out Message","description":"Confirmation message sent when a recipient opts out."},"opt_out_keywords":{"items":{"type":"string"},"type":"array","title":"Opt Out Keywords","description":"Keywords recipients may text to opt out."},"help_message":{"type":"string","title":"Help Message","description":"Reply sent when a recipient asks for help."},"help_keywords":{"items":{"type":"string"},"type":"array","title":"Help Keywords","description":"Keywords recipients may text to request help."},"privacy_policy_url":{"type":"string","title":"Privacy Policy Url","description":"Privacy policy URL shown for the campaign."},"terms_and_conditions_url":{"type":"string","title":"Terms And Conditions Url","description":"Terms and conditions URL shown for the campaign."},"status":{"$ref":"#/components/schemas/TwilioA2PCampaignStatus","description":"Current campaign review or suspension status."},"errors":{"items":{"$ref":"#/components/schemas/TwilioA2PCampaignError"},"type":"array","title":"Errors","description":"Rejection reasons, if the campaign failed review."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this A2P campaign was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this A2P campaign was last changed."}},"type":"object","required":["sms_use_case_id","setup_id","us_app_to_person_usecase","description","message_samples","message_flow","has_embedded_links","has_embedded_phone","age_gated","direct_lending","opt_in_message","opt_in_keywords","opt_out_message","opt_out_keywords","help_message","help_keywords","privacy_policy_url","terms_and_conditions_url","status","errors","created_at","updated_at"],"title":"A2PCampaignResponse","description":"A2P 10DLC campaign details and review status."},"AcceptedDocument":{"properties":{"name":{"type":"string","title":"Name","description":"Display name of this acceptable document type."},"type":{"type":"string","title":"Type","description":"Document type to submit for this requirement."},"detailed_fields":{"items":{"$ref":"#/components/schemas/DetailedField"},"type":"array","title":"Detailed Fields","description":"Values required for this document type."}},"type":"object","required":["name","type","detailed_fields"],"title":"AcceptedDocument","description":"One acceptable document type for a SupportingDocument slot; caller picks one."},"AudioMessageRequest":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"WhatsApp use case whose business number sends the message."},"to_bsuid":{"type":"string","maxLength":130,"minLength":3,"title":"To Bsuid","description":"Recipient's business-scoped WhatsApp user ID."},"message_type":{"type":"string","const":"audio","title":"Message Type","description":"WhatsApp message type; always `audio`."},"media_attachment":{"type":"string","contentMediaType":"application/octet-stream","title":"Media Attachment","description":"Audio attachment under 16 MB, or OGG under 512 KB for a voice note."},"is_voice":{"type":"boolean","title":"Is Voice","description":"Send the audio as a voice note when true."},"target_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Message Id","description":"Message to reply to, if any."}},"type":"object","required":["use_case_id","to_bsuid","message_type","media_attachment","is_voice"],"title":"AudioMessageRequest"},"AuthorizedRepresentative":{"properties":{"first_name":{"type":"string","maxLength":128,"minLength":1,"title":"First Name","description":"Representative's first name."},"last_name":{"type":"string","maxLength":128,"minLength":1,"title":"Last Name","description":"Representative's last name."},"email":{"type":"string","format":"email","title":"Email","description":"Contact email for Twilio verification."},"phone_number":{"type":"string","format":"phone","title":"Phone Number","description":"E.164 phone number for Twilio verification."},"business_title":{"type":"string","maxLength":128,"minLength":1,"title":"Business Title","description":"Free-text title (e.g. Chief Technology Officer)."},"job_position":{"$ref":"#/components/schemas/JobPosition","description":"Enum role for Twilio (e.g. CEO, VP, Director)."}},"type":"object","required":["first_name","last_name","email","phone_number","business_title","job_position"],"title":"AuthorizedRepresentative","description":"Person Twilio can contact for verification. Maps to EndUserType authorized_representative_1."},"Body_send-email":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id"},"to_address":{"type":"string","format":"email","title":"To Address"},"mode":{"type":"string","enum":["template","raw_html"],"title":"Mode"},"template_parameters":{"anyOf":[{"type":"string","contentMediaType":"application/json","contentSchema":{"additionalProperties":{"type":"string"},"type":"object"}},{"type":"null"}],"title":"Template Parameters"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"subject":{"anyOf":[{"type":"string","maxLength":998,"minLength":1},{"type":"null"}],"title":"Subject"},"body_html":{"anyOf":[{"type":"string","maxLength":1000000,"minLength":1},{"type":"null"}],"title":"Body Html"},"attachments":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Attachments","default":[]},"reply_to_inbound_email_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Reply To Inbound Email Id"}},"type":"object","required":["use_case_id","to_address","mode"],"title":"Body_send-email"},"Body_send-imessage":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id"},"to_number":{"type":"string","format":"phone","title":"To Number"},"content":{"type":"string","maxLength":18996,"title":"Content","default":""},"media":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Media"}},"type":"object","required":["use_case_id","to_number"],"title":"Body_send-imessage"},"Body_send-sms-message":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id"},"to_phone_number":{"type":"string","format":"phone","title":"To Phone Number"},"message":{"anyOf":[{"type":"string","maxLength":1600,"minLength":1},{"type":"null"}],"title":"Message"},"media_attachments":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","maxItems":10,"title":"Media Attachments","default":[]}},"type":"object","required":["use_case_id","to_phone_number"],"title":"Body_send-sms-message"},"Body_submit-regulatory-bundle":{"properties":{"iso_country":{"type":"string","pattern":"^\\w{2}$","title":"Iso Country"},"number_type":{"$ref":"#/components/schemas/TwilioNumberType"},"end_users":{"type":"string","title":"End Users"},"supporting_documents":{"type":"string","title":"Supporting Documents"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","default":[]}},"type":"object","required":["iso_country","number_type","end_users","supporting_documents"],"title":"Body_submit-regulatory-bundle"},"Body_submit-tollfree-verification":{"properties":{"business_name":{"type":"string","maxLength":256,"minLength":1,"title":"Business Name"},"business_website":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Business Website"},"use_case_categories":{"items":{"$ref":"#/components/schemas/TollfreeUseCaseCategory"},"type":"array","maxItems":10,"minItems":1,"title":"Use Case Categories"},"use_case_summary":{"type":"string","maxLength":4096,"minLength":1,"title":"Use Case Summary"},"production_message_sample":{"type":"string","maxLength":2048,"minLength":1,"title":"Production Message Sample"},"opt_in_type":{"$ref":"#/components/schemas/TollfreeOptInType"},"opt_in_confirmation_message":{"type":"string","maxLength":160,"minLength":1,"title":"Opt In Confirmation Message"},"message_volume":{"$ref":"#/components/schemas/TollfreeMessageVolume"},"business_type":{"$ref":"#/components/schemas/TollfreeBusinessType"},"terms_and_conditions_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Terms And Conditions Url"},"privacy_policy_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Privacy Policy Url"},"age_gated_content":{"type":"boolean","title":"Age Gated Content"},"opt_in_proof_files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Opt In Proof Files","default":[]},"additional_information":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1},{"type":"null"}],"title":"Additional Information"},"business_registration_number":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Business Registration Number"},"business_registration_authority":{"anyOf":[{"$ref":"#/components/schemas/TollfreeBusinessRegistrationAuthority"},{"type":"null"}]},"business_registration_country":{"anyOf":[{"type":"string","pattern":"^\\w{2}$"},{"type":"null"}],"title":"Business Registration Country"}},"type":"object","required":["business_name","business_website","use_case_categories","use_case_summary","production_message_sample","opt_in_type","opt_in_confirmation_message","message_volume","business_type","terms_and_conditions_url","privacy_policy_url","age_gated_content"],"title":"Body_submit-tollfree-verification"},"Body_upload-use-case-hold-music":{"properties":{"hold_music":{"type":"string","contentMediaType":"application/octet-stream","title":"Hold Music"}},"type":"object","required":["hold_music"],"title":"Body_upload-use-case-hold-music"},"BundleKind":{"type":"string","enum":["shaken_stir","cnam","a2p_messaging_profile","regulatory"],"title":"BundleKind","description":"Client-facing classification of a Twilio setup bundle, surfaced in place of\nthe raw Twilio policy SID (a vendor identifier). Mirrors the read-scope split in\nlist_twilio_setup_bundles: shaken_stir + cnam are voice, a2p_messaging_profile is\nsms, everything else is a Regulatory Compliance regulation."},"BusinessAddress":{"properties":{"street":{"type":"string","maxLength":256,"minLength":1,"title":"Street","description":"Street address line."},"city":{"type":"string","maxLength":128,"minLength":1,"title":"City","description":"City name."},"region":{"type":"string","maxLength":64,"minLength":1,"title":"Region","description":"State or province."},"postal_code":{"type":"string","maxLength":16,"minLength":1,"title":"Postal Code","description":"ZIP or postal code."},"iso_country":{"type":"string","pattern":"^\\w{2}$","title":"Iso Country","description":"ISO 3166-1 alpha-2 country code."}},"type":"object","required":["street","city","region","postal_code","iso_country"],"title":"BusinessAddress","description":"Business address provided for Twilio verification."},"BusinessIdentity":{"type":"string","enum":["direct_customer","isv_reseller_or_partner","unknown"]},"BusinessIndustry":{"type":"string","enum":["AGRICULTURE","AUTOMOTIVE","BANKING","CONSUMER","EDUCATION","ELECTRONICS","ENERGY","ENGINEERING","FAST_MOVING_CONSUMER_GOODS","FINANCIAL","FINTECH","FOOD_AND_BEVERAGE","GOVERNMENT","HEALTHCARE","HOSPITALITY","INSURANCE","JEWELRY","LEGAL","MANUFACTURING","MEDIA","NOT_FOR_PROFIT","OIL_AND_GAS","ONLINE","RAW_MATERIALS","REAL_ESTATE","RELIGION","RETAIL","TECHNOLOGY","TELECOMMUNICATIONS","TRANSPORTATION","TRAVEL"]},"BusinessRegion":{"type":"string","enum":["AFRICA","ASIA","EUROPE","LATIN_AMERICA","USA_AND_CANADA","AUSTRALIA"]},"BusinessRegistrationIdentifier":{"type":"string","enum":["EIN","DUNS","CBN","CN","ACN","CIN","VAT","VATRN","RN","Other"]},"BusinessType":{"type":"string","enum":["Sole Proprietorship","Partnership","Limited Liability Corporation","Co-operative","Non-profit Corporation","Corporation"]},"CampaignUseCase":{"properties":{"code":{"type":"string","title":"Code","description":"TCR campaign use-case code (e.g. \"MARKETING\", \"2FA\")."},"name":{"type":"string","title":"Name","description":"Human-readable name."},"description":{"type":"string","title":"Description","description":"Human-readable description from Twilio."},"post_approval_required":{"type":"boolean","title":"Post Approval Required","description":"Whether Twilio requires manual post-approval for campaigns at this code."}},"type":"object","required":["code","name","description","post_approval_required"],"title":"CampaignUseCase","description":"A campaign category available for A2P messaging."},"CanonicalInboundEnvelopePayload":{"properties":{"channel_kind":{"$ref":"#/components/schemas/ChannelKind"},"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id"},"inbound_message_ref":{"type":"string","maxLength":256,"minLength":1,"title":"Inbound Message Ref"},"caller_ref":{"type":"string","maxLength":320,"title":"Caller Ref","default":""},"content_parts":{"items":{"$ref":"#/components/schemas/ContentPartPayload"},"type":"array","maxItems":100,"minItems":1,"title":"Content Parts"},"parent_outbound_ref":{"type":"string","maxLength":256,"title":"Parent Outbound Ref","default":""},"subject":{"anyOf":[{"type":"string","maxLength":998},{"type":"null"}],"title":"Subject"},"authenticated":{"type":"boolean","title":"Authenticated","default":false},"idempotency_key":{"type":"string","maxLength":256,"title":"Idempotency Key","default":""},"occurred_at":{"type":"number","title":"Occurred At","default":0.0}},"type":"object","required":["channel_kind","use_case_id","inbound_message_ref","content_parts"],"title":"CanonicalInboundEnvelopePayload","description":"One inbound message, normalized across every channel (channel-manager → the use case's webhook_url)."},"Channel":{"type":"string","enum":["outbound_voice","inbound_voice","sms","email","imessage","whatsapp"],"title":"Channel","description":"Channel a use case operates on. Each maps to its own binding table (see\nschema.py); the value also drives the voice assignment UNIQUE(phone, channel)\nand the outbound-voice route gating."},"ChannelKind":{"type":"string","enum":["voice","sms","whatsapp","email","web","imessage"],"title":"ChannelKind","description":"Channel medium."},"CompanyType":{"type":"string","enum":["private","public","non-profit","government"]},"ContentPartPayload":{"properties":{"type":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9._-]*$","title":"Type","default":"text"},"text":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Text"},"url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Url"},"media_type":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Media Type"},"provider_id":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Provider Id"},"metadata":{"additionalProperties":true,"type":"object","maxProperties":50,"title":"Metadata"}},"type":"object","title":"ContentPartPayload","description":"HTTP/WebSocket shape for a modality-neutral conversation content part."},"CustomerProfileStatusDetail":{"properties":{"status":{"$ref":"#/components/schemas/SetupStepStatus","description":"Current verification status."},"last_failure":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Last Failure","description":"Human-readable failure strings from the latest noncompliant eval or\nwebhook rejection. NULL when healthy."}},"type":"object","required":["status"],"title":"CustomerProfileStatusDetail","description":"Status of the Trust Hub customer profile."},"DetailedField":{"properties":{"machine_name":{"type":"string","title":"Machine Name","description":"Key to use when supplying this value."},"friendly_name":{"type":"string","title":"Friendly Name","description":"Display label for this value."},"description":{"type":"string","title":"Description","description":"Guidance for completing this value, if available."},"value_type":{"type":"string","enum":["String","Boolean","Date","Address"],"title":"Value Type","description":"Expected value type; dates use ISO 8601 and addresses use structured fields."}},"type":"object","required":["machine_name","friendly_name","description","value_type"],"title":"DetailedField","description":"One value required for a business or supporting document."},"DialParticipant":{"properties":{"kind":{"type":"string","const":"dial","title":"Kind","description":"Participant type; always `dial`.","default":"dial"},"role":{"type":"string","enum":["operator","transfer_target","callee"],"title":"Role","description":"Role the dialed participant plays in the call."},"to_phone_number":{"type":"string","format":"phone","title":"To Phone Number","description":"Phone number to dial in E.164 format."},"detect_answering_machine":{"type":"boolean","title":"Detect Answering Machine","description":"Run Twilio AMD on this leg; the verdict lands on the participant as `answered_by`."}},"type":"object","required":["role","to_phone_number","detect_answering_machine"],"title":"DialParticipant"},"DialRedirect":{"properties":{"kind":{"type":"string","const":"dial","title":"Kind","description":"Redirect action; always `dial`.","default":"dial"},"to":{"type":"string","format":"phone","title":"To","description":"Destination phone number in E.164 format."}},"type":"object","required":["to"],"title":"DialRedirect"},"DnsRecord":{"properties":{"address":{"type":"string","title":"Address","description":"DNS host name where this record must be published."},"record":{"type":"string","title":"Record","description":"Value to publish in DNS."},"type":{"type":"string","enum":["CNAME","MX","TXT"],"title":"Type","description":"DNS record type."},"verified":{"type":"boolean","title":"Verified","description":"Whether this DNS record is currently verified."}},"type":"object","required":["address","record","type","verified"],"title":"DnsRecord","description":"A single DNS entry the customer must publish. `address` is the FQDN the entry\nlives under; `record` is its target value (for MX, includes the priority prefix)."},"DocumentMessageRequest":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"WhatsApp use case whose business number sends the message."},"to_bsuid":{"type":"string","maxLength":130,"minLength":3,"title":"To Bsuid","description":"Recipient's business-scoped WhatsApp user ID."},"message_type":{"type":"string","const":"document","title":"Message Type","description":"WhatsApp message type; always `document`."},"media_attachment":{"type":"string","contentMediaType":"application/octet-stream","title":"Media Attachment","description":"Supported document file under 100 MB."},"message":{"anyOf":[{"type":"string","maxLength":1024,"minLength":1},{"type":"null"}],"title":"Message","description":"Optional document caption."},"target_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Message Id","description":"Message to reply to, if any."}},"type":"object","required":["use_case_id","to_bsuid","message_type","media_attachment"],"title":"DocumentMessageRequest"},"DomainNameValidationResult":{"properties":{"ascii_domain":{"type":"string","title":"Ascii Domain"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["ascii_domain","domain"],"title":"DomainNameValidationResult"},"EmailBodyKind":{"type":"string","enum":["html","text"],"title":"EmailBodyKind","description":"Which body was extracted from inbound MIME via\n`EmailMessage.get_body(preferencelist=(\"html\",\"plain\"))` — sets the read\nContent-Type and the S3 key suffix (`body.html` vs `body.txt`)."},"EmailInboundMode":{"type":"string","enum":["send_only","replies_only","all_inbound"],"title":"EmailInboundMode","description":"What inbound a use case accepts. Only SEND_ONLY needs no inbound MX;\nALL_INBOUND adds cold inbound (not replying to our outbound) over REPLIES_ONLY."},"EmailTemplateItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the template."},"name":{"type":"string","title":"Name","description":"Name of the template."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of the template's purpose."},"ses_use_case_id":{"type":"string","format":"uuid","title":"Ses Use Case Id","description":"Email use case that owns this template."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this email template was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this email template was last changed."}},"type":"object","required":["id","name","description","ses_use_case_id","created_at","updated_at"],"title":"EmailTemplateItem"},"EmailTier":{"type":"string","enum":["onboarding","standard","premium","suspended"],"title":"EmailTier","description":"Reputation lane, mutable; set by the re-tiering cron on send/bounce/\ncomplaint metrics. SUSPENDED clears SendingPoolName → shared IPs (kept\nsendable, off the dedicated pools)."},"EmailType":{"type":"string","enum":["transactional","marketing"],"title":"EmailType","description":"Outbound email classification, immutable per use case. Selects the\nreputation-isolated IP pool family (transactional vs marketing never share\nIPs); maps to `outbound-{tier}-{email_type}`."},"EmailUseCaseRequest":{"properties":{"entity_name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Entity Name","description":"Business entity name; unique together with the use-case name."},"name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment stage this use case targets. Required; immutable after create."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets. Required; immutable after create."},"channel":{"type":"string","const":"email","title":"Channel","description":"Always \"email\" for this variant."},"ses_setup_id":{"type":"string","format":"uuid","title":"Ses Setup Id","description":"SES setup the use case binds to."},"sender_email_address":{"type":"string","title":"Sender Email Address","description":"Sender address for outbound email; its domain must match the SES setup."},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"Destination for inbound emails accepted by this use case."},"sender_email_alias":{"anyOf":[{"type":"string","maxLength":40,"minLength":4},{"type":"null"}],"title":"Sender Email Alias","description":"Display name shown before the sender address, or null for none; immutable after creation."},"email_type":{"$ref":"#/components/schemas/EmailType","description":"Transactional or marketing classification; immutable after creation."},"unsubscribable":{"type":"boolean","title":"Unsubscribable","description":"Whether the use case exposes RFC 8058 unsubscribe (List-Unsubscribe\nheader + footer links) and gates sends on the per-use-case unsubscribe\ntable. Marketing email_type MUST be unsubscribable (CAN-SPAM, Gmail/Yahoo\nbulk-sender rules); transactional may opt out for must-send flows. The\nsetup-level ban list is enforced regardless. Required: caller commits to\none stance per use case."},"inbound_mode":{"$ref":"#/components/schemas/EmailInboundMode","description":"What inbound this use case accepts. Anything but `send_only` requires the\nsetup's inbound MX verified at create. Mutable via PUT /v1/use-case/{id}."}},"type":"object","required":["entity_name","name","environment","region","channel","ses_setup_id","sender_email_address","webhook_url","sender_email_alias","email_type","unsubscribable","inbound_mode"],"title":"EmailUseCaseRequest","description":"Request body for the email channel."},"EmailUseCaseUpdateRequest":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description. Supply `null` to clear it, omit to leave it\nunchanged."},"channel":{"type":"string","const":"email","title":"Channel","description":"Use-case channel; always `email`."},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"New destination for inbound email; omit to leave unchanged."},"sender_email_alias":{"anyOf":[{"type":"string","maxLength":40,"minLength":4},{"type":"null"}],"title":"Sender Email Alias","description":"Display name rendered before the sender address in the outbound From\nheader. Supply `null` to clear it (bare address), omit to leave unchanged."},"inbound_mode":{"$ref":"#/components/schemas/EmailInboundMode","description":"What inbound this use case accepts (see the create request). Moving off\n`send_only` requires the setup's inbound MX verified now (409 otherwise)."}},"type":"object","required":["channel"],"title":"EmailUseCaseUpdateRequest"},"EndUserEntity":{"properties":{"entity_kind":{"type":"string","const":"end_user","title":"Entity Kind","description":"Entity category; always `end_user`.","default":"end_user"},"entity_type":{"type":"string","title":"Entity Type","description":"Twilio EndUser machine_name (e.g. customer_profile_business_information)."},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes","description":"The attribute values we submitted to Twilio for this entity."}},"type":"object","required":["entity_type","attributes"],"title":"EndUserEntity"},"EndUserRequirement":{"properties":{"name":{"type":"string","title":"Name","description":"Display name of the required business information."},"type":{"type":"string","title":"Type","description":"Business-information type to submit with the bundle."},"requirement_name":{"type":"string","title":"Requirement Name","description":"Regulation's name for this business-information requirement."},"detailed_fields":{"items":{"$ref":"#/components/schemas/DetailedField"},"type":"array","title":"Detailed Fields","description":"Values required for this business-information type."}},"type":"object","required":["name","type","requirement_name","detailed_fields"],"title":"EndUserRequirement","description":"One EndUser the regulation requires."},"Environment":{"type":"string","enum":["staging","production"],"title":"Environment","description":"Deployment stage a use case targets. Immutable; CHECK-constrained (extend\nthe CHECK to add a value)."},"EventType":{"type":"string","enum":["Reject","Delivery","Bounce","Complaint","DeliveryDelay","Open","Click"]},"FarewellRedirect":{"properties":{"kind":{"type":"string","const":"farewell","title":"Kind","description":"Redirect action; always `farewell`.","default":"farewell"},"message":{"type":"string","maxLength":1000,"minLength":1,"title":"Message","description":"Text to speak to the participant before the call ends."}},"type":"object","required":["message"],"title":"FarewellRedirect"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"HealthResponse"},"ImageMessageRequest":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"WhatsApp use case whose business number sends the message."},"to_bsuid":{"type":"string","maxLength":130,"minLength":3,"title":"To Bsuid","description":"Recipient's business-scoped WhatsApp user ID."},"message_type":{"type":"string","const":"image","title":"Message Type","description":"WhatsApp message type; always `image`."},"media_attachment":{"type":"string","contentMediaType":"application/octet-stream","title":"Media Attachment","description":"JPEG or PNG image under 5 MB."},"message":{"anyOf":[{"type":"string","maxLength":1024,"minLength":1},{"type":"null"}],"title":"Message","description":"Optional image caption."},"target_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Message Id","description":"Message to reply to, if any."}},"type":"object","required":["use_case_id","to_bsuid","message_type","media_attachment"],"title":"ImageMessageRequest"},"InboundEmailItem":{"properties":{"direction":{"type":"string","const":"inbound","title":"Direction","description":"Discriminator — always `inbound` on this variant."},"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the received email."},"ses_use_case_id":{"type":"string","format":"uuid","title":"Ses Use Case Id","description":"Email use case that received this message."},"setup_id":{"type":"string","format":"uuid","title":"Setup Id","description":"SES setup that received this message."},"from_address":{"type":"string","title":"From Address","description":"Envelope sender (mail.source). What SPF authenticated against."},"to_address":{"type":"string","title":"To Address","description":"The RCPT TO that landed on us."},"subject":{"type":"string","title":"Subject","description":"Subject of the received email."},"in_reply_to_email_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"In Reply To Email Id","description":"Sent email this message replies to, if any."},"received_at":{"type":"string","format":"date-time","title":"Received At","description":"When the email was received."},"has_attachment":{"type":"boolean","title":"Has Attachment","description":"Whether the email includes attachments."}},"type":"object","required":["direction","id","ses_use_case_id","setup_id","from_address","to_address","subject","in_reply_to_email_id","received_at","has_attachment"],"title":"InboundEmailItem","description":"Summary of a received email."},"InboundEmailResponse":{"properties":{"direction":{"type":"string","const":"inbound","title":"Direction","description":"Message direction; always `inbound`."},"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the received email."},"ses_use_case_id":{"type":"string","format":"uuid","title":"Ses Use Case Id","description":"Email use case that received this message."},"setup_id":{"type":"string","format":"uuid","title":"Setup Id","description":"SES setup that received this message."},"from_address":{"type":"string","title":"From Address","description":"Authenticated RFC822 `From:` sender; on a threaded reply this equals the outbound `to_address` we replied to."},"to_address":{"type":"string","title":"To Address","description":"The RCPT TO that landed on us."},"subject":{"type":"string","title":"Subject","description":"Subject of the received email."},"received_at":{"type":"string","format":"date-time","title":"Received At","description":"SES `mail.timestamp` — when the message was received upstream."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this email became available through the API."},"in_reply_to_email_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"In Reply To Email Id","description":"The outbound `emails.id` this replies to, or NULL when cold inbound."},"attachment_filenames":{"items":{"type":"string"},"type":"array","title":"Attachment Filenames","description":"Attachment filenames in message order."},"body_kind":{"$ref":"#/components/schemas/EmailBodyKind","description":"`html` or `text`. Tells the client what `Content-Type` `/body` will return."}},"type":"object","required":["direction","id","ses_use_case_id","setup_id","from_address","to_address","subject","received_at","created_at","in_reply_to_email_id","attachment_filenames","body_kind"],"title":"InboundEmailResponse"},"JobPosition":{"type":"string","enum":["Director","GM","VP","CEO","CFO","General Counsel","Other"]},"Keyword":{"type":"string","maxLength":255,"minLength":1,"pattern":"^[A-Za-z0-9]+$"},"MediaHeader":{"properties":{"format":{"type":"string","enum":["image","video","document"],"title":"Format","description":"Media format of the template header."}},"type":"object","required":["format"],"title":"MediaHeader"},"MediaParticipant":{"properties":{"kind":{"type":"string","const":"media","title":"Kind","description":"Participant type; always `media`.","default":"media"},"stream_url":{"type":"string","minLength":1,"format":"uri","title":"Stream Url","description":"The wss:// endpoint Twilio streams this leg's media to."},"stream_context":{"additionalProperties":{"type":"string","maxLength":256},"propertyNames":{"maxLength":128,"minLength":1},"type":"object","maxProperties":32,"title":"Stream Context","description":"Key→value context echoed to the stream's `start` event."}},"type":"object","required":["stream_url","stream_context"],"title":"MediaParticipant"},"MessageResponse":{"oneOf":[{"$ref":"#/components/schemas/src__routes__imessage__messages__InboundMessage"},{"$ref":"#/components/schemas/src__routes__imessage__messages__OutboundMessage"}],"discriminator":{"propertyName":"direction","mapping":{"inbound":"#/components/schemas/src__routes__imessage__messages__InboundMessage","outbound":"#/components/schemas/src__routes__imessage__messages__OutboundMessage"}}},"OutboundEmailItem":{"properties":{"direction":{"type":"string","const":"outbound","title":"Direction","description":"Discriminator — always `outbound` on this variant."},"id":{"type":"string","format":"uuid","title":"Id","description":"The ID of the email."},"ses_use_case_id":{"type":"string","format":"uuid","title":"Ses Use Case Id","description":"The SES use case the email was sent through."},"setup_id":{"type":"string","format":"uuid","title":"Setup Id","description":"The SES setup the email was sent from."},"from_address":{"type":"string","title":"From Address","description":"The sender address."},"to_address":{"type":"string","title":"To Address","description":"The recipient address."},"subject":{"type":"string","title":"Subject","description":"The email subject."},"state":{"$ref":"#/components/schemas/State","description":"Derived state; precedence complained > bounced > rejected > delivered > sent."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the email was created."},"has_attachment":{"type":"boolean","title":"Has Attachment","description":"True if the email had one or more attachments."},"replied_to_inbound_email_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Replied To Inbound Email Id","description":"Received email this message replies to, if any."},"open_count":{"type":"integer","title":"Open Count","description":"Total number of Open events SES has emitted for this send."},"click_count":{"type":"integer","title":"Click Count","description":"Total number of Click events SES has emitted for this send."}},"type":"object","required":["direction","id","ses_use_case_id","setup_id","from_address","to_address","subject","state","created_at","has_attachment","replied_to_inbound_email_id","open_count","click_count"],"title":"OutboundEmailItem","description":"Summary of a sent email."},"OutboundEmailResponse":{"properties":{"direction":{"type":"string","const":"outbound","title":"Direction","description":"Message direction; always `outbound`."},"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the sent email."},"ses_use_case_id":{"type":"string","format":"uuid","title":"Ses Use Case Id","description":"Email use case used to send this message."},"setup_id":{"type":"string","format":"uuid","title":"Setup Id","description":"SES setup used to send this message."},"from_address":{"type":"string","title":"From Address","description":"Sender address used for this email."},"to_address":{"type":"string","title":"To Address","description":"Recipient address of this email."},"subject":{"type":"string","title":"Subject","description":"Subject of the sent email."},"email_type":{"$ref":"#/components/schemas/EmailType","description":"Whether this email is transactional or marketing."},"tier":{"$ref":"#/components/schemas/EmailTier","description":"Reputation tier used when this email was sent."},"attachment_filenames":{"items":{"type":"string"},"type":"array","title":"Attachment Filenames","description":"Attachment filenames in send order."},"replied_to_inbound_email_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Replied To Inbound Email Id","description":"Received email this message replies to, if any."},"state":{"type":"string","enum":["sent","delivered","bounced","complained","rejected"],"title":"State","description":"Derived state; precedence complained > bounced > rejected > delivered > sent."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the email was sent."},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At","description":"When SES reported delivery, if available."},"bounced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Bounced At","description":"When SES reported a bounce, if any."},"bounce_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bounce Type","description":"SES bounce category, if the email bounced."},"bounce_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bounce Subtype","description":"SES bounce detail, if the email bounced."},"complained_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Complained At","description":"When SES reported a spam complaint, if any."},"rejected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rejected At","description":"When SES reported rejection, if any."},"delivery_delay_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivery Delay At","description":"When SES reported a delivery delay, if any."},"first_open_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Open At","description":"Time of the first recorded open, if any."},"last_open_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Open At","description":"Time of the latest recorded open, if any."},"open_count":{"type":"integer","title":"Open Count","description":"Raw SES Open count (one per pixel load); use first/last_open_at for unique-by-mail signal."},"first_click_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Click At","description":"Time of the first recorded link click, if any."},"last_click_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Click At","description":"Time of the latest recorded link click, if any."},"click_count":{"type":"integer","title":"Click Count","description":"Raw SES Click event count — one per link click."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When these delivery details last changed."}},"type":"object","required":["direction","id","ses_use_case_id","setup_id","from_address","to_address","subject","email_type","tier","attachment_filenames","replied_to_inbound_email_id","state","created_at","delivered_at","bounced_at","bounce_type","bounce_subtype","complained_at","rejected_at","delivery_delay_at","first_open_at","last_open_at","open_count","first_click_at","last_click_at","click_count","updated_at"],"title":"OutboundEmailResponse"},"Participant":{"properties":{"participant_ref":{"type":"string","format":"uuid","title":"Participant Ref","description":"Identifier used to control this participant."},"kind":{"$ref":"#/components/schemas/VoiceParticipantKind","description":"Type of call participant."},"role":{"$ref":"#/components/schemas/VoiceParticipantRole","description":"Role assigned to the participant."},"to_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Phone Number","description":"Dialed phone number, or null for a media stream."},"dial_status":{"anyOf":[{"$ref":"#/components/schemas/VoiceDialStatus"},{"type":"null"}],"description":"Latest dialing outcome, when applicable."},"answered_by":{"anyOf":[{"$ref":"#/components/schemas/VoiceAmdResult"},{"type":"null"}],"description":"Answering-machine classification, when requested and available."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this participant was added."},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At","description":"When the dialed leg answered, if any."},"joined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Joined At","description":"When the participant joined the conference, if any."},"left_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Left At","description":"When the participant left the conference, if any."}},"type":"object","required":["participant_ref","kind","role","to_phone_number","dial_status","answered_by","created_at","answered_at","joined_at","left_at"],"title":"Participant"},"ReactionMessageRequest":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"WhatsApp use case whose business number sends the message."},"to_bsuid":{"type":"string","maxLength":130,"minLength":3,"title":"To Bsuid","description":"Recipient's business-scoped WhatsApp user ID."},"message_type":{"type":"string","const":"reaction","title":"Message Type","description":"WhatsApp message type; always `reaction`."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Reaction emoji, or null to remove an existing reaction."},"target_message_id":{"type":"string","format":"uuid","title":"Target Message Id","description":"Message to react to."}},"type":"object","required":["use_case_id","to_bsuid","message_type","target_message_id"],"title":"ReactionMessageRequest"},"Region":{"type":"string","enum":["us-east-1","ap-southeast-2","eu-central-1","ca-central-1"],"title":"Region","description":"AWS region a use case targets. Immutable; CHECK-constrained (extend the\nCHECK to add a value)."},"Requirements":{"properties":{"end_user":{"items":{"$ref":"#/components/schemas/EndUserRequirement"},"type":"array","title":"End User","description":"Business or individual information required by the regulation."},"supporting_document":{"items":{"$ref":"#/components/schemas/SupportingDocumentRequirement"},"type":"array","title":"Supporting Document","description":"Each entry is independently required (AND); accepted_documents within an entry are alternatives (OR)."}},"type":"object","required":["end_user","supporting_document"],"title":"Requirements","description":"Top-level requirements block."},"SendBlueMessageService":{"type":"string","enum":["iMessage","SMS","RCS"]},"SendBluePhoneNumberResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of this SendBlue phone line."},"phone_number":{"type":"string","title":"Phone Number","description":"E.164. Always set — the line is provisioned synchronously when the\nsubaccount is created."},"blocked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Blocked At","description":"When SendBlue blocked this line; blocked lines cannot send messages."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this SendBlue phone line was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this SendBlue phone line was last changed."}},"type":"object","required":["id","phone_number","blocked_at","created_at","updated_at"],"title":"SendBluePhoneNumberResponse","description":"A single SendBlue line under a setup."},"SendBlueSetupResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of this SendBlue setup."},"friendly_name":{"type":"string","title":"Friendly Name","description":"Operator-facing label."},"phone_numbers":{"items":{"$ref":"#/components/schemas/SendBluePhoneNumberResponse"},"type":"array","title":"Phone Numbers","description":"Unblocked phone lines; the phone-number list endpoint can include blocked lines."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this SendBlue setup was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this SendBlue setup was last changed."}},"type":"object","required":["id","friendly_name","phone_numbers","created_at","updated_at"],"title":"SendBlueSetupResponse","description":"A SendBlue subaccount setup."},"SendBlueUseCaseRequest":{"properties":{"entity_name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Entity Name","description":"Business entity name; unique together with the use-case name."},"name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment stage this use case targets. Required; immutable after create."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets. Required; immutable after create."},"channel":{"type":"string","const":"imessage","title":"Channel","description":"Always \"imessage\" for this variant."},"sendblue_setup_id":{"type":"string","format":"uuid","title":"Sendblue Setup Id","description":"Active SendBlue setup that serves this use case."},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"Destination for inbound iMessages accepted by this use case."}},"type":"object","required":["entity_name","name","environment","region","channel","sendblue_setup_id","webhook_url"],"title":"SendBlueUseCaseRequest","description":"Request body for the iMessage channel (SendBlue-served)."},"SendBlueUseCaseUpdateRequest":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description. Supply `null` to clear it, omit to leave it\nunchanged."},"channel":{"type":"string","const":"imessage","title":"Channel","description":"Use-case channel; always `imessage`."},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"New destination for inbound iMessages; omit to leave unchanged."}},"type":"object","required":["channel"],"title":"SendBlueUseCaseUpdateRequest"},"SesSetupDetailResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of this SES setup."},"domain_identity":{"type":"string","title":"Domain Identity","description":"Email domain configured for this setup."},"dns_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dns Checked At","description":"Wall-clock time of the last refresh, or null if never checked."},"dns_records":{"items":{"$ref":"#/components/schemas/DnsRecord"},"type":"array","title":"Dns Records","description":"DNS records required for domain verification."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this SES setup was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this SES setup was last changed."},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At","description":"When the setup was deleted, if applicable; DNS results are then last-known values."}},"type":"object","required":["id","domain_identity","dns_checked_at","dns_records","created_at","updated_at"],"title":"SesSetupDetailResponse","description":"Response for POST /v1/ses-setup and GET /v1/ses-setup/{id}. On a tombstoned\nsetup `deleted_at` is set and `dns_records[].verified` reflects the last cached\nstate, not live SES."},"SetupStepStatus":{"type":"string","enum":["pending-review","in-review","twilio-approved","provisionally-approved","twilio-rejected"],"title":"SetupStepStatus","description":"Twilio-native status per Trust Hub verification step; mirrored as-is,\nincluding regressions from approved back to in-review on re-review."},"SmsStatus":{"type":"string","enum":["pending","sent","delivered","failed","undelivered"],"title":"SmsStatus"},"State":{"type":"string","enum":["sent","delivered","bounced","complained","rejected"]},"StickerMessageRequest":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"WhatsApp use case whose business number sends the message."},"to_bsuid":{"type":"string","maxLength":130,"minLength":3,"title":"To Bsuid","description":"Recipient's business-scoped WhatsApp user ID."},"message_type":{"type":"string","const":"sticker","title":"Message Type","description":"WhatsApp message type; always `sticker`."},"media_attachment":{"type":"string","contentMediaType":"application/octet-stream","title":"Media Attachment","description":"WebP sticker under 500 KB."},"target_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Message Id","description":"Message to reply to, if any."}},"type":"object","required":["use_case_id","to_bsuid","message_type","media_attachment"],"title":"StickerMessageRequest"},"SupportingDocumentEntity":{"properties":{"entity_kind":{"type":"string","const":"supporting_document","title":"Entity Kind","description":"Entity category; always `supporting_document`.","default":"supporting_document"},"entity_type":{"type":"string","title":"Entity Type","description":"Twilio document type selected for this requirement."},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes","description":"Document details submitted for review."},"filename":{"type":"string","title":"Filename","description":"The document filename submitted to Twilio."}},"type":"object","required":["entity_type","attributes","filename"],"title":"SupportingDocumentEntity"},"SupportingDocumentRequirement":{"properties":{"name":{"type":"string","title":"Name","description":"Display name of this document requirement."},"type":{"type":"string","title":"Type","description":"Always \"document\" in observed regulations."},"requirement_name":{"type":"string","title":"Requirement Name","description":"Regulation's name for this document requirement."},"description":{"type":"string","title":"Description","description":"Operator-facing guidance; pass through to UI verbatim."},"accepted_documents":{"items":{"$ref":"#/components/schemas/AcceptedDocument"},"type":"array","title":"Accepted Documents","description":"Document types that satisfy this slot (OR — caller picks one)."}},"type":"object","required":["name","type","requirement_name","description","accepted_documents"],"title":"SupportingDocumentRequirement","description":"One SupportingDocument slot the regulation requires."},"TemplateLanguage":{"type":"string","enum":["None","af","sq","ar","ar_EG","ar_AE","ar_LB","ar_MA","ar_QA","ar_SA","az","bn","bg","ca","zh_CN","zh_HK","zh_TW","hr","cs","da","nl","en","en_GB","en_US","en_AU","en_CA","en_IN","et","fil","fi","fr","fr_CA","fr_BE","ka","de","el","gu","ha","he","hi","hu","id","ga","it","ja","kn","kk","rw_RW","ko","ky_KG","lo","lv","lt","mk","ms","ml","mr","nb","fa","pl","pt_BR","pt_PT","pa","ro","ru","sr","sk","sl","es","es_AR","es_ES","es_MX","es_CL","es_CO","es_PE","es_VE","sw","sv","ta","te","th","tr","uk","ur","uz","vi","zu","UNKNOWN"],"title":"TemplateLanguage","description":"Template language and locale code.\n\n`'Template language and locale code' on\ndevelopers.facebook.com\n<https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates/supported-languages>`_"},"TextHeader":{"properties":{"format":{"type":"string","const":"text","title":"Format","description":"Header format; always `text`."},"text":{"type":"string","maxLength":60,"minLength":1,"title":"Text","description":"Header text, optionally containing one named placeholder."},"text_parameter_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":1,"pattern":"^[a-z_0-9]+$"},{"type":"null"}],"title":"Text Parameter Name","description":"Name of the placeholder used in the header text, if any."}},"type":"object","required":["format","text"],"title":"TextHeader"},"TextMessageRequest":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"WhatsApp use case whose business number sends the message."},"to_bsuid":{"type":"string","maxLength":130,"minLength":3,"title":"To Bsuid","description":"Recipient's business-scoped WhatsApp user ID."},"message_type":{"type":"string","const":"text","title":"Message Type","description":"WhatsApp message type; always `text`."},"message":{"type":"string","maxLength":4096,"minLength":1,"title":"Message","description":"Text to send to the recipient."},"target_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Message Id","description":"Message to reply to, if any."}},"type":"object","required":["use_case_id","to_bsuid","message_type","message"],"title":"TextMessageRequest"},"TollfreeBusinessRegistrationAuthority":{"type":"string","enum":["EIN","CBN","CRN","PROVINCIAL_NUMBER","VAT","ACN","ABN","BRN","SIREN","SIRET","NZBN","USt-IdNr","CIF","NIF","CNPJ","UID","NEQ","OTHER"]},"TollfreeBusinessType":{"type":"string","enum":["PRIVATE_PROFIT","PUBLIC_PROFIT","SOLE_PROPRIETOR","NON_PROFIT","GOVERNMENT"]},"TollfreeMessageVolume":{"type":"string","enum":["10","100","1,000","10,000","100,000","250,000","500,000","750,000","1,000,000","5,000,000","10,000,000+"]},"TollfreeOptInType":{"type":"string","enum":["VERBAL","WEB_FORM","PAPER_FORM","VIA_TEXT","MOBILE_QR_CODE","IMPORT"]},"TollfreeRejectionReasonDict":{"properties":{"code":{"type":"integer","title":"Code","description":"Twilio rejection code."},"description":{"type":"string","title":"Description","description":"Explanation of the rejection."}},"type":"object","required":["code","description"],"title":"TollfreeRejectionReasonDict","description":"Entry in TwilioTollfreeVerification.rejection_reasons. `code` from the\nrejection event's `errorcodes`; `description` resolved from Twilio's static\nerror catalog. A code with no catalog match is drift → 500 → DLQ."},"TollfreeUseCaseCategory":{"type":"string","enum":["TWO_FACTOR_AUTHENTICATION","ACCOUNT_NOTIFICATIONS","CUSTOMER_CARE","CHARITY_NONPROFIT","DELIVERY_NOTIFICATIONS","FRAUD_ALERT_MESSAGING","EVENTS","HIGHER_EDUCATION","K12","MARKETING","POLLING_AND_VOTING_NON_POLITICAL","POLITICAL_ELECTION_CAMPAIGNS","PUBLIC_SERVICE_ANNOUNCEMENT","SECURITY_ALERT"]},"TollfreeVerificationResponse":{"properties":{"phone_number_id":{"type":"string","title":"Phone Number Id","description":"Toll-free number being verified."},"status":{"$ref":"#/components/schemas/TollfreeVerificationStatus","description":"Current verification status; approved is terminal."},"business_name":{"type":"string","title":"Business Name","description":"Business name submitted for verification."},"business_website":{"type":"string","title":"Business Website","description":"Business website submitted for verification."},"business_type":{"$ref":"#/components/schemas/TollfreeBusinessType","description":"Legal structure of the business."},"business_registration_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Registration Number","description":"Business registration number; NULL only for SOLE_PROPRIETOR."},"business_registration_authority":{"anyOf":[{"$ref":"#/components/schemas/TollfreeBusinessRegistrationAuthority"},{"type":"null"}],"description":"Issuing authority; NULL for SOLE_PROPRIETOR."},"business_registration_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Registration Country","description":"ISO 3166-1 alpha-2 country of registration; NULL for SOLE_PROPRIETOR."},"use_case_categories":{"items":{"$ref":"#/components/schemas/TollfreeUseCaseCategory"},"type":"array","title":"Use Case Categories","description":"Categories describing the planned SMS traffic."},"use_case_summary":{"type":"string","title":"Use Case Summary","description":"Summary of how the toll-free number will be used."},"production_message_sample":{"type":"string","title":"Production Message Sample","description":"Example message submitted for review."},"opt_in_proof_filenames":{"items":{"type":"string"},"type":"array","title":"Opt In Proof Filenames","description":"Uploaded opt-in proof image filenames; public URLs are derived\nserver-side and not exposed here."},"opt_in_type":{"$ref":"#/components/schemas/TollfreeOptInType","description":"Method recipients use to consent to messages."},"opt_in_confirmation_message":{"type":"string","title":"Opt In Confirmation Message","description":"SMS sent to confirm a recipient's opt-in."},"message_volume":{"$ref":"#/components/schemas/TollfreeMessageVolume","description":"Expected monthly messaging volume."},"additional_information":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Information","description":"Additional information supplied to the reviewer, if any."},"privacy_policy_url":{"type":"string","title":"Privacy Policy Url","description":"Business's privacy policy URL."},"terms_and_conditions_url":{"type":"string","title":"Terms And Conditions Url","description":"Business's terms and conditions URL."},"age_gated_content":{"type":"boolean","title":"Age Gated Content","description":"Whether the campaign carries age-gated content."},"rejection_reasons":{"anyOf":[{"items":{"$ref":"#/components/schemas/TollfreeRejectionReasonDict"},"type":"array"},{"type":"null"}],"title":"Rejection Reasons","description":"Populated when TWILIO_REJECTED: {code, description} entries resolved from\nthe rejection event's error codes."},"edit_allowed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Edit Allowed","description":"Whether a rejected verification can be edited before resubmission; null otherwise."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this toll-free verification was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this toll-free verification was last changed."}},"type":"object","required":["phone_number_id","status","business_name","business_website","business_type","business_registration_number","business_registration_authority","business_registration_country","use_case_categories","use_case_summary","production_message_sample","opt_in_proof_filenames","opt_in_type","opt_in_confirmation_message","message_volume","additional_information","privacy_policy_url","terms_and_conditions_url","age_gated_content","rejection_reasons","edit_allowed","created_at","updated_at"],"title":"TollfreeVerificationResponse","description":"Toll-Free Verification attached to a phone number."},"TollfreeVerificationStatus":{"type":"string","enum":["pending-review","in-review","twilio-approved","twilio-rejected"],"title":"TollfreeVerificationStatus","description":"TFV status, distinct from SetupStepStatus (its own Twilio product,\nEvent-Streams-delivered). Transitions are inferred from the CloudEvent type,\nnever from a `verificationstatus` payload field."},"TwilioA2PCampaignError":{"properties":{"code":{"type":"integer","title":"Code","description":"Twilio campaign-registration error code."},"description":{"type":"string","title":"Description","description":"Explanation of the campaign error."}},"type":"object","required":["code","description"],"title":"TwilioA2PCampaignError","description":"Entry in the campaign-failure event's `campaignregistrationerrors`,\nprojected to `{code, description}`. Field names are our projection, NOT the\nwire shape — a deliberate divergence from `A2PBrandRegistrationError` (this\ncolumn is read often, e.g. the NON_REMEDIABLE_CAMPAIGN_ERROR_CODES gate)."},"TwilioA2PCampaignStatus":{"type":"string","enum":["IN_PROGRESS","VERIFIED","FAILED","SUSPENDED"],"title":"TwilioA2PCampaignStatus","description":"A2P 10DLC campaign-registration lifecycle, driven by Event Streams.\nSUSPENDED has no automated setter (reserved for future send-time-error\nreconciliation)."},"TwilioInboundVoiceUseCaseRequest":{"properties":{"entity_name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Entity Name","description":"Business entity name; unique together with the use-case name."},"name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment stage this use case targets. Required; immutable after create."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets. Required; immutable after create."},"channel":{"type":"string","const":"inbound_voice","title":"Channel","description":"Always \"inbound_voice\" for this variant."},"twilio_setup_id":{"type":"string","format":"uuid","title":"Twilio Setup Id","description":"Twilio setup with an approved customer profile."},"inbound_voice_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Inbound Voice Url","description":"URL that receives calls to numbers assigned to this use case."},"fallback_forwarding_number":{"anyOf":[{"type":"string","format":"phone"},{"type":"null"}],"title":"Fallback Forwarding Number","description":"E.164 that calls forward to when inbound_voice_url errors or times out."},"webhook_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Webhook Url","description":"Where channel-manager posts this call's lifecycle events. Omitted/NULL leaves\nthe use case un-orchestrated — its voice_url still points at an external framework."},"allowed_forwarding_numbers":{"items":{"type":"string","format":"phone"},"type":"array","maxItems":150,"title":"Allowed Forwarding Numbers","description":"E.164 numbers a live call may be forwarded / transferred to; an empty list denies all\nforwarding. Required — the caller commits the forwarding policy at create."}},"type":"object","required":["entity_name","name","environment","region","channel","twilio_setup_id","inbound_voice_url","allowed_forwarding_numbers"],"title":"TwilioInboundVoiceUseCaseRequest","description":"Request body for the Twilio inbound voice channel."},"TwilioInboundVoiceUseCaseUpdateRequest":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description. Supply `null` to clear it, omit to leave it\nunchanged."},"channel":{"type":"string","const":"inbound_voice","title":"Channel","description":"Use-case channel; always `inbound_voice`."},"inbound_voice_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Inbound Voice Url","description":"Replacement URL for calls to assigned numbers, when provided."},"fallback_forwarding_number":{"anyOf":[{"type":"string","format":"phone"},{"type":"null"}],"title":"Fallback Forwarding Number","description":"E.164 that calls forward to when inbound_voice_url fails; `null` removes it."},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"Lifecycle-event destination; the opt-in to CM orchestration. Not clearable."},"allowed_forwarding_numbers":{"items":{"type":"string","format":"phone"},"type":"array","maxItems":150,"title":"Allowed Forwarding Numbers","description":"Replace the forwarding allowlist wholesale (see create); omit to leave unchanged."}},"type":"object","required":["channel"],"title":"TwilioInboundVoiceUseCaseUpdateRequest"},"TwilioNumberType":{"type":"string","enum":["local","mobile","toll-free","national"]},"TwilioOutboundVoiceUseCaseRequest":{"properties":{"entity_name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Entity Name","description":"Business entity name; unique together with the use-case name."},"name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment stage this use case targets. Required; immutable after create."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets. Required; immutable after create."},"channel":{"type":"string","const":"outbound_voice","title":"Channel","description":"Always \"outbound_voice\" for this variant."},"twilio_setup_id":{"type":"string","format":"uuid","title":"Twilio Setup Id","description":"Twilio setup with an approved customer profile."},"webhook_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Webhook Url","description":"Where channel-manager posts this call's lifecycle events. Omitted/NULL leaves\nthe use case un-orchestrated — the framework drives Twilio itself."},"allowed_forwarding_numbers":{"items":{"type":"string","format":"phone"},"type":"array","maxItems":150,"title":"Allowed Forwarding Numbers","description":"E.164 numbers a live call may be forwarded / transferred to; an empty list denies all\nforwarding. Required — the caller commits the forwarding policy at create."}},"type":"object","required":["entity_name","name","environment","region","channel","twilio_setup_id","allowed_forwarding_numbers"],"title":"TwilioOutboundVoiceUseCaseRequest","description":"Request body for the Twilio outbound voice channel."},"TwilioOutboundVoiceUseCaseUpdateRequest":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description. Supply `null` to clear it, omit to leave it\nunchanged."},"channel":{"type":"string","const":"outbound_voice","title":"Channel","description":"Use-case channel; always `outbound_voice`."},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"Lifecycle-event destination; the opt-in to CM orchestration. Not clearable."},"allowed_forwarding_numbers":{"items":{"type":"string","format":"phone"},"type":"array","maxItems":150,"title":"Allowed Forwarding Numbers","description":"Replace the forwarding allowlist wholesale (see create); omit to leave unchanged."}},"type":"object","required":["channel"],"title":"TwilioOutboundVoiceUseCaseUpdateRequest"},"TwilioPhoneNumberCapability":{"type":"string","enum":["voice","sms","mms"]},"TwilioPhoneNumberResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of this phone number."},"setup_id":{"type":"string","title":"Setup Id","description":"Twilio setup that owns this phone number."},"use_case_ids":{"items":{"type":"string"},"type":"array","title":"Use Case Ids","description":"Voice and SMS use cases assigned to this number; empty when unassigned."},"phone_number":{"type":"string","title":"Phone Number","description":"E.164 phone number."},"country":{"type":"string","title":"Country","description":"ISO 3166-1 alpha-2 country code."},"number_type":{"$ref":"#/components/schemas/TwilioNumberType","description":"Phone number type — local, mobile, toll-free, or national."},"capabilities":{"items":{"$ref":"#/components/schemas/TwilioPhoneNumberCapability"},"type":"array","title":"Capabilities","description":"Capabilities reported by Twilio for this phone number."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this phone number was created."}},"type":"object","required":["id","setup_id","use_case_ids","phone_number","country","number_type","capabilities","created_at"],"title":"TwilioPhoneNumberResponse"},"TwilioSetupBundleResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of this bundle."},"setup_id":{"type":"string","title":"Setup Id","description":"Twilio setup that owns this bundle."},"bundle_kind":{"$ref":"#/components/schemas/BundleKind","description":"Which kind of bundle this is (shaken_stir, cnam, a2p_messaging_profile, or\nregulatory), derived from the underlying Twilio policy."},"status":{"$ref":"#/components/schemas/SetupStepStatus","description":"Current verification status."},"entities":{"items":{"oneOf":[{"$ref":"#/components/schemas/EndUserEntity"},{"$ref":"#/components/schemas/SupportingDocumentEntity"}],"discriminator":{"propertyName":"entity_kind","mapping":{"end_user":"#/components/schemas/EndUserEntity","supporting_document":"#/components/schemas/SupportingDocumentEntity"}}},"type":"array","title":"Entities","description":"The EndUser / SupportingDocument attributes we submitted for this bundle."},"last_failure":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Last Failure","description":"Human-readable failure strings from the latest noncompliant eval or\nwebhook rejection. NULL when healthy."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this bundle was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this bundle was last changed."}},"type":"object","required":["id","setup_id","bundle_kind","status","entities","created_at","updated_at"],"title":"TwilioSetupBundleResponse","description":"Single Trust Hub trust product / regulatory bundle attached to a setup."},"TwilioSetupResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of this Twilio setup."},"friendly_name":{"type":"string","title":"Friendly Name","description":"Human-readable label for this Twilio setup."},"customer_profile":{"$ref":"#/components/schemas/CustomerProfileStatusDetail","description":"Trust Hub customer profile state. Bundle state lives at GET /bundle."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this Twilio setup was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this Twilio setup was last changed."}},"type":"object","required":["id","friendly_name","customer_profile","created_at","updated_at"],"title":"TwilioSetupResponse","description":"Response for a single Twilio setup. Returned by create, get, update, and list."},"TwilioSmsUseCaseRequest":{"properties":{"entity_name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Entity Name","description":"Business entity name; unique together with the use-case name."},"name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment stage this use case targets. Required; immutable after create."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets. Required; immutable after create."},"channel":{"type":"string","const":"sms","title":"Channel","description":"Always \"sms\" for this variant."},"twilio_setup_id":{"type":"string","format":"uuid","title":"Twilio Setup Id","description":"Twilio setup with an approved customer profile."},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"Destination for inbound SMS and MMS messages."}},"type":"object","required":["entity_name","name","environment","region","channel","twilio_setup_id","webhook_url"],"title":"TwilioSmsUseCaseRequest","description":"Request body for the Twilio SMS channel."},"TwilioSmsUseCaseUpdateRequest":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description. Supply `null` to clear it, omit to leave it\nunchanged."},"channel":{"type":"string","const":"sms","title":"Channel","description":"Use-case channel; always `sms`."},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"New destination for inbound SMS and MMS; omit to leave unchanged."}},"type":"object","required":["channel"],"title":"TwilioSmsUseCaseUpdateRequest"},"UseCaseResponse":{"oneOf":[{"$ref":"#/components/schemas/src__routes__use_case__response__TwilioInboundVoiceUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__response__TwilioOutboundVoiceUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__response__TwilioSmsUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__response__EmailUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__response__SendBlueUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__response__WhatsAppUseCaseResponse"}],"discriminator":{"propertyName":"channel","mapping":{"email":"#/components/schemas/src__routes__use_case__response__EmailUseCaseResponse","imessage":"#/components/schemas/src__routes__use_case__response__SendBlueUseCaseResponse","inbound_voice":"#/components/schemas/src__routes__use_case__response__TwilioInboundVoiceUseCaseResponse","outbound_voice":"#/components/schemas/src__routes__use_case__response__TwilioOutboundVoiceUseCaseResponse","sms":"#/components/schemas/src__routes__use_case__response__TwilioSmsUseCaseResponse","whatsapp":"#/components/schemas/src__routes__use_case__response__WhatsAppUseCaseResponse"}}},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoMessageRequest":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"WhatsApp use case whose business number sends the message."},"to_bsuid":{"type":"string","maxLength":130,"minLength":3,"title":"To Bsuid","description":"Recipient's business-scoped WhatsApp user ID."},"message_type":{"type":"string","const":"video","title":"Message Type","description":"WhatsApp message type; always `video`."},"media_attachment":{"type":"string","contentMediaType":"application/octet-stream","title":"Media Attachment","description":"MP4 or 3GPP video under 16 MB."},"message":{"anyOf":[{"type":"string","maxLength":1024,"minLength":1},{"type":"null"}],"title":"Message","description":"Optional video caption."},"target_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Message Id","description":"Message to reply to, if any."}},"type":"object","required":["use_case_id","to_bsuid","message_type","media_attachment"],"title":"VideoMessageRequest"},"VoiceAmdResult":{"type":"string","enum":["human","fax","unknown","machine_start","machine_end_beep","machine_end_silence","machine_end_other"],"title":"VoiceAmdResult","description":"Twilio AMD AnsweredBy verdict; the machine_end_* variants need DetectMessageEnd."},"VoiceCallDirection":{"type":"string","enum":["inbound","outbound"],"title":"VoiceCallDirection"},"VoiceDialStatus":{"type":"string","enum":["answered","no_answer","busy","failed"],"title":"VoiceDialStatus","description":"Terminal outcome of a dial leg (our vocabulary, not Twilio's CallStatus).\nThe human/machine verdict is answered_by — an AMD machine leg still `answered`."},"VoiceParticipantKind":{"type":"string","enum":["inbound","dial","media"],"title":"VoiceParticipantKind","description":"How a leg came to be in the conference — NOT who it is (that is role)."},"VoiceParticipantRole":{"type":"string","enum":["caller","agent","operator","transfer_target","callee"],"title":"VoiceParticipantRole"},"WhatsAppTemplateCategory":{"type":"string","enum":["marketing","utility"]},"WhatsAppUseCaseRequest":{"properties":{"entity_name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Entity Name","description":"Business entity name; unique together with the use-case name."},"name":{"type":"string","maxLength":31,"minLength":1,"pattern":"^[A-Za-z\\- ]+$","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment stage this use case targets. Required; immutable after create."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets. Required; immutable after create."},"channel":{"type":"string","const":"whatsapp","title":"Channel","description":"Use-case channel; always `whatsapp`."},"whatsapp_setup_id":{"type":"string","format":"uuid","title":"Whatsapp Setup Id","description":"WhatsApp setup that owns the phone number."},"phone_number_id":{"type":"string","maxLength":16,"minLength":16,"pattern":"^\\d+$","title":"Phone Number Id","description":"Meta identifier of the phone number to register."},"phone_number_pin":{"type":"string","maxLength":6,"minLength":6,"pattern":"^\\d+$","title":"Phone Number Pin","description":"Six-digit PIN for registering the phone number."},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"Destination for inbound WhatsApp messages."}},"type":"object","required":["entity_name","name","environment","region","channel","whatsapp_setup_id","phone_number_id","phone_number_pin","webhook_url"],"title":"WhatsAppUseCaseRequest"},"WhatsAppUseCaseUpdateRequest":{"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Free-text description. Supply `null` to clear it, omit to leave it\nunchanged."},"channel":{"type":"string","const":"whatsapp","title":"Channel","description":"Use-case channel; always `whatsapp`."},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url","description":"New destination for inbound WhatsApp messages; omit to leave unchanged."}},"type":"object","required":["channel"],"title":"WhatsAppUseCaseUpdateRequest"},"src__routes__auth__create_oauth2_client__Request":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9 _-]+$","title":"Name","description":"Display name for the client."},"description":{"type":"string","maxLength":256,"minLength":1,"title":"Description","description":"Human-readable purpose of the client."},"granted_scopes":{"items":{"type":"string"},"type":"array","minItems":1,"uniqueItems":true,"title":"Granted Scopes","description":"Scopes the client may request; wildcard patterns are allowed."},"allowed_setup_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","uniqueItems":true},{"prefixItems":[{"type":"string","const":"*"}],"type":"array","maxItems":1,"minItems":1}],"minLength":1,"title":"Allowed Setup Ids","description":"Setup IDs the client may access, or `*` for all setups."}},"type":"object","required":["name","description","granted_scopes","allowed_setup_ids"],"title":"Request"},"src__routes__auth__create_oauth2_client__Response":{"properties":{"client_id":{"type":"string","format":"uuid","title":"Client Id","description":"Identifier to use when requesting tokens."},"client_secret":{"type":"string","title":"Client Secret","description":"The raw secret — returned ONCE here and never again. Store it now."},"name":{"type":"string","title":"Name","description":"Display name of the client."},"description":{"type":"string","title":"Description","description":"Human-readable purpose of the client."},"granted_scopes":{"items":{"type":"string"},"type":"array","title":"Granted Scopes","description":"Scopes the client may request."},"allowed_setup_ids":{"items":{"type":"string"},"type":"array","title":"Allowed Setup Ids","description":"Setup IDs the client may access, or `*` for all setups."}},"type":"object","required":["client_id","client_secret","name","description","granted_scopes","allowed_setup_ids"],"title":"Response"},"src__routes__auth__get_token__Request":{"properties":{"grant_type":{"type":"string","const":"client_credentials","title":"Grant Type","description":"OAuth2 grant type; must be `client_credentials`."},"scope":{"type":"string","title":"Scope","description":"Space-delimited requested scopes (RFC 6749 §3.3); down-scoped to the grant."},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id","description":"Client identifier when authenticating through form fields."},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret","description":"Client secret when authenticating through form fields."}},"type":"object","required":["grant_type","scope"],"title":"Request"},"src__routes__auth__get_token__Response":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"Bearer token for authenticated API requests."},"token_type":{"type":"string","const":"bearer","title":"Token Type","description":"Token scheme; always `bearer`."},"expires_in":{"type":"integer","title":"Expires In","description":"Number of seconds until the token expires."},"scope":{"type":"string","title":"Scope","description":"Space-delimited scopes granted to this token."}},"type":"object","required":["access_token","token_type","expires_in","scope"],"title":"Response"},"src__routes__auth__rotate_oauth2_client_secret__Response":{"properties":{"client_secret":{"type":"string","title":"Client Secret","description":"The new raw secret — returned ONCE here and never again. Store it now."}},"type":"object","required":["client_secret"],"title":"Response"},"src__routes__auth__update_oauth2_client__Request":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9 _-]+$","title":"Name","description":"New display name when provided."},"description":{"type":"string","maxLength":256,"minLength":1,"title":"Description","description":"New human-readable purpose when provided."},"granted_scopes":{"items":{"type":"string"},"type":"array","minItems":1,"uniqueItems":true,"title":"Granted Scopes","description":"Replacement scopes; wildcard patterns are allowed."},"allowed_setup_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","uniqueItems":true},{"prefixItems":[{"type":"string","const":"*"}],"type":"array","maxItems":1,"minItems":1}],"minLength":1,"title":"Allowed Setup Ids","description":"Replacement setup IDs, or `*` for all setups."}},"type":"object","title":"Request"},"src__routes__auth__update_oauth2_client__Response":{"properties":{"client_id":{"type":"string","format":"uuid","title":"Client Id","description":"Identifier of the updated client."},"name":{"type":"string","title":"Name","description":"Display name of the client."},"description":{"type":"string","title":"Description","description":"Human-readable purpose of the client."},"granted_scopes":{"items":{"type":"string"},"type":"array","title":"Granted Scopes","description":"Scopes the client may request."},"allowed_setup_ids":{"items":{"type":"string"},"type":"array","title":"Allowed Setup Ids","description":"Setup IDs the client may access, or `*` for all setups."}},"type":"object","required":["client_id","name","description","granted_scopes","allowed_setup_ids"],"title":"Response"},"src__routes__email__create_email_template__Request":{"properties":{"ses_use_case_id":{"type":"string","format":"uuid","title":"Ses Use Case Id","description":"Email use case that owns this template."},"name":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9 _-]+$","title":"Name","description":"Name unique within the email use case."},"description":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1},{"type":"null"}],"title":"Description","description":"Optional description of the template's purpose."},"subject_template":{"type":"string","maxLength":256,"minLength":1,"title":"Subject Template","description":"Jinja template for the email subject."},"body_template":{"type":"string","maxLength":1000000,"minLength":1,"title":"Body Template","description":"Jinja template for the email body."}},"type":"object","required":["ses_use_case_id","name","description","subject_template","body_template"],"title":"Request"},"src__routes__email__create_email_template__Response":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the template."},"name":{"type":"string","title":"Name","description":"Name of the template."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of the template's purpose."},"ses_use_case_id":{"type":"string","format":"uuid","title":"Ses Use Case Id","description":"Email use case that owns this template."},"subject_template":{"type":"string","title":"Subject Template","description":"Jinja template for the email subject."},"body_template":{"type":"string","title":"Body Template","description":"Jinja template for the email body."},"required_subject_variables":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Required Subject Variables","description":"Variables the caller must provide for the subject."},"required_body_variables":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Required Body Variables","description":"Variables the caller must provide for the body."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the template was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the template was last changed."}},"type":"object","required":["id","name","description","ses_use_case_id","subject_template","body_template","required_subject_variables","required_body_variables","created_at","updated_at"],"title":"Response"},"src__routes__email__get_email__Response":{"oneOf":[{"$ref":"#/components/schemas/InboundEmailResponse"},{"$ref":"#/components/schemas/OutboundEmailResponse"}],"discriminator":{"propertyName":"direction","mapping":{"inbound":"#/components/schemas/InboundEmailResponse","outbound":"#/components/schemas/OutboundEmailResponse"}}},"src__routes__email__get_email_template__Response":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the template."},"name":{"type":"string","title":"Name","description":"Name of the template."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of the template's purpose."},"ses_use_case_id":{"type":"string","format":"uuid","title":"Ses Use Case Id","description":"Email use case that owns this template."},"subject_template":{"type":"string","title":"Subject Template","description":"Jinja template for the email subject."},"body_template":{"type":"string","title":"Body Template","description":"Jinja template for the email body."},"required_subject_variables":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Required Subject Variables","description":"Variables the caller must provide for the subject."},"required_body_variables":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Required Body Variables","description":"Variables the caller must provide for the body."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the template was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the template was last changed."}},"type":"object","required":["id","name","description","ses_use_case_id","subject_template","body_template","required_subject_variables","required_body_variables","created_at","updated_at"],"title":"Response"},"src__routes__email__list_email_events__Response":{"properties":{"items":{"items":{"$ref":"#/components/schemas/src__routes__email__list_email_events__Response__Item"},"type":"array","title":"Items","description":"The events matching the request filters."},"has_more":{"type":"boolean","title":"Has More","description":"Whether there are more events to retrieve."},"continuation_token":{"title":"Continuation Token","description":"Opaque token to pass back on the next page request; null when no more results."}},"type":"object","required":["items","has_more"],"title":"Response"},"src__routes__email__list_email_events__Response__Item":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the email event."},"email_id":{"type":"string","format":"uuid","title":"Email Id","description":"The email this event was projected onto."},"event_type":{"$ref":"#/components/schemas/EventType","description":"The SES event type."},"event_at":{"type":"string","format":"date-time","title":"Event At","description":"Vendor-supplied timestamp from the SES event body."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this event became available through the API."}},"type":"object","required":["id","email_id","event_type","event_at","created_at"],"title":"Item"},"src__routes__email__list_email_events___SortField":{"type":"string","const":"event_at"},"src__routes__email__list_email_templates__Response":{"properties":{"email_templates":{"items":{"$ref":"#/components/schemas/EmailTemplateItem"},"type":"array","title":"Email Templates","description":"Templates owned by the requested email use case."}},"type":"object","required":["email_templates"],"title":"Response"},"src__routes__email__list_emails__Response":{"properties":{"items":{"items":{"oneOf":[{"$ref":"#/components/schemas/OutboundEmailItem"},{"$ref":"#/components/schemas/InboundEmailItem"}],"discriminator":{"propertyName":"direction","mapping":{"inbound":"#/components/schemas/InboundEmailItem","outbound":"#/components/schemas/OutboundEmailItem"}}},"type":"array","title":"Items","description":"The emails matching the request filters, inbound + outbound interleaved\nunless `direction` was supplied."},"has_more":{"type":"boolean","title":"Has More","description":"Whether there are more emails to retrieve."},"continuation_token":{"title":"Continuation Token","description":"Opaque token to pass back on the next page request. Null when\nthere are no more results."}},"type":"object","required":["items","has_more","continuation_token"],"title":"Response"},"src__routes__email__list_emails___SortField":{"type":"string","const":"created_at"},"src__routes__email__send_email__Response":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the sent email."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the email was sent."},"attachment_filenames":{"items":{"type":"string"},"type":"array","title":"Attachment Filenames","description":"Attachment filenames in send order."},"replied_to_inbound_email_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Replied To Inbound Email Id","description":"Received email this message replies to, if any."}},"type":"object","required":["id","created_at","attachment_filenames","replied_to_inbound_email_id"],"title":"Response"},"src__routes__email__update_email_template__Request":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9 _-]+$","title":"Name","description":"Replacement name when provided."},"description":{"anyOf":[{"type":"string","maxLength":4096,"minLength":1},{"type":"null"}],"title":"Description","description":"Replacement description; null clears it."},"subject_template":{"type":"string","maxLength":256,"minLength":1,"title":"Subject Template","description":"Replacement Jinja subject template."},"body_template":{"type":"string","maxLength":1000000,"minLength":1,"title":"Body Template","description":"Replacement Jinja body template."}},"type":"object","title":"Request"},"src__routes__email__update_email_template__Response":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the template."},"name":{"type":"string","title":"Name","description":"Name of the template."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of the template's purpose."},"ses_use_case_id":{"type":"string","format":"uuid","title":"Ses Use Case Id","description":"Email use case that owns this template."},"subject_template":{"type":"string","title":"Subject Template","description":"Jinja template for the email subject."},"body_template":{"type":"string","title":"Body Template","description":"Jinja template for the email body."},"required_subject_variables":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Required Subject Variables","description":"Variables the caller must provide for the subject."},"required_body_variables":{"items":{"type":"string"},"type":"array","uniqueItems":true,"title":"Required Body Variables","description":"Variables the caller must provide for the body."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the template was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the template was last changed."}},"type":"object","required":["id","name","description","ses_use_case_id","subject_template","body_template","required_subject_variables","required_body_variables","created_at","updated_at"],"title":"Response"},"src__routes__imessage__list_messages__Response":{"properties":{"items":{"items":{"oneOf":[{"$ref":"#/components/schemas/src__routes__imessage__messages__InboundMessage"},{"$ref":"#/components/schemas/src__routes__imessage__messages__OutboundMessage"}],"discriminator":{"propertyName":"direction","mapping":{"inbound":"#/components/schemas/src__routes__imessage__messages__InboundMessage","outbound":"#/components/schemas/src__routes__imessage__messages__OutboundMessage"}}},"type":"array","title":"Items","description":"Matching messages, newest first; both directions unless filtered."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page of messages is available."},"continuation_token":{"title":"Continuation Token","description":"Opaque token to pass back on the next page request. Null when there are no more results."}},"type":"object","required":["items","has_more"],"title":"Response"},"src__routes__imessage__list_messages___SortField":{"type":"string","const":"occurred_at"},"src__routes__imessage__messages__InboundMessage":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Message identifier."},"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"Use case associated with the message."},"from_number":{"type":"string","title":"From Number","description":"Sender's E.164 phone number."},"to_number":{"type":"string","title":"To Number","description":"Recipient's E.164 phone number."},"content":{"type":"string","title":"Content","description":"Text content. Empty string for media-only messages."},"has_media":{"type":"boolean","title":"Has Media","description":"Whether the message has media available at `GET /v1/imessage/{id}/media`."},"service":{"anyOf":[{"$ref":"#/components/schemas/SendBlueMessageService"},{"type":"null"}],"description":"Messaging service used, if known."},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At","description":"When sending was requested or the inbound message was received."},"direction":{"type":"string","const":"inbound","title":"Direction","description":"Message direction; always `inbound`.","default":"inbound"}},"type":"object","required":["id","use_case_id","from_number","to_number","content","has_media","service","occurred_at"],"title":"InboundMessage","description":"A received iMessage."},"src__routes__imessage__messages__OutboundMessage":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Message identifier."},"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"Use case associated with the message."},"from_number":{"type":"string","title":"From Number","description":"Sender's E.164 phone number."},"to_number":{"type":"string","title":"To Number","description":"Recipient's E.164 phone number."},"content":{"type":"string","title":"Content","description":"Text content. Empty string for media-only messages."},"has_media":{"type":"boolean","title":"Has Media","description":"Whether the message has media available at `GET /v1/imessage/{id}/media`."},"service":{"anyOf":[{"$ref":"#/components/schemas/SendBlueMessageService"},{"type":"null"}],"description":"Messaging service used, if known."},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At","description":"When sending was requested or the inbound message was received."},"direction":{"type":"string","const":"outbound","title":"Direction","description":"Message direction; always `outbound`.","default":"outbound"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At","description":"When the provider reported the message sent or delivered, if available."},"errored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Errored At","description":"When delivery failure was reported, if any."},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Provider's failure description, if any."},"was_downgraded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Was Downgraded","description":"Whether the message was sent as SMS instead, if known."},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At","description":"When the provider sent the message, if available."}},"type":"object","required":["id","use_case_id","from_number","to_number","content","has_media","service","occurred_at","delivered_at","errored_at","error_message","was_downgraded","sent_at"],"title":"OutboundMessage","description":"A sent iMessage with its delivery outcome."},"src__routes__outbound_voice__select_outbound_voice_phone_number__Request":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"Top-level use case to pick a sender for; must be outbound_voice."}},"type":"object","required":["use_case_id"],"title":"Request"},"src__routes__sendblue__create_sendblue_setup__Request":{"properties":{"friendly_name":{"type":"string","maxLength":256,"minLength":1,"title":"Friendly Name","description":"Operator-facing label for this subaccount."},"company_name":{"type":"string","maxLength":256,"minLength":1,"title":"Company Name","description":"Name passed to SendBlue when creating the child account. SendBlue\nauto-prefixes the parent-account email at creation time, so the value\nwe read back on `subaccount_company_name` is `<parent-email>-<name>`."}},"type":"object","required":["friendly_name","company_name"],"title":"Request","description":"Request body for POST /v1/sendblue-setup."},"src__routes__sendblue__list_phone_numbers__Response":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SendBluePhoneNumberResponse"},"type":"array","title":"Items","description":"Phone lines matching the requested status filter."}},"type":"object","required":["items"],"title":"Response","description":"Every line under the setup matching the requested status filter."},"src__routes__ses_setup__create_ses_setup__Request":{"properties":{"tenant_name":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","title":"Tenant Name","description":"SES tenant name, unique within the AWS account."},"domain_identity":{"type":"string","title":"Domain Identity","description":"Domain for sending and receiving; normalized to lowercase IDNA."}},"type":"object","required":["tenant_name","domain_identity"],"title":"Request"},"src__routes__sms__get_sms_message__InboundMessage":{"properties":{"direction":{"type":"string","const":"inbound","title":"Direction","description":"Message direction; always `inbound`.","default":"inbound"},"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the message."},"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"SMS use case that received this message."},"from_number":{"type":"string","title":"From Number","description":"Sender phone number."},"to_number":{"type":"string","title":"To Number","description":"Receiving phone number."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Text content, or null for a media-only MMS."},"num_segments":{"type":"integer","title":"Num Segments","description":"Number of text segments in the received message."},"attachment_names":{"items":{"type":"string"},"type":"array","title":"Attachment Names","description":"Names of the message's MMS attachments."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this SMS or MMS message was created."}},"type":"object","required":["id","use_case_id","from_number","to_number","body","num_segments","attachment_names","created_at"],"title":"InboundMessage"},"src__routes__sms__get_sms_message__OutboundMessage":{"properties":{"direction":{"type":"string","const":"outbound","title":"Direction","description":"Message direction; always `outbound`.","default":"outbound"},"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the message."},"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"SMS use case used to send this message."},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number","description":"Sender number, once the sending line is known."},"to_number":{"type":"string","title":"To Number","description":"Recipient phone number."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Text content, or null for a media-only MMS."},"num_segments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Segments","description":"Number of segments the message was split into; null until the message is sent."},"status":{"$ref":"#/components/schemas/SmsStatus","description":"Current delivery status."},"attachment_names":{"items":{"type":"string"},"type":"array","title":"Attachment Names","description":"Names of the message's MMS attachments."},"handed_off_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Handed Off At","description":"When the message was handed off to the carrier, if it has been."},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At","description":"When delivery was confirmed, if available."},"errored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Errored At","description":"When a send or delivery failure was reported, if any."},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Why the message failed, if it failed and the reason is known."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this SMS or MMS message was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this SMS or MMS message was last changed."}},"type":"object","required":["id","use_case_id","from_number","to_number","body","num_segments","status","attachment_names","handed_off_at","delivered_at","errored_at","error_message","created_at","updated_at"],"title":"OutboundMessage"},"src__routes__sms__get_sms_message__Response":{"oneOf":[{"$ref":"#/components/schemas/src__routes__sms__get_sms_message__OutboundMessage"},{"$ref":"#/components/schemas/src__routes__sms__get_sms_message__InboundMessage"}],"discriminator":{"propertyName":"direction","mapping":{"inbound":"#/components/schemas/src__routes__sms__get_sms_message__InboundMessage","outbound":"#/components/schemas/src__routes__sms__get_sms_message__OutboundMessage"}}},"src__routes__sms__list_sms_messages__Response":{"properties":{"items":{"items":{"oneOf":[{"$ref":"#/components/schemas/src__routes__sms__list_sms_messages__Response__OutboundMessage"},{"$ref":"#/components/schemas/src__routes__sms__list_sms_messages__Response__InboundMessage"}],"discriminator":{"propertyName":"direction","mapping":{"inbound":"#/components/schemas/src__routes__sms__list_sms_messages__Response__InboundMessage","outbound":"#/components/schemas/src__routes__sms__list_sms_messages__Response__OutboundMessage"}}},"type":"array","title":"Items","description":"Messages matching the requested filters."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page of results is available."},"continuation_token":{"title":"Continuation Token","description":"Opaque token for the next page, or null when complete."}},"type":"object","required":["items","has_more","continuation_token"],"title":"Response"},"src__routes__sms__list_sms_messages__Response__InboundMessage":{"properties":{"direction":{"type":"string","const":"inbound","title":"Direction","description":"Message direction; always `inbound`.","default":"inbound"},"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the message."},"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"SMS use case that received this message."},"from_number":{"type":"string","title":"From Number","description":"Sender phone number."},"to_number":{"type":"string","title":"To Number","description":"Receiving phone number."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Text content, or null for a media-only MMS."},"num_segments":{"type":"integer","title":"Num Segments","description":"Number of text segments in the received message."},"num_attachments":{"type":"integer","title":"Num Attachments","description":"Number of MMS attachments."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this SMS or MMS message was created."}},"type":"object","required":["id","use_case_id","from_number","to_number","body","num_segments","num_attachments","created_at"],"title":"InboundMessage"},"src__routes__sms__list_sms_messages__Response__OutboundMessage":{"properties":{"direction":{"type":"string","const":"outbound","title":"Direction","description":"Message direction; always `outbound`.","default":"outbound"},"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the message."},"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"SMS use case used to send this message."},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number","description":"Sender number, once the sending line is known."},"to_number":{"type":"string","title":"To Number","description":"Recipient phone number."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Text content, or null for a media-only MMS."},"num_segments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Segments","description":"Number of segments the message was split into; null until the message is sent."},"status":{"$ref":"#/components/schemas/SmsStatus","description":"Current delivery status."},"num_attachments":{"type":"integer","title":"Num Attachments","description":"Number of MMS attachments."},"handed_off_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Handed Off At","description":"When the message was handed off to the carrier, if it has been."},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At","description":"When delivery was confirmed, if available."},"errored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Errored At","description":"When a send or delivery failure was reported, if any."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this SMS or MMS message was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this SMS or MMS message was last changed."}},"type":"object","required":["id","use_case_id","from_number","to_number","body","num_segments","status","num_attachments","handed_off_at","delivered_at","errored_at","created_at","updated_at"],"title":"OutboundMessage"},"src__routes__sms__list_sms_setup_opt_outs__Response":{"properties":{"items":{"items":{"$ref":"#/components/schemas/src__routes__sms__list_sms_setup_opt_outs__Response__Item"},"type":"array","title":"Items","description":"Opt-outs matching the requested filters."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page of results is available."},"continuation_token":{"title":"Continuation Token","description":"Opaque token for the next page, or null when complete."}},"type":"object","required":["items","has_more","continuation_token"],"title":"Response"},"src__routes__sms__list_sms_setup_opt_outs__Response__Item":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the opt-out record."},"setup_id":{"type":"string","format":"uuid","title":"Setup Id","description":"Twilio setup that must not message this recipient."},"phone_number":{"type":"string","title":"Phone Number","description":"Opted-out recipient's E.164 phone number."},"opted_out_use_case_id":{"type":"string","format":"uuid","title":"Opted Out Use Case Id","description":"The SMS use case whose inbound STOP recorded this opt-out."},"opted_out_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Opted Out Message Id","description":"The inbound message that triggered it; NULL once that message is erased."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this SMS opt-out was created."},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At","description":"Non-NULL only on a cleared opt-out (via remove-setup-opt-out)."},"delete_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delete Reason","description":"Operator justification recorded when the opt-out was cleared."}},"type":"object","required":["id","setup_id","phone_number","opted_out_use_case_id","opted_out_message_id","created_at","deleted_at","delete_reason"],"title":"Item"},"src__routes__sms__remove_sms_setup_opt_out__Request":{"properties":{"setup_id":{"type":"string","format":"uuid","title":"Setup Id","description":"Twilio setup whose opt-out is cleared."},"user_phone_number":{"type":"string","format":"phone","title":"User Phone Number","description":"Opted-out recipient's E.164 phone number."},"reason":{"type":"string","maxLength":2000,"minLength":1,"title":"Reason","description":"Required, non-empty: this is the audit record of why the STOP was reversed."}},"type":"object","required":["setup_id","user_phone_number","reason"],"title":"Request"},"src__routes__sms__send_sms_message__Response":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the sent message."},"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"SMS use case used to send this message."},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number","description":"Sender number, once the sending line is known."},"to_number":{"type":"string","title":"To Number","description":"Recipient phone number."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Text content, or null for a media-only MMS."},"num_segments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Segments","description":"Number of segments the message was split into; null until the message is sent."},"status":{"$ref":"#/components/schemas/SmsStatus","description":"Current delivery status."},"attachment_names":{"items":{"type":"string"},"type":"array","title":"Attachment Names","description":"Names of the message's MMS attachments."},"handed_off_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Handed Off At","description":"When the message was handed off to the carrier, if it has been."},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At","description":"When delivery was confirmed, if available."},"errored_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Errored At","description":"When a send or delivery failure was reported, if any."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this SMS or MMS message was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this SMS or MMS message was last changed."}},"type":"object","required":["id","use_case_id","from_number","to_number","body","num_segments","status","attachment_names","handed_off_at","delivered_at","errored_at","created_at","updated_at"],"title":"Response"},"src__routes__sms__send_sms_opt_in_message__Request":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"SMS use case whose consent message is sent."},"to_phone_number":{"type":"string","format":"phone","title":"To Phone Number","description":"Recipient's E.164 phone number."}},"type":"object","required":["use_case_id","to_phone_number"],"title":"Request"},"src__routes__twilio__create_twilio_setup__Request":{"properties":{"friendly_name":{"type":"string","maxLength":256,"minLength":1,"title":"Friendly Name","description":"Human label for this setup."},"business_name":{"type":"string","maxLength":256,"minLength":1,"title":"Business Name","description":"Legal business name as registered."},"business_type":{"$ref":"#/components/schemas/BusinessType","description":"Legal structure of the business."},"business_industry":{"$ref":"#/components/schemas/BusinessIndustry","description":"Industry vertical for Twilio Trust Hub classification."},"business_identity":{"$ref":"#/components/schemas/BusinessIdentity","description":"Relationship to Twilio (direct customer or ISV/reseller).","default":"direct_customer"},"business_registration_identifier":{"$ref":"#/components/schemas/BusinessRegistrationIdentifier","description":"Type of registration ID (e.g. EIN, DUNS, VAT)."},"business_registration_number":{"type":"string","maxLength":32,"minLength":1,"title":"Business Registration Number","description":"Registration number matching the identifier type."},"business_regions_of_operation":{"$ref":"#/components/schemas/BusinessRegion","description":"Geographic region where the business operates."},"website_url":{"type":"string","maxLength":2048,"minLength":1,"title":"Website Url","description":"Business website URL."},"business_address":{"$ref":"#/components/schemas/BusinessAddress","description":"Registered business address."},"authorized_representative":{"$ref":"#/components/schemas/AuthorizedRepresentative","description":"Person Twilio can contact for verification."}},"type":"object","required":["friendly_name","business_name","business_type","business_industry","business_registration_identifier","business_registration_number","business_regions_of_operation","website_url","business_address","authorized_representative"],"title":"Request","description":"Request body for POST /v1/twilio-setup."},"src__routes__twilio__get_regulation__Response":{"properties":{"friendly_name":{"type":"string","title":"Friendly Name","description":"Display name of the regulation."},"iso_country":{"type":"string","title":"Iso Country","description":"Country where the number can be purchased."},"number_type":{"$ref":"#/components/schemas/TwilioNumberType","description":"Type of phone number covered by the regulation."},"end_user_type":{"type":"string","title":"End User Type","description":"Always \"business\"."},"requirements":{"$ref":"#/components/schemas/Requirements","description":"Business details and documents needed to purchase the number."}},"type":"object","required":["friendly_name","iso_country","number_type","end_user_type","requirements"],"title":"Response","description":"Twilio regulation + full requirements; walk `requirements` to assemble the\nPOST /bundle/regulatory payload."},"src__routes__twilio__list_available_phone_numbers__Response":{"properties":{"items":{"items":{"$ref":"#/components/schemas/src__routes__twilio__list_available_phone_numbers__Response__Item"},"type":"array","title":"Items","description":"Phone numbers currently available to purchase."}},"type":"object","required":["items"],"title":"Response"},"src__routes__twilio__list_available_phone_numbers__Response__Item":{"properties":{"phone_number":{"type":"string","title":"Phone Number","description":"E.164 phone number."},"friendly_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Friendly Name","description":"Formatted display name."},"locality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locality","description":"City name."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"State or province code."},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code","description":"ZIP or postal code."},"iso_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iso Country","description":"ISO 3166-1 alpha-2 country code."}},"type":"object","required":["phone_number"],"title":"Item"},"src__routes__twilio__list_phone_numbers__Response":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TwilioPhoneNumberResponse"},"type":"array","title":"Items","description":"Provisioned numbers matching the requested filters."}},"type":"object","required":["items"],"title":"Response"},"src__routes__twilio__list_twilio_setup_bundles__Response":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TwilioSetupBundleResponse"},"type":"array","title":"Items","description":"Bundles visible under the caller's granted read scopes."}},"type":"object","required":["items"],"title":"Response","description":"Bundles matching the filter, with status + last_failure; empty when none created yet."},"src__routes__twilio__provision_phone_number__Request":{"properties":{"phone_number":{"type":"string","format":"phone","title":"Phone Number","description":"E.164 phone number to purchase."},"country":{"type":"string","pattern":"^\\w{2}$","title":"Country","description":"ISO 3166-1 alpha-2. Drives Trust Hub gating and the Regulatory Compliance lookup."},"number_type":{"$ref":"#/components/schemas/TwilioNumberType","description":"Phone number type. `national` reuses the `.local` subresource with a\nprefix filter (see NATIONAL_PREFIXES)."}},"type":"object","required":["phone_number","country","number_type"],"title":"Request"},"src__routes__twilio__submit_a2p_brand_registration__Request":{"properties":{"brand_type":{"$ref":"#/components/schemas/A2PBrandRegistrationType","description":"Standard or Low-Volume Standard. Non-profit / government brands MUST be\nStandard (LVS → 422 here despite Twilio's silent acceptance)."}},"type":"object","required":["brand_type"],"title":"Request","description":"Request body for POST /v1/twilio-setup/{id}/bundle/a2p-brand-registration."},"src__routes__twilio__submit_a2p_messaging_profile__Request":{"properties":{"company_type":{"$ref":"#/components/schemas/CompanyType","description":"Legal structure of the brand."},"stock_exchange":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Stock Exchange","description":"Required when company_type == 'public', omitted otherwise. Bad values\nsurface as a noncompliant evaluation, not a validation error."},"stock_ticker":{"anyOf":[{"type":"string","maxLength":16,"minLength":1},{"type":"null"}],"title":"Stock Ticker","description":"Required when company_type == 'public'; must be omitted otherwise."},"brand_contact_email":{"type":"string","format":"email","title":"Brand Contact Email","description":"Email TCR uses for brand correspondence."}},"type":"object","required":["company_type","brand_contact_email"],"title":"Request","description":"Request body for POST /v1/twilio-setup/{id}/bundle/a2p-messaging-profile."},"src__routes__twilio__submit_cnam__Request":{"properties":{"display_name":{"type":"string","maxLength":15,"minLength":1,"title":"Display Name","description":"Caller ID name shown on the recipient's device (max 15 chars)."}},"type":"object","required":["display_name"],"title":"Request","description":"Request body for POST /v1/twilio-setup/{id}/bundle/cnam."},"src__routes__twilio__update_twilio_setup__Request":{"properties":{"business_name":{"type":"string","maxLength":256,"minLength":1,"title":"Business Name","description":"Legal business name as registered."},"business_type":{"$ref":"#/components/schemas/BusinessType","description":"Legal structure of the business."},"business_industry":{"$ref":"#/components/schemas/BusinessIndustry","description":"Industry vertical for Twilio Trust Hub classification."},"business_identity":{"$ref":"#/components/schemas/BusinessIdentity","description":"Relationship to Twilio (direct customer or ISV/reseller).","default":"direct_customer"},"business_registration_identifier":{"$ref":"#/components/schemas/BusinessRegistrationIdentifier","description":"Type of registration ID (e.g. EIN, DUNS, VAT)."},"business_registration_number":{"type":"string","maxLength":32,"minLength":1,"title":"Business Registration Number","description":"Registration number matching the identifier type."},"business_regions_of_operation":{"$ref":"#/components/schemas/BusinessRegion","description":"Geographic region where the business operates."},"website_url":{"type":"string","maxLength":2048,"minLength":1,"title":"Website Url","description":"Business website URL."},"business_address":{"$ref":"#/components/schemas/BusinessAddress","description":"Updated business address."},"authorized_representative":{"$ref":"#/components/schemas/AuthorizedRepresentative","description":"Updated authorized representative details."}},"type":"object","required":["business_name","business_type","business_industry","business_registration_identifier","business_registration_number","business_regions_of_operation","website_url","business_address","authorized_representative"],"title":"Request","description":"Request body for PUT /v1/twilio-setup/{id}."},"src__routes__twilio__validate_twilio_webhook__Request":{"properties":{"callback_url":{"type":"string","title":"Callback Url","description":"The exact URL Twilio signed, byte-for-byte — a mismatch fails validation."},"params":{"additionalProperties":{"type":"string"},"type":"object","title":"Params","description":"The webhook's POST parameters, exactly as Twilio sent them."},"signature":{"type":"string","title":"Signature","description":"The inbound request's ``X-Twilio-Signature`` header value."}},"type":"object","required":["callback_url","params","signature"],"title":"Request"},"src__routes__twilio__validate_twilio_webhook__Response":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"Whether ``signature`` is valid for this setup's subaccount auth token."}},"type":"object","required":["valid"],"title":"Response"},"src__routes__use_case__create_use_case__EmailUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the new use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"channel":{"type":"string","const":"email","title":"Channel","description":"Use-case channel; always `email`."},"ses_setup_id":{"type":"string","title":"Ses Setup Id","description":"SES setup that serves this use case."},"sender_email_address":{"type":"string","title":"Sender Email Address","description":"Explicit From address for outbound sends."},"sender_email_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email Alias","description":"Display name shown with the sender address, if set."},"email_type":{"$ref":"#/components/schemas/EmailType","description":"Whether the email use case is transactional or marketing."},"tier":{"$ref":"#/components/schemas/EmailTier","description":"Current sending reputation tier."},"unsubscribable":{"type":"boolean","title":"Unsubscribable","description":"When true, sends from this use case carry RFC 8058 List-Unsubscribe\nheaders + a footer with use-case + setup unsubscribe links, and the\nper-use-case unsubscribe table is consulted at send time. Marketing\nuse cases are always true; transactional may opt out for must-send\nflows like password reset."},"inbound_mode":{"$ref":"#/components/schemas/EmailInboundMode","description":"What inbound this use case accepts (see the create request)."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound emails accepted by this use case."},"webhook_secret":{"type":"string","title":"Webhook Secret","description":"One-time secret for verifying inbound webhook signatures."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","channel","ses_setup_id","sender_email_address","sender_email_alias","email_type","tier","unsubscribable","inbound_mode","webhook_url","webhook_secret"],"title":"EmailUseCaseResponse"},"src__routes__use_case__create_use_case__Request":{"oneOf":[{"$ref":"#/components/schemas/TwilioInboundVoiceUseCaseRequest"},{"$ref":"#/components/schemas/TwilioOutboundVoiceUseCaseRequest"},{"$ref":"#/components/schemas/TwilioSmsUseCaseRequest"},{"$ref":"#/components/schemas/EmailUseCaseRequest"},{"$ref":"#/components/schemas/SendBlueUseCaseRequest"},{"$ref":"#/components/schemas/WhatsAppUseCaseRequest"}],"discriminator":{"propertyName":"channel","mapping":{"email":"#/components/schemas/EmailUseCaseRequest","imessage":"#/components/schemas/SendBlueUseCaseRequest","inbound_voice":"#/components/schemas/TwilioInboundVoiceUseCaseRequest","outbound_voice":"#/components/schemas/TwilioOutboundVoiceUseCaseRequest","sms":"#/components/schemas/TwilioSmsUseCaseRequest","whatsapp":"#/components/schemas/WhatsAppUseCaseRequest"}}},"src__routes__use_case__create_use_case__Response":{"oneOf":[{"$ref":"#/components/schemas/src__routes__use_case__create_use_case__TwilioInboundVoiceUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__create_use_case__TwilioOutboundVoiceUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__create_use_case__TwilioSmsUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__create_use_case__EmailUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__create_use_case__SendBlueUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__create_use_case__WhatsAppUseCaseResponse"}],"discriminator":{"propertyName":"channel","mapping":{"email":"#/components/schemas/src__routes__use_case__create_use_case__EmailUseCaseResponse","imessage":"#/components/schemas/src__routes__use_case__create_use_case__SendBlueUseCaseResponse","inbound_voice":"#/components/schemas/src__routes__use_case__create_use_case__TwilioInboundVoiceUseCaseResponse","outbound_voice":"#/components/schemas/src__routes__use_case__create_use_case__TwilioOutboundVoiceUseCaseResponse","sms":"#/components/schemas/src__routes__use_case__create_use_case__TwilioSmsUseCaseResponse","whatsapp":"#/components/schemas/src__routes__use_case__create_use_case__WhatsAppUseCaseResponse"}}},"src__routes__use_case__create_use_case__SendBlueUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the new use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"channel":{"type":"string","const":"imessage","title":"Channel","description":"Use-case channel; always `imessage`."},"sendblue_setup_id":{"type":"string","title":"Sendblue Setup Id","description":"SendBlue subaccount fulfilling this use case."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound iMessages accepted by this use case."},"webhook_secret":{"type":"string","title":"Webhook Secret","description":"One-time secret for verifying inbound webhook signatures."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","channel","sendblue_setup_id","webhook_url","webhook_secret"],"title":"SendBlueUseCaseResponse"},"src__routes__use_case__create_use_case__TwilioInboundVoiceUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the new use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"channel":{"type":"string","const":"inbound_voice","title":"Channel","description":"Use-case channel; always `inbound_voice`."},"twilio_setup_id":{"type":"string","title":"Twilio Setup Id","description":"Twilio setup fulfilling this use case."},"inbound_voice_url":{"type":"string","title":"Inbound Voice Url","description":"URL that receives calls to assigned numbers."},"fallback_forwarding_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Forwarding Number","description":"E.164 that calls forward to when inbound_voice_url fails."},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Destination for call lifecycle events, if configured."},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret","description":"Signing secret for those events, returned ONCE at create and never again.\nNULL when no webhook_url was supplied."},"allowed_forwarding_numbers":{"items":{"type":"string"},"type":"array","title":"Allowed Forwarding Numbers","description":"E.164 numbers a live call may be forwarded / transferred to; empty denies all."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","channel","twilio_setup_id","inbound_voice_url","fallback_forwarding_number","webhook_url","webhook_secret","allowed_forwarding_numbers"],"title":"TwilioInboundVoiceUseCaseResponse"},"src__routes__use_case__create_use_case__TwilioOutboundVoiceUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the new use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"channel":{"type":"string","const":"outbound_voice","title":"Channel","description":"Use-case channel; always `outbound_voice`."},"twilio_setup_id":{"type":"string","title":"Twilio Setup Id","description":"Twilio setup that serves this use case."},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Destination for call lifecycle events, if configured."},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret","description":"Signing secret for those events, returned ONCE at create and never again.\nNULL when no webhook_url was supplied."},"allowed_forwarding_numbers":{"items":{"type":"string"},"type":"array","title":"Allowed Forwarding Numbers","description":"E.164 numbers a live call may be forwarded / transferred to; empty denies all."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","channel","twilio_setup_id","webhook_url","webhook_secret","allowed_forwarding_numbers"],"title":"TwilioOutboundVoiceUseCaseResponse"},"src__routes__use_case__create_use_case__TwilioSmsUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the new use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"channel":{"type":"string","const":"sms","title":"Channel","description":"Use-case channel; always `sms`."},"twilio_setup_id":{"type":"string","title":"Twilio Setup Id","description":"Twilio setup fulfilling this use case."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound SMS and MMS messages."},"webhook_secret":{"type":"string","title":"Webhook Secret","description":"One-time secret for verifying inbound webhook signatures."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","channel","twilio_setup_id","webhook_url","webhook_secret"],"title":"TwilioSmsUseCaseResponse"},"src__routes__use_case__create_use_case__WhatsAppUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the new use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"channel":{"type":"string","const":"whatsapp","title":"Channel","description":"Use-case channel; always `whatsapp`."},"whatsapp_setup_id":{"type":"string","title":"Whatsapp Setup Id","description":"WhatsApp setup fulfilling this use case."},"phone_number":{"type":"string","title":"Phone Number","description":"Registered business phone number in E.164 format."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound WhatsApp messages."},"webhook_secret":{"type":"string","title":"Webhook Secret","description":"The inbound-turn signing secret, returned exactly once here at create and\nnever on a read. Rotate via POST /v1/use-case/{id}/webhook-secret."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","channel","whatsapp_setup_id","phone_number","webhook_url","webhook_secret"],"title":"WhatsAppUseCaseResponse"},"src__routes__use_case__list_use_cases__Response":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UseCaseResponse"},"type":"array","title":"Items","description":"Use cases visible to the caller."}},"type":"object","required":["items"],"title":"Response"},"src__routes__use_case__response__EmailUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At","description":"When the use case was deleted, if included in the results."},"channel":{"type":"string","const":"email","title":"Channel","description":"Use-case channel; always `email`."},"ses_setup_id":{"type":"string","title":"Ses Setup Id","description":"SES setup that serves this use case."},"sender_email_address":{"type":"string","title":"Sender Email Address","description":"Explicit From address for outbound sends."},"sender_email_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email Alias","description":"Display name shown with the sender address, if set."},"email_type":{"$ref":"#/components/schemas/EmailType","description":"Whether the email use case is transactional or marketing."},"tier":{"$ref":"#/components/schemas/EmailTier","description":"Current sending reputation tier."},"unsubscribable":{"type":"boolean","title":"Unsubscribable","description":"When true, sends from this use case carry RFC 8058 List-Unsubscribe\nheaders + a footer with use-case + setup unsubscribe links, and the\nper-use-case unsubscribe table is consulted at send time. Marketing\nuse cases are always true; transactional may opt out for must-send\nflows like password reset."},"inbound_mode":{"$ref":"#/components/schemas/EmailInboundMode","description":"What inbound this use case accepts (see the create request)."},"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers","description":"Always empty for email use cases (surfaced uniformly across the union)."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound emails accepted by this use case."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","ses_setup_id","sender_email_address","sender_email_alias","email_type","tier","unsubscribable","inbound_mode","webhook_url"],"title":"EmailUseCaseResponse"},"src__routes__use_case__response__SendBlueUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At","description":"When the use case was deleted, if included in the results."},"channel":{"type":"string","const":"imessage","title":"Channel","description":"Use-case channel; always `imessage`."},"sendblue_setup_id":{"type":"string","title":"Sendblue Setup Id","description":"SendBlue subaccount fulfilling this use case."},"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers","description":"E.164 numbers assigned to this use case; blocked lines (blocked_at set) are\nfiltered out. Populated only by `GET /v1/use-case/{id}`; `list_use_cases` /\n`create_use_case` leave it empty."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound iMessages accepted by this use case."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","sendblue_setup_id","webhook_url"],"title":"SendBlueUseCaseResponse"},"src__routes__use_case__response__TwilioInboundVoiceUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At","description":"When the use case was deleted, if included in the results."},"channel":{"type":"string","const":"inbound_voice","title":"Channel","description":"Use-case channel; always `inbound_voice`."},"twilio_setup_id":{"type":"string","title":"Twilio Setup Id","description":"Twilio setup fulfilling this use case."},"inbound_voice_url":{"type":"string","title":"Inbound Voice Url","description":"URL that receives calls to assigned numbers."},"fallback_forwarding_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Forwarding Number","description":"E.164 that calls forward to when inbound_voice_url fails."},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Where channel-manager posts this use case's call lifecycle events. NULL\nmeans the use case is not CM-orchestrated."},"allowed_forwarding_numbers":{"items":{"type":"string"},"type":"array","title":"Allowed Forwarding Numbers","description":"E.164 numbers a live call may be forwarded / transferred to; empty denies all."},"hold_music_enabled":{"type":"boolean","title":"Hold Music Enabled","description":"Whether holds play this use case's uploaded hold music; false plays the default hold music."},"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers","description":"E.164 numbers assigned to this use case. Populated only by\n`GET /v1/use-case/{id}`; `list_use_cases` / `create_use_case` leave it empty."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","twilio_setup_id","inbound_voice_url","fallback_forwarding_number","webhook_url","allowed_forwarding_numbers","hold_music_enabled"],"title":"TwilioInboundVoiceUseCaseResponse"},"src__routes__use_case__response__TwilioOutboundVoiceUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At","description":"When the use case was deleted, if included in the results."},"channel":{"type":"string","const":"outbound_voice","title":"Channel","description":"Use-case channel; always `outbound_voice`."},"twilio_setup_id":{"type":"string","title":"Twilio Setup Id","description":"Twilio setup fulfilling this use case."},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Where channel-manager posts this use case's call lifecycle events. NULL\nmeans the use case is not CM-orchestrated."},"allowed_forwarding_numbers":{"items":{"type":"string"},"type":"array","title":"Allowed Forwarding Numbers","description":"E.164 numbers a live call may be forwarded / transferred to; empty denies all."},"hold_music_enabled":{"type":"boolean","title":"Hold Music Enabled","description":"Whether holds play this use case's uploaded hold music; false plays the default hold music."},"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers","description":"E.164 numbers assigned to this use case. Populated only by\n`GET /v1/use-case/{id}`; `list_use_cases` / `create_use_case` leave it empty."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","twilio_setup_id","webhook_url","allowed_forwarding_numbers","hold_music_enabled"],"title":"TwilioOutboundVoiceUseCaseResponse"},"src__routes__use_case__response__TwilioSmsUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At","description":"When the use case was deleted, if included in the results."},"channel":{"type":"string","const":"sms","title":"Channel","description":"Use-case channel; always `sms`."},"twilio_setup_id":{"type":"string","title":"Twilio Setup Id","description":"Twilio setup fulfilling this use case."},"phone_numbers":{"items":{"type":"string"},"type":"array","title":"Phone Numbers","description":"Assigned E.164 numbers; populated by the single-use-case endpoint."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound SMS and MMS messages."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","twilio_setup_id","webhook_url"],"title":"TwilioSmsUseCaseResponse"},"src__routes__use_case__response__WhatsAppUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At","description":"When the use case was deleted, if included in the results."},"channel":{"type":"string","const":"whatsapp","title":"Channel","description":"Use-case channel; always `whatsapp`."},"whatsapp_setup_id":{"type":"string","title":"Whatsapp Setup Id","description":"WhatsApp setup fulfilling this use case."},"phone_number":{"type":"string","title":"Phone Number","description":"Registered business phone number in E.164 format."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound WhatsApp messages."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","whatsapp_setup_id","phone_number","webhook_url"],"title":"WhatsAppUseCaseResponse"},"src__routes__use_case__rotate_webhook_secret__Response":{"properties":{"webhook_secret":{"type":"string","title":"Webhook Secret","description":"The freshly-minted signing secret. Returned ONCE — never re-readable via\nthe API; the caller stores it on its receiver to verify future signatures."},"old_secret_lasts_until":{"type":"string","format":"date-time","title":"Old Secret Lasts Until","description":"When the previous secret stops being accepted; until then the webhooks\ndual-sign both, so a receiver reconfigured before this still verifies."}},"type":"object","required":["webhook_secret","old_secret_lasts_until"],"title":"Response"},"src__routes__use_case__submit_a2p_campaign__Request":{"properties":{"us_app_to_person_usecase":{"type":"string","maxLength":128,"minLength":1,"title":"Us App To Person Usecase","description":"Campaign use-case code allowed for this setup's verified brand."},"description":{"type":"string","maxLength":4096,"minLength":40,"title":"Description","description":"Short description of what this SMS campaign does."},"message_samples":{"items":{"type":"string","maxLength":1024,"minLength":20},"type":"array","maxItems":5,"minItems":2,"title":"Message Samples","description":"2-5 sample messages, each 20-1024 chars."},"message_flow":{"type":"string","maxLength":2048,"minLength":40,"title":"Message Flow","description":"How consumers opt in to receive messages (40-2048 chars)."},"has_embedded_links":{"type":"boolean","title":"Has Embedded Links","description":"Whether campaign messages contain URLs."},"has_embedded_phone":{"type":"boolean","title":"Has Embedded Phone","description":"Whether campaign messages contain phone numbers."},"age_gated":{"type":"boolean","title":"Age Gated","description":"Whether the campaign requires age gating (e.g. federally legal but\nage-restricted content)."},"direct_lending":{"type":"boolean","title":"Direct Lending","description":"Whether the campaign supports direct lending offers."},"opt_in_message":{"type":"string","maxLength":320,"minLength":20,"title":"Opt In Message","description":"Opt-in confirmation copy. Required unconditionally (Twilio treats it as\noptional): we send it as the FIRST message on the use case, before any other."},"opt_in_keywords":{"items":{"$ref":"#/components/schemas/Keyword"},"type":"array","title":"Opt In Keywords","description":"Keywords that trigger text-to-join opt-in (e.g. \"START\"). Empty when the\ncampaign offers no keyword opt-in (e.g. consent collected via web/paper\nform)."},"opt_out_message":{"type":"string","maxLength":320,"minLength":20,"title":"Opt Out Message","description":"Auto-reply confirmation sent when an end user opts out."},"opt_out_keywords":{"items":{"$ref":"#/components/schemas/Keyword"},"type":"array","title":"Opt Out Keywords","description":"Keywords that trigger opt-out. MUST include the full CTIA set —\n\"STOP\", \"STOPALL\", \"UNSUBSCRIBE\", \"CANCEL\", \"END\", \"QUIT\"."},"help_message":{"type":"string","maxLength":320,"minLength":20,"title":"Help Message","description":"Auto-reply sent when an end user asks for help."},"help_keywords":{"items":{"$ref":"#/components/schemas/Keyword"},"type":"array","title":"Help Keywords","description":"Keywords that trigger help. MUST include \"HELP\" (CTIA requirement)."},"privacy_policy_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Privacy Policy Url","description":"Public URL of the campaign's privacy policy."},"terms_and_conditions_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Terms And Conditions Url","description":"Public URL of the campaign's terms & conditions."}},"type":"object","required":["us_app_to_person_usecase","description","message_samples","message_flow","has_embedded_links","has_embedded_phone","age_gated","direct_lending","opt_in_message","opt_out_message","opt_out_keywords","help_message","help_keywords","privacy_policy_url","terms_and_conditions_url"],"title":"Request","description":"Message content and consent details for a new A2P campaign."},"src__routes__use_case__update_a2p_campaign__Request":{"properties":{"description":{"type":"string","maxLength":4096,"minLength":40,"title":"Description","description":"Purpose and expected content of the campaign."},"message_flow":{"type":"string","maxLength":2048,"minLength":40,"title":"Message Flow","description":"How recipients consent to receive campaign messages."},"message_samples":{"items":{"type":"string","maxLength":1024,"minLength":20},"type":"array","maxItems":5,"minItems":2,"title":"Message Samples","description":"Two to five examples of messages the campaign will send."},"has_embedded_links":{"type":"boolean","title":"Has Embedded Links","description":"Whether campaign messages may contain URLs."},"has_embedded_phone":{"type":"boolean","title":"Has Embedded Phone","description":"Whether campaign messages may contain phone numbers."},"age_gated":{"type":"boolean","title":"Age Gated","description":"Whether campaign content is age restricted."},"direct_lending":{"type":"boolean","title":"Direct Lending","description":"Whether the campaign promotes direct lending."}},"type":"object","required":["description","message_flow","message_samples","has_embedded_links","has_embedded_phone","age_gated","direct_lending"],"title":"Request","description":"Updatable subset of campaign fields. Twilio's update_async signature\nis fixed at these 7 fields — no other field is mutable post-create."},"src__routes__use_case__update_use_case__EmailUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"channel":{"type":"string","const":"email","title":"Channel","description":"Use-case channel; always `email`."},"ses_setup_id":{"type":"string","title":"Ses Setup Id","description":"SES setup that serves this use case."},"sender_email_address":{"type":"string","title":"Sender Email Address","description":"Explicit From address for outbound sends."},"sender_email_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email Alias","description":"Display name shown with the sender address, if set."},"email_type":{"$ref":"#/components/schemas/EmailType","description":"Whether the email use case is transactional or marketing."},"tier":{"$ref":"#/components/schemas/EmailTier","description":"Current sending reputation tier."},"unsubscribable":{"type":"boolean","title":"Unsubscribable","description":"When true, sends from this use case carry RFC 8058 List-Unsubscribe\nheaders + a footer with use-case + setup unsubscribe links, and the\nper-use-case unsubscribe table is consulted at send time. Marketing\nuse cases are always true; transactional may opt out for must-send\nflows like password reset."},"inbound_mode":{"$ref":"#/components/schemas/EmailInboundMode","description":"What inbound this use case accepts (see the create request)."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound emails accepted by this use case."},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret","description":"New signing secret shown once when the webhook URL changes."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","ses_setup_id","sender_email_address","sender_email_alias","email_type","tier","unsubscribable","inbound_mode","webhook_url","webhook_secret"],"title":"EmailUseCaseResponse"},"src__routes__use_case__update_use_case__Request":{"oneOf":[{"$ref":"#/components/schemas/TwilioInboundVoiceUseCaseUpdateRequest"},{"$ref":"#/components/schemas/TwilioOutboundVoiceUseCaseUpdateRequest"},{"$ref":"#/components/schemas/TwilioSmsUseCaseUpdateRequest"},{"$ref":"#/components/schemas/EmailUseCaseUpdateRequest"},{"$ref":"#/components/schemas/SendBlueUseCaseUpdateRequest"},{"$ref":"#/components/schemas/WhatsAppUseCaseUpdateRequest"}],"discriminator":{"propertyName":"channel","mapping":{"email":"#/components/schemas/EmailUseCaseUpdateRequest","imessage":"#/components/schemas/SendBlueUseCaseUpdateRequest","inbound_voice":"#/components/schemas/TwilioInboundVoiceUseCaseUpdateRequest","outbound_voice":"#/components/schemas/TwilioOutboundVoiceUseCaseUpdateRequest","sms":"#/components/schemas/TwilioSmsUseCaseUpdateRequest","whatsapp":"#/components/schemas/WhatsAppUseCaseUpdateRequest"}}},"src__routes__use_case__update_use_case__Response":{"oneOf":[{"$ref":"#/components/schemas/src__routes__use_case__update_use_case__TwilioInboundVoiceUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__update_use_case__TwilioOutboundVoiceUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__update_use_case__TwilioSmsUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__update_use_case__EmailUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__update_use_case__SendBlueUseCaseResponse"},{"$ref":"#/components/schemas/src__routes__use_case__update_use_case__WhatsAppUseCaseResponse"}],"discriminator":{"propertyName":"channel","mapping":{"email":"#/components/schemas/src__routes__use_case__update_use_case__EmailUseCaseResponse","imessage":"#/components/schemas/src__routes__use_case__update_use_case__SendBlueUseCaseResponse","inbound_voice":"#/components/schemas/src__routes__use_case__update_use_case__TwilioInboundVoiceUseCaseResponse","outbound_voice":"#/components/schemas/src__routes__use_case__update_use_case__TwilioOutboundVoiceUseCaseResponse","sms":"#/components/schemas/src__routes__use_case__update_use_case__TwilioSmsUseCaseResponse","whatsapp":"#/components/schemas/src__routes__use_case__update_use_case__WhatsAppUseCaseResponse"}}},"src__routes__use_case__update_use_case__SendBlueUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"channel":{"type":"string","const":"imessage","title":"Channel","description":"Use-case channel; always `imessage`."},"sendblue_setup_id":{"type":"string","title":"Sendblue Setup Id","description":"SendBlue subaccount fulfilling this use case."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound iMessages accepted by this use case."},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret","description":"New signing secret shown once when the webhook URL changes."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","sendblue_setup_id","webhook_url","webhook_secret"],"title":"SendBlueUseCaseResponse"},"src__routes__use_case__update_use_case__TwilioInboundVoiceUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"channel":{"type":"string","const":"inbound_voice","title":"Channel","description":"Use-case channel; always `inbound_voice`."},"twilio_setup_id":{"type":"string","title":"Twilio Setup Id","description":"Twilio setup fulfilling this use case."},"inbound_voice_url":{"type":"string","title":"Inbound Voice Url","description":"URL that receives calls to assigned numbers."},"fallback_forwarding_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Forwarding Number","description":"E.164 that calls forward to when inbound_voice_url fails."},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Destination for call lifecycle events, if configured."},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret","description":"Set only when a webhook_url change minted it. Shown once."},"allowed_forwarding_numbers":{"items":{"type":"string"},"type":"array","title":"Allowed Forwarding Numbers","description":"E.164 numbers a live call may be forwarded / transferred to; empty denies all."},"hold_music_enabled":{"type":"boolean","title":"Hold Music Enabled","description":"Whether holds play this use case's uploaded hold music; false plays the default hold music."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","twilio_setup_id","inbound_voice_url","fallback_forwarding_number","webhook_url","webhook_secret","allowed_forwarding_numbers","hold_music_enabled"],"title":"TwilioInboundVoiceUseCaseResponse"},"src__routes__use_case__update_use_case__TwilioOutboundVoiceUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"channel":{"type":"string","const":"outbound_voice","title":"Channel","description":"Use-case channel; always `outbound_voice`."},"twilio_setup_id":{"type":"string","title":"Twilio Setup Id","description":"Twilio setup that serves this use case."},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Destination for call lifecycle events, if configured."},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret","description":"Set only when a webhook_url change minted it. Shown once."},"allowed_forwarding_numbers":{"items":{"type":"string"},"type":"array","title":"Allowed Forwarding Numbers","description":"E.164 numbers a live call may be forwarded / transferred to; empty denies all."},"hold_music_enabled":{"type":"boolean","title":"Hold Music Enabled","description":"Whether holds play this use case's uploaded hold music; false plays the default hold music."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","twilio_setup_id","webhook_url","webhook_secret","allowed_forwarding_numbers","hold_music_enabled"],"title":"TwilioOutboundVoiceUseCaseResponse"},"src__routes__use_case__update_use_case__TwilioSmsUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"channel":{"type":"string","const":"sms","title":"Channel","description":"Use-case channel; always `sms`."},"twilio_setup_id":{"type":"string","title":"Twilio Setup Id","description":"Twilio setup fulfilling this use case."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound SMS and MMS messages."},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret","description":"New signing secret shown once when the webhook URL changes."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","twilio_setup_id","webhook_url","webhook_secret"],"title":"TwilioSmsUseCaseResponse"},"src__routes__use_case__update_use_case__WhatsAppUseCaseResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the use case."},"entity_name":{"type":"string","title":"Entity Name","description":"Business entity running this use case (e.g. \"Amigo AI\")."},"name":{"type":"string","title":"Name","description":"Purpose within the entity (e.g. \"sales outbound\")."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Free-text description, if any."},"environment":{"$ref":"#/components/schemas/Environment","description":"Deployment environment this use case targets."},"region":{"$ref":"#/components/schemas/Region","description":"AWS region this use case targets."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the use case was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the use case was last changed."},"channel":{"type":"string","const":"whatsapp","title":"Channel","description":"Use-case channel; always `whatsapp`."},"whatsapp_setup_id":{"type":"string","title":"Whatsapp Setup Id","description":"WhatsApp setup fulfilling this use case."},"phone_number":{"type":"string","title":"Phone Number","description":"The E.164 phone number assigned to this use case."},"webhook_url":{"type":"string","title":"Webhook Url","description":"Destination for inbound WhatsApp messages."},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret","description":"New signing secret shown once when the webhook URL changes."}},"type":"object","required":["id","entity_name","name","description","environment","region","created_at","updated_at","channel","whatsapp_setup_id","phone_number","webhook_url","webhook_secret"],"title":"WhatsAppUseCaseResponse"},"src__routes__voice__add_voice_call_participant__Response":{"properties":{"participant_ref":{"type":"string","format":"uuid","title":"Participant Ref","description":"Identifier used to control this participant later."},"role":{"$ref":"#/components/schemas/VoiceParticipantRole","description":"Role assigned to the participant."}},"type":"object","required":["participant_ref","role"],"title":"Response"},"src__routes__voice__create_voice_call__Request":{"properties":{"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"Outbound-voice use case whose sender pool the call is placed from."},"idempotency_key":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Idempotency Key","description":"Retry-dedup key; a repeat returns the existing call rather than a second one."}},"type":"object","required":["use_case_id"],"title":"Request"},"src__routes__voice__create_voice_call__Response":{"properties":{"call_ref":{"type":"string","format":"uuid","title":"Call Ref","description":"Identifier used for subsequent call-control requests."},"phone_number":{"type":"string","title":"Phone Number","description":"The From number selected from the use case's pool."}},"type":"object","required":["call_ref","phone_number"],"title":"Response"},"src__routes__voice__get_voice_call__Response":{"properties":{"call_ref":{"type":"string","format":"uuid","title":"Call Ref","description":"Identifier of the voice call."},"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"Voice use case associated with this call."},"setup_id":{"type":"string","format":"uuid","title":"Setup Id","description":"Twilio setup that owns this call."},"direction":{"$ref":"#/components/schemas/VoiceCallDirection","description":"Direction of the voice call."},"phone_number":{"type":"string","title":"Phone Number","description":"Phone number used by the voice use case."},"peer_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Peer Number","description":"Other party's phone number, if known."},"recording_available":{"type":"boolean","title":"Recording Available","description":"Whether a call recording can be retrieved."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this voice call was created."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the call began, if started."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the call ended, if ended."},"participants":{"items":{"$ref":"#/components/schemas/Participant"},"type":"array","title":"Participants","description":"Participants and their latest call states."}},"type":"object","required":["call_ref","use_case_id","setup_id","direction","phone_number","peer_number","recording_available","created_at","started_at","ended_at","participants"],"title":"Response"},"src__routes__voice__list_voice_calls__Response":{"properties":{"items":{"items":{"$ref":"#/components/schemas/src__routes__voice__list_voice_calls__Response__Item"},"type":"array","title":"Items","description":"Calls matching the requested filters."},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page of results is available."},"continuation_token":{"title":"Continuation Token","description":"Opaque token for the next page, or null when complete."}},"type":"object","required":["items","has_more","continuation_token"],"title":"Response"},"src__routes__voice__list_voice_calls__Response__Item":{"properties":{"call_ref":{"type":"string","format":"uuid","title":"Call Ref","description":"Identifier of the voice call."},"use_case_id":{"type":"string","format":"uuid","title":"Use Case Id","description":"Voice use case associated with this call."},"direction":{"$ref":"#/components/schemas/VoiceCallDirection","description":"Direction of the voice call."},"phone_number":{"type":"string","title":"Phone Number","description":"Phone number used by the voice use case."},"peer_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Peer Number","description":"Other party's phone number, if known."},"recording_available":{"type":"boolean","title":"Recording Available","description":"Whether a call recording can be retrieved."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this voice call was created."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the call began, if started."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the call ended, if ended."}},"type":"object","required":["call_ref","use_case_id","direction","phone_number","peer_number","recording_available","created_at","started_at","ended_at"],"title":"Item"},"src__routes__voice__start_participant_media_stream__Request":{"properties":{"stream_url":{"type":"string","minLength":1,"format":"uri","title":"Stream Url","description":"The wss:// endpoint Twilio forks this participant's inbound audio to."},"stream_context":{"additionalProperties":{"type":"string","maxLength":256},"propertyNames":{"maxLength":128,"minLength":1},"type":"object","maxProperties":32,"title":"Stream Context","description":"Key→value context echoed to the fork's `start` event as `customParameters`."}},"type":"object","required":["stream_url","stream_context"],"title":"Request"},"src__routes__voice__update_voice_call_participant__Request":{"properties":{"hold":{"type":"boolean","title":"Hold","description":"Place the participant on hold or resume them."},"muted":{"type":"boolean","title":"Muted","description":"Mute or unmute the participant."},"ends_call_on_exit":{"type":"boolean","title":"Ends Call On Exit","description":"Whether the conference ends when this participant leaves."}},"type":"object","title":"Request"},"src__routes__whatsapp_message__create_whatsapp_message_template__Request":{"properties":{"setup_id":{"type":"string","format":"uuid","title":"Setup Id","description":"WhatsApp setup that owns the template."},"name":{"type":"string","maxLength":512,"minLength":4,"pattern":"^[a-z_0-9]+$","title":"Name","description":"Template name using lowercase letters, digits, and underscores."},"language":{"$ref":"#/components/schemas/TemplateLanguage","description":"Language in which the template is written."},"category":{"$ref":"#/components/schemas/WhatsAppTemplateCategory","description":"WhatsApp review category for the template."},"header":{"anyOf":[{"type":"string","contentMediaType":"application/json","contentSchema":{"oneOf":[{"$ref":"#/components/schemas/TextHeader"},{"$ref":"#/components/schemas/MediaHeader"}],"discriminator":{"propertyName":"format","mapping":{"document":"#/components/schemas/MediaHeader","image":"#/components/schemas/MediaHeader","text":"#/components/schemas/TextHeader","video":"#/components/schemas/MediaHeader"}}}},{"type":"null"}],"title":"Header","description":"Optional header definition supplied as JSON."},"header_sample_media":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Header Sample Media","description":"Sample file required for an image, video, or document header."},"body_text":{"type":"string","maxLength":1024,"minLength":1,"title":"Body Text","description":"Template body text with any named parameter placeholders."},"body_text_parameter_names":{"items":{"type":"string","maxLength":60,"minLength":1,"pattern":"^[a-z_0-9]+$"},"type":"array","title":"Body Text Parameter Names","description":"Names of every placeholder used in the body text.","default":[]},"footer_text":{"anyOf":[{"type":"string","maxLength":60,"minLength":1},{"type":"null"}],"title":"Footer Text","description":"Optional footer text without parameter placeholders."}},"type":"object","required":["setup_id","name","language","category","body_text"],"title":"Request"},"src__routes__whatsapp_message__create_whatsapp_message_template__Response":{"properties":{"template_id":{"type":"string","format":"uuid","title":"Template Id","description":"Identifier to use when retrieving the template later."}},"type":"object","required":["template_id"],"title":"Response"},"src__routes__whatsapp_message__send_whatsapp_message__Response":{"properties":{"message_id":{"type":"string","format":"uuid","title":"Message Id","description":"Identifier for retrieving this message later."}},"type":"object","required":["message_id"],"title":"Response"},"src__routes__whatsapp_setup__create_whatsapp_setup__Request":{"properties":{"friendly_name":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","title":"Friendly Name","description":"Operator-facing label for this business identity. Never sent to Meta."},"meta_business_portfolio_id":{"type":"string","maxLength":20,"minLength":15,"pattern":"^[0-9]+$","title":"Meta Business Portfolio Id","description":"Customer's Meta business portfolio ID; only one active setup may use it."}},"type":"object","required":["friendly_name","meta_business_portfolio_id"],"title":"Request"},"src__routes__whatsapp_setup__create_whatsapp_setup__Response":{"properties":{"whatsapp_embedded_signup_url":{"type":"string","title":"Whatsapp Embedded Signup Url","description":"Meta-hosted Embedded Signup URL to hand the customer. Static per environment —\ncarries no per-setup token."},"whatsapp_setup_id":{"type":"string","format":"uuid","title":"Whatsapp Setup Id","description":"Identifier of the new WhatsApp setup."}},"type":"object","required":["whatsapp_embedded_signup_url","whatsapp_setup_id"],"title":"Response"},"src__routes__whatsapp_setup__get_whatsapp_setup__Response":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Identifier of the WhatsApp setup."},"friendly_name":{"type":"string","title":"Friendly Name","description":"Display name of the setup."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this WhatsApp setup was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this WhatsApp setup was last changed."},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At","description":"Deletion time; null for an active setup."}},"type":"object","required":["id","friendly_name","created_at","updated_at","deleted_at"],"title":"Response"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"HTTPBasic":{"type":"http","scheme":"basic"}}}}