{"openapi":"3.1.0","info":{"title":"Resia API","description":"\nResia places and answers phone calls for you. Its orchestrations can coordinate calls, messages, and waits.\n\n# Start here\n\nThe guides, concepts, and this reference are on the docs site: [https://docs.resia.ai](https://docs.resia.ai).\nA coding assistant starts at [https://api.resia.ai/llms.txt](https://api.resia.ai/llms.txt).\n\n## Changes to this API\n\nEvery change to this contract is listed at [`/changelog`](https://api.resia.ai/changelog), newest first, with the ones\nthat would break an existing client marked, or as machine-readable JSON at\n[`/changelog.json`](https://api.resia.ai/changelog.json). The version above is the contract this environment is serving.\n","version":"0.26.7","x-logo":{"url":"/brand/resia-logo.webp","altText":"Resia","backgroundColor":"#2c0e13"}},"servers":[{"url":"https://api.resia.ai"}],"paths":{"/health":{"get":{"tags":["Health"],"summary":"Check that the service is up","description":"Answers 200 with an empty body once the service has run a real query against its database, and 503 with an empty body while that database is unreachable. Needs no credential.","operationId":"health_health_get","responses":{"200":{"description":"The service and its database are both answering."},"503":{"description":"The service is running but cannot reach its database."}}}},"/v1/rate-limits":{"get":{"tags":["Rate Limits"],"summary":"Read your rate limits","description":"Return the call, text-message, and phone-number release limits in force for your organization, plus the paid 10DLC campaign submission limit. The call report includes the shared inbound and outbound concurrency limit and the current call count. Each limit is your organization's own override when one is set, otherwise the deployment default; zero means the action is blocked. Orchestration runs have no separate organization limit — a run draws on these call and message limits, and its own caps live on its agent version.","operationId":"read_rate_limits_v1_rate_limits_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRateLimitsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feedback":{"post":{"tags":["Feedback"],"summary":"Report a problem or suggest a change","description":"Sends one report to the Resia team. Use `issue` for a problem you hit and `suggestion` for a change you want, or leave `kind` out. Resia stores the report for the team to read. The API has no route that reads or lists reports, and the team does not answer through the API. `related_ids` are stored as sent and are not looked up, so an id that does not exist is not an error. The answer is 201 with a receipt: the report's id, its kind, and when Resia stored it.","operationId":"submitFeedback","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}}},"responses":{"201":{"description":"The report was stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackReceived"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/available-phone-numbers":{"get":{"tags":["Phone Numbers"],"summary":"Search numbers you could buy","description":"Lists numbers the carrier currently has available, with their one-off and monthly cost. Narrow the search by area code, city, or state. Nothing is reserved or charged here — a number is only yours once you order it and the order completes.","operationId":"list_available_phone_numbers_v1_available_phone_numbers_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"area_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[2-9][0-9]{2}$"},{"type":"null"}],"title":"Area Code"}},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"City"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"State"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailablePhoneNumberSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/available-voices":{"get":{"tags":["Voices"],"summary":"List the voices you can use (deprecated)","description":"Deprecated. Use `GET /v1/call-agents/available-voices`, which takes the same query and returns the same voices. This endpoint stops working on 2026-11-09. Each response also carries a `Deprecation` header.\n\nLists the voices a Call Agent can be set to speak in, for one speech provider. Put a voice's provider and id into a Call Agent's voices list to let its calls speak in that voice. The provider defaults to cartesia; both cartesia and fish are supported.","operationId":"list_voices_v1_available_voices_get","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"provider","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TtsProvider","description":"The speech provider to list voices for — cartesia (the default) or fish.","default":"cartesia"},"description":"The speech provider to list voices for — cartesia (the default) or fish."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableVoicesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/phone-numbers":{"get":{"tags":["Phone Numbers"],"summary":"List your phone numbers","description":"Returns the phone numbers your organization currently owns, newest first, one page at a time. Each number reports the Call Agent that answers inbound calls to it, or null when none is assigned. Retired numbers are left out. Follow `next_cursor` for the next page.","operationId":"list_phone_numbers_v1_phone_numbers_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many phone numbers to return per page.","default":50,"title":"Limit"},"description":"How many phone numbers to return per page."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PhoneNumberSortField"},{"type":"null"}],"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties.","title":"Sort"},"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties."},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`.","default":"desc"},"description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnedPhoneNumberPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/phone-number-orders":{"post":{"tags":["Phone Numbers"],"summary":"Buy a phone number","description":"Orders one of the numbers returned by the search. The answer is 202 Accepted with the order in a pending state: the carrier completes the purchase in the background, usually within a minute. Poll the order until it reports success or failure. The number can be used as a caller ID only after Resia has confirmed with the carrier that it is live.","operationId":"create_phone_number_order_v1_phone_number_orders_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberPurchaseRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/phone-number-orders/{order_id}":{"get":{"tags":["Phone Numbers"],"summary":"Check a number purchase","description":"Reports where a purchase has got to: still pending with the carrier, completed, or failed.","operationId":"read_phone_number_order_v1_phone_number_orders__order_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/phone-numbers/{phone_number}":{"delete":{"tags":["Phone Numbers"],"summary":"Release a phone number","description":"Releases a number your organization owns and stops its later monthly charges. The empty 204 response confirms local release; carrier removal follows separately. Unfinished batch calls or messages that still need the number cause a 409 response. Cancel the batch or wait for the work before retrying. Unknown, foreign, and already released numbers return 404. History and past charges remain. Release gives no refund and cannot be undone. Organization release limits apply over rolling one-hour, 24-hour, and 30-day windows. GET /v1/rate-limits reports the effective limits. A full window returns 429 with Retry-After.","operationId":"delete_phone_number_v1_phone_numbers__phone_number__delete","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"phone_number","in":"path","required":true,"schema":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","description":"The owned phone number in E.164 form, such as +12125550142.","title":"Phone Number"},"description":"The owned phone number in E.164 form, such as +12125550142."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Phone Numbers"],"summary":"Assign an inbound agent","description":"Points one of your phone numbers at the agents that answer it: the Call Agent for calls dialled to it and the Chat Agent for texts sent to it. Send `inbound_call_agent_id` to assign a Call Agent, `inbound_chat_agent_id` to assign a Chat Agent, or both; send null in a field to stop that kind of inbound traffic on the number. A field you omit is left as it is, so one mapping changes without restating the other. An agent that needs inputs must have an `inbound_input_webhook_url`, because a call or a text that arrives on the number supplies no inputs of its own; otherwise the request is refused with `422`. A Chat Agent can be assigned only to a number that is `ASSIGNED` on an active 10DLC campaign, because its replies would otherwise fail at the carrier; any other number is refused with `422`. Resia reads the number's campaign from the carrier registry, and while the registry cannot be read the assignment is refused with `503`, `502`, `429`, or `422`. Sending null in `inbound_chat_agent_id` always clears the mapping. The path is the number in E.164 form (for example `+12125550142`). For setup and a test call, see [Receive an inbound call](https://docs.resia.ai/guides/inbound-call).","operationId":"assign_phone_number_inbound_agent_v1_phone_numbers__phone_number__patch","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"phone_number","in":"path","required":true,"schema":{"type":"string","title":"Phone Number"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberAssignmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnedPhoneNumber"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/10dlc/brand":{"get":{"tags":["10DLC Registration"],"summary":"Check your brand","description":"Reports whether your organization has a registered brand yet, and how far the carrier registry has got verifying it. Register one with `POST /v1/10dlc/brand`, or contact Resia to connect a brand you registered elsewhere. Verification usually completes within minutes but can take days.","operationId":"get_ten_dlc_brand_v1_10dlc_brand_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcBrandStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["10DLC Registration"],"summary":"Register your brand","description":"Registers your organization's business identity with the carrier registry, using the company details you supply — never a Telnyx identifier. Registration carries a one-time, non-refundable $4 registry fee. One brand per organization; verification usually completes within minutes but can take days — follow it with `GET /v1/10dlc/brand`. Sole proprietors and publicly traded companies cannot register through this API yet — contact Resia.","operationId":"register_ten_dlc_brand_v1_10dlc_brand_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandRegistrationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcBrandStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/10dlc/campaigns":{"get":{"tags":["10DLC Registration"],"summary":"List your campaigns","description":"Lists the campaigns registered for your organization's brand, read live from the carrier registry — Resia keeps no copy. Each campaign carries one stable status: pending review, active, rejected, suspended, or expired. Only an active campaign delivers texts.","operationId":"list_ten_dlc_campaigns_v1_10dlc_campaigns_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcCampaignListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["10DLC Registration"],"summary":"Register a campaign","description":"Registers a campaign for your brand: what you send, how recipients consent, and how HELP and STOP behave. When the registry accepts the campaign, Resia charges its first month; each later month is charged on the same day of the month until you release the campaign with `DELETE /v1/10dlc/campaigns/{campaign_id}`. If the registry rejects it, Resia charges a one-time rejection fee and no later month. Charges are not refunded. The request must repeat the `monthly_fee` from the use-case listing as `confirmed_upfront_fee`; if Resia's price no longer matches, nothing is charged and the answer is 409. A balance of $0.00 or less answers 402. `Idempotency-Key` is required and makes any retry safe: the same key returns the original registration (recovering it even when the first response was lost) and never charges twice; reusing the key with changed content returns 409. Registry and carrier review then run for hours to days — follow progress with `GET /v1/10dlc/campaigns/{campaign_id}`. A per-organization ceiling bounds new campaign submissions per day; the deployment default is ten.","operationId":"submit_ten_dlc_campaign_v1_10dlc_campaigns_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Repeat this value to retry safely: the same key returns the original registration instead of charging again.","title":"Idempotency-Key"},"description":"Repeat this value to retry safely: the same key returns the original registration instead of charging again."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcCampaignSubmissionRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcCampaignSubmissionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/10dlc/campaigns/{campaign_id}":{"get":{"tags":["10DLC Registration"],"summary":"Read one campaign","description":"Everything the list gives you, plus each carrier's own provisioning progress. Carrier review runs from hours to days; a campaign is usable for texting once its status is active.","operationId":"get_ten_dlc_campaign_v1_10dlc_campaigns__campaign_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9-]{4,64}$","description":"The campaign identifier from the campaign list.","title":"Campaign Id"},"description":"The campaign identifier from the campaign list."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["10DLC Registration"],"summary":"Release a campaign","description":"Ends a campaign that you registered through `POST /v1/10dlc/campaigns` and stops its monthly charges. Resia first detaches the campaign's numbers, then the registry deactivates the campaign. The numbers stay yours, but they cannot send business texts until you attach them to another active campaign. Release cannot be undone and gives no refund for the month already charged. A campaign that Resia did not register, or that is already released, answers 404. If the registry fails, the campaign is not released and its charges continue, but numbers detached before the failure stay detached; repeat the request to finish.","operationId":"release_ten_dlc_campaign_v1_10dlc_campaigns__campaign_id__delete","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9-]{4,64}$","description":"The campaign identifier from the campaign list.","title":"Campaign Id"},"description":"The campaign identifier from the campaign list."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/10dlc/campaigns/{campaign_id}/phone-numbers":{"post":{"tags":["10DLC Registration"],"summary":"Put a number on a campaign","description":"Attaches one phone number your organization owns to one of your campaigns, so texts sent from that number are delivered as registered traffic. The answer is 202 Accepted: carriers finish provisioning the number in the background, typically within a couple of hours. The campaign must be active first, and a number can sit on only one campaign at a time.","operationId":"assign_ten_dlc_phone_number_v1_10dlc_campaigns__campaign_id__phone_numbers_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9-]{4,64}$","description":"The campaign identifier from the campaign list.","title":"Campaign Id"},"description":"The campaign identifier from the campaign list."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcPhoneNumberAssignmentRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcPhoneNumberAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["10DLC Registration"],"summary":"See which numbers are on a campaign","description":"Lists every number attached to the campaign with each one's live provisioning state, so you can tell when a newly assigned number is ready to deliver texts.","operationId":"list_ten_dlc_campaign_phone_numbers_v1_10dlc_campaigns__campaign_id__phone_numbers_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9-]{4,64}$","description":"The campaign identifier from the campaign list.","title":"Campaign Id"},"description":"The campaign identifier from the campaign list."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenDlcCampaignPhoneNumberListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/10dlc/campaign-use-cases":{"get":{"tags":["10DLC Registration"],"summary":"See what you can register","description":"Lists the campaign types your brand currently qualifies for. `monthly_fee` is what Resia charges for one month of a campaign: once when the registry accepts it, then on the same day each month until you release it. It is the figure you must confirm when submitting. `quarterly_fee` and `annual_fee` are the registry's own fees, for reference; Resia does not charge them. Types you do not qualify for are omitted.","operationId":"list_ten_dlc_campaign_use_cases_v1_10dlc_campaign_use_cases_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUseCaseListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls":{"post":{"tags":["Calls"],"summary":"Place a call","description":"Queues one outbound call that follows the named Call Agent, and answers 202 Accepted straight away — the call has not been dialled yet when you get this response. Read `GET /v1/calls/{call_id}` for the outcome.\n\nAnything in `inputs` is handed to the voice agent, so a Call Agent written for one pharmacy or one patient can be reused for the next.\n\nSend an `Idempotency-Key` header to make a retry safe: repeating the same key returns the call the first request created instead of dialling a second time. The first request's inputs and webhook URL remain attached to that call, even if a retry sends different values. A request refused for its `inputs` creates no call, so a retry with the same key and corrected `inputs` places the call.\n\nDestinations are limited to United States and Canada numbers, and premium-rate numbers are refused. Exceeding your call rate limits returns 429.\n\nA request body with a field that this schema does not define is refused with 422, and the error message names that field.","operationId":"create_call_v1_calls_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Repeat this value to retry safely: a second request with the same key returns the original call instead of placing a new one.","title":"Idempotency-Key"},"description":"Repeat this value to retry safely: a second request with the same key returns the original call instead of placing a new one."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAccepted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Calls"],"summary":"List your calls","description":"Returns your organization's calls, newest first, one page at a time. Follow `next_cursor` for the next page. Each item includes the caller number selected when the call was placed and your own `client_reference` label when you set one. Set `tag_key` and `tag_value` to list only the calls whose tags hold that pair. Set `orchestration_run_id` to list only the calls that one orchestration run placed; a run your organization does not own is refused with 404. The `status` filter takes the same values the items show, `queued` and `canceled` included. A call whose live status cannot be read at this moment shows `unknown` and matches a `status=unknown` filter.","operationId":"list_calls_v1_calls_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"call_agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return calls placed with this Call Agent.","title":"Call Agent Id"},"description":"Only return calls placed with this Call Agent."},{"name":"orchestration_run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return calls that this orchestration run placed.","title":"Orchestration Run Id"},"description":"Only return calls that this orchestration run placed."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallStatus"},{"type":"null"}],"description":"Only return calls whose current status is this value.","title":"Status"},"description":"Only return calls whose current status is this value."},{"name":"client_reference","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"Only return calls carrying exactly this client_reference label. The label is an opaque identifier from your own system; because it travels in the URL here, it must never contain personal or sensitive information.","title":"Client Reference"},"description":"Only return calls carrying exactly this client_reference label. The label is an opaque identifier from your own system; because it travels in the URL here, it must never contain personal or sensitive information."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many calls to return per page.","default":50,"title":"Limit"},"description":"How many calls to return per page."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallSortField"},{"type":"null"}],"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties.","title":"Sort"},"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties."},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`.","default":"desc"},"description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CallSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls/{call_id}":{"get":{"tags":["Calls"],"summary":"Read one call","description":"Everything the list gives you, plus the input values the call was dialled with, the full transcript, and the structured analysis the Call Agent asked for. Each response uses one current voice-platform record: post_processing means the call has ended but transcript, participant, or analysis fields may still change; completed and error are terminal. Analysis can remain null at completed when none was requested or produced. Old calls have no stored inputs. With `include_tool_activity=true` it also returns the call's tool activity: each background task start, tool request, tool result, and task end that the voice platform observed, in sequence order, with credential fields shown as [redacted]. A read with that option is not stored in the request log.","operationId":"get_call_v1_calls__call_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"include_tool_activity","in":"query","required":false,"schema":{"type":"boolean","description":"Also return the call's tool activity (tool_activity). Off by default.","default":false,"title":"Include Tool Activity"},"description":"Also return the call's tool activity (tool_activity). Off by default."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls/{call_id}/recording":{"get":{"tags":["Calls"],"summary":"Download a call's recording","description":"Streams the call's audio recording as `audio/wav` or `audio/mpeg`. A call with no recording returns `404`. When `GET /v1/calls/{call_id}` returns a `recording` object, its `available` field says whether this route has audio. When `recording` is null, as it is for every call of a Call Agent whose `model_architecture` is `speech_to_speech`, request this route and treat `404` as no recording. Recordings exist only for calls placed after recording was enabled.","operationId":"get_call_recording_v1_calls__call_id__recording_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"The recording audio.","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}},"audio/mpeg":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"No such call for this organization, or the call has no recording."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/call-batches":{"post":{"tags":["Call Batches"],"summary":"Submit a batch of calls","description":"Queues up to a thousand outbound calls that all follow one Call Agent, and answers 202 Accepted straight away — nothing has been dialled yet. Every created call already exists: the response lists one `call_id` per created call, in submission order, and that same ID reads the call for its whole life through `GET /v1/calls/{call_id}` — status `queued` now, transcript and charge later. One cutover exception: a batch that was partly processed at the 2026-08-25 per-item-ID upgrade can order its items differently; match items by `to_phone_number` or `client_reference`. Resia dials from an internal queue at the pace your call rate limits allow, so a burst never comes back as a wall of 429s.\n\nA few bad entries no longer refuse the whole batch: each call is checked on its own, the good ones are created, and the rest are returned in `rejected_calls` — each with its 0-based submission `position`, the number as you sent it, its `client_reference`, and a `reason`. An entry is rejected when its destination is one Resia cannot dial, a destination already used earlier in the batch (the first is called, later duplicates are rejected), a multi-party entry (place those through `POST /v1/calls`), or one whose `inputs` the Call Agent's schema rejects. `calls` and `rejected_calls` together account for every submitted entry, and a batch in which every entry is rejected still returns 202 with an empty batch. A whole-request failure (an unknown Call Agent, an unowned sender, or passing the queued-call limit) is still refused outright.\n\n`Idempotency-Key` is required. Repeating it with the same request returns the original batch — the same `call_id` values, and the same entries in `rejected_calls` with the same positions and destinations (a rejected entry's `reason` text may read more generically on a replay) — and queues nothing further; reusing it after changing the Call Agent, the sender, the calls, their order, or the tags returns 409.\n\nThe batch's `tags` are copied onto every call it creates, so `GET /v1/calls` finds them by tag.\n\nRead `GET /v1/call-batches/{batch_id}` for whole-batch progress, or `GET /v1/call-batches/{batch_id}/calls` for the per-call detail. A batch larger than the queued-call limit is refused with 429.","operationId":"create_call_batch_v1_call_batches_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Repeat this value to retry safely: a second request with the same key returns the original batch, with the same call_id values, instead of queuing it again.","title":"Idempotency-Key"},"description":"Repeat this value to retry safely: a second request with the same key returns the original batch, with the same call_id values, instead of queuing it again."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallBatchCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallBatchSubmissionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Call Batches"],"summary":"List your call batches","description":"Returns your organization's call batches, newest first, one page at a time. Follow `next_cursor` for the next page. Each item is the same whole-batch progress the single-batch read returns. During a voice-platform outage this still answers HTTP 200; a call whose live status cannot be read reads `unknown`.","operationId":"list_call_batches_v1_call_batches_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many batches to return per page.","default":50,"title":"Limit"},"description":"How many batches to return per page."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallBatchSummaryPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/call-batches/{batch_id}":{"get":{"tags":["Call Batches"],"summary":"Read one call batch","description":"Whole-batch progress in one read: the derived status and the counts of every call across its queue and its dialed-call states. The counts always sum to `total`. During a voice-platform outage this still answers HTTP 200; a call whose live status cannot be read reads `unknown`.","operationId":"get_call_batch_v1_call_batches__batch_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallBatchSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/call-batches/{batch_id}/cancel":{"post":{"tags":["Call Batches"],"summary":"Cancel a call batch","description":"Stops the calls still queued. Calls already being placed or already dialled keep their state and run to their own end. Cancel is idempotent: cancelling an already-cancelled batch changes nothing and returns its current progress.","operationId":"cancel_call_batch_v1_call_batches__batch_id__cancel_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallBatchSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/call-batches/{batch_id}/calls":{"get":{"tags":["Call Batches"],"summary":"List the calls in a batch","description":"Returns every call in the batch, in the order you submitted them, one page at a time. Follow `next_cursor` for the next page. One cutover exception: a batch that was partly processed at the 2026-08-25 per-item-ID upgrade can order its items differently; match items by `to_phone_number` or `client_reference`. Each item carries the call's one durable `call_id` — assigned at submission — and its live status. Read the call through `GET /v1/calls/{call_id}` for its transcript, analysis, and charge. During a voice-platform outage this still answers HTTP 200; a call whose live status cannot be read reads `unknown`.","operationId":"list_call_batch_calls_v1_call_batches__batch_id__calls_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many calls to return per page.","default":50,"title":"Limit"},"description":"How many calls to return per page."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallBatchItemPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/call-charges":{"get":{"tags":["Calls"],"summary":"List what your calls cost","description":"Returns one charge per call, newest first. A charge is created when the call is placed and is finalized once the call ends, at its connected seconds (at least 30) times the per-minute price of the call and its model, rounded to the nearest cent. An amount can still change until `finalized_at` is set.","operationId":"list_call_charges_v1_call_charges_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"call_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return the charge for this call.","title":"Call Id"},"description":"Only return the charge for this call."},{"name":"finalized","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True returns only settled charges; false returns only charges whose amount can still change.","title":"Finalized"},"description":"True returns only settled charges; false returns only charges whose amount can still change."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many charges to return per page.","default":50,"title":"Limit"},"description":"How many charges to return per page."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ChargeSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/message-charges":{"get":{"tags":["Text Messages"],"summary":"List what your text messages cost","description":"Returns one charge per text, newest first: each recipient message you sent, and each text that reached one of your numbers (`direction`). A sent text's charge is created when the message is accepted and is finalized at its segment count times the per-segment price, rounded to the nearest cent, so an amount can still change until `finalized_at` is set; a recipient refused before sending finalizes at zero. A received text is charged, already final, when it arrives, and has no `text_message_id`.","operationId":"list_message_charges_v1_message_charges_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"text_message_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return the charge for this text message.","title":"Text Message Id"},"description":"Only return the charge for this text message."},{"name":"finalized","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True returns only settled charges; false returns only charges whose amount can still change.","title":"Finalized"},"description":"True returns only settled charges; false returns only charges whose amount can still change."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many charges to return per page.","default":50,"title":"Limit"},"description":"How many charges to return per page."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MessageChargeSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/phone-number-charges":{"get":{"tags":["Phone Numbers"],"summary":"List what your phone numbers cost","description":"Returns one charge per month of use, newest first, at the monthly phone-number price. The first month is charged when the number's order completes; each later month is charged on the same day of the month, or on the last day of a shorter month, until the number is released. `rental_month` is the first day of the month the charge pays for. Numbers bought before monthly terms renew on the 1st, and numbers bought before the rate card may also show their one-time purchase charge.","operationId":"list_phone_number_charges_v1_phone_number_charges_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"phone_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return charges for this owned phone number, in E.164 format.","title":"Phone Number"},"description":"Only return charges for this owned phone number, in E.164 format."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many charges to return per page.","default":50,"title":"Limit"},"description":"How many charges to return per page."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PhoneNumberChargeSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/text-message-batches":{"post":{"tags":["Text Message Batches"],"summary":"Submit a batch of text messages","description":"Queues up to a thousand texts that all share one sender and one body, and answers 202 Accepted straight away — nothing has been sent yet. Every created message already exists: the response lists one `text_message_id` per created recipient, in submission order, and that same ID reads the message for its whole life through `GET /v1/text-messages/{text_message_id}` — status `queued` now, delivery outcome later. One cutover exception: a batch that was partly processed at the 2026-08-25 per-item-ID upgrade can order its items differently; match items by `to_phone_number` or `client_reference`. Resia sends from an internal queue at the pace your message rate limits allow, so a burst never comes back as a wall of 429s.\n\nA few bad recipients no longer refuse the whole batch: each recipient is checked on its own, the good ones are created, and the rest are returned in `rejected_text_messages` — each with its 0-based submission `position`, the number as you sent it, its `client_reference`, and a `reason`. A recipient is rejected when its destination is one Resia cannot text or one already used earlier in the batch (the first is texted, later duplicates are rejected). `text_messages` and `rejected_text_messages` together account for every submitted recipient, and a batch in which every recipient is rejected still returns 202 with an empty batch.\n\n`Idempotency-Key` is required. Repeating it with the same request returns the original batch — the same `text_message_id` values, and the same entries in `rejected_text_messages` with the same positions and destinations (a rejected entry's `reason` text may read more generically on a replay) — and queues nothing further; reusing it after changing the sender, the body, the recipients, their order, or the tags returns 409.\n\nThe batch's `tags` are copied onto every message it creates, so `GET /v1/text-messages` finds them by tag.\n\nRead `GET /v1/text-message-batches/{batch_id}` for whole-batch progress, or `GET /v1/text-message-batches/{batch_id}/text-messages` for the per-recipient detail. A batch larger than the queued-message limit is refused with 429.","operationId":"create_text_message_batch_v1_text_message_batches_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Repeat this value to retry safely: a second request with the same key returns the original batch, with the same text_message_id values, instead of queuing it again.","title":"Idempotency-Key"},"description":"Repeat this value to retry safely: a second request with the same key returns the original batch, with the same text_message_id values, instead of queuing it again."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextMessageBatchCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextMessageBatchSubmissionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Text Message Batches"],"summary":"List your text message batches","description":"Returns your organization's text message batches, newest first, one page at a time. Follow `next_cursor` for the next page. Each item is the same whole-batch progress the single-batch read returns.","operationId":"list_text_message_batches_v1_text_message_batches_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many batches to return per page.","default":50,"title":"Limit"},"description":"How many batches to return per page."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextMessageBatchSummaryPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/text-message-batches/{batch_id}":{"get":{"tags":["Text Message Batches"],"summary":"Read one text message batch","description":"Whole-batch progress in one read: the derived status and the counts of every recipient across its queue and its message states. The counts always sum to `total`.","operationId":"get_text_message_batch_v1_text_message_batches__batch_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextMessageBatchSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/text-message-batches/{batch_id}/cancel":{"post":{"tags":["Text Message Batches"],"summary":"Cancel a text message batch","description":"Stops the texts still queued. Texts already sent or being sent keep their state and run to their own end. Cancel is idempotent: cancelling an already-cancelled batch changes nothing and returns its current progress.","operationId":"cancel_text_message_batch_route_v1_text_message_batches__batch_id__cancel_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextMessageBatchSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/text-message-batches/{batch_id}/text-messages":{"get":{"tags":["Text Message Batches"],"summary":"List the text messages in a batch","description":"Returns every recipient in the batch, in the order you submitted them, one page at a time. Follow `next_cursor` for the next page. One cutover exception: a batch that was partly processed at the 2026-08-25 per-item-ID upgrade can order its items differently; match items by `to_phone_number` or `client_reference`. Each item carries the message's one durable `text_message_id` — assigned at submission — and its live status. Read the message through `GET /v1/text-messages/{text_message_id}` for its delivery detail and charge.","operationId":"list_text_message_batch_text_messages_v1_text_message_batches__batch_id__text_messages_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many text messages to return per page.","default":50,"title":"Limit"},"description":"How many text messages to return per page."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextMessageBatchItemPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/text-messages":{"post":{"tags":["Text Messages"],"summary":"Send a text message (deprecated)","description":"**Deprecated. Use `POST /v1/text-message-batches`, which takes the same one-to-a-thousand recipients and paces them from an internal queue instead of sending them all at once.** This endpoint keeps working unchanged; its responses now also carry `batch_id`, and `submission_id` is a deprecated alias of it. Each response also carries a `Deprecation` header.\n\nSends one text from a number your organization owns to between one and a thousand recipients, and answers 202 Accepted straight away. The answer means Resia has safely recorded the request, not that anything has been delivered yet.\n\nEvery recipient comes back as its own text message with its own identifier and its own result, in the order you listed them, so one blocked or failed number never hides the rest. Read `GET /v1/text-messages/{text_message_id}` for one of them, or `GET /v1/text-messages?submission_id=` for all of them.\n\n`Idempotency-Key` is required and makes a retry safe: repeating the same key with the same request returns the original identifiers and sends nothing further. Reusing it after changing the sender, the recipients, or the text returns 409.\n\nRecipients are limited to United States numbers. A recipient who has replied STOP to your messages is recorded as failed without being sent to. Exceeding your message rate limits returns 429.","operationId":"create_text_messages_v1_text_messages_post","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Repeat this value to retry safely: a second request with the same key returns the original text messages instead of sending again.","title":"Idempotency-Key"},"description":"Repeat this value to retry safely: a second request with the same key returns the original text messages instead of sending again."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextMessageCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextMessageSubmissionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Text Messages"],"summary":"Find your text messages","description":"Returns text messages that match the filters, in the order they were submitted, one page at a time. Follow `next_cursor` for the next page. One cutover exception: a batch that was partly processed at the 2026-08-25 per-item-ID upgrade can order its items differently; match items by `to_phone_number` or `client_reference`. Filter by `batch_id` for every recipient of one batch or one deprecated send, by `client_reference` for the messages carrying exactly your own label, by `tag_key` and `tag_value` for the messages whose tags hold that pair (a message carries the tags of the batch or send that created it), or by any combination. At least one filter is required.","operationId":"list_text_messages_v1_text_messages_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"batch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return the messages of this batch. The same value the deprecated submission_id carries.","title":"Batch Id"},"description":"Only return the messages of this batch. The same value the deprecated submission_id carries."},{"name":"submission_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deprecated alias of batch_id; it carries the same value.","deprecated":true,"title":"Submission Id"},"description":"Deprecated alias of batch_id; it carries the same value.","deprecated":true},{"name":"client_reference","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"Only return messages carrying exactly this client_reference label. The label is an opaque identifier from your own system; because it travels in the URL here, it must never contain personal or sensitive information.","title":"Client Reference"},"description":"Only return messages carrying exactly this client_reference label. The label is an opaque identifier from your own system; because it travels in the URL here, it must never contain personal or sensitive information."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many text messages to return per page.","default":50,"title":"Limit"},"description":"How many text messages to return per page."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextMessagePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/text-messages/{text_message_id}":{"get":{"tags":["Text Messages"],"summary":"Read one text message","description":"Reports where one recipient's message has got to, including the reason it failed when it did.","operationId":"get_text_message_v1_text_messages__text_message_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"text_message_id","in":"path","required":true,"schema":{"type":"string","title":"Text Message Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextMessageResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/request-logs":{"get":{"tags":["Request Logs"],"summary":"List your request logs","description":"Returns the requests your organization sent to this API and the requests Resia sent to your inbound-input webhook, newest first, one page at a time. Follow `next_cursor` for the next page. Each item is metadata only; read one request's bodies with GET /v1/request-logs/{request_id}. Combine the filters to narrow the list; a request with no status (a webhook that never answered) never matches a `status_code` filter.","operationId":"list_request_logs_v1_request_logs_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only return requests handled at or after this time (ISO 8601).","title":"Created After"},"description":"Only return requests handled at or after this time (ISO 8601)."},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only return requests handled at or before this time (ISO 8601).","title":"Created Before"},"description":"Only return requests handled at or before this time (ISO 8601)."},{"name":"status_code","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only return requests that answered with exactly this HTTP status.","title":"Status Code"},"description":"Only return requests that answered with exactly this HTTP status."},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RequestLogKind"},{"type":"null"}],"description":"Only return requests of this kind: api (a request you sent) or webhook (a request Resia sent to your webhook).","title":"Kind"},"description":"Only return requests of this kind: api (a request you sent) or webhook (a request Resia sent to your webhook)."},{"name":"route","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"description":"Only return requests whose route matches exactly — an API route pattern such as /v1/calls, or a webhook URL. For a custom tool call, the route is only the origin of the tool's endpoint, so that value matches the calls of every tool on that host.","title":"Route"},"description":"Only return requests whose route matches exactly — an API route pattern such as /v1/calls, or a webhook URL. For a custom tool call, the route is only the origin of the tool's endpoint, so that value matches the calls of every tool on that host."},{"name":"method","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"description":"Only return requests that used exactly this HTTP method, such as POST.","title":"Method"},"description":"Only return requests that used exactly this HTTP method, such as POST."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many request logs to return per page.","default":50,"title":"Limit"},"description":"How many request logs to return per page."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_RequestLogSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/request-logs/{request_id}":{"get":{"tags":["Request Logs"],"summary":"Read one request log","description":"Everything the list gives you, plus the request and response bodies, stored complete and never truncated. Resia-issued credentials and the endpoint_url of your custom tools are replaced with [redacted] in a body; your other field values are stored unchanged. An unknown identifier, or one belonging to another organization, returns 404.","operationId":"get_request_log_v1_request_logs__request_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me":{"get":{"tags":["Identity"],"summary":"Read who you are signed in as","description":"Returns the signed-in person and the organization they belong to. Both are null before they have created or joined one — that empty result is how the portal knows to show organization creation. `admin` describes an Insito admin; with X-Resia-Organization-Id, an admin gets that organization instead.","operationId":"read_me_v1_me_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations":{"get":{"tags":["Organizations"],"summary":"List organizations","description":"Returns the organization you belong to. An Insito admin gets every active organization, newest first, one page at a time; follow `next_cursor` for the next page.","operationId":"list_organizations_v1_organizations_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many organizations to return per page.","default":50,"title":"Limit"},"description":"How many organizations to return per page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organizations"],"summary":"Create your organization","description":"Creates an organization and makes you its first member. The organization starts with $10.00 of free credit. Optional `invite_emails` are invited in the same request, so sign-up is one round trip. Refused if you already belong to an organization. An Insito admin can instead name the first `member`, who joins at their first sign-in; the admin key must name one. An Insito admin who signs in and sends no `member` creates their own organization, the same as anyone else. A customer who sends `member` is refused.","operationId":"create_organization_v1_organizations_post","security":[{"ResiaApiCredential":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/slug-available":{"get":{"tags":["Organizations"],"summary":"Check whether a slug is free","description":"A live check while a person types a slug. Advisory only — creation is still the authority, and an available slug can be taken by someone else a moment later.","operationId":"slug_available_v1_organizations_slug_available_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"slug","in":"query","required":true,"schema":{"type":"string","description":"The slug to check.","examples":["sunrise-clinics"],"title":"Slug"},"description":"The slug to check."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlugAvailableResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/{organization_id}":{"get":{"tags":["Organizations"],"summary":"Read your organization","description":"Returns your organization. A caller who is not a member gets 404, never 403 — membership is not discoverable.","operationId":"read_organization_v1_organizations__organization_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Organizations"],"summary":"Rename your organization","description":"Changes the organization's display name. The slug and region are fixed at creation.","operationId":"patch_organization_v1_organizations__organization_id__patch","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchOrganizationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/{organization_id}/members":{"get":{"tags":["Members"],"summary":"List the people in your organization","description":"Returns the organization's members, newest first, one page at a time. Follow `next_cursor` for the next page. An Insito admin can also read this list.","operationId":"list_members_v1_organizations__organization_id__members_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many members to return per page.","default":50,"title":"Limit"},"description":"How many members to return per page."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MemberResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/{organization_id}/members/{user_id}":{"delete":{"tags":["Members"],"summary":"Remove a member","description":"Removes a member; their access stops at once. Passing your own id is how you leave. Removing the last remaining member is refused.","operationId":"remove_member_v1_organizations__organization_id__members__user_id__delete","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/{organization_id}/invites":{"post":{"tags":["Invites"],"summary":"Invite a teammate","description":"Creates an invite for one address and returns a link to share. An address that is already a member, or that already has a live invite (returned as `invite_pending`), is refused.","operationId":"create_invite_v1_organizations__organization_id__invites_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedInvite"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Invites"],"summary":"List your organization's invites","description":"Returns invites, newest first. The link is only ever returned when the invite is created; it is not shown here.","operationId":"list_invites_v1_organizations__organization_id__invites_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many invites to return per page.","default":50,"title":"Limit"},"description":"How many invites to return per page."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_InviteResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/{organization_id}/invites/{invite_id}/resend":{"post":{"tags":["Invites"],"summary":"Resend an invite","description":"Issues a fresh link for a pending invite and resets its 7-day clock. The previous link stops working. Refused once the invite is accepted or revoked.","operationId":"resend_invite_v1_organizations__organization_id__invites__invite_id__resend_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}},{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedInvite"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/{organization_id}/invites/{invite_id}":{"delete":{"tags":["Invites"],"summary":"Revoke an invite","description":"Revokes an invite; its link stops working at once. Revoking an already-revoked invite changes nothing. Refused once the invite is accepted.","operationId":"revoke_invite_v1_organizations__organization_id__invites__invite_id__delete","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}},{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invites/{invite_id}":{"get":{"tags":["Invites"],"summary":"Read an invite before signing in","description":"The invitee's landing page. Needs no credential; the invite secret goes in the `X-Invite-Secret` header, never the URL. Reveals only the organization name, the inviter, and the invited address.","operationId":"read_invite_v1_invites__invite_id__get","parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}},{"name":"X-Invite-Secret","in":"header","required":true,"schema":{"type":"string","description":"The secret half of the invite link.","title":"X-Invite-Secret"},"description":"The secret half of the invite link."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteLandingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invites/{invite_id}/accept":{"post":{"tags":["Invites"],"summary":"Accept an invite","description":"Joins the organization the invite is for. Present the invite secret in the `X-Invite-Secret` header and be signed in with the invited email. Refused if you already belong to an organization.","operationId":"accept_invite_v1_invites__invite_id__accept_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}},{"name":"X-Invite-Secret","in":"header","required":true,"schema":{"type":"string","description":"The secret half of the invite link.","title":"X-Invite-Secret"},"description":"The secret half of the invite link."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/{organization_id}/api-credentials":{"post":{"tags":["API Credentials"],"summary":"Issue an API credential","description":"Creates an API credential and returns its secret exactly once, here. Resia stores only a fingerprint and can never show the secret again. A duplicate name within the environment is refused. `scope` sets what the credential may do: `reader` reads, `editor` also writes, and `owner` also deletes. It defaults to `editor` and cannot change later.","operationId":"create_api_credential_v1_organizations__organization_id__api_credentials_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiCredentialRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedApiCredential"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["API Credentials"],"summary":"List your API credentials","description":"Returns the organization's credentials — metadata only, never a secret or a fingerprint. Revoked credentials stay in the list as the audit trail.","operationId":"list_api_credentials_v1_organizations__organization_id__api_credentials_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many credentials to return per page.","default":50,"title":"Limit"},"description":"How many credentials to return per page."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ApiCredentialResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organizations/{organization_id}/api-credentials/{credential_id}":{"delete":{"tags":["API Credentials"],"summary":"Revoke an API credential","description":"Revokes a credential; it stops working immediately and cannot be un-revoked. The credential stays in the list as revoked. Revoking an already-revoked credential changes nothing.","operationId":"revoke_api_credential_v1_organizations__organization_id__api_credentials__credential_id__delete","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","title":"Credential Id"}},{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing":{"get":{"tags":["Billing"],"summary":"Read your balance and billing setup","description":"Returns your organization's prepaid balance, the saved card, and the automatic recharge setting. The balance is the funds added minus settled usage; usage that has not settled yet is not subtracted. While automatic recharge is on and a card is saved, Resia charges the card when the balance falls to $20.00 or less, and brings the balance back up to the target, charging at least $20.00. New paid work is refused with 402 only when the balance is $0.00 or less.","operationId":"read_billing_v1_billing_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/payment-method-session":{"post":{"tags":["Billing"],"summary":"Open a page to save a card","description":"Creates a hosted Stripe page where a person saves the card your organization pays with. Stripe shows the consent text for future automatic charges on that page, and Resia never sees the card number. The saved card replaces the previous one as the card automatic recharges use, and saving it allows an automatic charge at once, even after a failed one. `return_url` must be on one of the portal origins Resia allows; any other origin answers 422.","operationId":"open_payment_method_session_v1_billing_payment_method_session_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPaymentMethodSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPaymentMethodSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/auto-recharge":{"put":{"tags":["Billing"],"summary":"Turn automatic recharge on or off","description":"Automatic recharge is on by default with a $20.00 target. While it is on and a card is saved, Resia charges the card when the balance falls to $20.00 or less, and brings the balance back up to `target_in_cents`, charging at least $20.00. `target_in_cents` must be at least $20.00; leave it empty to use $20.00. Send `enabled: false` with no target to stop automatic charges. After a failed automatic charge Resia waits a day before it tries the same card again. Returns the updated billing summary.","operationId":"replace_auto_recharge_v1_billing_auto_recharge_put","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAutoRechargeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/top-ups":{"post":{"tags":["Billing"],"summary":"Add funds by hand","description":"Creates a hosted Stripe page where a person pays `amount_in_cents` into the balance, at least $20.00. The page handles any authentication the bank asks for. The payment is added to the balance once Stripe confirms it, usually within seconds; `credited` reports when. When no card is saved yet, the card paid with becomes the saved card. `Idempotency-Key` is required. Repeating it within 24 hours returns the same page with its current status instead of creating another; reusing it with a different amount or return URL answers 409. `return_url` must be on one of the portal origins Resia allows; any other origin answers 422.","operationId":"open_top_up_v1_billing_top_ups_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Repeat this value to read the same top-up page again instead of creating another.","title":"Idempotency-Key"},"description":"Repeat this value to read the same top-up page again instead of creating another."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingTopUpRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingTopUp"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/usage":{"get":{"tags":["Billing"],"summary":"Read your monthly usage","description":"Counts what your organization used in one UTC calendar month, by the time each record was created: calls and their connected duration, text messages, orchestration runs, 10DLC submissions, and the phone numbers you own now. When the call durations cannot be read, `engine_data_available` is false and the durations are empty rather than zero.","operationId":"read_usage_v1_billing_usage_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The month to report, as YYYY-MM in UTC. Omit it for the current month.","examples":["2026-09"],"title":"Month"},"description":"The month to report, as YYYY-MM in UTC. Omit it for the current month."},{"name":"engine","in":"query","required":false,"schema":{"type":"boolean","description":"Set false to skip reading call durations from the voice engine, for a faster report; the durations are then empty.","default":true,"title":"Engine"},"description":"Set false to skip reading call durations from the voice engine, for a faster report; the durations are then empty."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUsageReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/spend":{"get":{"tags":["Billing"],"summary":"Read your monthly spend","description":"Reports what your organization was charged in one UTC calendar month, by the time each charge was raised: the settled total and the settled and pending counts for calls, text messages sent and received, orchestration tokens, chat tokens, phone numbers, and concurrent call slots. Pending charges are counted, never estimated.","operationId":"read_spend_v1_billing_spend_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The month to report, as YYYY-MM in UTC. Omit it for the current month.","examples":["2026-09"],"title":"Month"},"description":"The month to report, as YYYY-MM in UTC. Omit it for the current month."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSpendReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/call-agents":{"post":{"tags":["Call Agents"],"summary":"Create a Call Agent","description":"Saves the instructions and settings a call should follow. A new Call Agent may need review before it can place production calls. The response `review_status` reports whether it is approved or pending review. `in_call_llm` does not accept a GPT-Live model; a request for one returns HTTP 422. To run the calls on a speech-to-speech model such as GPT-Live, set `model_architecture` to `speech_to_speech` and name the model in `speech_to_speech_model`.\n\n### Assign an inbound agent\n\nTo receive calls, assign this Call Agent to a Resia phone number your organization owns.\n\n1. Save the `id` from this response. Confirm that the agent is approved and active before a test call.\n2. Find your number with [List your phone numbers](https://docs.resia.ai/api-reference/tag/phone-numbers/get/v1/phone-numbers).\n3. Send `PATCH /v1/phone-numbers/{phone_number}` with the agent's `id` as `inbound_call_agent_id`.\n\nUse the full phone number with `+` and its country code in the path. Replace the example agent ID below with your agent's `id`.\n\n```json\n{\"inbound_call_agent_id\": \"01K1SA3F7M8QW2V5C9H4YTB0KD\"}\n```\n\nThis replaces the number's current agent for new inbound calls. A successful response returns HTTP `200` with the number and assigned agent ID. Send `null` as `inbound_call_agent_id` to stop inbound calls on that number.\n\nSee [Assign an inbound agent](https://docs.resia.ai/api-reference/tag/phone-numbers/patch/v1/phone-numbers/phone_number) for the full request reference, or [Receive an inbound call](https://docs.resia.ai/guides/inbound-call) for setup and testing.","operationId":"create_customer_call_agent_v1_call_agents_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAgentWrite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Call Agents"],"summary":"List your Call Agents","description":"Returns your organization's Call Agents, newest first, one page at a time. Follow `next_cursor` for the next page. Archived Call Agents are left out.","operationId":"list_customer_call_agents_v1_call_agents_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many Call Agents to return per page.","default":50,"title":"Limit"},"description":"How many Call Agents to return per page."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallAgentSortField"},{"type":"null"}],"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties.","title":"Sort"},"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties."},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`.","default":"desc"},"description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAgentSummaryPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/call-agents/available-voices":{"get":{"tags":["Call Agents"],"summary":"List the voices a Call Agent can use","description":"Lists the voices a Call Agent can be set to speak in, for one speech provider. Put a voice's provider and id into a Call Agent's voices list to let its calls speak in that voice. The provider defaults to cartesia; both cartesia and fish are supported. Nothing is stored or charged.","operationId":"list_call_agent_voices_v1_call_agents_available_voices_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"provider","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TtsProvider","description":"The speech provider to list voices for — cartesia (the default) or fish.","default":"cartesia"},"description":"The speech provider to list voices for — cartesia (the default) or fish."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableVoicesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/call-agents/available-in-call-llms":{"get":{"tags":["Call Agents"],"summary":"List the in-call models a Call Agent can use","description":"Lists every model that Resia has a price for today, cheapest first, with what each adds to the price of a connected call minute. Put an entry's `provider` and `model` into `in_call_llm` to make the agent's calls use that model. A save still checks the model with its provider, so a listed model that the provider no longer serves is refused with HTTP 422. `in_call_llm` null is not in the list: null means Resia dynamic (recommended), where Resia sends no model, the voice platform selects the model, and no surcharge applies. Nothing is stored or charged.","operationId":"list_call_agent_in_call_llms_v1_call_agents_available_in_call_llms_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableInCallLlmsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/call-agents/{call_agent_id}":{"get":{"tags":["Call Agents"],"summary":"Read one Call Agent","description":"Returns the Call Agent's current content along with where its latest edit stands in review. Set `active=true` to read the version calls use now instead of the latest edit; an agent with no active version returns 404.","operationId":"get_customer_call_agent_v1_call_agents__call_agent_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"call_agent_id","in":"path","required":true,"schema":{"type":"string","title":"Call Agent Id"}},{"name":"active","in":"query","required":false,"schema":{"type":"boolean","description":"Set true to read the version calls use now, not the latest edit.","default":false,"title":"Active"},"description":"Set true to read the version calls use now, not the latest edit."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Call Agents"],"summary":"Replace a Call Agent","description":"Overwrites the Call Agent with the content you send. The edit creates a new version that may need review before it takes effect. Calls use the last active version until the new one is active. `in_call_llm` does not accept a GPT-Live model; a request for one returns HTTP 422. To run the calls on a speech-to-speech model such as GPT-Live, set `model_architecture` to `speech_to_speech` and name the model in `speech_to_speech_model`.","operationId":"replace_customer_call_agent_v1_call_agents__call_agent_id__put","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"call_agent_id","in":"path","required":true,"schema":{"type":"string","title":"Call Agent Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAgentWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Call Agents"],"summary":"Archive a Call Agent","description":"Retires the Call Agent so no new call can use it. Calls already placed with it keep their history, and the Call Agent stops appearing in the list.","operationId":"archive_customer_call_agent_v1_call_agents__call_agent_id__delete","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"call_agent_id","in":"path","required":true,"schema":{"type":"string","title":"Call Agent Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat-agents":{"post":{"tags":["Chat Agents"],"summary":"Create a Chat Agent","description":"Saves the instructions and settings a text conversation should follow. A new Chat Agent may need review before it can run production chats; the response `review_status` reports whether it is approved or pending review.","operationId":"create_customer_chat_agent_v1_chat_agents_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAgentWrite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Chat Agents"],"summary":"List your Chat Agents","description":"Returns your organization's Chat Agents, newest first, one page at a time. Follow `next_cursor` for the next page. Archived Chat Agents are left out.","operationId":"list_customer_chat_agents_v1_chat_agents_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many Chat Agents to return per page.","default":50,"title":"Limit"},"description":"How many Chat Agents to return per page."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ChatAgentSortField"},{"type":"null"}],"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties.","title":"Sort"},"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties."},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`.","default":"desc"},"description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAgentSummaryPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat-agents/{chat_agent_id}":{"get":{"tags":["Chat Agents"],"summary":"Read one Chat Agent","description":"Returns the Chat Agent's current content along with where its latest edit stands in review.","operationId":"get_customer_chat_agent_v1_chat_agents__chat_agent_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"chat_agent_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Agent Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Chat Agents"],"summary":"Replace a Chat Agent","description":"Overwrites the Chat Agent with the content you send. The edit creates a new version that may need review before it takes effect. Chats use the last active version until the new one is active.","operationId":"replace_customer_chat_agent_v1_chat_agents__chat_agent_id__put","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"chat_agent_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Agent Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAgentWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Chat Agents"],"summary":"Archive a Chat Agent","description":"Retires the Chat Agent so no new chat can use it. Chats already started with it keep their history, and the Chat Agent stops appearing in the list.","operationId":"archive_customer_chat_agent_v1_chat_agents__chat_agent_id__delete","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"chat_agent_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Agent Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chats":{"post":{"tags":["Chats"],"summary":"Start a chat","description":"Starts one outbound text conversation that follows the named Chat Agent's approved version, and answers 202 Accepted straight away. The agent opens the conversation with a text it composes from its instructions and your inputs — put the exact opener in the agent's instructions if you need one — and then answers each reply.\n\nSend an `Idempotency-Key` header to make a retry safe: repeating the same key returns the chat the first request created instead of starting a second one. Reusing a key for a different chat — a different `channel`, `participant_handle`, Chat Agent, or `agent_handle` — is refused with 409. A retry that changes only `tags` returns the first chat with the tags it was created with. A retry is also refused with 409 when its `database_id` resolves to a different database than the first request did. An unknown, archived, or not-ready database resolves to none, so a retry after the database became unavailable gets 409. Only one open chat is allowed per channel for each (`participant_handle`, `agent_handle`) pair, so a second start to a pair that already has an open chat is refused with 409. A new chat is refused with 402 `insufficient_funds` while `paid_actions_allowed` is false in `GET /v1/billing` (your balance is $0.00 or less).\n\nFor a web chat, set `channel` to `web` and `participant_handle` to your own id for the person. Your page then runs the conversation through the API: read the agent's messages from `GET /v1/chats/{chat_id}/messages` and, once the agent's first message is there, send the person's messages to `POST /v1/chats/{chat_id}/messages`.","operationId":"create_chat_v1_chats_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Repeat this value to retry safely: a second request with the same key returns the original chat instead of starting a new one. A retry whose chat differs, including a database_id that now resolves differently, gets 409.","title":"Idempotency-Key"},"description":"Repeat this value to retry safely: a second request with the same key returns the original chat instead of starting a new one. A retry whose chat differs, including a database_id that now resolves differently, gets 409."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAccepted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Chats"],"summary":"List your chats","description":"Returns your organization's chats, newest first, one page at a time. Follow `next_cursor` for the next page. Set `chat_agent_id` to list the chats of one Chat Agent, archived or not; an identifier your organization does not own is refused with 404. Set `orchestration_run_id` to list only the chats that one orchestration run started; a run your organization does not own is refused with 404. Set `tag_key` and `tag_value` to list only the chats whose tags hold that pair.","operationId":"list_chats_v1_chats_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"chat_agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return chats run by this Chat Agent.","title":"Chat Agent Id"},"description":"Only return chats run by this Chat Agent."},{"name":"orchestration_run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return chats that this orchestration run started.","title":"Orchestration Run Id"},"description":"Only return chats that this orchestration run started."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many chats to return per page.","default":50,"title":"Limit"},"description":"How many chats to return per page."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ChatSortField"},{"type":"null"}],"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties.","title":"Sort"},"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties."},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`.","default":"desc"},"description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSummaryPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chats/{chat_id}":{"get":{"tags":["Chats"],"summary":"Read one chat","description":"Returns the chat's status and timestamps, the conversation so far, and the end-of-chat analysis once the chat has ended and its analysis is written. With `include_tool_activity=true` it also returns the tool requests and results the Chat Agent recorded, in recorded order, with credential fields shown as [redacted]. A read with that option is not stored in the request log.","operationId":"get_chat_v1_chats__chat_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}},{"name":"include_tool_activity","in":"query","required":false,"schema":{"type":"boolean","description":"Also return the tool requests and results the Chat Agent recorded (tool_activity). Off by default.","default":false,"title":"Include Tool Activity"},"description":"Also return the tool requests and results the Chat Agent recorded (tool_activity). Off by default."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chats/{chat_id}/cancel":{"post":{"tags":["Chats"],"summary":"Cancel a chat","description":"Ends one open chat so it stops answering. A chat that started shows post_processing while Resia writes its analysis, then cancelled with the analysis; a chat that has not started is cancelled at once. Cancel is idempotent: cancelling a chat whose conversation has already ended — post_processing, cancelled, or otherwise finished — changes nothing and returns its current record.","operationId":"cancel_chat_run_v1_chats__chat_id__cancel_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chats/{chat_id}/messages":{"post":{"tags":["Chats"],"summary":"Send a message in a web chat","description":"Stores one message the person wrote in a web chat and answers 202 Accepted straight away. The agent's reply follows a few seconds later: read it from `GET /v1/chats/{chat_id}/messages` with `after` set to this message's `sequence`. Send one message at a time: wait for this answer before you send the next message.\n\nSend the same `client_message_id` again to retry safely: Resia returns the message it stored the first time and does not reply a second time, even after the chat has ended. The same `client_message_id` with different text is refused with 409. A new message is refused with 409 while the chat is `pending` (wait for the agent's first message) and after the chat has ended. A chat that is not a web chat is refused with 409. A new message is refused with 402 `insufficient_funds` and not stored while `paid_actions_allowed` is false in `GET /v1/billing` (your balance is $0.00 or less).","operationId":"post_chat_message_v1_chats__chat_id__messages_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Chats"],"summary":"Read a web chat's messages","description":"Returns a web chat's messages after the `after` sequence number, oldest first, from both the person and the agent, with the chat's current status. Read again with `after` set to the last `sequence` you have; about once a second is enough while you wait for a reply. A chat that is not a web chat is refused with 409: read its transcript through `GET /v1/chats/{chat_id}`.\n\nBecause you read this route about once a second, a successful read is not kept in your request logs. A refused read is kept.","operationId":"read_chat_messages_v1_chats__chat_id__messages_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}},{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Return only the messages after this sequence number. Use 0 for the first read.","default":0,"title":"After"},"description":"Return only the messages after this sequence number. Use 0 for the first read."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many messages to return at most.","default":50,"title":"Limit"},"description":"How many messages to return at most."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessagePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestration-agents":{"post":{"tags":["Orchestration Agents"],"summary":"Create an Orchestration Agent","description":"Saves the instructions, the Call Agents its runs may dial, and the per-run caps and calling window an orchestration run follows. A new Orchestration Agent may be reviewed by Resia before its runs place production calls; the response `review_status` reports whether it is approved or still pending review.","operationId":"create_customer_orchestration_agent_v1_orchestration_agents_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationAgentWrite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Orchestration Agents"],"summary":"List your Orchestration Agents","description":"Returns your organization's Orchestration Agents, newest first, one page at a time. Follow `next_cursor` for the next page. Archived Orchestration Agents are left out.","operationId":"list_customer_orchestration_agents_v1_orchestration_agents_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many Orchestration Agents to return per page.","default":50,"title":"Limit"},"description":"How many Orchestration Agents to return per page."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OrchestrationAgentSortField"},{"type":"null"}],"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties.","title":"Sort"},"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties."},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`.","default":"desc"},"description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationAgentSummaryPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestration-agents/{orchestration_agent_id}":{"get":{"tags":["Orchestration Agents"],"summary":"Read one Orchestration Agent","description":"Returns the Orchestration Agent's current content along with where its latest edit stands in review. Set `active=true` to read the version runs use now instead of the latest edit; an agent with no active version returns 404.","operationId":"get_customer_orchestration_agent_v1_orchestration_agents__orchestration_agent_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"orchestration_agent_id","in":"path","required":true,"schema":{"type":"string","title":"Orchestration Agent Id"}},{"name":"active","in":"query","required":false,"schema":{"type":"boolean","description":"Set true to read the version runs use now, not the latest edit.","default":false,"title":"Active"},"description":"Set true to read the version runs use now, not the latest edit."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Orchestration Agents"],"summary":"Replace an Orchestration Agent","description":"Overwrites the Orchestration Agent with the content you send. The edit becomes a new version that may be reviewed before it takes effect.","operationId":"replace_customer_orchestration_agent_v1_orchestration_agents__orchestration_agent_id__put","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"orchestration_agent_id","in":"path","required":true,"schema":{"type":"string","title":"Orchestration Agent Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationAgentWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Orchestration Agents"],"summary":"Archive an Orchestration Agent","description":"Retires the Orchestration Agent so no new run can use it. Runs already started keep their history, and the Orchestration Agent stops appearing in the list. Archival is refused with 409 while a run of the agent is unfinished, while an Orchestration Agent experiment is running, or while another Orchestration Agent references it.","operationId":"archive_customer_orchestration_agent_v1_orchestration_agents__orchestration_agent_id__delete","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"orchestration_agent_id","in":"path","required":true,"schema":{"type":"string","title":"Orchestration Agent Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/databases":{"post":{"tags":["Databases"],"summary":"Create a database","description":"Registers the HTTPS URL of your JSON data export and imports it right away. The response `ready` reports whether the first import succeeded; a database that is not ready answers no calls or chats until a later refresh succeeds.","operationId":"create_customer_database_v1_databases_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Databases"],"summary":"List your databases","description":"Returns your organization's databases, newest first, one page at a time. Follow `next_cursor` for the next page.","operationId":"list_customer_databases_v1_databases_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many databases to return per page.","default":50,"title":"Limit"},"description":"How many databases to return per page."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DatabaseSortField"},{"type":"null"}],"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties.","title":"Sort"},"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties."},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`.","default":"desc"},"description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabasePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/databases/{database_id}":{"get":{"tags":["Databases"],"summary":"Read one database","description":"Returns the database, including whether it is ready and which export version its data was imported from.","operationId":"get_customer_database_v1_databases__database_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","title":"Database Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools":{"post":{"tags":["Tools"],"summary":"Create a tool","description":"Defines one HTTPS tool for your organization: a name, a description that tells the agent what the tool does and what it returns, an object JSON Schema for its arguments, and your endpoint URL. An agent can use the tool once an agent version names it in `tools`. For each tool call, Resia sends one POST of a `ToolRequest` to the endpoint, with no retry and no redirect, and waits at most ten seconds. The endpoint answers with a 2xx `ToolEndpointResponse` of at most 64 KiB: `result`, or `error` with a `message`. Treat the endpoint URL as a credential. A name that another tool of your organization uses, or used before it was archived, returns HTTP 409. A built-in tool name, an invalid argument schema, a schema reference that is not local or does not lead to a schema, a reserved argument name, text that looks like a secret or personal data, or an endpoint that is not a public HTTPS URL with a valid host name returns HTTP 422.","operationId":"create_customer_tool_v1_tools_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolWrite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Tools"],"summary":"List your tools","description":"Returns your organization's tools, newest first, one page at a time. Follow `next_cursor` for the next page. Archived tools are left out.","operationId":"list_customer_tools_v1_tools_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many tools to return per page.","default":50,"title":"Limit"},"description":"How many tools to return per page."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ToolSortField"},{"type":"null"}],"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties.","title":"Sort"},"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties."},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`.","default":"desc"},"description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/{tool_id}":{"get":{"tags":["Tools"],"summary":"Read one tool","description":"Returns the tool's current definition, including its endpoint URL. An archived tool returns HTTP 404.","operationId":"get_customer_tool_v1_tools__tool_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Tools"],"summary":"Replace a tool","description":"Overwrites the tool's description, argument schema, and endpoint URL, with no new agent version. The endpoint and the argument check apply from the next tool call of every agent version that names the tool. The agent reads the new description and schema from the next call, chat turn, or orchestration session that starts. The name cannot change: a different `name` returns HTTP 422. An archived tool returns HTTP 404.","operationId":"replace_customer_tool_v1_tools__tool_id__put","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tools"],"summary":"Archive a tool","description":"Archives a tool that no agent uses. The tool leaves the list, GET and PUT return HTTP 404, and its name stays reserved. A tool that is assigned to an agent returns HTTP 409. The answer lists every such agent in `agents`; the message does not name them. An agent counts when it is a Call Agent, Chat Agent, or Orchestration Agent that is not archived and whose current `tools` list, or the version that now runs, names the tool. Remove the tool from each of those agents, then archive it. A call, chat, or run that started before the archive continues without the tool, and a tool call already sent still finishes.","operationId":"archive_customer_tool_v1_tools__tool_id__delete","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"204":{"description":"Successful Response"},"409":{"description":"The tool is assigned to at least one agent. `agents` lists every such agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolAssignedError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestration-runs":{"post":{"tags":["Orchestration Runs"],"summary":"Start an orchestration run","description":"Starts one run of an Orchestration Agent that can place calls, wait, and pick the work back up later, over hours or days. Answers 201 when the run is new.\n\n`inputs` must satisfy the Orchestration Agent's input schema. A new run whose inputs do not is refused with 422, and no run is created.\n\nSend `idempotency_key` to make retries safe: repeating a key with the same inputs answers 200 and returns the run you already started. The first request's webhook URL remains on that run. Repeating the key with different inputs is refused with 409.\n\nA `timezone` in `inputs` (an IANA name such as `America/New_York`) is optional. It sets the zone the calling window is measured in. When it is omitted, the window is measured in `America/New_York`. A present but unknown zone is refused with 422.","operationId":"create_run_v1_orchestration_runs_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationRunCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationRunCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Orchestration Runs"],"summary":"List your orchestration runs","description":"Returns your organization's orchestration runs, newest first, one page at a time. Follow `next_cursor` for the next page. Set `orchestration_agent_id` to list the runs of one Orchestration Agent, archived or not; an identifier your organization does not own is refused with 404. Set `tag_key` and `tag_value` to list only the runs whose tags hold that pair. Each item is the same record that `GET /v1/orchestration-runs/{orchestration_run_id}` returns.","operationId":"list_runs_v1_orchestration_runs_get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"orchestration_agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return runs of this Orchestration Agent.","title":"Orchestration Agent Id"},"description":"Only return runs of this Orchestration Agent."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page. Omit it for the first page.","title":"Cursor"},"description":"The `next_cursor` from the previous page. Omit it for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many orchestration runs to return per page.","default":50,"title":"Limit"},"description":"How many orchestration runs to return per page."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OrchestrationRunSortField"},{"type":"null"}],"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties.","title":"Sort"},"description":"Order the list by this field. Omit it for the default order, newest first. Empty values come last in both directions, and the identifier breaks ties."},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`.","default":"desc"},"description":"The direction of `sort`: `asc` or `desc`. It applies only with `sort`. Keep the same `sort` and `order` when you pass `next_cursor`."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_OrchestrationRunResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestration-runs/{orchestration_run_id}":{"get":{"tags":["Orchestration Runs"],"summary":"Read one orchestration run","description":"Reports whether the run is queued, working, waiting, or finished. A waiting run says in `waiting_for` what it is waiting on. A finished run carries its result in `analysis`, or a reason in `error_code` if it failed. With `include_tool_activity=true` it also returns the tool requests and results the Orchestration Agent recorded, in recorded order, with credential fields shown as [redacted]. A read with that option is not stored in the request log. Read it when the run opens or its status changes, not on every status check.","operationId":"get_run_v1_orchestration_runs__orchestration_run_id__get","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"orchestration_run_id","in":"path","required":true,"schema":{"type":"string","title":"Orchestration Run Id"}},{"name":"include_tool_activity","in":"query","required":false,"schema":{"type":"boolean","description":"Also return the tool requests and results the Orchestration Agent recorded (tool_activity). Off by default.","default":false,"title":"Include Tool Activity"},"description":"Also return the tool requests and results the Orchestration Agent recorded (tool_activity). Off by default."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/orchestration-runs/{orchestration_run_id}/cancel":{"post":{"tags":["Orchestration Runs"],"summary":"Cancel an orchestration run","description":"Asks a run to stop. Cancelling is a request, not an instant stop: a run that is mid-turn finishes what it is doing before it ends, so the status you get back can still be `running`. Cancelling a run that has already finished is refused with 409; cancelling an already-cancelled run is accepted and changes nothing.","operationId":"cancel_run_v1_orchestration_runs__orchestration_run_id__cancel_post","security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"orchestration_run_id","in":"path","required":true,"schema":{"type":"string","title":"Orchestration Run Id"}},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationRunCancelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflow-agents":{"post":{"tags":["Workflow Agents"],"summary":"Create an Orchestration Agent (deprecated)","description":"Deprecated. Use `POST /v1/orchestration-agents`. This endpoint stops working on 2026-10-25.\n\nSaves the instructions, the Call Agents its runs may dial, and the per-run caps and calling window an orchestration run follows. A new Orchestration Agent may be reviewed by Resia before its runs place production calls; the response `review_status` reports whether it is approved or still pending review.","operationId":"create_customer_workflow_agent_v1_workflow_agents_post","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentWrite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Workflow Agents"],"summary":"List your Orchestration Agents (deprecated)","description":"Deprecated. Use `GET /v1/orchestration-agents`. This endpoint stops working on 2026-10-25.\n\nReturns your organization's Orchestration Agents, newest first, one page at a time. Follow `next_cursor` for the next page. Archived Orchestration Agents are left out.","operationId":"list_customer_workflow_agents_v1_workflow_agents_get","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page.","title":"Cursor"},"description":"The `next_cursor` from the previous page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many agents to return per page.","default":50,"title":"Limit"},"description":"How many agents to return per page."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentSummaryPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflow-agents/{workflow_agent_id}":{"get":{"tags":["Workflow Agents"],"summary":"Read one Orchestration Agent (deprecated)","description":"Deprecated. Use `GET /v1/orchestration-agents/{orchestration_agent_id}`. This endpoint stops working on 2026-10-25.\n\nReturns the Orchestration Agent's current content along with where its latest edit stands in review. Set `active=true` to read the version runs use now instead of the latest edit; an agent with no active version returns 404.","operationId":"get_customer_workflow_agent_v1_workflow_agents__workflow_agent_id__get","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"workflow_agent_id","in":"path","required":true,"schema":{"type":"string","deprecated":true,"title":"Workflow Agent Id"},"deprecated":true},{"name":"active","in":"query","required":false,"schema":{"type":"boolean","description":"Set true to read the version runs use now, not the latest edit.","default":false,"title":"Active"},"description":"Set true to read the version runs use now, not the latest edit."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflow Agents"],"summary":"Replace an Orchestration Agent (deprecated)","description":"Deprecated. Use `PUT /v1/orchestration-agents/{orchestration_agent_id}`. This endpoint stops working on 2026-10-25.\n\nOverwrites the Orchestration Agent with the content you send. The edit becomes a new version that may be reviewed before it takes effect.","operationId":"replace_customer_workflow_agent_v1_workflow_agents__workflow_agent_id__put","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"workflow_agent_id","in":"path","required":true,"schema":{"type":"string","deprecated":true,"title":"Workflow Agent Id"},"deprecated":true},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAgentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workflow Agents"],"summary":"Archive an Orchestration Agent (deprecated)","description":"Deprecated. Use `DELETE /v1/orchestration-agents/{orchestration_agent_id}`. This endpoint stops working on 2026-10-25.\n\nRetires the Orchestration Agent so no new run can use it. Runs already started keep their history, and the Orchestration Agent stops appearing in the list. Archival is refused with 409 while a run of the agent is unfinished, while an Orchestration Agent experiment is running, or while another Orchestration Agent references it.","operationId":"archive_customer_workflow_agent_v1_workflow_agents__workflow_agent_id__delete","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"workflow_agent_id","in":"path","required":true,"schema":{"type":"string","deprecated":true,"title":"Workflow Agent Id"},"deprecated":true},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflow-runs":{"post":{"tags":["Workflow Runs"],"summary":"Start an orchestration run (deprecated)","description":"Deprecated. Use `POST /v1/orchestration-runs`. This endpoint stops working on 2026-10-25.\n\nStarts one run of an Orchestration Agent that can place calls, wait, and pick the work back up later, over hours or days. Answers 201 when the run is new.\n\n`inputs` must satisfy the Orchestration Agent's input schema. A new run whose inputs do not is refused with 422, and no run is created.\n\nSend `idempotency_key` to make retries safe: repeating a key with the same inputs answers 200 and returns the run you already started. The first request's webhook URL remains on that run. Repeating the key with different inputs is refused with 409.\n\nA `timezone` in `inputs` (an IANA name such as `America/New_York`) is optional. It sets the zone the calling window is measured in. When it is omitted, the window is measured in `America/New_York`. A present but unknown zone is refused with 422.","operationId":"create_run_v1_workflow_runs_post","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Workflow Runs"],"summary":"List your orchestration runs (deprecated)","description":"Deprecated. Use `GET /v1/orchestration-runs`. This endpoint stops working on 2026-10-25.\n\nReturns your organization's orchestration runs, newest first, one page at a time. Follow `next_cursor` for the next page. Set `workflow_agent_id` to list the runs of one Orchestration Agent, archived or not; an identifier your organization does not own is refused with 404. Set `tag_key` and `tag_value` to list only the runs whose tags hold that pair. Each item is the same record that `GET /v1/workflow-runs/{workflow_run_id}` returns.","operationId":"list_runs_v1_workflow_runs_get","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"workflow_agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return runs of this Orchestration Agent.","deprecated":true,"title":"Workflow Agent Id"},"description":"Only return runs of this Orchestration Agent.","deprecated":true},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` from the previous page.","title":"Cursor"},"description":"The `next_cursor` from the previous page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"How many runs to return per page.","default":50,"title":"Limit"},"description":"How many runs to return per page."},{"name":"tag_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Key"},"description":"Only return records whose tags hold this key with exactly `tag_value`. Send it together with `tag_value`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"tag_value","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information.","title":"Tag Value"},"description":"The value `tag_key` must hold. Send it together with `tag_key`. Because it travels in the URL, it must not carry names, phone numbers, or any personal, health, credential, or secret information."},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WorkflowRunResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflow-runs/{workflow_run_id}":{"get":{"tags":["Workflow Runs"],"summary":"Read one orchestration run (deprecated)","description":"Deprecated. Use `GET /v1/orchestration-runs/{orchestration_run_id}`. This endpoint stops working on 2026-10-25.\n\nReports whether the run is queued, working, waiting, or finished. A waiting run says in `waiting_for` what it is waiting on. A finished run carries its result in `analysis`, or a reason in `error_code` if it failed.","operationId":"get_run_v1_workflow_runs__workflow_run_id__get","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"string","deprecated":true,"title":"Workflow Run Id"},"deprecated":true},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflow-runs/{workflow_run_id}/cancel":{"post":{"tags":["Workflow Runs"],"summary":"Cancel an orchestration run (deprecated)","description":"Deprecated. Use `POST /v1/orchestration-runs/{orchestration_run_id}/cancel`. This endpoint stops working on 2026-10-25.\n\nAsks a run to stop. Cancelling is a request, not an instant stop: a run that is mid-turn finishes what it is doing before it ends, so the status you get back can still be `running`. Cancelling a run that has already finished is refused with 409; cancelling an already-cancelled run is accepted and changes nothing.","operationId":"cancel_run_v1_workflow_runs__workflow_run_id__cancel_post","deprecated":true,"security":[{"ResiaApiCredential":[]}],"parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"string","deprecated":true,"title":"Workflow Run Id"},"deprecated":true},{"name":"X-Resia-Organization-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization.","title":"X-Resia-Organization-Id"},"description":"Insito admins only: the organization this request acts on. A customer's own credential may omit it, or name only its own organization."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunCancelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"webhooks":{"call.ended":{"post":{"tags":["Calls"],"summary":"Call Ended Event","description":"Resia sends this when a call using a Call Agent that has a `call_ended_webhook_url` reaches\na terminal status. `type` is `call.ended` and `call` is the same record `GET /v1/calls/{call_id}`\nreturns, built when the event is sent. Reply with any `2xx` to acknowledge; Resia retries a\nfailed delivery on a fixed schedule and gives up after the last attempt, repeating the same\n`call.id` each time, so treat a repeated `call.id` as a duplicate. Each attempt is one row in\n`GET /v1/request-logs`.","operationId":"call_ended_eventcall_ended_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallEndedEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"call.incoming":{"post":{"tags":["Calls"],"summary":"Call Incoming Event","description":"Resia sends this to a Call Agent's `inbound_input_webhook_url` when an inbound call arrives.\n`type` is `call.incoming` and `call` carries the caller (`from_phone_number`) and dialed\n(`to_phone_number`) numbers. Reply within 30 seconds with the `InboundCallInputWebhookResponse`\nbody (the call's inputs); the response shape is unchanged. Each delivery is one row in\n`GET /v1/request-logs`.","operationId":"call_incoming_eventcall_incoming_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallIncomingEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"orchestration_run.ended":{"post":{"tags":["Orchestration Runs"],"summary":"Orchestration Run Ended Event","description":"Resia sends this when an Orchestration Run reaches `succeeded`, `failed`, or `cancelled`.\n`orchestration_run` is the same resource that `GET /v1/orchestration-runs/{orchestration_run_id}` returns.\nReply with any `2xx` to acknowledge the event. Resia uses the `call.ended` retry schedule.\nTreat a repeated `orchestration_run_id` as a duplicate. Each HTTP attempt creates one request log.","operationId":"orchestration_run_ended_eventorchestration_run_ended_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrchestrationRunEndedEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"chat.ended":{"post":{"tags":["Chats"],"summary":"Chat Ended Event","description":"Resia sends this when a chat using a Chat Agent that has a `chat_ended_webhook_url` reaches a\nterminal status (`completed`, `failed`, or `cancelled`). `type` is `chat.ended` and `chat` is the\nsame record `GET /v1/chats/{chat_id}` returns, built when the event is sent. Reply with any `2xx`\nto acknowledge; Resia uses the `call.ended` retry schedule and repeats the same `chat.id` each\ntime, so treat a repeated `chat.id` as a duplicate. Each attempt is one row in\n`GET /v1/request-logs`.","operationId":"chat_ended_eventchat_ended_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatEndedEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"chat.incoming":{"post":{"tags":["Chats"],"summary":"Chat Incoming Event","description":"Resia sends this to a Chat Agent's `inbound_input_webhook_url` when a text starts a new chat on a\nnumber mapped to the agent; later texts in that chat do not send it. `type` is `chat.incoming` and\n`chat` carries the `channel`, the person (`participant_handle`), and your number (`agent_handle`), never\nthe message text. Reply within 30 seconds with HTTP `200` and the `InboundCallInputWebhookResponse`\nbody: `{\"inputs\": {...}}` that fits the agent's `input_schema`. Any other answer, or no answer, starts\nno chat and sends no reply, so the webhook works as an allow list. Each delivery is one row in\n`GET /v1/request-logs`.","operationId":"chat_incoming_eventchat_incoming_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatIncomingEvent"}}},"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":{"AcceptInviteResponse":{"properties":{"organization":{"$ref":"#/components/schemas/OrganizationResponse","description":"The organization you just joined."}},"additionalProperties":false,"type":"object","required":["organization"],"title":"AcceptInviteResponse"},"AdminMemberRequest":{"properties":{"email":{"type":"string","title":"Email","description":"The first member's email. When they sign in with this address, they land in the organization.","examples":["sofia@sunriseclinics.com"]},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name","description":"An optional display name for the member. When omitted, the email's local part is used.","examples":["Sofia Martinez"]}},"additionalProperties":false,"type":"object","required":["email"],"title":"AdminMemberRequest"},"AdminOrganizationPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminOrganizationSummary"},"type":"array","title":"Items","description":"The customers on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass back as `cursor` for the next page. Empty means this is the last page."}},"additionalProperties":false,"type":"object","required":["items"],"title":"AdminOrganizationPage"},"AdminOrganizationSummary":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"The organization's identifier."},"display_name":{"type":"string","title":"Display Name","description":"The customer's display name."},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"The organization's short handle, when one was chosen."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the organization was created."}},"additionalProperties":false,"type":"object","required":["id","display_name","created_at"],"title":"AdminOrganizationSummary","description":"One customer, as the operations dashboard lists them."},"AdminSummary":{"properties":{"id":{"type":"string","title":"Id","description":"The admin's stable identifier.","examples":["01K2TZ7W9M0000000000000000"]},"name":{"type":"string","title":"Name","description":"The admin's display name, taken from their sign-in provider.","examples":["Sofia Martinez"]},"email":{"type":"string","title":"Email","description":"The email the admin signed in with.","examples":["sofia@insitohealth.com"]}},"additionalProperties":false,"type":"object","required":["id","name","email"],"title":"AdminSummary","description":"An approved Insito admin, as the admin's own `/v1/me` describes them. Never shown to a customer."},"AgentKind":{"type":"string","enum":["call","orchestration","chat"],"title":"AgentKind","description":"The type of a Resia agent: a Call Agent, a Chat Agent, or an Orchestration Agent."},"AgentMilestone":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[^\\r\\n]+$","title":"Name","description":"The stage name. The agent reports it when the run or chat reaches this stage, and a read of the run or chat shows the latest one."},"description":{"type":"string","maxLength":280,"minLength":1,"title":"Description","description":"What this stage means, so the agent knows when to set it."}},"additionalProperties":false,"type":"object","required":["name","description"],"title":"AgentMilestone"},"AgentToolActivityEvent":{"properties":{"sequence":{"type":"integer","minimum":0.0,"title":"Sequence","description":"The recorded order of this event within this activity, from 0."},"kind":{"$ref":"#/components/schemas/ToolActivityKind","description":"tool_called for a tool request, tool_result for its result."},"invocation_id":{"type":"string","title":"Invocation Id","description":"Ties a tool request to its result within the same agent message."},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name","description":"The tool that was called. Null when a recorded result has no recorded request.","examples":["book_appointment"]},"turn":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn","description":"The index of the last visible transcript message before this event, when it can be placed."},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At","description":"When the event happened, only when the record holds that time. Never the time the agent state was saved."},"payload_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payload Text","description":"A sanitized preview of the tool input or the tool result. Credential fields show as [redacted]. Null when no preview is available or the whole payload was withheld."},"payload_state":{"$ref":"#/components/schemas/PayloadState","description":"How much of the payload payload_text shows.","default":"unavailable"},"outcome":{"anyOf":[{"$ref":"#/components/schemas/ToolActivityOutcome"},{"type":"null"}],"description":"returned or error when the recorded result says so; otherwise null."}},"additionalProperties":false,"type":"object","required":["sequence","kind","invocation_id"],"title":"AgentToolActivityEvent","description":"One tool request or tool result in an agent's saved conversation."},"AgentVoice":{"properties":{"tts_provider":{"$ref":"#/components/schemas/TtsProvider","description":"The speech provider this voice belongs to."},"voice_id":{"type":"string","maxLength":512,"minLength":1,"title":"Voice Id","description":"The provider's identifier for the voice, taken from GET /v1/available-voices."}},"additionalProperties":false,"type":"object","required":["tts_provider","voice_id"],"title":"AgentVoice","description":"One voice a Call Agent may speak in: a speech provider and that provider's voice identifier.\n\nGet valid pairs from GET /v1/available-voices for the provider you want."},"ApiCredentialResponse":{"properties":{"id":{"type":"string","title":"Id","description":"The credential's stable identifier — the same value that appears in the middle of the bearer token.","examples":["01K2TZ44WQ0000000000000000"]},"name":{"type":"string","title":"Name","description":"The name you gave the credential, unique within its environment. How you tell credentials apart once the secret can no longer be read.","examples":["billing-sync"]},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"environment":{"$ref":"#/components/schemas/CredentialEnvironment","description":"The environment this credential authenticates against: development or production.","examples":["production"]},"prefix":{"type":"string","title":"Prefix","description":"The non-secret leading part of the bearer token, safe to display.","examples":["prod.01K2TZ44WQ0000000000000000"]},"status":{"$ref":"#/components/schemas/ApiCredentialStatus","description":"active until revoked; revoked credentials keep appearing here as the audit trail."},"scope":{"$ref":"#/components/schemas/ApiCredentialScope","description":"What the credential may do. reader reads. editor reads and writes, including actions that cost money. owner reads, writes, and deletes. Fixed when the credential is created.","examples":["editor"]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the credential was issued."},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserSummary"},{"type":"null"}],"description":"The person who issued the credential, or null if that record is unavailable."},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At","description":"When the credential was revoked, or null if it is still active."},"revoked_by":{"anyOf":[{"$ref":"#/components/schemas/UserSummary"},{"type":"null"}],"description":"The person who revoked the credential, or null if it is still active."},"created_by_insito_admin":{"type":"boolean","title":"Created By Insito Admin","description":"True when an Insito admin issued the credential. The admin is not named.","default":false},"revoked_by_insito_admin":{"type":"boolean","title":"Revoked By Insito Admin","description":"True when an Insito admin revoked the credential. The admin is not named.","default":false}},"additionalProperties":false,"type":"object","required":["id","name","environment","prefix","status","scope","created_at","created_by","revoked_at","revoked_by"],"title":"ApiCredentialResponse"},"ApiCredentialScope":{"type":"string","enum":["reader","editor","owner"],"title":"ApiCredentialScope","description":"What an API credential may do. Each scope includes every action of the scopes before it."},"ApiCredentialStatus":{"type":"string","enum":["active","revoked"],"title":"ApiCredentialStatus"},"AvailableInCallLlm":{"properties":{"provider":{"$ref":"#/components/schemas/InCallLlmProvider","description":"The provider that serves the model."},"model":{"type":"string","maxLength":255,"minLength":1,"title":"Model","description":"The exact model identifier to put into in_call_llm.model."},"surcharge_in_cents_per_minute":{"type":"number","minimum":0.0,"title":"Surcharge In Cents Per Minute","description":"What this model adds to the price of each connected call minute, in US cents. It can have a fraction of a cent, for example 5.5. The call minute price itself applies in every case.","examples":[5.5]}},"additionalProperties":false,"type":"object","required":["provider","model","surcharge_in_cents_per_minute"],"title":"AvailableInCallLlm","description":"One in-call model a Call Agent may use, and its price.\n\nPut the provider and model into a Call Agent's in_call_llm to select this model."},"AvailableInCallLlmsResponse":{"properties":{"in_call_llms":{"items":{"$ref":"#/components/schemas/AvailableInCallLlm"},"type":"array","title":"In Call Llms","description":"Each model your Call Agents may use, cheapest first. Equal surcharges are in provider order, then model order."}},"additionalProperties":false,"type":"object","required":["in_call_llms"],"title":"AvailableInCallLlmsResponse","description":"The in-call models your Call Agents may use, cheapest first.\n\nin_call_llm null is not in this list. Null means Resia dynamic (recommended): Resia sends no\nmodel, the voice platform selects the model, and no surcharge applies."},"AvailablePhoneNumber":{"properties":{"phone_number":{"type":"string","pattern":"^\\+1[2-9][0-9]{2}[2-9][0-9]{6}$","title":"Phone Number"},"region_information":{"items":{"$ref":"#/components/schemas/AvailablePhoneNumberRegion"},"type":"array","title":"Region Information"},"features":{"items":{"$ref":"#/components/schemas/AvailablePhoneNumberFeature"},"type":"array","minItems":1,"title":"Features"},"cost_information":{"$ref":"#/components/schemas/AvailablePhoneNumberCost"}},"additionalProperties":false,"type":"object","required":["phone_number","region_information","features","cost_information"],"title":"AvailablePhoneNumber"},"AvailablePhoneNumberCost":{"properties":{"upfront_cost":{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$","title":"Upfront Cost"},"monthly_cost":{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$","title":"Monthly Cost"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"}},"additionalProperties":false,"type":"object","required":["upfront_cost","monthly_cost","currency"],"title":"AvailablePhoneNumberCost"},"AvailablePhoneNumberFeature":{"type":"string","enum":["emergency","fax","hd_voice","international_sms","local_calling","mms","sms","voice"],"title":"AvailablePhoneNumberFeature"},"AvailablePhoneNumberRegion":{"properties":{"region_type":{"$ref":"#/components/schemas/AvailablePhoneNumberRegionType"},"region_name":{"type":"string","maxLength":128,"minLength":1,"title":"Region Name"}},"additionalProperties":false,"type":"object","required":["region_type","region_name"],"title":"AvailablePhoneNumberRegion"},"AvailablePhoneNumberRegionType":{"type":"string","enum":["country_code","rate_center","state","location"],"title":"AvailablePhoneNumberRegionType"},"AvailablePhoneNumberSearchResponse":{"properties":{"phone_numbers":{"items":{"$ref":"#/components/schemas/AvailablePhoneNumber"},"type":"array","title":"Phone Numbers"}},"additionalProperties":false,"type":"object","required":["phone_numbers"],"title":"AvailablePhoneNumberSearchResponse"},"AvailableVoice":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"The voice's identifier. Store it, with its provider, in a Call Agent's voices list."},"provider":{"$ref":"#/components/schemas/TtsProvider","description":"The speech provider this voice comes from."},"name":{"type":"string","minLength":1,"title":"Name","description":"The voice's display name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"A short description of how the voice sounds, when the provider supplies one."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"The primary language the voice speaks, as a short code such as \"en\", when the provider reports one."},"gender":{"$ref":"#/components/schemas/VoiceGender","description":"The voice's gender, so a person can keep a Call Agent's persona name and its voice consistent. One of Male, Female, Neutral, or Unknown. Unknown means the speech provider gives no single recognized gender signal for this voice — none at all, an unrecognized one, or conflicting ones. The field is always present and never null.","default":"Unknown"}},"additionalProperties":false,"type":"object","required":["id","provider","name"],"title":"AvailableVoice","description":"One voice a Call Agent can be set to speak in.\n\nReturned by GET /v1/available-voices. Put this voice's provider and id into a Call Agent's\nvoices list to let its calls speak in this voice; the other fields help a person choose. Only\nvoices your organization is permitted to use are listed."},"AvailableVoicesResponse":{"properties":{"voices":{"items":{"$ref":"#/components/schemas/AvailableVoice"},"type":"array","title":"Voices"}},"additionalProperties":false,"type":"object","required":["voices"],"title":"AvailableVoicesResponse","description":"The voices your organization can choose from for one speech provider."},"BatchRejectedEntry":{"properties":{"position":{"type":"integer","minimum":0.0,"title":"Position","description":"The rejected entry's 0-based index in the submitted list."},"to_phone_number":{"type":"string","maxLength":64,"title":"To Phone Number","description":"The destination exactly as submitted, echoed back so you can match it to your own record."},"client_reference":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Client Reference","description":"The label sent on this entry, echoed back unchanged, or null if none was sent."},"reason":{"type":"string","title":"Reason","description":"Why this entry was rejected, in one sentence."}},"additionalProperties":false,"type":"object","required":["position","to_phone_number","reason"],"title":"BatchRejectedEntry","description":"One submitted entry the batch did not create, and why.\n\nA batch checks each destination on its own. An entry Resia cannot use — a destination its policy\nrefuses, a malformed number, or a destination already used earlier in the same batch — is\nreported here instead of refusing the whole batch. A reported entry is not created: it is not\ncalled or texted, and it is not charged."},"BatchStatus":{"type":"string","enum":["in_progress","completed","canceled"],"title":"BatchStatus","description":"A whole batch's lifecycle, derived from its items. Shared by every batch channel.\n\n``in_progress`` while any item is still queued or in flight; ``completed`` once every item\nreached a terminal state on its own; ``canceled`` once the batch was explicitly canceled."},"BillingAutoRecharge":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether Resia charges the saved card automatically when the balance falls to the minimum or below. On by default."},"target_in_cents":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Target In Cents","description":"The balance each automatic charge restores, in whole US cents. Each charge is at least the minimum. Empty while automatic recharge is off.","examples":[5000]},"last_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Failed At","description":"When the most recent automatic charge failed. Resia waits a day before it charges the same card again; saving a new card allows a charge at once. Empty when the most recent attempt did not fail."}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"BillingAutoRecharge","description":"Automatic recharge: Resia charges the saved card when the balance runs low."},"BillingAutoRechargeUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"True to charge the saved card automatically when the balance runs low. False to stop automatic charges."},"target_in_cents":{"anyOf":[{"type":"integer","maximum":99999999.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Target In Cents","description":"The balance each automatic charge restores, in whole US cents. It must be at least the minimum. Leave it empty to use the minimum. It must be empty when enabled is false.","examples":[5000]}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"BillingAutoRechargeUpdate","description":"Turn automatic recharge on or off, and choose the balance it restores."},"BillingCard":{"properties":{"brand":{"type":"string","title":"Brand","description":"The card network.","examples":["visa"]},"last4":{"type":"string","pattern":"^[0-9]{4}$","title":"Last4","description":"The last four digits of the card number.","examples":["4242"]},"exp_month":{"type":"integer","maximum":12.0,"minimum":1.0,"title":"Exp Month","description":"The month the card expires.","examples":[12]},"exp_year":{"type":"integer","title":"Exp Year","description":"The year the card expires.","examples":[2030]}},"additionalProperties":false,"type":"object","required":["brand","last4","exp_month","exp_year"],"title":"BillingCard","description":"The organization's saved card, masked. Resia never stores or returns a card number."},"BillingCurrency":{"type":"string","enum":["usd"],"title":"BillingCurrency","description":"The currency every billing amount is in."},"BillingPaymentMethodSession":{"properties":{"url":{"type":"string","title":"Url","description":"Open this page to save a card. Stripe hosts the page and shows the consent text for future automatic charges. The new card replaces the saved card.","examples":["https://checkout.stripe.com/c/pay/cs_test_a1B2c3D4"]},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When the page stops accepting a card."}},"additionalProperties":false,"type":"object","required":["url","expires_at"],"title":"BillingPaymentMethodSession","description":"A hosted Stripe page where a person saves the organization's card."},"BillingPaymentMethodSessionRequest":{"properties":{"return_url":{"type":"string","minLength":1,"format":"uri","title":"Return Url","description":"The page Stripe sends the person back to when they finish or leave. Its origin must be one of the portal origins Resia allows.","examples":["https://app.resia.ai/settings/billing"]}},"additionalProperties":false,"type":"object","required":["return_url"],"title":"BillingPaymentMethodSessionRequest","description":"Open a hosted page where a person saves the organization's card."},"BillingPaymentStatus":{"type":"string","enum":["unpaid","paid","no_payment_required"],"title":"BillingPaymentStatus","description":"Whether the money for one top-up has been collected."},"BillingSummary":{"properties":{"currency":{"$ref":"#/components/schemas/BillingCurrency","description":"The currency of every amount. Always US dollars."},"balance_in_cents":{"type":"integer","title":"Balance In Cents","description":"Funds added minus settled usage, in whole US cents. It is negative when settled usage is more than the funds. Usage that has not settled yet is not subtracted.","examples":[5000]},"paid_actions_allowed":{"type":"boolean","title":"Paid Actions Allowed","description":"Whether Resia accepts new paid work now: calls, text messages, phone-number purchases, and orchestration runs. When it is false, those requests answer 402 until funds are added."},"card":{"anyOf":[{"$ref":"#/components/schemas/BillingCard"},{"type":"null"}],"description":"The saved card that automatic charges use. Empty until a card is saved."},"auto_recharge":{"$ref":"#/components/schemas/BillingAutoRecharge","description":"The automatic recharge setting."}},"additionalProperties":false,"type":"object","required":["currency","balance_in_cents","paid_actions_allowed","auto_recharge"],"title":"BillingSummary","description":"The organization's prepaid balance, saved card, and automatic recharge setting."},"BillingTopUp":{"properties":{"checkout_session_id":{"type":"string","maxLength":512,"minLength":1,"title":"Checkout Session Id","description":"Stripe's identifier for the hosted page.","examples":["cs_test_a1B2c3D4"]},"amount_in_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount In Cents","description":"The amount this top-up adds, in whole US cents.","examples":[5000]},"status":{"$ref":"#/components/schemas/BillingTopUpStatus","description":"`open` while the page accepts payment, `complete` after payment, `expired` when the page closed without payment."},"payment_status":{"$ref":"#/components/schemas/BillingPaymentStatus","description":"`paid` once the money is collected."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Open this page to pay. Empty once the page is complete or expired.","examples":["https://checkout.stripe.com/c/pay/cs_test_a1B2c3D4"]},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When the page stops accepting payment."},"credited":{"type":"boolean","title":"Credited","description":"Whether the payment is in the balance. It can become true a few seconds after `payment_status` becomes `paid`."}},"additionalProperties":false,"type":"object","required":["checkout_session_id","amount_in_cents","status","payment_status","expires_at","credited"],"title":"BillingTopUp","description":"One hosted top-up page and what has happened on it."},"BillingTopUpRequest":{"properties":{"amount_in_cents":{"type":"integer","maximum":99999999.0,"exclusiveMinimum":0.0,"title":"Amount In Cents","description":"The amount to add, in whole US cents. It must be at least the minimum.","examples":[5000]},"return_url":{"type":"string","minLength":1,"format":"uri","title":"Return Url","description":"The page Stripe sends the person back to when they finish or leave. Its origin must be one of the portal origins Resia allows.","examples":["https://app.resia.ai/settings/billing"]}},"additionalProperties":false,"type":"object","required":["amount_in_cents","return_url"],"title":"BillingTopUpRequest","description":"Add funds to the balance by hand on a hosted Stripe page."},"BillingTopUpStatus":{"type":"string","enum":["open","complete","expired"],"title":"BillingTopUpStatus","description":"Where one hosted top-up page is in its life."},"BrandEntityType":{"type":"string","enum":["PRIVATE_PROFIT","NON_PROFIT","GOVERNMENT"],"title":"BrandEntityType","description":"The registry entity types Resia registers self-serve. SOLE_PROPRIETOR (OTP flow) and PUBLIC_PROFIT (stock-listing fields) are deliberately unsupported."},"BrandIdentityStatus":{"type":"string","enum":["SELF_DECLARED","UNVERIFIED","VERIFIED","VETTED_VERIFIED"],"title":"BrandIdentityStatus","description":"The registry's own verification grades for a brand, passed through unchanged."},"BrandRegistrationRequest":{"properties":{"entity_type":{"$ref":"#/components/schemas/BrandEntityType","description":"The legal form of the organization. Sole proprietors and publicly traded companies cannot register through this API yet.","examples":["PRIVATE_PROFIT"]},"display_name":{"type":"string","maxLength":100,"minLength":1,"title":"Display Name","description":"The brand name recipients associate with the texts.","examples":["Cariina"]},"company_name":{"type":"string","maxLength":100,"minLength":1,"title":"Company Name","description":"The registered legal company name.","examples":["Busways Inc"]},"ein":{"type":"string","maxLength":20,"minLength":2,"title":"Ein","description":"The company's tax identifier (EIN for United States companies).","examples":["12-3456789"]},"street":{"type":"string","maxLength":100,"minLength":1,"title":"Street","description":"Registered street address.","examples":["100 Main St"]},"city":{"type":"string","maxLength":100,"minLength":1,"title":"City","description":"Registered city.","examples":["Boston"]},"state":{"type":"string","maxLength":20,"minLength":2,"title":"State","description":"Registered state or region code.","examples":["MA"]},"postal_code":{"type":"string","maxLength":10,"minLength":1,"title":"Postal Code","description":"Registered postal code.","examples":["02110"]},"country":{"type":"string","pattern":"^[A-Z]{2}$","title":"Country","description":"Two-letter country code of the registered address.","examples":["US"]},"email":{"type":"string","maxLength":100,"minLength":3,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$","title":"Email","description":"The business contact email the registry may verify against.","examples":["ops@example.com"]},"business_phone":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"Business Phone","description":"The business contact phone number, in international format.","examples":["+16175550100"]},"vertical":{"$ref":"#/components/schemas/BrandVertical","description":"The industry the brand operates in.","examples":["EDUCATION"]},"website":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Website","description":"The company website, if any.","examples":["https://example.com"]}},"additionalProperties":false,"type":"object","required":["entity_type","display_name","company_name","ein","street","city","state","postal_code","country","email","business_phone","vertical"],"title":"BrandRegistrationRequest"},"BrandVertical":{"type":"string","enum":["AGRICULTURE","COMMUNICATION","CONSTRUCTION","EDUCATION","ENERGY","ENTERTAINMENT","FINANCIAL","GAMBLING","GOVERNMENT","HEALTHCARE","HOSPITALITY","HUMAN_RESOURCES","INSURANCE","LEGAL","MANUFACTURING","NGO","POLITICAL","POSTAL","PROFESSIONAL","REAL_ESTATE","RETAIL","TECHNOLOGY","TRANSPORTATION"],"title":"BrandVertical","description":"The registry's industry vocabulary for a brand."},"CallAccepted":{"properties":{"call_agent_version_id":{"type":"string","title":"Call Agent Version Id","description":"The exact Call Agent version this call is pinned to, so a later edit to the Call Agent cannot change what this call does.","examples":["01K1S9V9Q0RS7X4T2N6BJ8ZDE5"]},"id":{"type":"string","title":"Id","description":"Identifier of the new call. Use it with `GET /v1/calls/{call_id}` to follow the call.","examples":["01K1SA3F7M8QW2V5C9H4YTB0KD"]},"status":{"anyOf":[{"$ref":"#/components/schemas/CallStatus"},{"type":"null"}],"description":"Where the call is in its life so far: queued until the voice platform takes it.","default":"queued"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia accepted the request."}},"additionalProperties":false,"type":"object","required":["call_agent_version_id","id","created_at"],"title":"CallAccepted","description":"A call that has been queued. It has not been dialled yet."},"CallAgentParticipant":{"properties":{"dial":{"$ref":"#/components/schemas/ParticipantDialMode","description":"When this participant is dialed: at_start dials them during call setup; on_agent_request dials them only when the agent asks for it during the call."},"intro":{"$ref":"#/components/schemas/ParticipantIntroMode","description":"How this participant joins: private_first (the default) gives the agent a private conversation with them (everyone else waits on hold) before the agent merges them on; direct puts them straight onto the open line.","default":"private_first"},"phone_number":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"Phone Number","description":"A fixed number for this participant, in E.164 form. Set it for destinations that are part of the agent's configuration, such as an escalation desk, and for participants an inbound call must reach. Omitted, each call names this participant's number in its request."}},"additionalProperties":false,"type":"object","required":["dial"],"title":"CallAgentParticipant","description":"One additional participant that calls using this Call Agent may bring on.\n\nFor example, a call to a patient whose agent can bring the patient's pharmacy\nonto the line once the patient agrees. The participant's name — the map key —\nappears in the call transcript and in the agent's instructions."},"CallAgentResource":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":280,"minLength":1},{"type":"null"}],"title":"Description"},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"agent_speaks_first":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Agent Speaks First","description":"Whether calls using this Call Agent should begin speaking as soon as the answered call connects. Null and false preserve the wait-for-caller behavior."},"should_leave_voicemail":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Should Leave Voicemail","description":"Whether calls using this Call Agent should leave a message when they reach a voicemail box. Null and false hang up without speaking instead."},"enable_background_noise":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Background Noise","description":"Whether calls of this Call Agent play a quiet office background sound under the agent's voice. True plays the sound. False plays no sound. Null uses the Resia default, which plays the sound."},"voices":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentVoice"},"type":"array","maxItems":32},{"type":"null"}],"title":"Voices","description":"The voices this Call Agent's calls may speak in, each a provider and voice id taken from GET /v1/available-voices. Each call this agent places picks one entry from the list at random, so a list of one always uses that voice and every entry in a longer list has an equal chance on each call. At most 32 entries. Null or an empty list keeps the voice each deployment is configured with — the behavior every agent had before this field existed. To keep a persona name and its voice consistent, give the name one voice, or several voices of one gender; read each voice's gender from GET /v1/available-voices. Resia does not enforce this — a name and a voice of any gender are allowed."},"in_call_llm":{"anyOf":[{"$ref":"#/components/schemas/InCallLlm"},{"type":"null"}],"description":"The provider and model used for the live conversation. Choose a provider and model that the gateway accepts. Resia validates the selection when it saves the Call Agent. Null means Resia dynamic (recommended): Resia sends no model, the voice platform selects the model, and no surcharge applies."},"model_architecture":{"anyOf":[{"$ref":"#/components/schemas/ModelArchitecture"},{"type":"null"}],"description":"How calls using this Call Agent produce the agent's speech. stt_llm_tts transcribes the other party, writes each reply with a language model, and speaks it with a voice. speech_to_speech runs the whole conversation on one speech-to-speech model, named in speech_to_speech_model. Null means stt_llm_tts, the behavior of every Call Agent before this field existed. A speech_to_speech Call Agent needs a null in_call_llm. It places outbound calls only, and each call needs from_phone_number. Its calls cannot use a database, custom tools, or additional participants, and voices, agent_speaks_first, and should_leave_voicemail have no effect. An inbound call to a number assigned to it is not answered."},"speech_to_speech_model":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Speech To Speech Model","description":"The speech-to-speech model that runs the calls, for example gpt-live-1. Required when model_architecture is speech_to_speech, and must be null otherwise. Resia validates the name when it saves the Call Agent. Each model has a fixed voice."},"primary_participant":{"anyOf":[{"type":"string","maxLength":40,"minLength":1,"pattern":"^[^\\r\\n]+$"},{"type":"null"}],"title":"Primary Participant","description":"What the primary party — the person at to_phone_number, or the inbound caller — is called in the transcript and in the agent's instructions, e.g. \"patient\". Required exactly when additional_participants is present, and forbidden otherwise. The names agent, assistant, caller, system, and user are reserved, in any letter case."},"additional_participants":{"anyOf":[{"patternProperties":{"^[^\\r\\n]+$":{"$ref":"#/components/schemas/CallAgentParticipant"}},"propertyNames":{"maxLength":40,"minLength":1},"type":"object"},{"type":"null"}],"title":"Additional Participants","description":"The additional participants calls using this Call Agent may bring on, keyed by each participant's name. Absent, calls using this agent are ordinary two-party calls and a request naming a participant is rejected. Present, a call may supply numbers for these names; the agent still decides during the call when to bring each one on. When it has at least one participant, primary_participant is required. The names agent, assistant, caller, system, and user are reserved, in any letter case."},"inbound_input_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Inbound Input Webhook Url","description":"HTTPS URL Resia calls to fetch the inputs for a new inbound conversation this agent answers. For a Call Agent, Resia POSTs a call.incoming event — {\"type\": \"call.incoming\", \"call\": {\"from_phone_number\": <caller>, \"to_phone_number\": <dialed number>}} — when an inbound call arrives. For a Chat Agent, Resia POSTs a chat.incoming event — {\"type\": \"chat.incoming\", \"chat\": {\"channel\": \"sms\", \"participant_handle\": <the person>, \"agent_handle\": <your number>}} — when a text starts a new chat; later texts in that chat do not call it. Neither event carries message content. Resia waits up to 30 seconds for a single attempt — no retry. The 200 response body must be the InboundCallInputWebhookResponse envelope, {\"inputs\": {...}}, at most 1 MiB (1048576 bytes); a bare inputs object is an invalid response. inputs must satisfy this agent's input_schema; it is stored as the call's or chat's inputs and rendered into the agent's instructions. On a timeout, a non-200 status, an unreadable body, or inputs the input schema rejects: a Call Agent whose input schema accepts an empty object answers unpersonalized with empty inputs, and any other Call Agent lets the call ring out; a Chat Agent starts no chat and sends no reply, so a Chat Agent's webhook works as an allow list — answer with inputs for a person you accept (an empty object when the agent needs none) and 404 for anyone else. An agent whose instructions need inputs must have this URL before PATCH /v1/phone-numbers/{phone_number} can assign it to a number. The webhook may be delivered more than once for the same call or person, so the endpoint must be read-only and tolerate duplicates. The URL is not a credential inside Resia: Resia stores it, returns it on reads, and logs it in the clear. Delivery authenticity to your endpoint is HTTPS; embed your own token in the URL if you want to authenticate Resia's requests. Inbound-only: outbound calls and chats always supply inputs in their start request and never consult this URL. Null clears the webhook."},"call_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Call Ended Webhook Url","description":"HTTPS URL Resia POSTs a call.ended event to each time a call this Call Agent places or answers reaches a terminal status — completed, error, or canceled. The body is a JSON WebhookEvent: {\"type\": \"call.ended\", \"call\": ...}, where call is the same CallDetail that GET /v1/calls/{call_id} returns, built from live data when the event is sent. Resia makes one immediate attempt when the call ends and retries a failed delivery on a fixed schedule (six attempts over about 8.6 hours); any 2xx response is success. The call's id repeats unchanged across retries, so treat a repeated call.id as a duplicate. Treat the complete URL as a credential: delivery authenticity is HTTPS plus URL secrecy, and you may embed your own token in the URL to authenticate Resia's requests. Null clears the webhook and stops pending deliveries."},"timezone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Timezone","description":"IANA time zone name, for example America/New_York. Every call's system prompt states today's date, computed when the call is placed or answered. Without a timezone the date is read in America/New_York and no time is given. With a timezone the date is read in that zone and the prompt also states the local time, for example \"6:08 PM\". Resia validates the name when it saves the Call Agent. Null clears it."},"instructions":{"type":"string","title":"Instructions","description":"The instructions for each call. Use `$name` or `${name}` to insert a top-level input property. Declare every placeholder in `input_schema.properties`. Supply every referenced value in the call's `inputs`, even if the schema does not require it. Use `$$` for a literal dollar sign. Nested property paths are not supported."},"input_schema":{"$ref":"#/components/schemas/ResiaJsonObject"},"analysis_prompt":{"type":"string","title":"Analysis Prompt"},"analysis_schema":{"$ref":"#/components/schemas/ResiaJsonObject"},"tools":{"anyOf":[{"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"type":"array","maxItems":64},{"type":"null"}],"title":"Tools","description":"The names of your organization's tools that calls of this version may use. Resia sends each tool call to the tool's endpoint. A call of a speech_to_speech Call Agent whose version names tools is refused. Null or an empty list names none."},"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id"},"review_status":{"$ref":"#/components/schemas/CallAgentReviewStatus"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"active_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Active Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"additionalProperties":false,"type":"object","required":["name","instructions","input_schema","analysis_prompt","analysis_schema","id","review_status","is_active","created_at","submitted_at"],"title":"CallAgentResource"},"CallAgentReviewStatus":{"type":"string","enum":["pending_review","approved"],"title":"CallAgentReviewStatus"},"CallAgentSortField":{"type":"string","enum":["created_at","name","active_call_count","submitted_at"],"title":"CallAgentSortField"},"CallAgentSummary":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id"},"name":{"type":"string","title":"Name"},"review_status":{"$ref":"#/components/schemas/CallAgentReviewStatus"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"active_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Active Updated At"},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"active_call_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Call Count","description":"How many of this agent's calls have not ended. Only the list route fills it; 0 means none."}},"additionalProperties":false,"type":"object","required":["id","name","review_status","is_active","created_at","submitted_at"],"title":"CallAgentSummary"},"CallAgentSummaryPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallAgentSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"CallAgentSummaryPage"},"CallAgentWrite":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":280,"minLength":1},{"type":"null"}],"title":"Description"},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"},"agent_speaks_first":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Agent Speaks First","description":"Whether calls using this Call Agent should begin speaking as soon as the answered call connects. Null and false preserve the wait-for-caller behavior."},"should_leave_voicemail":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Should Leave Voicemail","description":"Whether calls using this Call Agent should leave a message when they reach a voicemail box. Null and false hang up without speaking instead."},"enable_background_noise":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Background Noise","description":"Whether calls of this Call Agent play a quiet office background sound under the agent's voice. True plays the sound. False plays no sound. Null uses the Resia default, which plays the sound."},"voices":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentVoice"},"type":"array","maxItems":32},{"type":"null"}],"title":"Voices","description":"The voices this Call Agent's calls may speak in, each a provider and voice id taken from GET /v1/available-voices. Each call this agent places picks one entry from the list at random, so a list of one always uses that voice and every entry in a longer list has an equal chance on each call. At most 32 entries. Null or an empty list keeps the voice each deployment is configured with — the behavior every agent had before this field existed. To keep a persona name and its voice consistent, give the name one voice, or several voices of one gender; read each voice's gender from GET /v1/available-voices. Resia does not enforce this — a name and a voice of any gender are allowed."},"in_call_llm":{"anyOf":[{"$ref":"#/components/schemas/InCallLlm"},{"type":"null"}],"description":"The provider and model used for the live conversation. Choose a provider and model that the gateway accepts. Resia validates the selection when it saves the Call Agent. Null means Resia dynamic (recommended): Resia sends no model, the voice platform selects the model, and no surcharge applies."},"model_architecture":{"anyOf":[{"$ref":"#/components/schemas/ModelArchitecture"},{"type":"null"}],"description":"How calls using this Call Agent produce the agent's speech. stt_llm_tts transcribes the other party, writes each reply with a language model, and speaks it with a voice. speech_to_speech runs the whole conversation on one speech-to-speech model, named in speech_to_speech_model. Null means stt_llm_tts, the behavior of every Call Agent before this field existed. A speech_to_speech Call Agent needs a null in_call_llm. It places outbound calls only, and each call needs from_phone_number. Its calls cannot use a database, custom tools, or additional participants, and voices, agent_speaks_first, and should_leave_voicemail have no effect. An inbound call to a number assigned to it is not answered."},"speech_to_speech_model":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Speech To Speech Model","description":"The speech-to-speech model that runs the calls, for example gpt-live-1. Required when model_architecture is speech_to_speech, and must be null otherwise. Resia validates the name when it saves the Call Agent. Each model has a fixed voice."},"primary_participant":{"anyOf":[{"type":"string","maxLength":40,"minLength":1,"pattern":"^[^\\r\\n]+$"},{"type":"null"}],"title":"Primary Participant","description":"What the primary party — the person at to_phone_number, or the inbound caller — is called in the transcript and in the agent's instructions, e.g. \"patient\". Required exactly when additional_participants is present, and forbidden otherwise. The names agent, assistant, caller, system, and user are reserved, in any letter case."},"additional_participants":{"anyOf":[{"patternProperties":{"^[^\\r\\n]+$":{"$ref":"#/components/schemas/CallAgentParticipant"}},"propertyNames":{"maxLength":40,"minLength":1},"type":"object"},{"type":"null"}],"title":"Additional Participants","description":"The additional participants calls using this Call Agent may bring on, keyed by each participant's name. Absent, calls using this agent are ordinary two-party calls and a request naming a participant is rejected. Present, a call may supply numbers for these names; the agent still decides during the call when to bring each one on. When it has at least one participant, primary_participant is required. The names agent, assistant, caller, system, and user are reserved, in any letter case."},"inbound_input_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Inbound Input Webhook Url","description":"HTTPS URL Resia calls to fetch the inputs for a new inbound conversation this agent answers. For a Call Agent, Resia POSTs a call.incoming event — {\"type\": \"call.incoming\", \"call\": {\"from_phone_number\": <caller>, \"to_phone_number\": <dialed number>}} — when an inbound call arrives. For a Chat Agent, Resia POSTs a chat.incoming event — {\"type\": \"chat.incoming\", \"chat\": {\"channel\": \"sms\", \"participant_handle\": <the person>, \"agent_handle\": <your number>}} — when a text starts a new chat; later texts in that chat do not call it. Neither event carries message content. Resia waits up to 30 seconds for a single attempt — no retry. The 200 response body must be the InboundCallInputWebhookResponse envelope, {\"inputs\": {...}}, at most 1 MiB (1048576 bytes); a bare inputs object is an invalid response. inputs must satisfy this agent's input_schema; it is stored as the call's or chat's inputs and rendered into the agent's instructions. On a timeout, a non-200 status, an unreadable body, or inputs the input schema rejects: a Call Agent whose input schema accepts an empty object answers unpersonalized with empty inputs, and any other Call Agent lets the call ring out; a Chat Agent starts no chat and sends no reply, so a Chat Agent's webhook works as an allow list — answer with inputs for a person you accept (an empty object when the agent needs none) and 404 for anyone else. An agent whose instructions need inputs must have this URL before PATCH /v1/phone-numbers/{phone_number} can assign it to a number. The webhook may be delivered more than once for the same call or person, so the endpoint must be read-only and tolerate duplicates. The URL is not a credential inside Resia: Resia stores it, returns it on reads, and logs it in the clear. Delivery authenticity to your endpoint is HTTPS; embed your own token in the URL if you want to authenticate Resia's requests. Inbound-only: outbound calls and chats always supply inputs in their start request and never consult this URL. Null clears the webhook."},"call_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Call Ended Webhook Url","description":"HTTPS URL Resia POSTs a call.ended event to each time a call this Call Agent places or answers reaches a terminal status — completed, error, or canceled. The body is a JSON WebhookEvent: {\"type\": \"call.ended\", \"call\": ...}, where call is the same CallDetail that GET /v1/calls/{call_id} returns, built from live data when the event is sent. Resia makes one immediate attempt when the call ends and retries a failed delivery on a fixed schedule (six attempts over about 8.6 hours); any 2xx response is success. The call's id repeats unchanged across retries, so treat a repeated call.id as a duplicate. Treat the complete URL as a credential: delivery authenticity is HTTPS plus URL secrecy, and you may embed your own token in the URL to authenticate Resia's requests. Null clears the webhook and stops pending deliveries."},"timezone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Timezone","description":"IANA time zone name, for example America/New_York. Every call's system prompt states today's date, computed when the call is placed or answered. Without a timezone the date is read in America/New_York and no time is given. With a timezone the date is read in that zone and the prompt also states the local time, for example \"6:08 PM\". Resia validates the name when it saves the Call Agent. Null clears it."},"instructions":{"type":"string","title":"Instructions","description":"The instructions for each call. Use `$name` or `${name}` to insert a top-level input property. Declare every placeholder in `input_schema.properties`. Supply every referenced value in the call's `inputs`, even if the schema does not require it. Use `$$` for a literal dollar sign. Nested property paths are not supported."},"input_schema":{"$ref":"#/components/schemas/ResiaJsonObject"},"analysis_prompt":{"type":"string","title":"Analysis Prompt"},"analysis_schema":{"$ref":"#/components/schemas/ResiaJsonObject"},"tools":{"anyOf":[{"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"type":"array","maxItems":64},{"type":"null"}],"title":"Tools","description":"The names of your organization's tools that calls of this version may use. Resia sends each tool call to the tool's endpoint. A call of a speech_to_speech Call Agent whose version names tools is refused. Null or an empty list names none."}},"additionalProperties":false,"type":"object","required":["name","instructions","input_schema","analysis_prompt","analysis_schema"],"title":"CallAgentWrite"},"CallBatchCounts":{"properties":{"queued":{"type":"integer","minimum":0.0,"title":"Queued","description":"Calls still waiting to be dialed."},"canceled":{"type":"integer","minimum":0.0,"title":"Canceled","description":"Calls stopped before they were dialed."},"initiated":{"type":"integer","minimum":0.0,"title":"Initiated","description":"Calls the voice platform has accepted but not yet started."},"in_progress":{"type":"integer","minimum":0.0,"title":"In Progress","description":"Calls currently connected."},"post_processing":{"type":"integer","minimum":0.0,"title":"Post Processing","description":"Calls that have hung up and are being finalized."},"completed":{"type":"integer","minimum":0.0,"title":"Completed","description":"Calls that ended normally."},"error":{"type":"integer","minimum":0.0,"title":"Error","description":"Calls that ended in error."},"unknown":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Unknown","description":"Calls the platform holds but whose live status could not be read this instant. Null on payloads from before this field existed."}},"additionalProperties":false,"type":"object","required":["queued","canceled","initiated","in_progress","post_processing","completed","error"],"title":"CallBatchCounts","description":"How a batch's calls are distributed across states right now.\n\nEach call is counted once, by its own status (``queued`` → ``initiated`` → ``in_progress`` →\n``post_processing`` → ``completed`` or ``error``, or ``canceled`` for a call stopped before it\nwas dialed, or ``unknown`` when the platform holds the call but its live status could not be\nread this instant). The eight counts always sum to the batch's ``total``."},"CallBatchCreateRequest":{"properties":{"call_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Call Agent Id","description":"The Call Agent every call in this batch follows."},"from_phone_number":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"From Phone Number","description":"An owned caller number, or the default when omitted."},"calls":{"items":{"$ref":"#/components/schemas/CallBatchEntryRequest"},"type":"array","maxItems":1000,"minItems":1,"title":"Calls","description":"The calls to place, in submission order. Duplicate destinations are allowed: the first is created and each later one is reported as a rejected entry."},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags","description":"Labels copied onto every call this batch creates. Any keys and values. Filter GET /v1/calls by one key and value pair."}},"additionalProperties":false,"type":"object","required":["call_agent_id","calls"],"title":"CallBatchCreateRequest","description":"Submit up to a thousand calls that all follow one Call Agent.\n\nA batch accepts a mix of good and bad entries. Each call is checked on its own: an entry Resia\ncannot dial — a destination its policy refuses, a malformed number, a destination repeated within\nthe batch, a multi-party entry, or inputs the Call Agent rejects — is reported in the 202 response\nas a rejected entry, and the rest of the batch is still created. A batch in which every entry is\nrejected still returns 202, with an empty batch and every entry in the rejected list."},"CallBatchEntryRequest":{"properties":{"to_phone_number":{"type":"string","maxLength":64,"title":"To Phone Number","description":"The number to call, in E.164 form. A number Resia cannot dial is reported as a rejected entry rather than refusing the whole batch."},"inputs":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","title":"Inputs","description":"Values handed to the Call Agent for this one call."},"client_reference":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Client Reference","description":"Your own label for this call. Resia never interprets it: it is stored on the call, echoed on every read of it, and usable as a filter on GET /v1/calls. Use an opaque identifier from your own system — an order number, a CRM record id. Do not put names, phone numbers, or any personal or sensitive information in it: the label travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"additional_participants":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Additional Participants","description":"A batch cannot place a multi-party call yet. An entry that sets this is reported as a rejected entry, not created; place multi-party calls through POST /v1/calls."}},"additionalProperties":false,"type":"object","required":["to_phone_number"],"title":"CallBatchEntryRequest","description":"One call in a batch: a destination, its per-call inputs, and an optional customer label."},"CallBatchItem":{"properties":{"call_id":{"type":"string","maxLength":512,"minLength":1,"title":"Call Id","description":"The call's one durable identifier, assigned at submission. Read it through GET /v1/calls/{call_id} for its status, transcript, and charge."},"to_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"To Phone Number","description":"The number this call dials, in E.164 form."},"client_reference":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Client Reference","description":"The label sent on submission, echoed back unchanged."},"status":{"$ref":"#/components/schemas/CallStatus","description":"Where the call is in its life right now."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia accepted the call."}},"additionalProperties":false,"type":"object","required":["call_id","to_phone_number","status","created_at"],"title":"CallBatchItem","description":"One call in a batch: its one durable ID and its live status.\n\n``call_id`` exists from the moment the batch is accepted and never changes. Read the call\nthrough ``GET /v1/calls/{call_id}`` at any point in its life — while it waits in the queue it\nreads ``queued``; after it is dialed the same read carries its transcript, analysis, and charge."},"CallBatchItemPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallBatchItem"},"type":"array","title":"Items","description":"The calls on this page, in submission order (the class note names the one cutover exception)."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as `cursor` for the next page, or null on the last page."}},"additionalProperties":false,"type":"object","required":["items"],"title":"CallBatchItemPage","description":"One page of a batch's calls, in submission order. One exception: a batch that was partly processed when Resia moved to per-item IDs (2026-08-25) can list its items in a different order — match items by to_phone_number or client_reference."},"CallBatchSubmissionResponse":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"Identifier of the batch.","examples":["01M0C7XKQ3ZT9V4W8N2RGA5HDB"]},"status":{"$ref":"#/components/schemas/BatchStatus","description":"The batch's derived lifecycle state."},"call_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Call Agent Id","description":"The Call Agent every call in the batch follows."},"from_phone_number":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"From Phone Number","description":"The caller number used, or null when the default was used."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"How many calls the batch created. Equal to the submitted count minus the rejected entries; zero when every entry was rejected."},"counts":{"$ref":"#/components/schemas/CallBatchCounts","description":"How the batch's calls are distributed across states right now."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia accepted the batch."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When the batch reached a terminal state, or null while it is still in progress."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"calls":{"items":{"$ref":"#/components/schemas/CallBatchItem"},"type":"array","maxItems":1000,"title":"Calls","description":"One item per created call, in submission order (one cutover exception — see CallBatchItemPage), each with its final call_id. Empty when every submitted entry was rejected.","default":[]},"rejected_calls":{"items":{"$ref":"#/components/schemas/BatchRejectedEntry"},"type":"array","maxItems":1000,"title":"Rejected Calls","description":"Every submitted entry Resia did not create, each with its 0-based submission position and the reason. Empty when every entry was created.","default":[]}},"additionalProperties":false,"type":"object","required":["id","status","call_agent_id","total","counts","created_at"],"title":"CallBatchSubmissionResponse","description":"The 202 submission response: the batch summary, one pre-created call per created item, and the rejected entries.\n\n``calls`` keeps submission order, with one cutover exception: A batch that was partly processed when Resia moved to per-item IDs (2026-08-25) can order its items differently — match items by to_phone_number or client_reference.\n``rejected_calls`` lists every submitted entry Resia did not create, each with its 0-based\nsubmission position. ``calls`` and ``rejected_calls`` together account for every submitted entry.\nA repeated ``Idempotency-Key`` returns the same batch again — the same batch ID, the same\n``call_id`` values, and the same entries reported as rejected."},"CallBatchSummary":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"Identifier of the batch.","examples":["01M0C7XKQ3ZT9V4W8N2RGA5HDB"]},"status":{"$ref":"#/components/schemas/BatchStatus","description":"The batch's derived lifecycle state."},"call_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Call Agent Id","description":"The Call Agent every call in the batch follows."},"from_phone_number":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"From Phone Number","description":"The caller number used, or null when the default was used."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"How many calls the batch created. Equal to the submitted count minus the rejected entries; zero when every entry was rejected."},"counts":{"$ref":"#/components/schemas/CallBatchCounts","description":"How the batch's calls are distributed across states right now."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia accepted the batch."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When the batch reached a terminal state, or null while it is still in progress."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."}},"additionalProperties":false,"type":"object","required":["id","status","call_agent_id","total","counts","created_at"],"title":"CallBatchSummary","description":"A whole batch's progress in one read.\n\nReturned by the poll and the batch list. ``completed_at`` is set once the batch reaches a\nterminal ``status``; it is null while the batch is still in progress."},"CallBatchSummaryPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallBatchSummary"},"type":"array","title":"Items","description":"The batches on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as `cursor` for the next page, or null on the last page."}},"additionalProperties":false,"type":"object","required":["items"],"title":"CallBatchSummaryPage","description":"One page of batches, newest first."},"CallCreateRequest":{"properties":{"call_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Call Agent Id","description":"The Call Agent that should handle this call."},"to_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"To Phone Number"},"from_phone_number":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}],"title":"From Phone Number"},"client_reference":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Client Reference","description":"Your own label for this call. Resia never interprets it: it is stored on the call, echoed on every read of it, and usable as a filter on GET /v1/calls. Use an opaque identifier from your own system — an order number, a CRM record id. Do not put names, phone numbers, or any personal or sensitive information in it: the label travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"},"call_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Call Ended Webhook Url","description":"HTTPS URL Resia POSTs the call.ended event to for this call. A URL here overrides the Call Agent URL. Null or omitted uses the Call Agent URL. A retry that returns the same call keeps the URL saved by the first request. Treat the complete URL as a credential because delivery authenticity uses HTTPS plus URL secrecy."},"inputs":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","title":"Inputs"},"database_id":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Database Id","description":"Names the database this call answers from. Null or omitted runs the call without one. The id must belong to a ready database in your organization; the call answers without a database when it does not."},"additional_participants":{"anyOf":[{"patternProperties":{"^[^\\r\\n]+$":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"}},"propertyNames":{"maxLength":40,"minLength":1},"type":"object"},{"type":"null"}],"title":"Additional Participants","description":"Numbers for this call's additional participants, keyed by the names the Call Agent declares — for example {\"pharmacy\": \"+16175550188\"}. Every name must be on the agent's roster; a roster participant with a fixed number needs no entry. Omitted, and with no roster on the agent, the call is an ordinary two-party call."}},"additionalProperties":false,"type":"object","required":["call_agent_id","to_phone_number"],"title":"CallCreateRequest","examples":[{"call_agent_id":"01K1S9V9Q0RS7X4T2N6BJ8ZDE5","from_phone_number":"+16465550175","inputs":{"medication":"metformin 500mg","pharmacy_name":"Grove Street Pharmacy"},"to_phone_number":"+12125550142"}]},"CallDetail":{"properties":{"call_agent_version_id":{"type":"string","title":"Call Agent Version Id","description":"The exact Call Agent version this call is pinned to, so a later edit to the Call Agent cannot change what this call does.","examples":["01K1S9V9Q0RS7X4T2N6BJ8ZDE5"]},"id":{"type":"string","title":"Id","description":"Identifier of the call.","examples":["01K1SA3F7M8QW2V5C9H4YTB0KD"]},"call_agent_id":{"type":"string","title":"Call Agent Id","description":"The stable Call Agent this call was placed with. Unlike call_agent_version_id, this identifier does not change when the Call Agent is edited.","examples":["01K1S7RA9M8QW2V5C9H4YTB0AG"]},"call_agent_name":{"type":"string","title":"Call Agent Name","description":"The Call Agent's name, for display. It is the name the Call Agent has now, so a later rename changes it.","examples":["Front desk"]},"direction":{"anyOf":[{"$ref":"#/components/schemas/CallDirection"},{"type":"null"}],"description":"Whether Resia placed this call (outbound) or answered it (inbound). Empty for a call the voice platform has not taken yet."},"to_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Phone Number","description":"The number this call dials, in E.164 form.","examples":["+12125550142"]},"from_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Phone Number","description":"The caller number selected when the call was placed. Empty when the call used Resia's default caller number.","examples":["+16465550175"]},"status":{"$ref":"#/components/schemas/CallStatus","description":"Where the call is in its life: queued from acceptance until the voice platform takes it; post_processing after the call ends while transcript, participant, or analysis fields may still change; completed, error, and canceled are terminal. `unknown` when the platform has the call but its live status could not be read right now."},"client_reference":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Client Reference","description":"Your own label for this call, set when the call was created and echoed back unchanged. Usable as a filter on GET /v1/calls."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia accepted the request."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the voice platform created the call session. Empty if the call never connected."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the call ended. Empty while it is still running."},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Ms","description":"Deprecated: use duration_secs. How long the call lasted, in milliseconds.","examples":[47320.0]},"duration_secs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Secs","description":"How long the call lasted, in seconds.","examples":[47.32]},"failure":{"anyOf":[{"$ref":"#/components/schemas/CallFailure"},{"type":"null"}],"description":"Set only when the call did not complete."},"charge_amount_in_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Charge Amount In Cents","description":"What this call cost, in cents. Can still change until the charge is finalized.","examples":[25]},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Inputs","description":"The Call Agent input values this call was dialled with. Empty for calls created before Resia began storing them."},"analysis":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object"},{"type":"null"}],"title":"Analysis","description":"The structured result the Call Agent asked the voice agent to extract. Its shape is whatever that Call Agent defined. Null while status is post_processing. It can also be null at completed when no analysis was requested or analysis produced no result."},"transcript":{"items":{"$ref":"#/components/schemas/TranscriptTurn"},"type":"array","title":"Transcript","description":"The open line's turns, in order — every turn the primary party could hear. It can be partial while status is post_processing and is stable only at completed or error. It can be empty when no turns were recorded. A multi-party call has more: each private conversation is under additional_transcripts."},"stt_stream_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stt Stream Started At","description":"When the first inbound audio frame arrived. This is the zero for start_secs and end_secs on a call that has no recording; a call with a recording uses recording.started_at."},"recording":{"anyOf":[{"$ref":"#/components/schemas/CallRecording"},{"type":"null"}],"description":"Whether this call's audio can be fetched from GET /v1/calls/{call_id}/recording, its length and format, and started_at — the instant of its first sample, which is the zero every start_secs and end_secs on this call counts from. Empty for calls with no stored recording metadata."},"primary_participant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Participant","description":"What the primary party is called in transcripts and prompts. Present only on multi-party calls."},"additional_participants":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/CallParticipantDetail"},"type":"object"},{"type":"null"}],"title":"Additional Participants","description":"This call's additional participants, keyed by name. Present only on multi-party calls."},"additional_transcripts":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/TranscriptTurn"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Additional Transcripts","description":"Each additional participant's private conversation with the agent, keyed by name — the turns the primary party could not hear. Each list is in call order. started_at uses one clock for every leg, so clients can interleave these lists with transcript by started_at (ties: transcript first). A turn with a null started_at keeps its place after the previous turn of its own list. A list's leading turns with a null started_at sort before every turn that has one. start_secs and end_secs are null on a multi-party call. timestamp is deprecated and is not a sort key. Present only on multi-party calls."},"tool_activity":{"anyOf":[{"items":{"$ref":"#/components/schemas/CallToolActivityEvent"},"type":"array"},{"type":"null"}],"title":"Tool Activity","description":"The call's observed tool activity, in sequence order: each background task start, tool request, tool result, and task end. Present only on GET /v1/calls/{call_id} with include_tool_activity=true; null otherwise. The call.ended webhook body leaves out both tool activity fields. An empty list or null never proves that no tool ran."},"tool_activity_truncated":{"type":"boolean","title":"Tool Activity Truncated","description":"True when capture or a size limit left events out or cut a payload preview, or when an unreadable record was left out. tool_activity then holds the earliest events only.","default":false}},"additionalProperties":false,"type":"object","required":["call_agent_version_id","id","call_agent_id","call_agent_name","status","created_at"],"title":"CallDetail","description":"Everything in the summary, plus what was said and what was learned."},"CallDirection":{"type":"string","enum":["inbound","outbound"],"title":"CallDirection"},"CallEndedEvent":{"properties":{"type":{"type":"string","const":"call.ended","title":"Type","default":"call.ended"},"call":{"$ref":"#/components/schemas/CallDetail"}},"additionalProperties":false,"type":"object","required":["call"],"title":"CallEndedEvent","description":"The body Resia POSTs to a Call Agent's call_ended_webhook_url when a call reaches a terminal\nstatus (ENG-3493). The thin WebhookEvent base carries the shared `type` discriminator; this event\nnests the same CallDetail read model that GET /v1/calls/{call_id} returns, so there is one call\nshape and not two. The call id and timestamps a customer dedups and orders on live in `call`."},"CallFailure":{"properties":{"code":{"$ref":"#/components/schemas/CallFailureCode","description":"Machine-readable reason, safe to branch on."},"message":{"type":"string","title":"Message","description":"The same reason written for a person."},"hangup_cause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hangup Cause","description":"The carrier's normalized hangup reason. Empty when the carrier supplied no reason.","examples":["call_rejected"]},"sip_hangup_cause":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Hangup Cause","description":"The Session Initiation Protocol response code from the carrier. Empty when the carrier supplied no code.","examples":[603]}},"additionalProperties":false,"type":"object","required":["code","message"],"title":"CallFailure","description":"Why a call did not complete."},"CallFailureCode":{"type":"string","enum":["no_answer","busy","call_rejected","executor_error","dispatch_outcome_unknown"],"title":"CallFailureCode"},"CallIncomingEvent":{"properties":{"type":{"type":"string","const":"call.incoming","title":"Type","default":"call.incoming"},"call":{"$ref":"#/components/schemas/InboundCallInputWebhookRequest"}},"additionalProperties":false,"type":"object","required":["call"],"title":"CallIncomingEvent","description":"The body Resia POSTs to a Call Agent's inbound_input_webhook_url when an inbound call arrives\n(ENG-3513). The thin WebhookEvent base carries the shared `type` discriminator; this event nests\nthe same InboundCallInputWebhookRequest — the caller and dialed numbers — that the former bare\nbody sent, so every outbound webhook is one shape a customer routes on `type` and reads under\n`call`."},"CallParticipantDetail":{"properties":{"phone_number":{"type":"string","title":"Phone Number","description":"The number dialed for this participant, in E.164 form.","examples":["+16175550188"]},"joined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Joined At","description":"When this participant came onto the open line, or null if they never did."},"left_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Left At","description":"When this participant left the call, or null while they are on it (or if they never joined)."}},"additionalProperties":false,"type":"object","required":["phone_number"],"title":"CallParticipantDetail","description":"One additional participant's lifecycle on this call."},"CallRecording":{"properties":{"available":{"type":"boolean","title":"Available","description":"True when a recording exists and can be fetched from GET /v1/calls/{call_id}/recording.","examples":[true]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"The instant of the recording's first sample. It is the zero for every start_secs and end_secs on a call that has a recording; a call without a recording counts from the first inbound audio frame (stt_stream_started_at). Approximate."},"duration_secs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Secs","description":"Length of the recording in seconds, when known.","examples":[47.3]},"format":{"anyOf":[{"$ref":"#/components/schemas/CallRecordingFormat"},{"type":"null"}],"description":"Audio container of the recording; wav today.","examples":["wav"]}},"additionalProperties":false,"type":"object","required":["available"],"title":"CallRecording","description":"Whether this call's audio recording can be fetched, and its basic shape."},"CallRecordingFormat":{"type":"string","enum":["wav","mp3"],"title":"CallRecordingFormat","description":"The audio container of a call recording."},"CallSortField":{"type":"string","enum":["created_at","call_agent_name","from_phone_number","charge_amount_in_cents","started_at","status","duration_secs"],"title":"CallSortField"},"CallStatus":{"type":"string","enum":["queued","initiated","in_progress","post_processing","completed","error","canceled","unknown"],"title":"CallStatus","description":"One call's whole life, in the one vocabulary every Resia call read uses.\n\n``queued`` covers a call from acceptance until the voice platform takes it — a batch call\nwhile it waits its turn in the drain, and any call in the short window before the platform\naccepts it. The voice platform's own execution states map into the middle of the sequence.\n``canceled`` is reachable only from ``queued``: a batch cancel stops calls that were never\ndialed, and a call already being placed runs to its own end. ``unknown`` is the one\nnon-terminal exception to the sequence: the platform holds the call, but its live status\ncould not be read this instant."},"CallSummary":{"properties":{"call_agent_version_id":{"type":"string","title":"Call Agent Version Id","description":"The exact Call Agent version this call is pinned to, so a later edit to the Call Agent cannot change what this call does.","examples":["01K1S9V9Q0RS7X4T2N6BJ8ZDE5"]},"id":{"type":"string","title":"Id","description":"Identifier of the call.","examples":["01K1SA3F7M8QW2V5C9H4YTB0KD"]},"call_agent_id":{"type":"string","title":"Call Agent Id","description":"The stable Call Agent this call was placed with. Unlike call_agent_version_id, this identifier does not change when the Call Agent is edited.","examples":["01K1S7RA9M8QW2V5C9H4YTB0AG"]},"call_agent_name":{"type":"string","title":"Call Agent Name","description":"The Call Agent's name, for display. It is the name the Call Agent has now, so a later rename changes it.","examples":["Front desk"]},"direction":{"anyOf":[{"$ref":"#/components/schemas/CallDirection"},{"type":"null"}],"description":"Whether Resia placed this call (outbound) or answered it (inbound). Empty for a call the voice platform has not taken yet."},"to_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Phone Number","description":"The number this call dials, in E.164 form.","examples":["+12125550142"]},"from_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Phone Number","description":"The caller number selected when the call was placed. Empty when the call used Resia's default caller number.","examples":["+16465550175"]},"status":{"$ref":"#/components/schemas/CallStatus","description":"Where the call is in its life: queued from acceptance until the voice platform takes it; post_processing after the call ends while transcript, participant, or analysis fields may still change; completed, error, and canceled are terminal. `unknown` when the platform has the call but its live status could not be read right now."},"client_reference":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Client Reference","description":"Your own label for this call, set when the call was created and echoed back unchanged. Usable as a filter on GET /v1/calls."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia accepted the request."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the voice platform created the call session. Empty if the call never connected."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the call ended. Empty while it is still running."},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Ms","description":"Deprecated: use duration_secs. How long the call lasted, in milliseconds.","examples":[47320.0]},"duration_secs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Secs","description":"How long the call lasted, in seconds.","examples":[47.32]},"failure":{"anyOf":[{"$ref":"#/components/schemas/CallFailure"},{"type":"null"}],"description":"Set only when the call did not complete."},"charge_amount_in_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Charge Amount In Cents","description":"What this call cost, in cents. Can still change until the charge is finalized.","examples":[25]}},"additionalProperties":false,"type":"object","required":["call_agent_version_id","id","call_agent_id","call_agent_name","status","created_at"],"title":"CallSummary","description":"One call as it appears in a list."},"CallToolActivityEvent":{"properties":{"sequence":{"type":"integer","minimum":0.0,"title":"Sequence","description":"The order of this event within the call, from 0."},"kind":{"$ref":"#/components/schemas/ToolActivityKind","description":"What the event records: a background task start, a tool request, a tool result, or a task end."},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At","description":"When the voice platform observed this event."},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"The background task this event belongs to. Null for a tool that ran outside a background task."},"invocation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invocation Id","description":"Ties a tool request to its result within this call. Present on tool_called and tool_result. It is not the tool_call_id your tool endpoint receives."},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name","description":"The tool that was called. Present on tool_called and tool_result.","examples":["book_appointment"]},"turn":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn","description":"The index of the last transcript turn before this event, when the call has no timed transcript. Null before the first turn."},"payload_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payload Text","description":"A sanitized preview of the tool input, the tool result, the task instruction, or the task summary. Credential fields show as [redacted]. Null when no preview is available or the whole payload was withheld."},"payload_state":{"$ref":"#/components/schemas/PayloadState","description":"How much of the payload payload_text shows.","default":"unavailable"},"outcome":{"anyOf":[{"$ref":"#/components/schemas/ToolActivityOutcome"},{"type":"null"}],"description":"How the tool or task ended. Null on tool_called and task_started."}},"additionalProperties":false,"type":"object","required":["sequence","kind","occurred_at"],"title":"CallToolActivityEvent","description":"One tool-activity event the voice platform observed during the call."},"CampaignUseCase":{"type":"string","enum":["2FA","ACCOUNT_NOTIFICATION","AGENTS_FRANCHISES","CHARITY","CUSTOMER_CARE","DELIVERY_NOTIFICATION","EMERGENCY","FRAUD_ALERT","HIGHER_EDUCATION","K12_EDUCATION","LOW_VOLUME","MARKETING","MIXED","POLITICAL","POLLING_VOTING","PROXY","PUBLIC_SERVICE_ANNOUNCEMENT","SECURITY_ALERT","SOCIAL","SWEEPSTAKE","TRIAL"],"title":"CampaignUseCase","description":"The registry's standard campaign use cases."},"CampaignUseCaseListResponse":{"properties":{"use_cases":{"items":{"$ref":"#/components/schemas/CampaignUseCaseQualification"},"type":"array","title":"Use Cases","description":"Only the use cases this brand currently qualifies for, each with live fees. Unqualified use cases are omitted."}},"additionalProperties":false,"type":"object","required":["use_cases"],"title":"CampaignUseCaseListResponse"},"CampaignUseCaseQualification":{"properties":{"usecase":{"$ref":"#/components/schemas/CampaignUseCase","description":"A use case this brand qualifies for.","examples":["LOW_VOLUME"]},"monthly_fee":{"type":"string","pattern":"^(0|[1-9][0-9]{0,5})(\\.[0-9]{1,2})?$","title":"Monthly Fee","description":"What Resia charges for one month of a campaign with this use case: once when the registry accepts the submission, then on the same day each month until the campaign is released or ends. The figure `confirmed_upfront_fee` must echo.","examples":["6.00"]},"quarterly_fee":{"type":"string","pattern":"^(0|[1-9][0-9]{0,5})(\\.[0-9]{1,2})?$","title":"Quarterly Fee","description":"The registry's three-month fee for this use case, for reference. Resia does not charge it; Resia charges `monthly_fee`.","examples":["6.00"]},"annual_fee":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,5})(\\.[0-9]{1,2})?$","description":"An exact decimal amount in US dollars with at most two decimal places, as the registry reports it.","examples":["6.00"]},{"type":"null"}],"title":"Annual Fee","description":"The registry's annual fee, when it has one for this use case, for reference. Resia does not charge it."},"min_sub_usecases":{"type":"integer","minimum":0.0,"title":"Min Sub Usecases","description":"How many sub-use-cases a submission for this use case must declare, at minimum. When above zero, `sub_usecases` is required.","examples":[1]},"max_sub_usecases":{"type":"integer","minimum":0.0,"title":"Max Sub Usecases","description":"The most sub-use-cases a submission for this use case may declare.","examples":[5]}},"additionalProperties":false,"type":"object","required":["usecase","monthly_fee","quarterly_fee","min_sub_usecases","max_sub_usecases"],"title":"CampaignUseCaseQualification"},"CarrierProvisioning":{"properties":{"network_id":{"type":"string","pattern":"^[A-Z0-9_]{1,64}$","title":"Network Id","description":"The registry's numeric identifier for one US carrier network.","examples":["10017"]},"status":{"$ref":"#/components/schemas/CarrierProvisioningStatus","description":"This carrier's provisioning progress for the campaign.","examples":["approved"]}},"additionalProperties":false,"type":"object","required":["network_id","status"],"title":"CarrierProvisioning"},"CarrierProvisioningStatus":{"type":"string","enum":["pending","review","approved","rejected","suspended","other"],"title":"CarrierProvisioningStatus","description":"One carrier's progress provisioning a campaign, folded to a stable vocabulary."},"ChargeSummary":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the charge.","examples":["01K1SA6D2E9NP3R7T5W8XQ4MHZ"]},"call_id":{"type":"string","title":"Call Id","description":"The call this charge is for.","examples":["01K1SA3F7M8QW2V5C9H4YTB0KD"]},"amount_in_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount In Cents","description":"Amount in cents. Until the charge is finalized this is Resia's working figure and can change.","examples":[25]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the charge was raised, which is when the call was placed."},"finalized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finalized At","description":"When the amount was settled. While this is empty, the amount can still change."}},"additionalProperties":false,"type":"object","required":["id","call_id","created_at"],"title":"ChargeSummary","description":"What one call cost."},"ChatAccepted":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id"},"chat_agent_version_id":{"type":"string","maxLength":512,"minLength":1,"title":"Chat Agent Version Id"},"status":{"$ref":"#/components/schemas/ChatStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","chat_agent_version_id","status","created_at"],"title":"ChatAccepted","description":"The 202 answer to POST /v1/chats: the chat is created but the first text has not been sent yet."},"ChatAgentResource":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":280,"minLength":1},{"type":"null"}],"title":"Description"},"chat_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Chat Ended Webhook Url","description":"HTTPS URL Resia POSTs a chat.ended event to each time a chat this Chat Agent runs reaches a terminal status. The body is a JSON WebhookEvent: {\"type\": \"chat.ended\", \"chat\": ...}, where chat is the same ChatDetail that GET /v1/chats/{chat_id} returns. Resia makes one immediate attempt when the chat ends and retries a failed delivery on a fixed schedule; any 2xx response is success. The chat's id repeats unchanged across retries, so treat a repeated chat.id as a duplicate. Treat the complete URL as a credential: delivery authenticity is HTTPS plus URL secrecy. Null clears the webhook and stops pending deliveries."},"inbound_input_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Inbound Input Webhook Url","description":"HTTPS URL Resia calls to fetch the inputs for a new inbound conversation this agent answers. For a Call Agent, Resia POSTs a call.incoming event — {\"type\": \"call.incoming\", \"call\": {\"from_phone_number\": <caller>, \"to_phone_number\": <dialed number>}} — when an inbound call arrives. For a Chat Agent, Resia POSTs a chat.incoming event — {\"type\": \"chat.incoming\", \"chat\": {\"channel\": \"sms\", \"participant_handle\": <the person>, \"agent_handle\": <your number>}} — when a text starts a new chat; later texts in that chat do not call it. Neither event carries message content. Resia waits up to 30 seconds for a single attempt — no retry. The 200 response body must be the InboundCallInputWebhookResponse envelope, {\"inputs\": {...}}, at most 1 MiB (1048576 bytes); a bare inputs object is an invalid response. inputs must satisfy this agent's input_schema; it is stored as the call's or chat's inputs and rendered into the agent's instructions. On a timeout, a non-200 status, an unreadable body, or inputs the input schema rejects: a Call Agent whose input schema accepts an empty object answers unpersonalized with empty inputs, and any other Call Agent lets the call ring out; a Chat Agent starts no chat and sends no reply, so a Chat Agent's webhook works as an allow list — answer with inputs for a person you accept (an empty object when the agent needs none) and 404 for anyone else. An agent whose instructions need inputs must have this URL before PATCH /v1/phone-numbers/{phone_number} can assign it to a number. The webhook may be delivered more than once for the same call or person, so the endpoint must be read-only and tolerate duplicates. The URL is not a credential inside Resia: Resia stores it, returns it on reads, and logs it in the clear. Delivery authenticity to your endpoint is HTTPS; embed your own token in the URL if you want to authenticate Resia's requests. Inbound-only: outbound calls and chats always supply inputs in their start request and never consult this URL. Null clears the webhook."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"instructions":{"type":"string","title":"Instructions","description":"The instructions the agent follows for each chat. Use `$name` or `${name}` to insert a top-level input property. Declare every placeholder in `input_schema.properties`. Supply every referenced value in the chat's `inputs`, even if the schema does not require it. Use `$$` for a literal dollar sign. Nested property paths are not supported."},"input_schema":{"$ref":"#/components/schemas/ResiaJsonObject"},"analysis_prompt":{"type":"string","title":"Analysis Prompt"},"analysis_schema":{"$ref":"#/components/schemas/ResiaJsonObject"},"tools":{"anyOf":[{"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"type":"array","maxItems":64},{"type":"null"}],"title":"Tools","description":"The names of your organization's tools that chats of this version may call. Null or an empty list names none."},"milestones":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentMilestone"},"type":"array","maxItems":32,"minItems":1},{"type":"null"}],"title":"Milestones","description":"The stages a chat with this Chat Agent may report, each a name and a description. During a chat the agent records the stage it has reached, using a name from this list; GET the chat to read the current stage. Names must be unique. Null (the default) means the agent reports no milestone."},"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id"},"review_status":{"$ref":"#/components/schemas/CallAgentReviewStatus"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"active_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Active Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"additionalProperties":false,"type":"object","required":["name","instructions","input_schema","analysis_prompt","analysis_schema","id","review_status","is_active","created_at","submitted_at"],"title":"ChatAgentResource"},"ChatAgentSortField":{"type":"string","enum":["created_at","name","active_chat_count","submitted_at"],"title":"ChatAgentSortField"},"ChatAgentSummary":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id"},"name":{"type":"string","title":"Name"},"review_status":{"$ref":"#/components/schemas/CallAgentReviewStatus"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"active_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Active Updated At"},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"active_chat_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Chat Count","description":"How many of this agent's chats have not ended. Only the list route fills it; 0 means none."}},"additionalProperties":false,"type":"object","required":["id","name","review_status","is_active","created_at","submitted_at"],"title":"ChatAgentSummary"},"ChatAgentSummaryPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChatAgentSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"ChatAgentSummaryPage"},"ChatAgentWrite":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":280,"minLength":1},{"type":"null"}],"title":"Description"},"chat_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Chat Ended Webhook Url","description":"HTTPS URL Resia POSTs a chat.ended event to each time a chat this Chat Agent runs reaches a terminal status. The body is a JSON WebhookEvent: {\"type\": \"chat.ended\", \"chat\": ...}, where chat is the same ChatDetail that GET /v1/chats/{chat_id} returns. Resia makes one immediate attempt when the chat ends and retries a failed delivery on a fixed schedule; any 2xx response is success. The chat's id repeats unchanged across retries, so treat a repeated chat.id as a duplicate. Treat the complete URL as a credential: delivery authenticity is HTTPS plus URL secrecy. Null clears the webhook and stops pending deliveries."},"inbound_input_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Inbound Input Webhook Url","description":"HTTPS URL Resia calls to fetch the inputs for a new inbound conversation this agent answers. For a Call Agent, Resia POSTs a call.incoming event — {\"type\": \"call.incoming\", \"call\": {\"from_phone_number\": <caller>, \"to_phone_number\": <dialed number>}} — when an inbound call arrives. For a Chat Agent, Resia POSTs a chat.incoming event — {\"type\": \"chat.incoming\", \"chat\": {\"channel\": \"sms\", \"participant_handle\": <the person>, \"agent_handle\": <your number>}} — when a text starts a new chat; later texts in that chat do not call it. Neither event carries message content. Resia waits up to 30 seconds for a single attempt — no retry. The 200 response body must be the InboundCallInputWebhookResponse envelope, {\"inputs\": {...}}, at most 1 MiB (1048576 bytes); a bare inputs object is an invalid response. inputs must satisfy this agent's input_schema; it is stored as the call's or chat's inputs and rendered into the agent's instructions. On a timeout, a non-200 status, an unreadable body, or inputs the input schema rejects: a Call Agent whose input schema accepts an empty object answers unpersonalized with empty inputs, and any other Call Agent lets the call ring out; a Chat Agent starts no chat and sends no reply, so a Chat Agent's webhook works as an allow list — answer with inputs for a person you accept (an empty object when the agent needs none) and 404 for anyone else. An agent whose instructions need inputs must have this URL before PATCH /v1/phone-numbers/{phone_number} can assign it to a number. The webhook may be delivered more than once for the same call or person, so the endpoint must be read-only and tolerate duplicates. The URL is not a credential inside Resia: Resia stores it, returns it on reads, and logs it in the clear. Delivery authenticity to your endpoint is HTTPS; embed your own token in the URL if you want to authenticate Resia's requests. Inbound-only: outbound calls and chats always supply inputs in their start request and never consult this URL. Null clears the webhook."},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"},"instructions":{"type":"string","title":"Instructions","description":"The instructions the agent follows for each chat. Use `$name` or `${name}` to insert a top-level input property. Declare every placeholder in `input_schema.properties`. Supply every referenced value in the chat's `inputs`, even if the schema does not require it. Use `$$` for a literal dollar sign. Nested property paths are not supported."},"input_schema":{"$ref":"#/components/schemas/ResiaJsonObject"},"analysis_prompt":{"type":"string","title":"Analysis Prompt"},"analysis_schema":{"$ref":"#/components/schemas/ResiaJsonObject"},"tools":{"anyOf":[{"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"type":"array","maxItems":64},{"type":"null"}],"title":"Tools","description":"The names of your organization's tools that chats of this version may call. Null or an empty list names none."},"milestones":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentMilestone"},"type":"array","maxItems":32,"minItems":1},{"type":"null"}],"title":"Milestones","description":"The stages a chat with this Chat Agent may report, each a name and a description. During a chat the agent records the stage it has reached, using a name from this list; GET the chat to read the current stage. Names must be unique. Null (the default) means the agent reports no milestone."}},"additionalProperties":false,"type":"object","required":["name","instructions","input_schema","analysis_prompt","analysis_schema"],"title":"ChatAgentWrite"},"ChatChannel":{"type":"string","enum":["sms","web","email"],"title":"ChatChannel","description":"The channel a chat runs on: SMS through a carrier; web, where the customer's own page runs the\nconversation through the API; or email, which is not available yet."},"ChatCreateRequest":{"if":{"properties":{"channel":{"const":"sms"}}},"then":{"properties":{"participant_handle":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},"agent_handle":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}]}}},"properties":{"chat_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Chat Agent Id","description":"The Chat Agent whose approved production version runs this chat."},"participant_handle":{"type":"string","maxLength":512,"minLength":1,"title":"Participant Handle","description":"The person to chat with, as their address, such as a phone number in E.164 form.","examples":["+14155550123"]},"agent_handle":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Agent Handle","description":"Your organization's address to chat from, such as one of your messaging numbers in E.164 form. Omitted, Resia picks a configured sending number for you.","examples":["+14155550199"]},"inputs":{"anyOf":[{"$ref":"#/components/schemas/ResiaJsonObject"},{"type":"null"}],"description":"A flat JSON object satisfying the Chat Agent's input_schema, rendered into the agent's instructions before the first text. Null runs the chat with empty inputs, which requires an input schema that accepts an empty object."},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"},"database_id":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Database Id","description":"The database for this chat. An unknown, other-organization, or unready database resolves to null."},"channel":{"$ref":"#/components/schemas/ChatChannel","description":"The channel the chat runs on: sms texts the person's phone number, and web runs the chat in your own page through POST and GET /v1/chats/{id}/messages. email is not available yet.","default":"sms"}},"additionalProperties":false,"type":"object","required":["chat_agent_id","participant_handle"],"title":"ChatCreateRequest","description":"Start one outbound chat with a named Chat Agent on a channel, mirroring POST /v1/calls. The agent sends\nthe first text, composed from its instructions and these inputs, and then answers each inbound text. On\nsms both handles are phone numbers in E.164 form. On web, participant_handle is your own stable id for the\nperson, and agent_handle, when given, must be the chat_agent_id.\n\nAt most one open chat is allowed per channel for each (participant_handle, agent_handle) pair, so an\ninbound reply always points to exactly one run; a second start to a busy pair is refused."},"ChatDetail":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id"},"chat_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Chat Agent Id"},"chat_agent_version_id":{"type":"string","maxLength":512,"minLength":1,"title":"Chat Agent Version Id"},"status":{"$ref":"#/components/schemas/ChatStatus"},"channel":{"$ref":"#/components/schemas/ChatChannel","description":"The channel the chat runs on."},"participant_handle":{"type":"string","title":"Participant Handle","description":"The person's address on the channel.","examples":["+14155550123"]},"agent_handle":{"type":"string","title":"Agent Handle","description":"Your organization's address on the channel.","examples":["+14155550199"]},"transcript":{"items":{"$ref":"#/components/schemas/ChatTranscriptMessage"},"type":"array","title":"Transcript","description":"The conversation so far, oldest first."},"analysis":{"anyOf":[{"$ref":"#/components/schemas/ResiaJsonObject"},{"type":"null"}],"description":"The end-of-chat analysis, present once the chat has ended and Resia has written it. Null while the chat is open or post_processing, for a chat that never started, and when no analysis that fits the Chat Agent's analysis_schema could be written."},"database_id":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Database Id","description":"The database selected for this chat, or null when none was usable."},"milestone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[^\\r\\n]+$"},{"type":"null"}],"title":"Milestone","description":"The stage this chat last reported, or null when it has reported none. One of the names its Chat Agent version declared in milestones."},"failure":{"anyOf":[{"$ref":"#/components/schemas/TextMessageFailure"},{"type":"null"}],"description":"Why the chat failed when its first text could not be delivered: the same reason the text-message reads report for that text, such as sender_not_registered when the sending number is not yet registered for business texting. Null for every other chat, including a chat that failed for another reason."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the conversation started: on sms, when the carrier confirmed delivery of the first text or the person first replied, whichever came first; for a chat the person started by texting your number, when that text arrived; on web, when the agent's first message was stored. Null while the chat is pending, and for a chat that ended before it started."},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the chat reached its final status: completed, failed, or cancelled. Null while it is open or post_processing."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"tool_activity":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentToolActivityEvent"},"type":"array"},{"type":"null"}],"title":"Tool Activity","description":"The tool requests and results the Chat Agent recorded, in recorded order. Present only on GET /v1/chats/{id} with include_tool_activity=true; null otherwise. The chat.ended webhook body leaves out both tool activity fields. Tool details never reach the person on the channel."},"tool_activity_truncated":{"type":"boolean","title":"Tool Activity Truncated","description":"True when a size limit left events out or cut a payload preview, or when an unreadable record was left out. tool_activity then holds the earliest events only.","default":false}},"additionalProperties":false,"type":"object","required":["id","chat_agent_id","chat_agent_version_id","status","channel","participant_handle","agent_handle","transcript","created_at","updated_at"],"title":"ChatDetail","description":"One chat run and its conversation so far, as GET /v1/chats/{id} and the chat.ended webhook see it."},"ChatEndedEvent":{"properties":{"type":{"type":"string","const":"chat.ended","title":"Type","default":"chat.ended"},"chat":{"$ref":"#/components/schemas/ChatDetail"}},"additionalProperties":false,"type":"object","required":["chat"],"title":"ChatEndedEvent","description":"The event Resia sends after a Chat Agent chat reaches a terminal status (ENG-3621).\n\nIt nests the same ChatDetail read model that GET /v1/chats/{chat_id} returns, so a customer\nroutes on ``type`` and reads the finished conversation and its analysis under ``chat``."},"ChatIncomingEvent":{"properties":{"type":{"type":"string","const":"chat.incoming","title":"Type","default":"chat.incoming"},"chat":{"$ref":"#/components/schemas/InboundChatInputWebhookRequest"}},"additionalProperties":false,"type":"object","required":["chat"],"title":"ChatIncomingEvent","description":"The body Resia POSTs to a Chat Agent's inbound_input_webhook_url when a text starts a new chat\n(ENG-3775). The thin WebhookEvent base carries the shared `type` discriminator; this event nests\nInboundChatInputWebhookRequest under `chat`. The endpoint answers with the same\nInboundCallInputWebhookResponse envelope an inbound call uses."},"ChatMessageCreateRequest":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text","description":"What the person wrote. Text of only spaces is refused.","examples":["Yes, I still need the refill."]},"client_message_id":{"type":"string","maxLength":512,"minLength":1,"title":"Client Message Id","description":"Your own id for this message, unique within the chat. Send the same id again to retry safely: Resia answers with the message it stored the first time and does not reply a second time.","examples":["5f0c2a9e-3b1d-4c8e-9a6f-2d7e1b4c8a90"]}},"additionalProperties":false,"type":"object","required":["text","client_message_id"],"title":"ChatMessageCreateRequest","description":"One message from the person in a web chat, which the customer's backend posts to\nPOST /v1/chats/{chat_id}/messages. The agent's reply is read from the chat's message list."},"ChatMessagePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChatMessageResource"},"type":"array","title":"Items","description":"The messages after your cursor, oldest first."},"chat_status":{"$ref":"#/components/schemas/ChatStatus","description":"The chat's status when Resia read this page. An ended chat gets no new messages."}},"additionalProperties":false,"type":"object","required":["items","chat_status"],"title":"ChatMessagePage","description":"The messages of a web chat after a cursor, oldest first, with the chat's current status."},"ChatMessageResource":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"Resia's id for the message.","examples":["01M35981X02D671AMMP158K2MY"]},"sequence":{"type":"integer","minimum":1.0,"title":"Sequence","description":"The message's position in the chat, from 1. Ask for the messages after the last sequence you have."},"role":{"$ref":"#/components/schemas/ChatMessageRole","description":"Who wrote the message: the person or the agent."},"text":{"type":"string","title":"Text","description":"The message text.","examples":["Hi, do you still need your refill?"]},"client_message_id":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Client Message Id","description":"Your id for a message from the person. Null on the agent's messages.","examples":["5f0c2a9e-3b1d-4c8e-9a6f-2d7e1b4c8a90"]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia stored the message."}},"additionalProperties":false,"type":"object","required":["id","sequence","role","text","created_at"],"title":"ChatMessageResource","description":"One stored message of a web chat, from either side."},"ChatMessageRole":{"type":"string","enum":["contact","agent"],"title":"ChatMessageRole","description":"Who one line of a chat transcript belongs to. A chat holds these two alone."},"ChatSortField":{"type":"string","enum":["created_at","chat_agent_name","channel","participant_handle","status","milestone","started_at","ended_at"],"title":"ChatSortField"},"ChatStatus":{"type":"string","enum":["pending","active","post_processing","completed","failed","cancelled"],"title":"ChatStatus","description":"Where a chat run is in its life. After the conversation ends, a chat that started waits in post_processing\nwhile Resia writes its analysis; then it ends completed (the agent ended it) or cancelled (you cancelled it).\nfailed means the chat never started."},"ChatSummary":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id"},"chat_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Chat Agent Id"},"status":{"$ref":"#/components/schemas/ChatStatus"},"channel":{"$ref":"#/components/schemas/ChatChannel","description":"The channel the chat runs on."},"participant_handle":{"type":"string","title":"Participant Handle","description":"The person's address on the channel.","examples":["+14155550123"]},"agent_handle":{"type":"string","title":"Agent Handle","description":"Your organization's address on the channel.","examples":["+14155550199"]},"database_id":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Database Id","description":"The database selected for this chat, or null when none was usable."},"milestone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[^\\r\\n]+$"},{"type":"null"}],"title":"Milestone","description":"The stage this chat last reported, or null when it has reported none. One of the names its Chat Agent version declared in milestones."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the conversation started: on sms, when the carrier confirmed delivery of the first text or the person first replied, whichever came first; for a chat the person started by texting your number, when that text arrived; on web, when the agent's first message was stored. Null while the chat is pending, and for a chat that ended before it started."},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."}},"additionalProperties":false,"type":"object","required":["id","chat_agent_id","status","channel","participant_handle","agent_handle","created_at","updated_at"],"title":"ChatSummary"},"ChatSummaryPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChatSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"ChatSummaryPage"},"ChatTranscriptMessage":{"properties":{"role":{"$ref":"#/components/schemas/ChatMessageRole","description":"Who the line belongs to — the person or the agent."},"content":{"type":"string","title":"Content","description":"What was said, as text."},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At","description":"When the line was sent, when known."}},"additionalProperties":false,"type":"object","required":["role","content"],"title":"ChatTranscriptMessage","description":"One line of the conversation, read from the checkpoint."},"ConversationRole":{"type":"string","enum":["system","user","assistant","event"],"title":"ConversationRole","description":"Who a transcript turn belongs to."},"CreateApiCredentialRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"A name to identify the credential by, unique within its environment.","examples":["billing-sync"]},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"},"scope":{"$ref":"#/components/schemas/ApiCredentialScope","description":"What the credential may do: reader, editor, or owner. Omit it for editor. The scope cannot change later; create a new credential instead.","default":"editor","examples":["reader"]}},"additionalProperties":false,"type":"object","required":["name"],"title":"CreateApiCredentialRequest"},"CreateInviteRequest":{"properties":{"email":{"type":"string","title":"Email","description":"The address to invite. Inviting an address that is already a member is refused; an address with a live invite already outstanding is refused so you can resend it instead.","examples":["raj@sunriseclinics.com"]}},"additionalProperties":false,"type":"object","required":["email"],"title":"CreateInviteRequest"},"CreateOrganizationRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"The organization's display name.","examples":["Sunrise Clinics"]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"An optional short URL-safe handle. When omitted, one is derived from the name. Lowercase letters, digits, and single hyphens.","examples":["sunrise-clinics"]},"invite_emails":{"items":{"type":"string"},"type":"array","title":"Invite Emails","description":"Optional addresses to invite in the same request, so sign-up is one round trip.","examples":[["dana@sunriseclinics.com","priya@sunriseclinics.com"]]},"member":{"anyOf":[{"$ref":"#/components/schemas/AdminMemberRequest"},{"type":"null"}],"description":"Insito admins only: the organization's first member, created as a pending person who binds at first sign-in. The admin key must send it. An admin who signs in may omit it, and then becomes the first member of their own new organization. A customer who sends it is refused."}},"additionalProperties":false,"type":"object","required":["name"],"title":"CreateOrganizationRequest"},"CreateOrganizationResponse":{"properties":{"organization":{"$ref":"#/components/schemas/OrganizationResponse","description":"The organization you now belong to as its first member."},"invites":{"items":{"$ref":"#/components/schemas/IssuedInvite"},"type":"array","title":"Invites","description":"Any invites created from the request's invite_emails, each with a link to share."}},"additionalProperties":false,"type":"object","required":["organization","invites"],"title":"CreateOrganizationResponse"},"CredentialEnvironment":{"type":"string","enum":["development","production"],"title":"CredentialEnvironment","description":"The environment an API credential authenticates against, as shown to the portal user — the\nhuman-facing `development`/`production` spelling, distinct from the short `dev`/`prod` form that\nappears inside the bearer token."},"DatabaseCreateRequest":{"properties":{"refresh_url":{"type":"string","minLength":1,"format":"uri","title":"Refresh Url","description":"HTTPS URL of the structured JSON export this database reads. Resia fetches it at creation and before each call that names it. The body must be a JSON object whose values are arrays of row objects. Resia prefers ETag, then a valid Last-Modified date, then a SHA-256 digest of the body bytes. Version headers are optional. Conditional requests can avoid a download for unchanged ETag or date versions. A digest requires a complete download on each refresh."},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"}},"additionalProperties":false,"type":"object","required":["refresh_url"],"title":"DatabaseCreateRequest"},"DatabasePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DatabaseResource"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"DatabasePage"},"DatabaseResource":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id"},"refresh_url":{"type":"string","minLength":1,"format":"uri","title":"Refresh Url"},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"ready":{"type":"boolean","title":"Ready","description":"True when the first import of this database is complete, so calls and chats that name it answer from it. False until then; a call or chat that names a database that is not ready answers as if none was named."},"last_source_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Source Version","description":"The source version of the export that this database holds: its ETag, a prefixed Last-Modified date, or a prefixed SHA-256 digest of the body bytes. ETag values remain unchanged. Null until the first import completes."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","refresh_url","ready","created_at"],"title":"DatabaseResource"},"DatabaseSortField":{"type":"string","enum":["created_at","refresh_url","ready"],"title":"DatabaseSortField"},"FeedbackKind":{"type":"string","enum":["issue","suggestion"],"title":"FeedbackKind","description":"What one report is: a problem the sender hit, or a change the sender wants. A report with no\nkind has a null kind; there is no third member."},"FeedbackReceived":{"properties":{"feedback_id":{"type":"string","maxLength":512,"minLength":1,"title":"Feedback Id","description":"The stored report's identifier.","examples":["01K9FEED7M8QW2V5C9H4YTB0KD"]},"kind":{"anyOf":[{"$ref":"#/components/schemas/FeedbackKind"},{"type":"null"}],"description":"The kind sent with the report, or null when the report had none.","examples":["issue"]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia stored the report."}},"additionalProperties":false,"type":"object","required":["feedback_id","kind","created_at"],"title":"FeedbackReceived","description":"The receipt for one stored report."},"FeedbackRequest":{"properties":{"kind":{"anyOf":[{"$ref":"#/components/schemas/FeedbackKind"},{"type":"null"}],"description":"Whether this reports a problem (`issue`) or asks for a change (`suggestion`). Omit it, or send null, when the report is neither or you do not know.","examples":["issue"]},"message":{"type":"string","maxLength":10000,"minLength":1,"title":"Message","description":"The report in plain language: what happened, or what to add.","examples":["GET /v1/calls/{call_id} returned 404 for a call that I placed one minute before."]},"related_ids":{"items":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"type":"array","maxItems":10,"title":"Related Ids","description":"Up to 10 identifiers of Resia records that the report is about, such as a call_id or an agent_id. Resia stores them as sent and does not look them up.","examples":[["01K9CALL7M8QW2V5C9H4YTB0KD"]]}},"additionalProperties":false,"type":"object","required":["message"],"title":"FeedbackRequest","description":"One report to the Resia team."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InCallLlm":{"properties":{"provider":{"$ref":"#/components/schemas/InCallLlmProvider","description":"The provider that serves the live conversation model."},"model":{"type":"string","maxLength":255,"minLength":1,"title":"Model","description":"The exact model identifier published by that provider, without a provider prefix."}},"additionalProperties":false,"type":"object","required":["provider","model"],"title":"InCallLlm"},"InCallLlmProvider":{"type":"string","enum":["anthropic","openai"],"title":"InCallLlmProvider"},"InboundCallInputWebhookRequest":{"properties":{"from_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"From Phone Number"},"to_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"To Phone Number"}},"additionalProperties":false,"type":"object","required":["from_phone_number","to_phone_number"],"title":"InboundCallInputWebhookRequest","description":"The ``call`` payload of the ``call.incoming`` event Resia sends to a Call Agent's\ninbound_input_webhook_url when an inbound call arrives: the caller and dialed numbers.\n\nDeliberately minimal: the customer knows their own number-to-agent mapping, so the two phone\nnumbers are all the endpoint needs to look up the caller and return the call's inputs."},"InboundChatInputWebhookRequest":{"properties":{"channel":{"$ref":"#/components/schemas/ChatChannel","description":"The channel the text arrived on."},"participant_handle":{"type":"string","title":"Participant Handle","description":"The person's address on the channel: their phone number in E.164 form on sms.","examples":["+14155550123"]},"agent_handle":{"type":"string","title":"Agent Handle","description":"Your organization's address the text arrived at: your Resia number on sms.","examples":["+14155550199"]}},"additionalProperties":false,"type":"object","required":["channel","participant_handle","agent_handle"],"title":"InboundChatInputWebhookRequest","description":"The ``chat`` payload of the ``chat.incoming`` event Resia sends to a Chat Agent's\ninbound_input_webhook_url when a text starts a new chat: the channel and the two handles.\n\nIt never carries the message text. The handles are named for the side each belongs to, as on\nevery chat shape (ENG-3719), so the endpoint looks the person up exactly as it reads a chat."},"InviteLandingResponse":{"properties":{"organization_name":{"type":"string","title":"Organization Name","description":"The organization you have been invited to.","examples":["Sunrise Clinics"]},"invited_by":{"type":"string","title":"Invited By","description":"The name of the person who invited you.","examples":["Sofia Martinez"]},"email":{"type":"string","title":"Email","description":"The address this invite was issued to. You must sign in with this address to accept.","examples":["raj@sunriseclinics.com"]},"status":{"$ref":"#/components/schemas/InviteStatus","description":"Whether the invite is still pending, or has been accepted, revoked, or expired."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When the invite stops working."}},"additionalProperties":false,"type":"object","required":["organization_name","invited_by","email","status","expires_at"],"title":"InviteLandingResponse"},"InviteResponse":{"properties":{"id":{"type":"string","title":"Id","description":"The invite's stable identifier.","examples":["01K2TZ8AAA0000000000000000"]},"email":{"type":"string","title":"Email","description":"The address the invite was issued to. Only this address can accept it.","examples":["raj@sunriseclinics.com"]},"status":{"$ref":"#/components/schemas/InviteStatus","description":"Where the invite stands: pending, accepted, revoked, or expired."},"invited_by":{"anyOf":[{"$ref":"#/components/schemas/UserSummary"},{"type":"null"}],"description":"The member who created the invite, or null when an Insito admin created it."},"invited_by_insito_admin":{"type":"boolean","title":"Invited By Insito Admin","description":"True when an Insito admin created the invite. The admin is not named.","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the invite was created."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When the invite stops working. Resending resets this."},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At","description":"When the invite was accepted, or null if it has not been."}},"additionalProperties":false,"type":"object","required":["id","email","status","invited_by","created_at","expires_at","accepted_at"],"title":"InviteResponse"},"InviteStatus":{"type":"string","enum":["pending","accepted","revoked","expired"],"title":"InviteStatus"},"IssuedApiCredential":{"properties":{"credential":{"$ref":"#/components/schemas/ApiCredentialResponse","description":"The created credential's metadata."},"secret":{"type":"string","title":"Secret","description":"The full bearer token, in `<environment>.<credential-id>.<secret>` form. Returned exactly once, here; Resia stores only its fingerprint and can never show it again."}},"additionalProperties":false,"type":"object","required":["credential","secret"],"title":"IssuedApiCredential"},"IssuedInvite":{"properties":{"invite":{"$ref":"#/components/schemas/InviteResponse","description":"The created invite."},"token":{"type":"string","title":"Token","description":"The one-time link secret to share with the invited person. Present because email delivery is deferred; treat it as a secret. It is not returned again by any other endpoint."}},"additionalProperties":false,"type":"object","required":["invite","token"],"title":"IssuedInvite"},"JsonValue":{},"MeResponse":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/UserSummary"},{"type":"null"}],"description":"The signed-in person as a member of `organization`, or null before they have joined or created one, and null for an admin who opens an organization they do not belong to."},"organization":{"anyOf":[{"$ref":"#/components/schemas/OrganizationResponse"},{"type":"null"}],"description":"The organization the signed-in person belongs to, or, for an admin who sends X-Resia-Organization-Id, the organization it names. Null when there is none — the signal to show organization creation, or the organization selector for an admin."},"admin":{"anyOf":[{"$ref":"#/components/schemas/AdminSummary"},{"type":"null"}],"description":"The signed-in person's Insito admin identity, or null when they are not an approved admin."}},"additionalProperties":false,"type":"object","required":["user","organization"],"title":"MeResponse"},"MemberResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserSummary","description":"The member."},"joined_at":{"type":"string","format":"date-time","title":"Joined At","description":"When this person joined the organization."}},"additionalProperties":false,"type":"object","required":["user","joined_at"],"title":"MemberResponse"},"MessageChargeDirection":{"type":"string","enum":["sent","received"],"title":"MessageChargeDirection","description":"Whether a text-message charge is for a text Resia sent or a text that reached one of the organization's numbers."},"MessageChargeSummary":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"Identifier of the charge.","examples":["01K1SA6D2E9NP3R7T5W8XQ4MHZ"]},"direction":{"$ref":"#/components/schemas/MessageChargeDirection","description":"`sent` for a text Resia sent; `received` for a text that reached one of your numbers.","examples":["sent"]},"text_message_id":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Text Message Id","description":"The sent message this charge is for — one charge per recipient message, not per submission. Empty for a received text.","examples":["01K1SA3F7M8QW2V5C9H4YTB0KD"]},"amount_in_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Amount In Cents","description":"Amount in cents: the text's segment count times the per-segment price, rounded to the nearest cent, or zero for a recipient refused before sending. Until the charge is finalized this is Resia's working figure and can change.","examples":[2]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the charge was raised: when a sent message was accepted, or when a received text arrived."},"finalized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finalized At","description":"When the amount was settled. While this is empty, the amount can still change."}},"additionalProperties":false,"type":"object","required":["id","direction","created_at"],"title":"MessageChargeSummary","description":"What one text message cost."},"ModelArchitecture":{"type":"string","enum":["stt_llm_tts","speech_to_speech"],"title":"ModelArchitecture"},"OrchestrationAgentResource":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"The Orchestration Agent's name. It must be unique within your organization."},"description":{"anyOf":[{"type":"string","maxLength":280,"minLength":1},{"type":"null"}],"title":"Description","description":"One line saying what this Orchestration Agent is for. Optional; a name is the fallback."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"instructions":{"type":"string","title":"Instructions","description":"The instructions for each run. Use `$name` or `${name}` to refer to a top-level run input property. Declare every placeholder in `input_schema.properties`. Resia supplies validated run inputs to the agent as a separate JSON object. Resia does not replace the placeholder text. Nested property paths are not supported."},"input_schema":{"$ref":"#/components/schemas/ResiaJsonObject","description":"A JSON Schema (draft 2020-12) the inputs of each run must satisfy. Use a JSON Schema object, not the legacy fields format."},"analysis_prompt":{"type":"string","title":"Analysis Prompt","description":"The prompt that tells Resia how to read the run's outcome into the analysis result."},"analysis_schema":{"$ref":"#/components/schemas/ResiaJsonObject","description":"A JSON Schema (draft 2020-12) the run's analysis result is shaped by. Use a JSON Schema object, not the legacy fields format."},"milestones":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentMilestone"},"type":"array","maxItems":32,"minItems":1},{"type":"null"}],"title":"Milestones","description":"The stages a run of this Orchestration Agent may report, each a name and a description. During a run the agent records the stage it has reached, using a name from this list; GET the run to read the current stage. Names must be unique. Null (the default) means the agent reports no milestone."},"tools":{"anyOf":[{"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"type":"array","maxItems":64},{"type":"null"}],"title":"Tools","description":"The names of your organization's tools that runs of this version may call. Null or an empty list names none."},"max_calls":{"type":"integer","minimum":0.0,"title":"Max Calls","description":"The most calls one run of this Orchestration Agent may place. Zero means the run places no calls, and it then receives no calling ability at all. A run that reaches this limit is refused further calls."},"max_messages":{"type":"integer","minimum":0.0,"title":"Max Messages","description":"The most text messages one run of this Orchestration Agent may send. Zero (the default) means the run sends none, and it then receives no messaging ability.","default":0},"max_spend_in_cents":{"type":"integer","minimum":0.0,"title":"Max Spend In Cents","description":"The most one run of this Orchestration Agent may spend, in whole cents. A run that reaches this limit is refused further spend."},"calling_window_start_local_time":{"type":"string","format":"time","title":"Calling Window Start Local Time","description":"The earliest local clock time a run may place a call, as HH:MM:SS. The window has no time zone of its own; each run's inputs carry the time zone the window is read in. The start must be before the end."},"calling_window_end_local_time":{"type":"string","format":"time","title":"Calling Window End Local Time","description":"The latest local clock time a run may place a call, as HH:MM:SS. It must be after calling_window_start_local_time."},"triggerable_call_agent_ids":{"items":{"type":"string","maxLength":512,"minLength":1},"type":"array","maxItems":64,"title":"Triggerable Call Agent Ids","description":"The Call Agents runs of this Orchestration Agent may dial, each named by its identifier. Every identifier must name a Call Agent your organization owns and has not archived. An empty list (the default) means the orchestration places no calls."},"triggerable_chat_agent_ids":{"items":{"type":"string","maxLength":512,"minLength":1},"type":"array","maxItems":64,"title":"Triggerable Chat Agent Ids","description":"The Chat Agents runs of this Orchestration Agent may start a chat with, each named by its identifier. Every identifier must name a Chat Agent your organization owns and has not archived. An empty list (the default) means the orchestration starts no chats. A run also needs max_messages above zero to start a chat."},"run_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Run Ended Webhook Url","description":"HTTPS URL Resia POSTs an orchestration_run.ended event to when an Orchestration Run reaches succeeded, failed, or cancelled. The event contains the same OrchestrationRunResponse that GET /v1/orchestration-runs/{orchestration_run_id} returns. Resia makes one immediate attempt when practical and retries a failed delivery on the call.ended schedule. Any 2xx response is success. The orchestration_run_id stays unchanged across retries, so treat a repeated orchestration_run_id as a duplicate. Treat the complete URL as a credential. Null clears the webhook and stops pending deliveries."},"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"The stable Orchestration Agent identifier."},"review_status":{"$ref":"#/components/schemas/CallAgentReviewStatus","description":"Whether the latest submitted configuration is approved or still pending review."},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the agent has an approved production configuration and is not archived."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the stable Orchestration Agent was created."},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At","description":"When the latest configuration was submitted."},"active_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Active Updated At","description":"When the current active configuration was approved, or null when none is active."},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At","description":"When the agent was archived, or null."}},"additionalProperties":false,"type":"object","required":["name","instructions","input_schema","analysis_prompt","analysis_schema","max_calls","max_spend_in_cents","calling_window_start_local_time","calling_window_end_local_time","id","review_status","is_active","created_at","submitted_at"],"title":"OrchestrationAgentResource"},"OrchestrationAgentSortField":{"type":"string","enum":["created_at","name","active_run_count","submitted_at"],"title":"OrchestrationAgentSortField"},"OrchestrationAgentSummary":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"The stable Orchestration Agent identifier."},"name":{"type":"string","title":"Name","description":"The Orchestration Agent's name."},"review_status":{"$ref":"#/components/schemas/CallAgentReviewStatus","description":"Whether the latest submitted configuration is approved or still pending review."},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the agent has an approved production configuration and is not archived."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the stable Orchestration Agent was created."},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At","description":"When the latest configuration was submitted."},"active_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Active Updated At","description":"When the current active configuration was approved, or null when none is active."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"active_run_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Run Count","description":"How many of this agent's orchestration runs have not ended. Only the list route fills it; 0 means none."}},"additionalProperties":false,"type":"object","required":["id","name","review_status","is_active","created_at","submitted_at"],"title":"OrchestrationAgentSummary"},"OrchestrationAgentSummaryPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrchestrationAgentSummary"},"type":"array","title":"Items","description":"One page of Orchestration Agent summaries, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque cursor for the next page, or null on the final page."}},"additionalProperties":false,"type":"object","required":["items"],"title":"OrchestrationAgentSummaryPage"},"OrchestrationAgentWrite":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"The Orchestration Agent's name. It must be unique within your organization."},"description":{"anyOf":[{"type":"string","maxLength":280,"minLength":1},{"type":"null"}],"title":"Description","description":"One line saying what this Orchestration Agent is for. Optional; a name is the fallback."},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"},"instructions":{"type":"string","title":"Instructions","description":"The instructions for each run. Use `$name` or `${name}` to refer to a top-level run input property. Declare every placeholder in `input_schema.properties`. Resia supplies validated run inputs to the agent as a separate JSON object. Resia does not replace the placeholder text. Nested property paths are not supported."},"input_schema":{"$ref":"#/components/schemas/ResiaJsonObject","description":"A JSON Schema (draft 2020-12) the inputs of each run must satisfy. Use a JSON Schema object, not the legacy fields format."},"analysis_prompt":{"type":"string","title":"Analysis Prompt","description":"The prompt that tells Resia how to read the run's outcome into the analysis result."},"analysis_schema":{"$ref":"#/components/schemas/ResiaJsonObject","description":"A JSON Schema (draft 2020-12) the run's analysis result is shaped by. Use a JSON Schema object, not the legacy fields format."},"milestones":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentMilestone"},"type":"array","maxItems":32,"minItems":1},{"type":"null"}],"title":"Milestones","description":"The stages a run of this Orchestration Agent may report, each a name and a description. During a run the agent records the stage it has reached, using a name from this list; GET the run to read the current stage. Names must be unique. Null (the default) means the agent reports no milestone."},"tools":{"anyOf":[{"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"type":"array","maxItems":64},{"type":"null"}],"title":"Tools","description":"The names of your organization's tools that runs of this version may call. Null or an empty list names none."},"max_calls":{"type":"integer","minimum":0.0,"title":"Max Calls","description":"The most calls one run of this Orchestration Agent may place. Zero means the run places no calls, and it then receives no calling ability at all. A run that reaches this limit is refused further calls."},"max_messages":{"type":"integer","minimum":0.0,"title":"Max Messages","description":"The most text messages one run of this Orchestration Agent may send. Zero (the default) means the run sends none, and it then receives no messaging ability.","default":0},"max_spend_in_cents":{"type":"integer","minimum":0.0,"title":"Max Spend In Cents","description":"The most one run of this Orchestration Agent may spend, in whole cents. A run that reaches this limit is refused further spend."},"calling_window_start_local_time":{"type":"string","format":"time","title":"Calling Window Start Local Time","description":"The earliest local clock time a run may place a call, as HH:MM:SS. The window has no time zone of its own; each run's inputs carry the time zone the window is read in. The start must be before the end."},"calling_window_end_local_time":{"type":"string","format":"time","title":"Calling Window End Local Time","description":"The latest local clock time a run may place a call, as HH:MM:SS. It must be after calling_window_start_local_time."},"triggerable_call_agent_ids":{"items":{"type":"string","maxLength":512,"minLength":1},"type":"array","maxItems":64,"title":"Triggerable Call Agent Ids","description":"The Call Agents runs of this Orchestration Agent may dial, each named by its identifier. Every identifier must name a Call Agent your organization owns and has not archived. An empty list (the default) means the orchestration places no calls."},"triggerable_chat_agent_ids":{"items":{"type":"string","maxLength":512,"minLength":1},"type":"array","maxItems":64,"title":"Triggerable Chat Agent Ids","description":"The Chat Agents runs of this Orchestration Agent may start a chat with, each named by its identifier. Every identifier must name a Chat Agent your organization owns and has not archived. An empty list (the default) means the orchestration starts no chats. A run also needs max_messages above zero to start a chat."},"run_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Run Ended Webhook Url","description":"HTTPS URL Resia POSTs an orchestration_run.ended event to when an Orchestration Run reaches succeeded, failed, or cancelled. The event contains the same OrchestrationRunResponse that GET /v1/orchestration-runs/{orchestration_run_id} returns. Resia makes one immediate attempt when practical and retries a failed delivery on the call.ended schedule. Any 2xx response is success. The orchestration_run_id stays unchanged across retries, so treat a repeated orchestration_run_id as a duplicate. Treat the complete URL as a credential. Null clears the webhook and stops pending deliveries."}},"additionalProperties":false,"type":"object","required":["name","instructions","input_schema","analysis_prompt","analysis_schema","max_calls","max_spend_in_cents","calling_window_start_local_time","calling_window_end_local_time"],"title":"OrchestrationAgentWrite"},"OrchestrationRunCancelResponse":{"properties":{"orchestration_run_id":{"type":"string","maxLength":512,"minLength":1,"title":"Orchestration Run Id"},"status":{"$ref":"#/components/schemas/OrchestrationRunStatus"},"cancel_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancel Requested At"}},"additionalProperties":false,"type":"object","required":["orchestration_run_id","status"],"title":"OrchestrationRunCancelResponse"},"OrchestrationRunChargeTotals":{"properties":{"token_charge_amount_in_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Token Charge Amount In Cents","description":"The finalized price of the run's own model-token consumption, or null while the run is still open and its token charge is not yet priced.","examples":[300]},"call_charges_in_cents":{"type":"integer","minimum":0.0,"title":"Call Charges In Cents","description":"The summed finalized prices of the calls this run placed. Calls still being priced are excluded.","examples":[165]},"message_charges_in_cents":{"type":"integer","minimum":0.0,"title":"Message Charges In Cents","description":"The summed finalized prices of the text messages this run sent. Messages still being priced are excluded.","examples":[4]},"total_in_cents":{"type":"integer","minimum":0.0,"title":"Total In Cents","description":"The sum of the three components above — everything this run has been charged so far.","examples":[469]}},"additionalProperties":false,"type":"object","required":["call_charges_in_cents","message_charges_in_cents","total_in_cents"],"title":"OrchestrationRunChargeTotals","description":"What one orchestration run has cost, from the three ledgers it draws on.\n\nThe run's own charge holds only its model-token component; its calls and messages\ncarry their own charges. Each figure sums finalized amounts only — work still being\npriced is visible per item on the charge list endpoints, never guessed at here."},"OrchestrationRunCreateRequest":{"properties":{"orchestration_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Orchestration Agent Id","description":"The Orchestration Agent that should run."},"idempotency_key":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Idempotency Key"},"run_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Run Ended Webhook Url","description":"HTTPS URL Resia POSTs the orchestration_run.ended event to for this run. A URL here overrides the Orchestration Agent URL. Null or omitted uses the Orchestration Agent URL. An idempotent retry keeps the URL saved by the first request. Treat the complete URL as a credential because delivery authenticity uses HTTPS plus URL secrecy."},"inputs":{"$ref":"#/components/schemas/ResiaJsonObject"},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"}},"additionalProperties":false,"type":"object","required":["orchestration_agent_id","inputs"],"title":"OrchestrationRunCreateRequest"},"OrchestrationRunCreateResponse":{"properties":{"orchestration_run_id":{"type":"string","maxLength":512,"minLength":1,"title":"Orchestration Run Id"},"status":{"$ref":"#/components/schemas/OrchestrationRunStatus"},"created":{"type":"boolean","title":"Created"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["orchestration_run_id","status","created","created_at"],"title":"OrchestrationRunCreateResponse"},"OrchestrationRunEndedEvent":{"properties":{"type":{"type":"string","const":"orchestration_run.ended","title":"Type","default":"orchestration_run.ended"},"orchestration_run":{"$ref":"#/components/schemas/OrchestrationRunResponse"}},"additionalProperties":false,"type":"object","required":["orchestration_run"],"title":"OrchestrationRunEndedEvent","description":"The event Resia sends after an Orchestration Run reaches a terminal status."},"OrchestrationRunFailureCode":{"type":"string","enum":["BUNDLE_VERIFICATION_FAILED","INVALID_ANALYSIS","RUNTIME_FAILURE"],"title":"OrchestrationRunFailureCode"},"OrchestrationRunResponse":{"properties":{"orchestration_run_id":{"type":"string","maxLength":512,"minLength":1,"title":"Orchestration Run Id"},"orchestration_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Orchestration Agent Id","description":"The Orchestration Agent running this orchestration."},"status":{"$ref":"#/components/schemas/OrchestrationRunStatus"},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"analysis":{"anyOf":[{"$ref":"#/components/schemas/ResiaJsonObject"},{"type":"null"}]},"error_code":{"anyOf":[{"$ref":"#/components/schemas/OrchestrationRunFailureCode"},{"type":"null"}]},"waiting_for":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Waiting For"},"milestone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[^\\r\\n]+$"},{"type":"null"}],"title":"Milestone","description":"The stage this run last reported, or null when it has reported none. One of the names its Orchestration Agent version declared in milestones."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"charges":{"anyOf":[{"$ref":"#/components/schemas/OrchestrationRunChargeTotals"},{"type":"null"}],"description":"What the run has cost so far across its token, call, and message ledgers. Null when the serving gateway predates charge reporting."},"tool_activity":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentToolActivityEvent"},"type":"array"},{"type":"null"}],"title":"Tool Activity","description":"The tool requests and results the Orchestration Agent recorded, in recorded order, including linked call and chat IDs as payload text. Present only on GET /v1/orchestration-runs/{orchestration_run_id} with include_tool_activity=true; null in the run list and otherwise. The orchestration_run.ended webhook body leaves out both tool activity fields."},"tool_activity_truncated":{"type":"boolean","title":"Tool Activity Truncated","description":"True when a size limit left events out or cut a payload preview, or when an unreadable record was left out. tool_activity then holds the earliest events only.","default":false}},"additionalProperties":false,"type":"object","required":["orchestration_run_id","orchestration_agent_id","status","created_at"],"title":"OrchestrationRunResponse"},"OrchestrationRunSortField":{"type":"string","enum":["created_at","orchestration_agent_name","status","milestone","duration","started_at","ended_at"],"title":"OrchestrationRunSortField"},"OrchestrationRunStatus":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"],"title":"OrchestrationRunStatus"},"OrganizationCallRateLimits":{"properties":{"concurrent":{"type":"integer","title":"Concurrent","description":"Maximum inbound and outbound calls in progress together for this organization. At this limit, new calls are refused and batch calls wait. Zero stops new calls."},"in_progress":{"type":"integer","title":"In Progress","description":"Inbound and outbound calls in progress for this organization. This count can exceed concurrent after a limit decrease."},"per_minute":{"type":"integer","title":"Per Minute","description":"Calls the organization may place in the last minute."},"per_hour":{"type":"integer","title":"Per Hour","description":"Calls the organization may place in the last hour."},"per_day":{"type":"integer","title":"Per Day","description":"Calls the organization may place in the last day."},"per_destination_per_day":{"type":"integer","title":"Per Destination Per Day","description":"Calls the organization may place in the last day to one destination number."}},"additionalProperties":false,"type":"object","required":["concurrent","in_progress","per_minute","per_hour","per_day","per_destination_per_day"],"title":"OrganizationCallRateLimits","description":"The organization's call limits and current count of calls in progress."},"OrganizationChargeLedgerSummary":{"properties":{"finalized_amount_in_cents":{"type":"integer","title":"Finalized Amount In Cents","description":"The settled amounts summed, in whole US cents."},"finalized_count":{"type":"integer","title":"Finalized Count","description":"How many of the month's charges are settled."},"pending_count":{"type":"integer","title":"Pending Count","description":"Charges raised this month with no settled amount yet. Pending charges carry no dollar figure, so they are counted, never estimated."}},"additionalProperties":false,"type":"object","required":["finalized_amount_in_cents","finalized_count","pending_count"],"title":"OrganizationChargeLedgerSummary","description":"One line item of a month's spend: what is settled, and how much is still in flight."},"OrganizationMessageRateLimits":{"properties":{"per_minute":{"type":"integer","title":"Per Minute","description":"Text messages the organization may send in the last minute."},"per_hour":{"type":"integer","title":"Per Hour","description":"Text messages the organization may send in the last hour."},"per_day":{"type":"integer","title":"Per Day","description":"Text messages the organization may send in the last day."},"per_destination_per_day":{"type":"integer","title":"Per Destination Per Day","description":"Text messages the organization may send in the last day to one destination number."}},"additionalProperties":false,"type":"object","required":["per_minute","per_hour","per_day","per_destination_per_day"],"title":"OrganizationMessageRateLimits","description":"The most text messages one organization may send inside each rolling window."},"OrganizationPhoneNumberReleaseRateLimits":{"properties":{"per_hour":{"type":"integer","minimum":0.0,"title":"Per Hour","description":"Maximum phone number releases in a rolling hour. Zero blocks releases."},"per_day":{"type":"integer","minimum":0.0,"title":"Per Day","description":"Maximum phone number releases in rolling 24 hours. Zero blocks releases."},"per_month":{"type":"integer","minimum":0.0,"title":"Per Month","description":"Maximum phone number releases in rolling 30 days. Zero blocks releases."}},"additionalProperties":false,"type":"object","required":["per_hour","per_day","per_month"],"title":"OrganizationPhoneNumberReleaseRateLimits","description":"Maximum phone number releases per organization in each rolling window."},"OrganizationRateLimitsResponse":{"properties":{"call":{"$ref":"#/components/schemas/OrganizationCallRateLimits","description":"The organization's outbound call windows, shared inbound and outbound concurrency limit, and current use."},"message":{"$ref":"#/components/schemas/OrganizationMessageRateLimits","description":"The organization's outbound text-message limits."},"ten_dlc":{"$ref":"#/components/schemas/OrganizationTenDlcRateLimits","description":"The organization's paid 10DLC campaign submission limits."},"phone_number_release":{"anyOf":[{"$ref":"#/components/schemas/OrganizationPhoneNumberReleaseRateLimits"},{"type":"null"}],"description":"The organization's phone number release limits. Older gateways omit this field."}},"additionalProperties":false,"type":"object","required":["call","message","ten_dlc"],"title":"OrganizationRateLimitsResponse","description":"Every per-organization rate limit in force for the caller right now.\n\nEach limit is the organization's own override when it has one, otherwise the deployment\ndefault. A zero limit blocks that action. The call report also includes the current use. Orchestration runs carry no\nseparate organization limit: a run draws on the call and message limits here, and its own\ncall, message, and spend caps live on its approved agent version."},"OrganizationResponse":{"properties":{"id":{"type":"string","title":"Id","description":"The organization's stable identifier.","examples":["01K2TZ44WQ0000000000000000"]},"name":{"type":"string","title":"Name","description":"The organization's display name.","examples":["Sunrise Clinics"]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"The organization's short URL-safe handle, unique across active organizations.","examples":["sunrise-clinics"]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the organization was created."},"member_count":{"type":"integer","title":"Member Count","description":"How many people currently belong to the organization.","examples":[3]}},"additionalProperties":false,"type":"object","required":["id","name","slug","created_at","member_count"],"title":"OrganizationResponse"},"OrganizationSpendReport":{"properties":{"organization_id":{"type":"string","maxLength":512,"minLength":1,"title":"Organization Id","description":"The organization reported on."},"month":{"type":"string","title":"Month","description":"The calendar month reported, as YYYY-MM in UTC."},"calls":{"$ref":"#/components/schemas/OrganizationChargeLedgerSummary","description":"The call charge ledger's month summary."},"messages":{"$ref":"#/components/schemas/OrganizationChargeLedgerSummary","description":"The text-message charge ledger's month summary — texts sent and texts received."},"orchestration_tokens":{"$ref":"#/components/schemas/OrganizationChargeLedgerSummary","description":"The orchestration token charge ledger's month summary."},"chats":{"$ref":"#/components/schemas/OrganizationChargeLedgerSummary","description":"The chat token charge ledger's month summary. A chat's texts are in `messages`."},"phone_numbers":{"$ref":"#/components/schemas/OrganizationChargeLedgerSummary","description":"The phone-number charge ledger's month summary — monthly rentals."},"call_concurrency_slots":{"$ref":"#/components/schemas/OrganizationChargeLedgerSummary","description":"The monthly charges for concurrent call slots above the included ones."},"ten_dlc":{"$ref":"#/components/schemas/OrganizationChargeLedgerSummary","description":"The 10DLC campaign charge ledger's month summary — monthly campaign charges and registry rejection fees."},"total_finalized_in_cents":{"type":"integer","title":"Total Finalized In Cents","description":"The seven ledgers' settled amounts summed. Nothing is double-counted: each charge belongs to exactly one ledger."},"workflow_tokens":{"$ref":"#/components/schemas/OrganizationChargeLedgerSummary","description":"Deprecated. Use orchestration_tokens. It stops working on 2026-10-25.","deprecated":true,"readOnly":true}},"additionalProperties":false,"type":"object","required":["organization_id","month","calls","messages","orchestration_tokens","chats","phone_numbers","call_concurrency_slots","ten_dlc","total_finalized_in_cents","workflow_tokens"],"title":"OrganizationSpendReport","description":"What one organization spent during one calendar month, by line item."},"OrganizationTenDlcRateLimits":{"properties":{"per_day":{"type":"integer","title":"Per Day","description":"Paid 10DLC campaign submissions the organization may start in the last day."}},"additionalProperties":false,"type":"object","required":["per_day"],"title":"OrganizationTenDlcRateLimits","description":"The most paid 10DLC campaign submissions one organization may start inside each window."},"OrganizationUsageReport":{"properties":{"organization_id":{"type":"string","maxLength":512,"minLength":1,"title":"Organization Id","description":"The organization reported on."},"month":{"type":"string","title":"Month","description":"The calendar month reported, as YYYY-MM in UTC."},"calls_count":{"type":"integer","title":"Calls Count","description":"Calls placed during the month."},"calls_duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calls Duration Ms","description":"Total connected duration of the month's calls. Empty when the call details were not read."},"messages_count":{"type":"integer","title":"Messages Count","description":"Text messages (one per recipient) sent during the month."},"orchestration_runs_count":{"type":"integer","title":"Orchestration Runs Count","description":"Orchestration runs started during the month."},"active_phone_numbers_count":{"type":"integer","title":"Active Phone Numbers Count","description":"Numbers the organization owns right now — ownership is current state, not a monthly event."},"ten_dlc_submissions_count":{"type":"integer","title":"Ten Dlc Submissions Count","description":"Paid 10DLC campaign submissions recorded during the month."},"engine_data_available":{"type":"boolean","title":"Engine Data Available","description":"False when the call details were not read — skipped by the caller or unavailable — in which case the duration fields are empty rather than zero."},"workflow_runs_count":{"type":"integer","title":"Workflow Runs Count","description":"Deprecated. Use orchestration_runs_count. It stops working on 2026-10-25.","deprecated":true,"readOnly":true}},"additionalProperties":false,"type":"object","required":["organization_id","month","calls_count","messages_count","orchestration_runs_count","active_phone_numbers_count","ten_dlc_submissions_count","engine_data_available","workflow_runs_count"],"title":"OrganizationUsageReport","description":"What one organization used during one calendar month (UTC, by record creation time)."},"OwnedPhoneNumber":{"properties":{"phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"Phone Number","description":"The organization-owned phone number in E.164 format.","examples":["+14155550199"]},"inbound_call_agent_id":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Inbound Call Agent Id","description":"The Call Agent that answers inbound calls to this number, or null if none.","examples":["01K1SA3F7M8QW2V5C9H4YTB0KD"]},"inbound_chat_agent_id":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Inbound Chat Agent Id","description":"The Chat Agent that answers inbound texts to this number, or null if none.","examples":["01M328WBA7EW21KGMR7MY9QT2P"]},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."}},"additionalProperties":false,"type":"object","required":["phone_number"],"title":"OwnedPhoneNumber"},"OwnedPhoneNumberPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OwnedPhoneNumber"},"type":"array","title":"Items","description":"The organization's currently owned phone numbers, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this value as `cursor` to fetch the next page. Null means this is the last page."}},"additionalProperties":false,"type":"object","required":["items"],"title":"OwnedPhoneNumberPage"},"Page_ApiCredentialResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApiCredentialResponse"},"type":"array","title":"Items","description":"The results on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as the `cursor` query parameter to get the next page. Empty means this is the last page.","examples":["MDFLMVNBM0Y3TThRVzJWNUM5SDRZVEIwS0Q"]}},"type":"object","required":["items"],"title":"Page[ApiCredentialResponse]"},"Page_CallSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CallSummary"},"type":"array","title":"Items","description":"The results on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as the `cursor` query parameter to get the next page. Empty means this is the last page.","examples":["MDFLMVNBM0Y3TThRVzJWNUM5SDRZVEIwS0Q"]}},"type":"object","required":["items"],"title":"Page[CallSummary]"},"Page_ChargeSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChargeSummary"},"type":"array","title":"Items","description":"The results on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as the `cursor` query parameter to get the next page. Empty means this is the last page.","examples":["MDFLMVNBM0Y3TThRVzJWNUM5SDRZVEIwS0Q"]}},"type":"object","required":["items"],"title":"Page[ChargeSummary]"},"Page_InviteResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InviteResponse"},"type":"array","title":"Items","description":"The results on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as the `cursor` query parameter to get the next page. Empty means this is the last page.","examples":["MDFLMVNBM0Y3TThRVzJWNUM5SDRZVEIwS0Q"]}},"type":"object","required":["items"],"title":"Page[InviteResponse]"},"Page_MemberResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MemberResponse"},"type":"array","title":"Items","description":"The results on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as the `cursor` query parameter to get the next page. Empty means this is the last page.","examples":["MDFLMVNBM0Y3TThRVzJWNUM5SDRZVEIwS0Q"]}},"type":"object","required":["items"],"title":"Page[MemberResponse]"},"Page_MessageChargeSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MessageChargeSummary"},"type":"array","title":"Items","description":"The results on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as the `cursor` query parameter to get the next page. Empty means this is the last page.","examples":["MDFLMVNBM0Y3TThRVzJWNUM5SDRZVEIwS0Q"]}},"type":"object","required":["items"],"title":"Page[MessageChargeSummary]"},"Page_OrchestrationRunResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrchestrationRunResponse"},"type":"array","title":"Items","description":"The results on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as the `cursor` query parameter to get the next page. Empty means this is the last page.","examples":["MDFLMVNBM0Y3TThRVzJWNUM5SDRZVEIwS0Q"]}},"type":"object","required":["items"],"title":"Page[OrchestrationRunResponse]"},"Page_PhoneNumberChargeSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PhoneNumberChargeSummary"},"type":"array","title":"Items","description":"The results on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as the `cursor` query parameter to get the next page. Empty means this is the last page.","examples":["MDFLMVNBM0Y3TThRVzJWNUM5SDRZVEIwS0Q"]}},"type":"object","required":["items"],"title":"Page[PhoneNumberChargeSummary]"},"Page_RequestLogSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RequestLogSummary"},"type":"array","title":"Items","description":"The results on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as the `cursor` query parameter to get the next page. Empty means this is the last page.","examples":["MDFLMVNBM0Y3TThRVzJWNUM5SDRZVEIwS0Q"]}},"type":"object","required":["items"],"title":"Page[RequestLogSummary]"},"Page_WorkflowRunResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkflowRunResponse"},"type":"array","title":"Items","description":"The results on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as the `cursor` query parameter to get the next page. Empty means this is the last page.","examples":["MDFLMVNBM0Y3TThRVzJWNUM5SDRZVEIwS0Q"]}},"type":"object","required":["items"],"title":"Page[WorkflowRunResponse]","description":"Deprecated. Use `Page_OrchestrationRunResponse_`.","deprecated":true},"ParticipantDialMode":{"type":"string","enum":["at_start","on_agent_request"],"title":"ParticipantDialMode"},"ParticipantIntroMode":{"type":"string","enum":["direct","private_first"],"title":"ParticipantIntroMode"},"PatchOrganizationRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"A new display name for the organization.","examples":["Sunrise Clinics"]}},"additionalProperties":false,"type":"object","required":["name"],"title":"PatchOrganizationRequest"},"PayloadState":{"type":"string","enum":["full","redacted","truncated","redacted_truncated","unavailable"],"title":"PayloadState"},"PhoneNumberAssignmentRequest":{"properties":{"inbound_call_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Call Agent Id","description":"The Call Agent to answer inbound calls to this number. Send null to stop taking inbound calls on it; omit it to leave it unchanged.","examples":["01K1SA3F7M8QW2V5C9H4YTB0KD"]},"inbound_chat_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Chat Agent Id","description":"The Chat Agent to answer inbound texts to this number. Send null to stop taking inbound texts on it; omit it to leave it unchanged.","examples":["01M328WBA7EW21KGMR7MY9QT2P"]},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags","description":"Replaces all of this number's tags with this map. Send {} or null to remove every tag; omit it to leave the tags unchanged.","examples":[{"customer":"beacon"}]}},"type":"object","title":"PhoneNumberAssignmentRequest","description":"Assign (or clear) the agents that answer a number — the Call Agent for inbound calls and the Chat Agent for inbound texts — and replace its tags. Send only the fields you want to change."},"PhoneNumberChargeKind":{"type":"string","enum":["purchase","monthly_rental"],"title":"PhoneNumberChargeKind"},"PhoneNumberChargeSummary":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"Identifier of the charge.","examples":["01K1SA6D2E9NP3R7T5W8XQ4MHZ"]},"phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"Phone Number","description":"The organization-owned phone number this charge is for, in E.164 format — the number itself is how owned numbers are identified everywhere in this API.","examples":["+14155550199"]},"charge_kind":{"$ref":"#/components/schemas/PhoneNumberChargeKind","description":"`monthly_rental` for one month of use. `purchase` only on numbers bought before 2026-10-05, when a purchase had its own one-time charge."},"rental_month":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Rental Month","description":"The first day of the month of use that a rental charge pays for. The first month starts on the purchase day, and each later month starts on the same day of the month, or on the last day of a shorter month. Numbers bought before monthly terms renew on the 1st. Null for a purchase charge.","examples":["2026-10-09"]},"amount_in_cents":{"type":"integer","minimum":0.0,"title":"Amount In Cents","description":"Amount in cents: the phone-number monthly price in force on the first day of the month of use. Phone-number charges are final from the moment they are raised — there is no pending state.","examples":[200]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the charge was raised."},"finalized_at":{"type":"string","format":"date-time","title":"Finalized At","description":"When the amount was settled — always set, in the same moment the charge was raised."}},"additionalProperties":false,"type":"object","required":["id","phone_number","charge_kind","amount_in_cents","created_at","finalized_at"],"title":"PhoneNumberChargeSummary","description":"What one phone number cost: one month of use, or the one-time purchase charge of a number bought before monthly terms."},"PhoneNumberOrderResponse":{"properties":{"phone_number_order_id":{"type":"string","maxLength":512,"minLength":1,"title":"Phone Number Order Id"},"phone_number":{"type":"string","pattern":"^\\+1[2-9][0-9]{2}[2-9][0-9]{6}$","title":"Phone Number"},"status":{"$ref":"#/components/schemas/PhoneNumberOrderStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["phone_number_order_id","phone_number","status","created_at","updated_at"],"title":"PhoneNumberOrderResponse"},"PhoneNumberOrderStatus":{"type":"string","enum":["pending","ready","failed"],"title":"PhoneNumberOrderStatus"},"PhoneNumberPurchaseRequest":{"properties":{"phone_number":{"type":"string","pattern":"^\\+1[2-9][0-9]{2}[2-9][0-9]{6}$","title":"Phone Number"}},"additionalProperties":false,"type":"object","required":["phone_number"],"title":"PhoneNumberPurchaseRequest"},"PhoneNumberSortField":{"type":"string","enum":["created_at","phone_number","inbound_call_agent_name","inbound_chat_agent_name","assigned"],"title":"PhoneNumberSortField"},"RequestLogDetail":{"properties":{"request_id":{"type":"string","maxLength":512,"minLength":1,"title":"Request Id","description":"Identifier of the stored request. Use it with GET /v1/request-logs/{request_id} to read the bodies, and to match a Cloud Logging line by its X-Request-ID.","examples":["01K1SA3F7M8QW2V5C9H4YTB0KD"]},"kind":{"$ref":"#/components/schemas/RequestLogKind","description":"Who made the request: api is a request you sent to this API; webhook is a request Resia sent to your webhooks."},"method":{"type":"string","title":"Method","description":"The HTTP method.","examples":["POST"]},"route":{"type":"string","title":"Route","description":"Where the request went. For an api request, this is the API route pattern, never the filled-in path. For a webhook request, this is the webhook URL. A custom tool call is also a webhook request, but its route is only the origin of the tool's endpoint: the scheme, the host, and a port other than 443.","examples":["/v1/calls"]},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code","description":"The HTTP status the request answered with. Empty for a webhook that never answered — a timeout or a transport error.","examples":[422]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the request was handled."},"insito_admin":{"type":"boolean","title":"Insito Admin","description":"True when an Insito admin sent the request on your organization's behalf. The admin is not named.","default":false},"request_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Body","description":"The request body exactly as it arrived, as a JSON string, with Resia-issued credentials and a custom tool's endpoint_url replaced by [redacted]. Empty for a request that carried no JSON body."},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Body","description":"The response body exactly as it was sent, as a JSON string, with Resia-issued credentials and a custom tool's endpoint_url replaced by [redacted]. Empty for a response with no JSON body, such as an audio download."}},"additionalProperties":false,"type":"object","required":["request_id","kind","method","route","created_at"],"title":"RequestLogDetail","description":"Everything in the summary, plus the request and response bodies, stored complete."},"RequestLogKind":{"type":"string","enum":["api","webhook"],"title":"RequestLogKind","description":"Who initiated the logged HTTP exchange."},"RequestLogSummary":{"properties":{"request_id":{"type":"string","maxLength":512,"minLength":1,"title":"Request Id","description":"Identifier of the stored request. Use it with GET /v1/request-logs/{request_id} to read the bodies, and to match a Cloud Logging line by its X-Request-ID.","examples":["01K1SA3F7M8QW2V5C9H4YTB0KD"]},"kind":{"$ref":"#/components/schemas/RequestLogKind","description":"Who made the request: api is a request you sent to this API; webhook is a request Resia sent to your webhooks."},"method":{"type":"string","title":"Method","description":"The HTTP method.","examples":["POST"]},"route":{"type":"string","title":"Route","description":"Where the request went. For an api request, this is the API route pattern, never the filled-in path. For a webhook request, this is the webhook URL. A custom tool call is also a webhook request, but its route is only the origin of the tool's endpoint: the scheme, the host, and a port other than 443.","examples":["/v1/calls"]},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code","description":"The HTTP status the request answered with. Empty for a webhook that never answered — a timeout or a transport error.","examples":[422]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the request was handled."},"insito_admin":{"type":"boolean","title":"Insito Admin","description":"True when an Insito admin sent the request on your organization's behalf. The admin is not named.","default":false}},"additionalProperties":false,"type":"object","required":["request_id","kind","method","route","created_at"],"title":"RequestLogSummary","description":"One stored request as it appears in a list — its shape and outcome, without the bodies."},"ResiaJsonObject":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","title":"ResiaJsonObject"},"ResiaRuntimeErrorCode":{"type":"string","enum":["UNAUTHENTICATED","FORBIDDEN","NOT_FOUND","INVALID_REQUEST","CONFLICT","GONE","TOO_EARLY","PATIENT_INPUTS_DISABLED","REGISTRATION_TIMEOUT","STALE_EXECUTION","CAPABILITY_EXPIRED","LEASE_EXPIRED","RUNTIME_FAILURE","CALL_LIMIT_REACHED","MESSAGE_LIMIT_REACHED","SPEND_LIMIT_REACHED","OUTSIDE_CALLING_WINDOW","UNKNOWN_REFERENCE","AGENT_NOT_TRIGGERABLE","CAPABILITY_NOT_GRANTED","INSUFFICIENT_FUNDS"],"title":"ResiaRuntimeErrorCode","description":"The reason for an error. Resia's own services use some of these values, and the customer API does not return those."},"SlugAvailableResponse":{"properties":{"slug":{"type":"string","title":"Slug","description":"The slug that was checked.","examples":["sunrise-clinics"]},"available":{"type":"boolean","title":"Available","description":"Whether the slug is free right now. Advisory only — creation is still the authority."}},"additionalProperties":false,"type":"object","required":["slug","available"],"title":"SlugAvailableResponse"},"SortOrder":{"type":"string","enum":["asc","desc"],"title":"SortOrder","description":"The direction of a sorted list."},"SpokenCaptureMethod":{"type":"string","enum":["exact-pts","estimate-16cps","sentence-sync","live-audio-sync","none"],"title":"SpokenCaptureMethod","description":"How a turn's spoken portion was captured: an exact word-timed capture, or an estimate."},"TenDlcBrandStatusResponse":{"properties":{"connected":{"type":"boolean","title":"Connected","description":"Whether this organization has a registered brand yet — registered through the API or connected by a Resia operator."},"identity_status":{"anyOf":[{"$ref":"#/components/schemas/BrandIdentityStatus"},{"type":"null"}],"description":"The registry's live verification grade for the connected brand, or null while no brand is connected or the grade is unavailable.","examples":["VERIFIED"]}},"additionalProperties":false,"type":"object","required":["connected"],"title":"TenDlcBrandStatusResponse"},"TenDlcCampaignDetailResponse":{"properties":{"campaign_id":{"type":"string","pattern":"^[A-Za-z0-9-]{4,64}$","title":"Campaign Id","description":"The Telnyx identifier of a campaign registered for the organization's brand.","examples":["6d40039b-0fc1-c114-c8e2-8a5294fd9941"]},"usecase":{"$ref":"#/components/schemas/CampaignUseCase","description":"The registry use case the campaign was registered for.","examples":["LOW_VOLUME"]},"status":{"$ref":"#/components/schemas/TenDlcCampaignStatus","description":"One stable lifecycle answer folded from the registry's several status signals. Only an active campaign delivers texts.","examples":["active"]},"carrier_provisioning":{"items":{"$ref":"#/components/schemas/CarrierProvisioning"},"type":"array","title":"Carrier Provisioning","description":"Per-carrier provisioning progress, read live from the registry. Empty while the registry has published no per-carrier record yet."}},"additionalProperties":false,"type":"object","required":["campaign_id","usecase","status","carrier_provisioning"],"title":"TenDlcCampaignDetailResponse"},"TenDlcCampaignListResponse":{"properties":{"campaigns":{"items":{"$ref":"#/components/schemas/TenDlcCampaignSummary"},"type":"array","title":"Campaigns","description":"Every campaign registered for the organization's brand, read live from the registry."}},"additionalProperties":false,"type":"object","required":["campaigns"],"title":"TenDlcCampaignListResponse"},"TenDlcCampaignPhoneNumberListResponse":{"properties":{"phone_numbers":{"items":{"$ref":"#/components/schemas/TenDlcPhoneNumberAssignmentResponse"},"type":"array","title":"Phone Numbers","description":"Every number attached to the campaign, with each one's live registry assignment state."}},"additionalProperties":false,"type":"object","required":["phone_numbers"],"title":"TenDlcCampaignPhoneNumberListResponse"},"TenDlcCampaignStatus":{"type":"string","enum":["pending_review","active","rejected","suspended","expired"],"title":"TenDlcCampaignStatus","description":"Where a campaign is in its registry and carrier lifecycle, as one stable answer."},"TenDlcCampaignSubmissionRequest":{"properties":{"usecase":{"$ref":"#/components/schemas/CampaignUseCase","description":"The use case to register, from the qualification listing.","examples":["LOW_VOLUME"]},"description":{"type":"string","maxLength":4096,"minLength":40,"title":"Description","description":"What this campaign's messages are about, for registry reviewers."},"sample_messages":{"items":{"type":"string","maxLength":1024,"minLength":1},"type":"array","maxItems":5,"minItems":1,"title":"Sample Messages","description":"One to five representative message texts."},"message_flow":{"type":"string","maxLength":2048,"minLength":40,"title":"Message Flow","description":"How a recipient consents to these messages, step by step."},"help_keywords":{"type":"string","maxLength":255,"title":"Help Keywords","description":"Comma-separated keywords a recipient can send for help.","default":"HELP"},"help_message":{"type":"string","maxLength":320,"minLength":20,"title":"Help Message","description":"The reply a recipient gets after texting a help keyword."},"optin_keywords":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Optin Keywords","description":"Comma-separated opt-in keywords, when recipients can subscribe by texting."},"optin_message":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Optin Message","description":"The confirmation reply after an opt-in keyword."},"optout_keywords":{"type":"string","maxLength":255,"title":"Optout Keywords","description":"Comma-separated keywords that stop these messages.","default":"STOP"},"optout_message":{"type":"string","maxLength":320,"minLength":20,"title":"Optout Message","description":"The final reply a recipient gets after opting out."},"privacy_policy_link":{"type":"string","maxLength":255,"title":"Privacy Policy Link","description":"Public privacy-policy URL."},"terms_and_conditions_link":{"type":"string","maxLength":255,"title":"Terms And Conditions Link","description":"Public terms-and-conditions URL."},"age_gated":{"type":"boolean","title":"Age Gated","description":"Whether the content is age-restricted.","default":false},"direct_lending":{"type":"boolean","title":"Direct Lending","description":"Whether messages relate to direct lending or loan arrangements.","default":false},"embedded_link":{"type":"boolean","title":"Embedded Link","description":"Whether messages contain web links.","default":false},"embedded_phone":{"type":"boolean","title":"Embedded Phone","description":"Whether messages contain phone numbers.","default":false},"subscriber_optin":{"type":"boolean","title":"Subscriber Optin","description":"Whether recipients opt in before receiving messages.","default":true},"subscriber_optout":{"type":"boolean","title":"Subscriber Optout","description":"Whether recipients can opt out by keyword.","default":true},"subscriber_help":{"type":"boolean","title":"Subscriber Help","description":"Whether recipients can get help by keyword.","default":true},"sub_usecases":{"items":{"$ref":"#/components/schemas/CampaignUseCase"},"type":"array","maxItems":5,"title":"Sub Usecases","description":"Which standard categories this campaign's traffic actually is — required by use cases such as LOW_VOLUME and MIXED. The qualification listing's `min_sub_usecases`/`max_sub_usecases` state how many this use case needs; a count outside those bounds is refused before any charge.","default":[],"examples":[["ACCOUNT_NOTIFICATION"]]},"confirmed_upfront_fee":{"type":"string","pattern":"^(0|[1-9][0-9]{0,5})(\\.[0-9]{1,2})?$","title":"Confirmed Upfront Fee","description":"The `monthly_fee` shown in the qualification listing: the first month, charged when the registry accepts the campaign. Submission is refused if Resia's price no longer matches.","examples":["6.00"]}},"additionalProperties":false,"type":"object","required":["usecase","description","sample_messages","message_flow","help_message","optout_message","privacy_policy_link","terms_and_conditions_link","confirmed_upfront_fee"],"title":"TenDlcCampaignSubmissionRequest"},"TenDlcCampaignSubmissionResponse":{"properties":{"campaign_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9-]{4,64}$","description":"The Telnyx identifier of a campaign registered for the organization's brand.","examples":["6d40039b-0fc1-c114-c8e2-8a5294fd9941"]},{"type":"null"}],"title":"Campaign Id","description":"The registered campaign's identifier, or null while the provider outcome is still being settled."},"status":{"$ref":"#/components/schemas/TenDlcCampaignSubmissionStatus","description":"Where this paid submission stands. A pending submission is settled by retrying with the same Idempotency-Key.","examples":["registered"]}},"additionalProperties":false,"type":"object","required":["status"],"title":"TenDlcCampaignSubmissionResponse"},"TenDlcCampaignSubmissionStatus":{"type":"string","enum":["pending","registered","failed"],"title":"TenDlcCampaignSubmissionStatus","description":"Where a paid campaign submission stands in Resia's payment-intent ledger."},"TenDlcCampaignSummary":{"properties":{"campaign_id":{"type":"string","pattern":"^[A-Za-z0-9-]{4,64}$","title":"Campaign Id","description":"The Telnyx identifier of a campaign registered for the organization's brand.","examples":["6d40039b-0fc1-c114-c8e2-8a5294fd9941"]},"usecase":{"$ref":"#/components/schemas/CampaignUseCase","description":"The registry use case the campaign was registered for.","examples":["LOW_VOLUME"]},"status":{"$ref":"#/components/schemas/TenDlcCampaignStatus","description":"One stable lifecycle answer folded from the registry's several status signals. Only an active campaign delivers texts.","examples":["active"]}},"additionalProperties":false,"type":"object","required":["campaign_id","usecase","status"],"title":"TenDlcCampaignSummary"},"TenDlcPhoneNumberAssignmentRequest":{"properties":{"phone_number":{"type":"string","pattern":"^\\+1[2-9][0-9]{2}[2-9][0-9]{6}$","title":"Phone Number","description":"A number the organization owns, to attach to the campaign.","examples":["+12125550131"]}},"additionalProperties":false,"type":"object","required":["phone_number"],"title":"TenDlcPhoneNumberAssignmentRequest"},"TenDlcPhoneNumberAssignmentResponse":{"properties":{"phone_number":{"type":"string","pattern":"^\\+1[2-9][0-9]{2}[2-9][0-9]{6}$","title":"Phone Number","description":"The owned number the assignment applies to.","examples":["+12125550131"]},"campaign_id":{"type":"string","pattern":"^[A-Za-z0-9-]{4,64}$","title":"Campaign Id","description":"The Telnyx identifier of a campaign registered for the organization's brand.","examples":["6d40039b-0fc1-c114-c8e2-8a5294fd9941"]},"assignment_status":{"anyOf":[{"$ref":"#/components/schemas/TenDlcPhoneNumberAssignmentStatus"},{"type":"null"}],"description":"The registry's attachment state for this number, or null when the registry reported a state Resia does not recognize.","examples":["PENDING_ASSIGNMENT"]}},"additionalProperties":false,"type":"object","required":["phone_number","campaign_id"],"title":"TenDlcPhoneNumberAssignmentResponse"},"TenDlcPhoneNumberAssignmentStatus":{"type":"string","enum":["PENDING_ASSIGNMENT","ASSIGNED","FAILED_ASSIGNMENT","PENDING_UNASSIGNMENT","FAILED_UNASSIGNMENT"],"title":"TenDlcPhoneNumberAssignmentStatus","description":"The registry's finite states for a number's attachment to a campaign."},"TextMessageBatchCounts":{"properties":{"queued":{"type":"integer","minimum":0.0,"title":"Queued","description":"Recipients waiting in the pipeline, before the message is sent."},"canceled":{"type":"integer","minimum":0.0,"title":"Canceled","description":"Recipients stopped before their message was sent."},"sent":{"type":"integer","minimum":0.0,"title":"Sent","description":"Messages handed to a carrier, not yet confirmed delivered."},"delivered":{"type":"integer","minimum":0.0,"title":"Delivered","description":"Messages the carrier confirmed delivered."},"delivery_unconfirmed":{"type":"integer","minimum":0.0,"title":"Delivery Unconfirmed","description":"Messages sent for which no final delivery confirmation ever arrived."},"failed":{"type":"integer","minimum":0.0,"title":"Failed","description":"Messages that failed, including recipients refused before sending."}},"additionalProperties":false,"type":"object","required":["queued","canceled","sent","delivered","delivery_unconfirmed","failed"],"title":"TextMessageBatchCounts","description":"How a batch's recipients are distributed across states right now.\n\nEach recipient is counted once, by its message's own status. A batch message reads ``queued``\nfrom acceptance until it is handed to a carrier, then ``sent`` → ``delivered``, or\n``delivery_unconfirmed`` or ``failed``; ``canceled`` is a recipient stopped before its message\nwas sent. The six counts always sum to the batch's ``total``."},"TextMessageBatchCreateRequest":{"properties":{"from_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"From Phone Number","description":"An owned sender number the batch texts from."},"text":{"type":"string","maxLength":1600,"minLength":1,"title":"Text","description":"The one body every recipient receives, preserved exactly as given."},"text_messages":{"items":{"$ref":"#/components/schemas/TextMessageBatchEntryRequest"},"type":"array","maxItems":1000,"minItems":1,"title":"Text Messages","description":"The recipients to text, in submission order. Duplicate destinations are allowed: the first is created and each later one is reported as a rejected entry."},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags","description":"Labels copied onto every message this batch creates. Any keys and values. Filter GET /v1/text-messages by one key and value pair."}},"additionalProperties":false,"type":"object","required":["from_phone_number","text","text_messages"],"title":"TextMessageBatchCreateRequest","description":"Submit up to a thousand recipients that all receive one body from one owned sender.\n\nA batch accepts a mix of good and bad recipients. Each recipient is checked on its own: one Resia\ncannot text — a destination its policy refuses, a malformed number, or a destination repeated\nwithin the batch — is reported in the 202 response as a rejected entry, and the rest of the batch\nis still created. A batch in which every recipient is rejected still returns 202, with an empty\nbatch and every recipient in the rejected list. The text is preserved exactly as given."},"TextMessageBatchEntryRequest":{"properties":{"to_phone_number":{"type":"string","maxLength":64,"title":"To Phone Number","description":"The number to text, in E.164 form. A number Resia cannot text is reported as a rejected entry rather than refusing the whole batch."},"client_reference":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Client Reference","description":"Your own label for this message. Resia never interprets it: it is stored on the message, echoed on every read of it, and usable as a filter on GET /v1/text-messages. Use an opaque identifier from your own system — an order number, a CRM record id. Do not put names, phone numbers, or any personal or sensitive information in it: the label travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."}},"additionalProperties":false,"type":"object","required":["to_phone_number"],"title":"TextMessageBatchEntryRequest","description":"One recipient in a batch: a destination and an optional customer label.\n\nThe body is shared by the whole batch, so an entry carries only who the message goes to."},"TextMessageBatchItem":{"properties":{"text_message_id":{"type":"string","maxLength":512,"minLength":1,"title":"Text Message Id","description":"The message's one durable identifier, assigned at submission. Read it through GET /v1/text-messages/{text_message_id} for its delivery status and charge."},"to_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"To Phone Number","description":"The number this message texts, in E.164 form."},"client_reference":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Client Reference","description":"The label sent on submission, echoed back unchanged."},"status":{"$ref":"#/components/schemas/TextMessageStatus","description":"Where the message is in its life right now."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia accepted the message."}},"additionalProperties":false,"type":"object","required":["text_message_id","to_phone_number","status","created_at"],"title":"TextMessageBatchItem","description":"One recipient in a batch: its one durable ID and its live delivery status.\n\n``text_message_id`` exists from the moment the batch is accepted and never changes. Read the\nmessage through ``GET /v1/text-messages/{text_message_id}`` at any point in its life — while it\nwaits in the pipeline it reads ``queued``; afterwards the same read carries its delivery\noutcome, failure reason, and charge."},"TextMessageBatchItemPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TextMessageBatchItem"},"type":"array","title":"Items","description":"The recipients on this page, in submission order (the class note names the one cutover exception)."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as `cursor` for the next page, or null on the last page."}},"additionalProperties":false,"type":"object","required":["items"],"title":"TextMessageBatchItemPage","description":"One page of a batch's recipients, in submission order. One exception: a batch that was partly processed when Resia moved to per-item IDs (2026-08-25) can list its items in a different order — match items by to_phone_number or client_reference."},"TextMessageBatchSubmissionResponse":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"Identifier of the batch.","examples":["01M0C7XKQ3ZT9V4W8N2RGA5HDB"]},"status":{"$ref":"#/components/schemas/BatchStatus","description":"The batch's derived lifecycle state."},"from_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"From Phone Number","description":"The sender number every message in the batch texts from."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"How many recipients the batch created. Equal to the submitted count minus the rejected entries; zero when every recipient was rejected."},"counts":{"$ref":"#/components/schemas/TextMessageBatchCounts","description":"How the batch's recipients are distributed across states right now."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia accepted the batch."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When the batch reached a terminal state, or null while it is still in progress."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"text_messages":{"items":{"$ref":"#/components/schemas/TextMessageBatchItem"},"type":"array","maxItems":1000,"title":"Text Messages","description":"One item per created recipient, in submission order (one cutover exception — see TextMessageBatchItemPage), each with its final text_message_id. Empty when every submitted recipient was rejected.","default":[]},"rejected_text_messages":{"items":{"$ref":"#/components/schemas/BatchRejectedEntry"},"type":"array","maxItems":1000,"title":"Rejected Text Messages","description":"Every submitted recipient Resia did not create, each with its 0-based submission position and the reason. Empty when every recipient was created.","default":[]}},"additionalProperties":false,"type":"object","required":["id","status","from_phone_number","total","counts","created_at"],"title":"TextMessageBatchSubmissionResponse","description":"The 202 submission response: the batch summary, one pre-created message per created recipient, and the rejected entries.\n\n``text_messages`` keeps submission order, with one cutover exception: A batch that was partly processed when Resia moved to per-item IDs (2026-08-25) can order its items differently — match items by to_phone_number or client_reference.\n``rejected_text_messages`` lists every submitted recipient Resia did not create, each with its\n0-based submission position. ``text_messages`` and ``rejected_text_messages`` together account\nfor every submitted recipient.\nA repeated ``Idempotency-Key`` returns the same batch again — the same batch ID, the same\n``text_message_id`` values, and the same recipients reported as rejected."},"TextMessageBatchSummary":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"Identifier of the batch.","examples":["01M0C7XKQ3ZT9V4W8N2RGA5HDB"]},"status":{"$ref":"#/components/schemas/BatchStatus","description":"The batch's derived lifecycle state."},"from_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"From Phone Number","description":"The sender number every message in the batch texts from."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"How many recipients the batch created. Equal to the submitted count minus the rejected entries; zero when every recipient was rejected."},"counts":{"$ref":"#/components/schemas/TextMessageBatchCounts","description":"How the batch's recipients are distributed across states right now."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When Resia accepted the batch."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When the batch reached a terminal state, or null while it is still in progress."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."}},"additionalProperties":false,"type":"object","required":["id","status","from_phone_number","total","counts","created_at"],"title":"TextMessageBatchSummary","description":"A whole batch's progress in one read.\n\nReturned by the poll and the batch list. ``completed_at`` is set once the batch reaches a\nterminal ``status``; it is null while the batch is still in progress."},"TextMessageBatchSummaryPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TextMessageBatchSummary"},"type":"array","title":"Items","description":"The batches on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass this back as `cursor` for the next page, or null on the last page."}},"additionalProperties":false,"type":"object","required":["items"],"title":"TextMessageBatchSummaryPage","description":"One page of batches, newest first."},"TextMessageCreateRequest":{"properties":{"from_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"From Phone Number"},"to_phone_numbers":{"items":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},"type":"array","maxItems":1000,"minItems":1,"title":"To Phone Numbers"},"text":{"type":"string","maxLength":1600,"minLength":1,"title":"Text"},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"}},"additionalProperties":false,"type":"object","required":["from_phone_number","to_phone_numbers","text"],"title":"TextMessageCreateRequest","description":"One send intent: an owned sender, one body of text, and every recipient it goes to.\n\nThe whole request is validated before any recipient is accepted, so one malformed or repeated\nnumber refuses the submission rather than half-sending it. The text is preserved exactly as\ngiven — it is never trimmed or rewritten, because what the recipient reads must be what the\ncustomer wrote."},"TextMessageFailure":{"properties":{"code":{"$ref":"#/components/schemas/TextMessageFailureCode"},"message":{"type":"string","maxLength":2048,"minLength":1,"title":"Message"}},"additionalProperties":false,"type":"object","required":["code","message"],"title":"TextMessageFailure","description":"Why one recipient's message did not arrive: a stable reason plus a sentence a person reads."},"TextMessageFailureCode":{"type":"string","enum":["recipient_opted_out","destination_invalid","destination_unreachable","sender_not_registered","carrier_rejected","submission_failed","unknown"],"title":"TextMessageFailureCode","description":"The failure reasons Resia publishes, mapped from the provider at the transport boundary.\n\nRaw provider error codes are deliberately outside the customer contract, so every carrier\nrejection has to be translated into one of these seven values rather than forwarded. Do not\ncollapse this into a passthrough."},"TextMessagePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TextMessageResource"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"TextMessagePage","description":"One page of a submission's recipients, in the paged shape every Resia list read uses."},"TextMessageResource":{"properties":{"text_message_id":{"type":"string","maxLength":512,"minLength":1,"title":"Text Message Id"},"batch_id":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Batch Id","description":"The batch this message belongs to. A message sent through /v1/text-message-batches and one sent through the deprecated /v1/text-messages both carry the id of their batch here."},"submission_id":{"type":"string","maxLength":512,"minLength":1,"title":"Submission Id","description":"Deprecated alias of batch_id; it carries the same value. Use batch_id.","deprecated":true},"from_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"From Phone Number"},"to_phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$","title":"To Phone Number"},"client_reference":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Client Reference","description":"Your own label for this message, set at batch submission and echoed back unchanged. Null for a message the deprecated single-send created. Usable as a filter on GET /v1/text-messages."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"status":{"$ref":"#/components/schemas/TextMessageStatus"},"failure":{"anyOf":[{"$ref":"#/components/schemas/TextMessageFailure"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"additionalProperties":false,"type":"object","required":["text_message_id","submission_id","from_phone_number","to_phone_number","status","created_at"],"title":"TextMessageResource","description":"One recipient's independently addressable outcome, including who it was for.\n\n``created_at`` records when Resia accepted the message, ``sent_at`` when it was handed to a\ncarrier — still null for a message blocked before sending — and ``completed_at`` when the\nmessage reached any terminal state.\n\nA failed message is the one outcome that says nothing about whether a carrier ever saw it: a\nrecipient who opted out is refused before the handoff and has no send time, while a carrier\nrejection happens after it and has one. Every other status settles the question, which is why\nonly ``failed`` is left free to carry either."},"TextMessageStatus":{"type":"string","enum":["accepted","queued","sent","delivered","delivery_unconfirmed","failed","canceled"],"title":"TextMessageStatus","description":"The delivery states Resia publishes, mapped from the provider at the transport boundary.\n\nA provider's own status strings are never handed to a customer. The transport translates\nwhatever the carrier reports into exactly these values, which is what lets Resia change or\nadd a messaging provider without changing the public contract — the same independence Resia's\ncall statuses keep from the voice provider's. Do not collapse this into a passthrough.\n\n``accepted`` means Resia safely recorded the request and has not started sending; it is a\nsingle-send state only — a batch message reads ``queued`` from acceptance until it is sent.\n``canceled`` is a batch message stopped before it was sent; it is terminal.\n``delivery_unconfirmed`` is terminal but proves neither delivery nor failure: it is what a\nmessage becomes when no final carrier confirmation ever arrives."},"TextMessageSubmissionResponse":{"properties":{"batch_id":{"anyOf":[{"type":"string","maxLength":512,"minLength":1},{"type":"null"}],"title":"Batch Id","description":"The batch this send created. The same value the new /v1/text-message-batches submit returns as its batch id."},"submission_id":{"type":"string","maxLength":512,"minLength":1,"title":"Submission Id","description":"Deprecated alias of batch_id; it carries the same value. Use batch_id.","deprecated":true},"created":{"type":"boolean","title":"Created"},"text_messages":{"items":{"$ref":"#/components/schemas/TextMessageResource"},"type":"array","minItems":1,"title":"Text Messages"}},"additionalProperties":false,"type":"object","required":["submission_id","created","text_messages"],"title":"TextMessageSubmissionResponse","description":"An accepted submission: the id to read it back by, and one resource per recipient.\n\nThe resources are returned in the order the recipients were submitted. ``created`` is false when\na repeated idempotency key returned the original submission, which is how a caller tells a safe\nretry from a new send."},"ToolActivityKind":{"type":"string","enum":["task_started","tool_called","tool_result","task_finished"],"title":"ToolActivityKind"},"ToolActivityOutcome":{"type":"string","enum":["returned","error","timeout","cancelled"],"title":"ToolActivityOutcome"},"ToolAssignedAgent":{"properties":{"kind":{"$ref":"#/components/schemas/AgentKind","description":"The agent type: call, chat, or orchestration."},"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"The agent's identifier. Use it with the routes of that agent type.","examples":["01K2T9V4M0Q7ZC3X8B5N6R1WDH"]},"name":{"type":"string","minLength":1,"title":"Name","description":"The agent's name."}},"additionalProperties":false,"type":"object","required":["kind","id","name"],"title":"ToolAssignedAgent"},"ToolAssignedError":{"properties":{"code":{"$ref":"#/components/schemas/ResiaRuntimeErrorCode","description":"The reason for the error, for a program. Base retry logic on the HTTP status, and use this value for finer handling."},"message":{"type":"string","maxLength":2048,"minLength":1,"title":"Message","description":"What went wrong, for a person. The wording can change, so do not parse it."},"request_id":{"type":"string","maxLength":512,"minLength":1,"title":"Request Id","description":"The identifier of this request. Find the request by it in your request logs, and include it when you contact support.","examples":["01K3F6Y8P2J5H9A4S7D0G1K3MZ"]},"agents":{"items":{"$ref":"#/components/schemas/ToolAssignedAgent"},"type":"array","minItems":1,"title":"Agents","description":"Every agent that the tool is assigned to: Call Agents, then Chat Agents, then Orchestration Agents, each oldest first. The message does not name the agents."}},"additionalProperties":false,"type":"object","required":["code","message","request_id","agents"],"title":"ToolAssignedError"},"ToolPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ToolResource"},"type":"array","title":"Items","description":"One page of your organization's tools, newest first. Archived tools are left out."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Send this value as `cursor` to read the next page. Null on the last page."}},"additionalProperties":false,"type":"object","required":["items"],"title":"ToolPage"},"ToolResource":{"properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$","title":"Name","description":"The tool name. An agent version names the tool by it, and the model calls the tool by it."},"description":{"type":"string","maxLength":1000,"minLength":1,"title":"Description","description":"What the tool does and when the agent should use it."},"parameters":{"$ref":"#/components/schemas/ResiaJsonObject","description":"An object JSON Schema for the tool arguments."},"endpoint_url":{"type":"string","minLength":1,"format":"uri","title":"Endpoint Url","description":"The owner's public HTTPS endpoint. Resia sends one ToolRequest POST for each tool call, with no retry or redirect. The total deadline is ten seconds. Return a 2xx ToolEndpointResponse of at most 64 KiB. A timeout leaves the action outcome unknown. Treat the complete URL as a credential."},"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"The tool's identifier. Use it with GET, PUT, and DELETE /v1/tools/{tool_id}.","examples":["01K1SA3F7M8QW2V5C9H4YTB0KD"]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the tool was created."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the tool's description, argument schema, or endpoint URL last changed."}},"additionalProperties":false,"type":"object","required":["name","description","parameters","endpoint_url","id","created_at","updated_at"],"title":"ToolResource"},"ToolSortField":{"type":"string","enum":["created_at","name","description","updated_at"],"title":"ToolSortField"},"ToolWrite":{"properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$","title":"Name","description":"The tool name, unique in your organization. An agent version names the tool by it. A built-in tool name such as get_schema, run_sql, end_chat, or start_call is refused. The name stays reserved after the tool is archived."},"description":{"type":"string","maxLength":1000,"minLength":1,"title":"Description","description":"What the tool does and when the agent should use it."},"parameters":{"$ref":"#/components/schemas/ResiaJsonObject","description":"An object JSON Schema for the tool arguments."},"endpoint_url":{"type":"string","minLength":1,"format":"uri","title":"Endpoint Url","description":"The owner's public HTTPS endpoint. Resia sends one ToolRequest POST for each tool call, with no retry or redirect. The total deadline is ten seconds. Return a 2xx ToolEndpointResponse of at most 64 KiB. A timeout leaves the action outcome unknown. Treat the complete URL as a credential."}},"additionalProperties":false,"type":"object","required":["name","description","parameters","endpoint_url"],"title":"ToolWrite"},"TranscriptTurn":{"properties":{"role":{"$ref":"#/components/schemas/ConversationRole","description":"Who spoke this turn — the Resia agent (assistant), the person it called (user), the system, or a non-speech event such as a keypad tone.","examples":["assistant"]},"content":{"type":"string","title":"Content","description":"What was said, as text.","examples":["Hi, I'm calling to check whether you have metformin in stock."]},"turn_id":{"type":"string","title":"Turn Id","description":"The pipeline's identifier for this turn; empty when it was not set.","default":"","examples":["turn-7"]},"timestamp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp","description":"Deprecated: use started_at for the instant the turn started, and start_secs to place the turn in the audio. Unix epoch seconds at which the pipeline recorded the turn, which is not the moment speech started. Null on calls that do not record it. Do not sort or interleave turns by this value.","examples":[1734100000.5]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the turn's speech started, as an instant: the speech start for a person, the playout start for the agent, and the send time for a keypad tone. Every leg of a multi-party call uses the same clock, so this value interleaves the transcripts of different participants. Null for an agent turn that never played, and on older calls whose turn start was not recorded."},"start_secs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start Secs","description":"When the turn starts, in seconds from the first sample of the call's recording. The count starts at the first inbound audio frame when the call has no recording. Null on multi-party calls and on turns whose position could not be measured.","examples":[12.34]},"end_secs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End Secs","description":"When the turn ends, in seconds, on the same scale and from the same zero as start_secs.","examples":[15.02]},"words":{"anyOf":[{"items":{"$ref":"#/components/schemas/TranscriptWord"},"type":"array"},{"type":"null"}],"title":"Words","description":"Per-word timings for this turn, when the transcriber captured them; empty otherwise."},"interrupted":{"type":"boolean","title":"Interrupted","description":"True when an assistant turn was cut off before it finished speaking.","default":false},"spoken_secs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spoken Secs","description":"For an interrupted assistant turn, how many seconds of it were actually spoken before the cut.","examples":[1.6]},"spoken_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spoken Text","description":"For an interrupted assistant turn, the portion actually spoken before the cut, when known."},"capture_method":{"anyOf":[{"$ref":"#/components/schemas/SpokenCaptureMethod"},{"type":"null"}],"description":"How spoken_text was determined: exact-pts (an exact word-timed capture), estimate-16cps or sentence-sync (estimates), or none."},"cut_cause":{"anyOf":[{"$ref":"#/components/schemas/TurnCutCause"},{"type":"null"}],"description":"Why an assistant turn was cut short — the caller talked over it (barge-in), or the call ended."},"speaker":{"anyOf":[{"type":"string","maxLength":40,"minLength":1,"pattern":"^[^\\r\\n]+$"},{"type":"null"}],"title":"Speaker","description":"Which human spoke this turn, as a participant name from the Call Agent's roster — the primary party uses the agent's primary_participant name. Present on every human turn of a multi-party call; absent on a plain two-party call.","examples":["patient"]},"present":{"anyOf":[{"items":{"type":"string","maxLength":40,"minLength":1,"pattern":"^[^\\r\\n]+$"},"type":"array"},{"type":"null"}],"title":"Present","description":"Who was on the line when this turn was spoken, as participant names. The agent is implicit and the speaker is always a member. Absent means every participant declared on the call was on the line; an empty list means everyone was on hold and the agent was momentarily alone. A person heard a turn exactly when this field is absent or contains their name.","examples":[["pharmacy"]]}},"additionalProperties":false,"type":"object","required":["role","content"],"title":"TranscriptTurn","description":"One thing that was said on the call, with its timing and any interruption detail."},"TranscriptWord":{"properties":{"word":{"type":"string","title":"Word","description":"The recognized word.","examples":["metformin"]},"start_secs":{"type":"number","title":"Start Secs","description":"When the word starts, in seconds from the first sample of the call's recording (from the first inbound audio frame when the call has no recording).","examples":[12.34]},"end_secs":{"type":"number","title":"End Secs","description":"When the word ends, in seconds, on the same scale as start_secs.","examples":[12.78]}},"additionalProperties":false,"type":"object","required":["word","start_secs","end_secs"],"title":"TranscriptWord","description":"One recognized word and where it falls in the call's audio."},"TtsProvider":{"type":"string","enum":["cartesia","fish"],"title":"TtsProvider","description":"A speech provider — the service that turns the agent's words into spoken audio.\n\n(\"TTS\" is text to speech.) Resia offers Cartesia and Fish."},"TurnCutCause":{"type":"string","enum":["barge-in","call-ended"],"title":"TurnCutCause","description":"Why an assistant turn's playback was cut short."},"UserSummary":{"properties":{"id":{"type":"string","title":"Id","description":"The person's stable identifier.","examples":["01K2TZ7W9M0000000000000000"]},"name":{"type":"string","title":"Name","description":"The person's display name, taken from their sign-in provider.","examples":["Sofia Martinez"]},"email":{"type":"string","title":"Email","description":"The email the person signed in with.","examples":["sofia@sunriseclinics.com"]}},"additionalProperties":false,"type":"object","required":["id","name","email"],"title":"UserSummary"},"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"},"VoiceGender":{"type":"string","enum":["Male","Female","Neutral","Unknown"],"title":"VoiceGender"},"WorkflowAgentResource":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"The Orchestration Agent's name. It must be unique within your organization."},"description":{"anyOf":[{"type":"string","maxLength":280,"minLength":1},{"type":"null"}],"title":"Description","description":"One line saying what this Orchestration Agent is for. Optional; a name is the fallback."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"instructions":{"type":"string","title":"Instructions","description":"The instructions for each run. Use `$name` or `${name}` to refer to a top-level run input property. Declare every placeholder in `input_schema.properties`. Resia supplies validated run inputs to the agent as a separate JSON object. Resia does not replace the placeholder text. Nested property paths are not supported."},"input_schema":{"$ref":"#/components/schemas/ResiaJsonObject","description":"A JSON Schema (draft 2020-12) the inputs of each run must satisfy. Use a JSON Schema object, not the legacy fields format."},"analysis_prompt":{"type":"string","title":"Analysis Prompt","description":"The prompt that tells Resia how to read the run's outcome into the analysis result."},"analysis_schema":{"$ref":"#/components/schemas/ResiaJsonObject","description":"A JSON Schema (draft 2020-12) the run's analysis result is shaped by. Use a JSON Schema object, not the legacy fields format."},"milestones":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentMilestone"},"type":"array","maxItems":32,"minItems":1},{"type":"null"}],"title":"Milestones","description":"The stages a run of this Orchestration Agent may report, each a name and a description. During a run the agent records the stage it has reached, using a name from this list; GET the run to read the current stage. Names must be unique. Null (the default) means the agent reports no milestone."},"tools":{"anyOf":[{"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"type":"array","maxItems":64},{"type":"null"}],"title":"Tools","description":"The names of your organization's tools that runs of this version may call. Null or an empty list names none."},"max_calls":{"type":"integer","minimum":0.0,"title":"Max Calls","description":"The most calls one run of this Orchestration Agent may place. Zero means the run places no calls, and it then receives no calling ability at all. A run that reaches this limit is refused further calls."},"max_messages":{"type":"integer","minimum":0.0,"title":"Max Messages","description":"The most text messages one run of this Orchestration Agent may send. Zero (the default) means the run sends none, and it then receives no messaging ability.","default":0},"max_spend_in_cents":{"type":"integer","minimum":0.0,"title":"Max Spend In Cents","description":"The most one run of this Orchestration Agent may spend, in whole cents. A run that reaches this limit is refused further spend."},"calling_window_start_local_time":{"type":"string","format":"time","title":"Calling Window Start Local Time","description":"The earliest local clock time a run may place a call, as HH:MM:SS. The window has no time zone of its own; each run's inputs carry the time zone the window is read in. The start must be before the end."},"calling_window_end_local_time":{"type":"string","format":"time","title":"Calling Window End Local Time","description":"The latest local clock time a run may place a call, as HH:MM:SS. It must be after calling_window_start_local_time."},"triggerable_call_agent_ids":{"items":{"type":"string","maxLength":512,"minLength":1},"type":"array","maxItems":64,"title":"Triggerable Call Agent Ids","description":"The Call Agents runs of this Orchestration Agent may dial, each named by its identifier. Every identifier must name a Call Agent your organization owns and has not archived. An empty list (the default) means the orchestration places no calls."},"triggerable_chat_agent_ids":{"items":{"type":"string","maxLength":512,"minLength":1},"type":"array","maxItems":64,"title":"Triggerable Chat Agent Ids","description":"The Chat Agents runs of this Orchestration Agent may start a chat with, each named by its identifier. Every identifier must name a Chat Agent your organization owns and has not archived. An empty list (the default) means the orchestration starts no chats. A run also needs max_messages above zero to start a chat."},"run_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Run Ended Webhook Url","description":"HTTPS URL Resia POSTs an orchestration_run.ended event to when an Orchestration Run reaches succeeded, failed, or cancelled. The event contains the same OrchestrationRunResponse that GET /v1/orchestration-runs/{orchestration_run_id} returns. Resia makes one immediate attempt when practical and retries a failed delivery on the call.ended schedule. Any 2xx response is success. The orchestration_run_id stays unchanged across retries, so treat a repeated orchestration_run_id as a duplicate. Treat the complete URL as a credential. Null clears the webhook and stops pending deliveries."},"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"The stable Orchestration Agent identifier."},"review_status":{"$ref":"#/components/schemas/CallAgentReviewStatus","description":"Whether the latest submitted configuration is approved or still pending review."},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the agent has an approved production configuration and is not archived."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the stable Orchestration Agent was created."},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At","description":"When the latest configuration was submitted."},"active_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Active Updated At","description":"When the current active configuration was approved, or null when none is active."},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At","description":"When the agent was archived, or null."}},"additionalProperties":false,"type":"object","required":["name","instructions","input_schema","analysis_prompt","analysis_schema","max_calls","max_spend_in_cents","calling_window_start_local_time","calling_window_end_local_time","id","review_status","is_active","created_at","submitted_at"],"title":"WorkflowAgentResource","description":"Deprecated. Use OrchestrationAgentResource. It stops working on 2026-10-25.","deprecated":true},"WorkflowAgentSummary":{"properties":{"id":{"type":"string","maxLength":512,"minLength":1,"title":"Id","description":"The stable Orchestration Agent identifier."},"name":{"type":"string","title":"Name","description":"The Orchestration Agent's name."},"review_status":{"$ref":"#/components/schemas/CallAgentReviewStatus","description":"Whether the latest submitted configuration is approved or still pending review."},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the agent has an approved production configuration and is not archived."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the stable Orchestration Agent was created."},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At","description":"When the latest configuration was submitted."},"active_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Active Updated At","description":"When the current active configuration was approved, or null when none is active."},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"active_run_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Run Count","description":"How many of this agent's orchestration runs have not ended. Only the list route fills it; 0 means none."}},"additionalProperties":false,"type":"object","required":["id","name","review_status","is_active","created_at","submitted_at"],"title":"WorkflowAgentSummary","description":"Deprecated. Use OrchestrationAgentSummary. It stops working on 2026-10-25.","deprecated":true},"WorkflowAgentSummaryPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkflowAgentSummary"},"type":"array","title":"Items","description":"One page of Orchestration Agent summaries, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque cursor for the next page, or null on the final page."}},"additionalProperties":false,"type":"object","required":["items"],"title":"WorkflowAgentSummaryPage","description":"Deprecated. Use OrchestrationAgentSummaryPage. It stops working on 2026-10-25.","deprecated":true},"WorkflowAgentWrite":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"The Orchestration Agent's name. It must be unique within your organization."},"description":{"anyOf":[{"type":"string","maxLength":280,"minLength":1},{"type":"null"}],"title":"Description","description":"One line saying what this Orchestration Agent is for. Optional; a name is the fallback."},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"},"instructions":{"type":"string","title":"Instructions","description":"The instructions for each run. Use `$name` or `${name}` to refer to a top-level run input property. Declare every placeholder in `input_schema.properties`. Resia supplies validated run inputs to the agent as a separate JSON object. Resia does not replace the placeholder text. Nested property paths are not supported."},"input_schema":{"$ref":"#/components/schemas/ResiaJsonObject","description":"A JSON Schema (draft 2020-12) the inputs of each run must satisfy. Use a JSON Schema object, not the legacy fields format."},"analysis_prompt":{"type":"string","title":"Analysis Prompt","description":"The prompt that tells Resia how to read the run's outcome into the analysis result."},"analysis_schema":{"$ref":"#/components/schemas/ResiaJsonObject","description":"A JSON Schema (draft 2020-12) the run's analysis result is shaped by. Use a JSON Schema object, not the legacy fields format."},"milestones":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentMilestone"},"type":"array","maxItems":32,"minItems":1},{"type":"null"}],"title":"Milestones","description":"The stages a run of this Orchestration Agent may report, each a name and a description. During a run the agent records the stage it has reached, using a name from this list; GET the run to read the current stage. Names must be unique. Null (the default) means the agent reports no milestone."},"tools":{"anyOf":[{"items":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"type":"array","maxItems":64},{"type":"null"}],"title":"Tools","description":"The names of your organization's tools that runs of this version may call. Null or an empty list names none."},"max_calls":{"type":"integer","minimum":0.0,"title":"Max Calls","description":"The most calls one run of this Orchestration Agent may place. Zero means the run places no calls, and it then receives no calling ability at all. A run that reaches this limit is refused further calls."},"max_messages":{"type":"integer","minimum":0.0,"title":"Max Messages","description":"The most text messages one run of this Orchestration Agent may send. Zero (the default) means the run sends none, and it then receives no messaging ability.","default":0},"max_spend_in_cents":{"type":"integer","minimum":0.0,"title":"Max Spend In Cents","description":"The most one run of this Orchestration Agent may spend, in whole cents. A run that reaches this limit is refused further spend."},"calling_window_start_local_time":{"type":"string","format":"time","title":"Calling Window Start Local Time","description":"The earliest local clock time a run may place a call, as HH:MM:SS. The window has no time zone of its own; each run's inputs carry the time zone the window is read in. The start must be before the end."},"calling_window_end_local_time":{"type":"string","format":"time","title":"Calling Window End Local Time","description":"The latest local clock time a run may place a call, as HH:MM:SS. It must be after calling_window_start_local_time."},"triggerable_call_agent_ids":{"items":{"type":"string","maxLength":512,"minLength":1},"type":"array","maxItems":64,"title":"Triggerable Call Agent Ids","description":"The Call Agents runs of this Orchestration Agent may dial, each named by its identifier. Every identifier must name a Call Agent your organization owns and has not archived. An empty list (the default) means the orchestration places no calls."},"triggerable_chat_agent_ids":{"items":{"type":"string","maxLength":512,"minLength":1},"type":"array","maxItems":64,"title":"Triggerable Chat Agent Ids","description":"The Chat Agents runs of this Orchestration Agent may start a chat with, each named by its identifier. Every identifier must name a Chat Agent your organization owns and has not archived. An empty list (the default) means the orchestration starts no chats. A run also needs max_messages above zero to start a chat."},"run_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Run Ended Webhook Url","description":"HTTPS URL Resia POSTs an orchestration_run.ended event to when an Orchestration Run reaches succeeded, failed, or cancelled. The event contains the same OrchestrationRunResponse that GET /v1/orchestration-runs/{orchestration_run_id} returns. Resia makes one immediate attempt when practical and retries a failed delivery on the call.ended schedule. Any 2xx response is success. The orchestration_run_id stays unchanged across retries, so treat a repeated orchestration_run_id as a duplicate. Treat the complete URL as a credential. Null clears the webhook and stops pending deliveries."}},"additionalProperties":false,"type":"object","required":["name","instructions","input_schema","analysis_prompt","analysis_schema","max_calls","max_spend_in_cents","calling_window_start_local_time","calling_window_end_local_time"],"title":"WorkflowAgentWrite","description":"Deprecated. Use OrchestrationAgentWrite. It stops working on 2026-10-25.","deprecated":true},"WorkflowRunCancelResponse":{"properties":{"workflow_run_id":{"type":"string","maxLength":512,"minLength":1,"title":"Workflow Run Id"},"status":{"$ref":"#/components/schemas/OrchestrationRunStatus"},"cancel_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancel Requested At"}},"additionalProperties":false,"type":"object","required":["workflow_run_id","status"],"title":"WorkflowRunCancelResponse","description":"Deprecated. Use OrchestrationRunCancelResponse. It stops working on 2026-10-25.","deprecated":true},"WorkflowRunCreateRequest":{"properties":{"workflow_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Workflow Agent Id","description":"The Orchestration Agent that should run."},"idempotency_key":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Idempotency Key"},"run_ended_webhook_url":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Run Ended Webhook Url","description":"HTTPS URL Resia POSTs the orchestration_run.ended event to for this run. A URL here overrides the Orchestration Agent URL. Null or omitted uses the Orchestration Agent URL. An idempotent retry keeps the URL saved by the first request. Treat the complete URL as a credential because delivery authenticity uses HTTPS plus URL secrecy."},"inputs":{"$ref":"#/components/schemas/ResiaJsonObject"},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},{"type":"null"}],"title":"Tags"}},"additionalProperties":false,"type":"object","required":["workflow_agent_id","inputs"],"title":"WorkflowRunCreateRequest","description":"Deprecated. Use OrchestrationRunCreateRequest. It stops working on 2026-10-25.","deprecated":true},"WorkflowRunCreateResponse":{"properties":{"workflow_run_id":{"type":"string","maxLength":512,"minLength":1,"title":"Workflow Run Id"},"status":{"$ref":"#/components/schemas/OrchestrationRunStatus"},"created":{"type":"boolean","title":"Created"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["workflow_run_id","status","created","created_at"],"title":"WorkflowRunCreateResponse","description":"Deprecated. Use OrchestrationRunCreateResponse. It stops working on 2026-10-25.","deprecated":true},"WorkflowRunResponse":{"properties":{"workflow_run_id":{"type":"string","maxLength":512,"minLength":1,"title":"Workflow Run Id"},"workflow_agent_id":{"type":"string","maxLength":512,"minLength":1,"title":"Workflow Agent Id","description":"The Orchestration Agent running this orchestration."},"status":{"$ref":"#/components/schemas/OrchestrationRunStatus"},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags","description":"Open key/value labels on this record. Set any keys and any values. Filter a list by one key and value pair. Resia never interprets a tag. Do not put names, phone numbers, or any personal, health, credential, or secret information in a tag: a tag travels in URLs when used as a filter, and URLs appear in ordinary infrastructure request logs."},"analysis":{"anyOf":[{"$ref":"#/components/schemas/ResiaJsonObject"},{"type":"null"}]},"error_code":{"anyOf":[{"$ref":"#/components/schemas/OrchestrationRunFailureCode"},{"type":"null"}]},"waiting_for":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Waiting For"},"milestone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[^\\r\\n]+$"},{"type":"null"}],"title":"Milestone","description":"The stage this run last reported, or null when it has reported none. One of the names its Orchestration Agent version declared in milestones."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"charges":{"anyOf":[{"$ref":"#/components/schemas/OrchestrationRunChargeTotals"},{"type":"null"}],"description":"What the run has cost so far across its token, call, and message ledgers. Null when the serving gateway predates charge reporting."},"tool_activity":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentToolActivityEvent"},"type":"array"},{"type":"null"}],"title":"Tool Activity","description":"The tool requests and results the Orchestration Agent recorded, in recorded order, including linked call and chat IDs as payload text. Present only on GET /v1/orchestration-runs/{orchestration_run_id} with include_tool_activity=true; null in the run list and otherwise. The orchestration_run.ended webhook body leaves out both tool activity fields."},"tool_activity_truncated":{"type":"boolean","title":"Tool Activity Truncated","description":"True when a size limit left events out or cut a payload preview, or when an unreadable record was left out. tool_activity then holds the earliest events only.","default":false}},"additionalProperties":false,"type":"object","required":["workflow_run_id","workflow_agent_id","status","created_at"],"title":"WorkflowRunResponse","description":"Deprecated. Use OrchestrationRunResponse. It stops working on 2026-10-25.","deprecated":true}},"securitySchemes":{"ResiaApiCredential":{"type":"http","description":"A bearer token: an API credential for machine access, or an Identity Platform ID token for a signed-in person. Identity-management routes accept only the person's ID token and reject an API credential.","scheme":"bearer","bearerFormat":"<environment>.<credential-id>.<secret> (API credential), or an Identity Platform ID token (signed-in person)"}}},"tags":[{"name":"Call Agents","description":"The reusable instructions and settings a call follows. A Call Agent's new version may be reviewed before it is used in production; the response review_status reports whether that version is approved or still pending review."},{"name":"Calls","description":"Place one outbound call, follow it while it runs, and read its transcript, analysis, and charge afterwards."},{"name":"Call Batches","description":"Submit up to a thousand calls in one request and let Resia dial them from an internal queue at the pace your rate limits allow. One poll reports whole-batch progress; cancel stops the calls still queued."},{"name":"Voices","description":"Deprecated. The voice list moved to GET /v1/call-agents/available-voices, under Call Agents. The old path stops working on 2026-11-09."},{"name":"Chat Agents","description":"The reusable instructions and settings a text conversation follows — the text twin of a Call Agent. A new version may be reviewed before production; review_status reports whether it is approved or pending."},{"name":"Chats","description":"Start a text conversation an approved Chat Agent runs, read your chats with their transcript and analysis, and cancel one. An outbound chat opens with the agent's own first text; the agent then answers each reply."},{"name":"Text Messages","description":"Send one text to one recipient or to a thousand, and read what happened to each of them. Every recipient gets its own result, so one blocked or failed number never hides the rest."},{"name":"Text Message Batches","description":"Submit up to a thousand texts in one request and let Resia send them from an internal queue at the pace your message rate limits allow. One poll reports whole-batch progress; cancel stops the texts still queued."},{"name":"10DLC Registration","description":"US carriers require business texting from a normal 10-digit number to be registered: who is sending (a brand) and what they send (a campaign). Register your brand, see which campaign types you qualify for with their fees, register a campaign, and put a number you own onto it so its texts reach handsets. Registration fees are non-refundable and are always shown before you pay: the request that charges one repeats the amount back, and a mismatch refuses the submission instead of charging you."},{"name":"Orchestration Agents","description":"The reusable Orchestration Agents your runs use. An Orchestration Agent holds the instructions a run follows, the Call Agents its runs may dial, and the per-run caps and calling window each run is held to. A new version may be reviewed before it is used in production; the response review_status reports whether that version is approved or still pending review. Create, list, read, replace, and archive them."},{"name":"Orchestration Runs","description":"Long-running agents that can place calls, wait for a reply, and continue over hours or days. Start a run, read its progress, and cancel it."},{"name":"Workflow Agents","description":"Deprecated. Use Orchestration Agents. These endpoints stop working on 2026-10-25."},{"name":"Workflow Runs","description":"Deprecated. Use Orchestration Runs. These endpoints stop working on 2026-10-25."},{"name":"Tools","description":"Let your agents act through your own HTTPS endpoints. Define a tool once for your organization: a name, a description, a JSON Schema for its arguments, and the endpoint URL. A Call Agent, Chat Agent, or Orchestration Agent version names the tools it may use in `tools`, and its agent then sends one POST to your endpoint for each tool call during a call, a chat, or an orchestration run."},{"name":"Databases","description":"Attach your organization's data so calls and chats can answer from it. A database is one HTTPS URL to a JSON export of your data; Resia imports the export and refreshes it before each call or chat that names the database, using the export's ETag to skip unchanged downloads. Name a database on a call or a chat, and the agent looks answers up from your data during the conversation."},{"name":"Phone Numbers","description":"List the numbers your organization owns, search for available numbers, and buy one. A purchased number becomes usable as a caller ID only after the carrier confirms the order and Resia verifies the number is live."},{"name":"Organizations","description":"Create your organization and read or rename it. An organization owns everything else: its members, API credentials, calls, and numbers. Everyone signs in as a person, and a person belongs to exactly one organization."},{"name":"Identity","description":"Who you are signed in as. Sign-in happens in the browser through Google, GitHub, or a one-time link sent to your email address; the resulting token is sent as a bearer credential like an API key, and this endpoint reports the person and organization it belongs to."},{"name":"Members","description":"See who is in your organization and remove someone. Every member has the same access; there are no roles. Removing the last remaining member is refused, and removing yourself is how you leave."},{"name":"Invites","description":"Bring a teammate into your organization. Creating an invite returns a link to share; the person opens it, signs in, and joins — but only if the email they sign in with matches the address you invited."},{"name":"API Credentials","description":"Issue and revoke the API keys your servers use. A key is shown once, at creation, and never again; Resia stores only a fingerprint of it. Revoking a key stops it working immediately and cannot be undone."},{"name":"Billing","description":"Keep your organization's prepaid balance funded. Calls, text messages, phone numbers, and orchestration runs are paid from the balance. Save a card on a hosted Stripe page, and Resia charges it automatically when the balance falls to the minimum, or add funds by hand. New paid work is refused with 402 only when the balance is $0.00 or less. Read your monthly usage and spend here too."},{"name":"Health","description":"Liveness of the service itself. No credential required."},{"name":"Rate Limits","description":"Read the call and text-message rate limits in force for your organization, plus the paid 10DLC campaign submission limit. Each number is your own override when one is set, otherwise the deployment default; zero means the action is blocked. Orchestration runs have no separate organization limit — they draw on these call and message limits."},{"name":"Request Logs","description":"Read the requests your organization sent to this API, and the requests Resia sent to your inbound-input webhook, with the request and response bodies exactly as they crossed the wire. Resia-issued credentials and the endpoint_url of your custom tools are replaced with [redacted] in a body; your other field values are stored unchanged. Use this to see why a request was refused."},{"name":"Feedback","description":"Report a problem or suggest a change to the Resia team. Resia stores each report for the team to read and returns a receipt. The API has no route that reads or lists reports, and the team does not answer through the API."}],"x-tagGroups":[{"name":"Calls","tags":["Call Agents","Calls","Call Batches","Voices"]},{"name":"Texts","tags":["Chat Agents","Chats","Text Messages","Text Message Batches","10DLC Registration"]},{"name":"Orchestration","tags":["Orchestration Agents","Orchestration Runs"]},{"name":"Workflows (deprecated)","tags":["Workflow Agents","Workflow Runs"]},{"name":"Agent tools","tags":["Tools","Databases"]},{"name":"Phone numbers","tags":["Phone Numbers"]},{"name":"Organization","tags":["Organizations","Identity","Members","Invites","API Credentials","Billing"]},{"name":"API metadata","tags":["Health","Rate Limits","Request Logs","Feedback"]}]}