{"openapi":"3.1.0","info":{"title":"Arbol API: raiz","version":"1.20261120.163816"},"servers":[{"url":"https://api.getarbol.com"}],"components":{"schemas":{"DeletedObject":{"type":"object","required":["id","deleted"],"properties":{"id":{"type":"string","description":"The id of the deleted resource."},"deleted":{"type":"boolean","const":true}},"additionalProperties":false},"DeletedObjectResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/DeletedObject"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"Empty":{"type":"object","description":"No fields.","additionalProperties":false,"properties":{}},"ForbiddenError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/ForbiddenFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"ForbiddenFailure":{"type":"object","description":"The token does not authorize this operation.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"HttpsUrl":{"format":"uri","pattern":"^https://","maxLength":2048,"type":"string"},"InternalError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/InternalFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"InternalFailure":{"type":"object","description":"The service could not complete the operation.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["INTERNAL_ERROR"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"InvalidInputError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/InvalidInputFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"InvalidInputFailure":{"type":"object","description":"The request does not match the published schema.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["INVALID_INPUT"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/InvalidInputFailureData"}}},"InvalidInputFailureData":{"type":"object","properties":{"issues":{"type":"array","items":{"$ref":"#/components/schemas/ValidationIssue"},"maxItems":10}},"additionalProperties":false},"OrganizationId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"},"OutcomeUnknownError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/OutcomeUnknownFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"OutcomeUnknownFailure":{"type":"object","description":"The operation may have been applied; check its result before repeating it.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["OUTCOME_UNKNOWN"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"PageInfo":{"type":"object","required":["hasNextPage","hasPreviousPage","nextCursor","previousCursor"],"properties":{"hasNextPage":{"type":"boolean","description":"Whether a later page exists in the current ordering."},"hasPreviousPage":{"type":"boolean","description":"Whether an earlier page exists in the current ordering."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page, or null when there is none."},"previousCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the previous page, or null when there is none."}},"additionalProperties":false},"RaizAddressInUseFailure":{"type":"object","description":"Another contact in this organization already uses this address.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["ADDRESS_IN_USE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizAgent":{"type":"object","required":["channelCount","createdAt","description","firstMessage","id","language","modality","name","ready","status","syncErrorCode","synced","timeZone","toolCount","updatedAt","version","channels","instructions","integrationProcedures","integrationTools","knowledgeDocumentIds","procedures","settings","workflow"],"properties":{"channelCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"language":{"type":"string","description":"BCP 47 language tag."},"modality":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"text"}],"description":"`voice`: phone calls. `text`: WhatsApp and web chat."},"name":{"type":"string"},"ready":{"type":"boolean","description":"Whether the Agent can hold conversations: active, with instructions and, for voice, published for calls."},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused Agent answers nothing and places no calls."},"syncErrorCode":{"anyOf":[{"type":"string","description":"Why calls still use an older version: the error code of the last publication attempt. Null while synced or while a publication is pending. A fix to the Agent (a valid `voiceId`, instructions) publishes again."},{"type":"null"}]},"synced":{"type":"boolean","description":"Whether calls already use the current version (it is published on the Agent's voice channels). Always true for text Agents."},"timeZone":{"anyOf":[{"type":"string","description":"IANA time zone."},{"type":"null"}]},"toolCount":{"type":"integer","minimum":0},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"version":{"type":"integer","minimum":1},"channels":{"type":"array","items":{"type":"object","required":["address","channelType","id","name","status"],"properties":{"address":{"anyOf":[{"type":"string","description":"Phone number or web address of the channel."},{"type":"null"}]},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}]},"id":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"lastBusinessAppGreetingAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}],"description":"WhatsApp only. Last observed message from the phone app matching the configured greeting. Null when none has been recognized. The phone's current greeting setting is unknown."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"active"},{"type":"string","const":"degraded"}]}},"additionalProperties":false},"description":"Channels assigned to the Agent. Assign one with `updateChannel`.","maxItems":50},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationProcedures":{"type":"array","items":{"type":"object","required":["connectionId","digest","procedure"],"properties":{"connectionId":{"type":"string","description":"A connection's id in Account (`con_…`).","maxLength":255,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"digest":{"type":"string","description":"The digest of the procedure the Agent was saved with. When the connection's procedure (`listConnections`) has another digest, it changed: the Agent keeps this text until it is saved again.","maxLength":64,"minLength":1},"procedure":{"type":"string","description":"The procedure's name, as its connection lists it.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"}},"additionalProperties":false},"description":"The procedures the Agent takes from its connections, each saved with the text its connection published then. They run as free-form procedures beside `procedures`.","maxItems":32},"integrationTools":{"type":"array","items":{"type":"object","required":["connectionId","digest","effect","tool","toolsVersion"],"properties":{"connectionId":{"type":"string","description":"A connection's id in Account (`con_…`).","maxLength":255,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"digest":{"type":"string","description":"The digest of the definition the Agent was saved with. The Agent runs the tool as its connection lists it now (`listConnections`): another digest there only says the tool changed since.","maxLength":64,"minLength":1},"effect":{"anyOf":[{"type":"string","const":"read"},{"type":"string","const":"write"}],"description":"`read` only looks; `write` may change data."},"tool":{"type":"string","description":"The tool's name, as its connection lists it.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_.-]+$"},"toolsVersion":{"type":"string","description":"The connection's tool-list version when the Agent was saved."}},"additionalProperties":false},"description":"The integrations' tools the Agent may call, each on the connection it runs on. The Agent runs each as its connection lists it now.","maxItems":200},"knowledgeDocumentIds":{"type":"array","items":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Knowledge documents the Agent consults.","maxItems":100},"procedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentProcedure"},"description":"The Agent's procedures. The model reads only the triggers until a conversation matches one, then loads that procedure. In an update, the complete new set.","maxItems":64},"settings":{"$ref":"#/components/schemas/RaizAgentSettings"},"workflow":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentWorkflow"},{"type":"null"}],"description":"The conversation graph the Agent follows beside its instructions and procedures, or null for none."}},"additionalProperties":false},"RaizAgentGreeting":{"anyOf":[{"type":"object","required":["message","type"],"properties":{"always":{"type":"boolean","description":"Send it even when it does not answer the opening, right before the Agent's reply: for a notice everyone must receive. Absent or false: the Agent's reply goes in its place."},"message":{"type":"string","description":"Sent exactly as written.","maxLength":1000,"minLength":1},"type":{"type":"string","const":"message"}},"description":"A fixed message for the openings it answers, sent at once without the model: when the contact only greets or asks in general terms for what it explains, it is their answer, sets aside what they add that it also answers, and the Agent replies from their next message. When they already send files, data, a question or the details of their case, the Agent answers instead, in one reply that introduces itself as the greeting does. A small classifier model decides the cases the rules leave open.","additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"The greeting as the app sends it. A message from the app that starts with its first line is recognized as the greeting.","maxLength":1000,"minLength":1},"type":{"type":"string","const":"businessApp"}},"description":"The WhatsApp Business app sharing the number sends this greeting itself. It is not a person taking over and the Agent never sends another: when the contact only greeted or asked in a few words without data, the Agent waits for it and replies from their next message; otherwise it answers right after it. A trial, which has no app, receives it from Raíz.","additionalProperties":false},{"type":"object","required":["instructions","type"],"properties":{"instructions":{"type":"string","description":"What the first reply must do, in a few lines: what to say and which data to ask for.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"instructions"}},"description":"The Agent writes the first reply itself, following these instructions on top of its own.","additionalProperties":false}]},"RaizAgentInUseFailure":{"type":"object","description":"The Agent still has channels or active campaigns. Unassign them before deleting it.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["AGENT_IN_USE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizAgentIntegrationProcedureInput":{"type":"object","required":["connectionId","procedure"],"properties":{"connectionId":{"type":"string","description":"A connection's id in Account (`con_…`).","maxLength":255,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"procedure":{"type":"string","description":"The procedure's name, as its connection lists it.","maxLength":64,"minLength":1,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"}},"additionalProperties":false},"RaizAgentIntegrationToolInput":{"type":"object","required":["connectionId","tool"],"properties":{"connectionId":{"type":"string","description":"A connection's id in Account (`con_…`).","maxLength":255,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$"},"tool":{"type":"string","description":"The tool's name, as its connection lists it.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_.-]+$"}},"additionalProperties":false},"RaizAgentModalityLockedFailure":{"type":"object","description":"The Agent's modality cannot change while it has channels or is published for calls. Create a new Agent instead.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["AGENT_MODALITY_LOCKED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizAgentModelTrial":{"type":"object","required":["model","percent","reasoningEffort"],"properties":{"model":{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"The tier the trial's conversations are answered with."},"percent":{"type":"integer","description":"The share of new conversations in the trial, in percent.","maximum":50,"minimum":1},"reasoningEffort":{"anyOf":[{"type":"string","const":"none"},{"type":"string","const":"low"},{"type":"string","const":"medium"},{"type":"string","const":"high"},{"type":"string","const":"xhigh"},{"type":"null"}],"description":"The trial tier's reasoning, as `reasoningEffort`. Null: the tier's default."}},"additionalProperties":false},"RaizAgentNotTextFailure":{"type":"object","description":"Only a text Agent can hold a web conversation; a voice Agent only with `origin: test`, to try it by text.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["AGENT_NOT_TEXT"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizAgentPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgent"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizAgentPageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizAgentPage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizAgentProcedure":{"type":"object","required":["content","id","name","status","steps","trigger","type"],"properties":{"content":{"type":"string","description":"Free-form procedures: what to do, in Markdown, with inline references such as `[tool id=\"buscar_citas\"]`, `[kb id=\"kdc_…\"]`, `[procedure id=\"prc_…\"]`, `[system_tool id=\"end_conversation\"]` and `{{contact_name}}`. Empty for structured procedures.","maxLength":50000},"id":{"type":"string","description":"The procedure's id (`prc_…`), stable for the Agent's life.","examples":["prc_01k8f3w2pqv6xs9mhdr0tz7n3b"],"pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"name":{"type":"string","description":"A short label for people. The model never reads it.","maxLength":120,"minLength":1},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused procedure runs on no channel."},"steps":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["tool","type"],"properties":{"arguments":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,128}$":{"anyOf":[{"type":"object","required":["value"],"properties":{"value":{"description":"Always this value."}},"additionalProperties":false},{"type":"object","required":["variable"],"properties":{"variable":{"type":"string","description":"The current value of this runtime variable.","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"}},"additionalProperties":false},{"type":"object","required":["omit"],"properties":{"omit":{"type":"boolean","const":true,"description":"Leave the parameter out of the call."}},"additionalProperties":false}]}},"additionalProperties":false,"description":"Parameters whose value is fixed, by name; the model fills the others."},"instruction":{"type":"string","description":"How to fill the tool's parameters; omitted leaves it to the model.","maxLength":2000},"onFailure":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."},{"type":"object","required":["maxRetries","type"],"properties":{"maxRetries":{"type":"integer","description":"Calls of the tool after the first one.","maximum":3,"minimum":1},"type":{"type":"string","const":"retry"}},"additionalProperties":false,"description":"Call the failed tool again and, if it fails again, run its failure steps again. Only the last step of a failure handler."}]},"description":"What to do when the call fails. Omitted or empty: the procedure stops and the Agent handles the failure under its instructions.","maxItems":40},"tool":{"type":"string","description":"One of the Agent's integration tools by its tool name, or one of Raíz's own tools (`search_knowledge`, `escalate_to_team`, `transfer_to_human`).","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"type":{"type":"string","const":"tool"}},"additionalProperties":false},{"type":"object","required":["branches","type"],"properties":{"branches":{"type":"array","items":{"type":"object","required":["steps","when"],"properties":{"steps":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["tool","type"],"properties":{"arguments":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,128}$":{"anyOf":[{"type":"object","required":["value"],"properties":{"value":{"description":"Always this value."}},"additionalProperties":false},{"type":"object","required":["variable"],"properties":{"variable":{"type":"string","description":"The current value of this runtime variable.","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"}},"additionalProperties":false},{"type":"object","required":["omit"],"properties":{"omit":{"type":"boolean","const":true,"description":"Leave the parameter out of the call."}},"additionalProperties":false}]}},"additionalProperties":false,"description":"Parameters whose value is fixed, by name; the model fills the others."},"instruction":{"type":"string","description":"How to fill the tool's parameters; omitted leaves it to the model.","maxLength":2000},"onFailure":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."},{"type":"object","required":["maxRetries","type"],"properties":{"maxRetries":{"type":"integer","description":"Calls of the tool after the first one.","maximum":3,"minimum":1},"type":{"type":"string","const":"retry"}},"additionalProperties":false,"description":"Call the failed tool again and, if it fails again, run its failure steps again. Only the last step of a failure handler."}]},"description":"What to do when the call fails. Omitted or empty: the procedure stops and the Agent handles the failure under its instructions.","maxItems":40},"tool":{"type":"string","description":"One of the Agent's integration tools by its tool name, or one of Raíz's own tools (`search_knowledge`, `escalate_to_team`, `transfer_to_human`).","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"type":{"type":"string","const":"tool"}},"additionalProperties":false},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."}]},"maxItems":40,"minItems":1},"when":{"type":"string","description":"A condition the Agent judges from the conversation, such as: The contact says the order already shipped.","maxLength":2000,"minLength":1}},"additionalProperties":false},"maxItems":8,"minItems":1},"otherwise":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["tool","type"],"properties":{"arguments":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,128}$":{"anyOf":[{"type":"object","required":["value"],"properties":{"value":{"description":"Always this value."}},"additionalProperties":false},{"type":"object","required":["variable"],"properties":{"variable":{"type":"string","description":"The current value of this runtime variable.","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"}},"additionalProperties":false},{"type":"object","required":["omit"],"properties":{"omit":{"type":"boolean","const":true,"description":"Leave the parameter out of the call."}},"additionalProperties":false}]}},"additionalProperties":false,"description":"Parameters whose value is fixed, by name; the model fills the others."},"instruction":{"type":"string","description":"How to fill the tool's parameters; omitted leaves it to the model.","maxLength":2000},"onFailure":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."},{"type":"object","required":["maxRetries","type"],"properties":{"maxRetries":{"type":"integer","description":"Calls of the tool after the first one.","maximum":3,"minimum":1},"type":{"type":"string","const":"retry"}},"additionalProperties":false,"description":"Call the failed tool again and, if it fails again, run its failure steps again. Only the last step of a failure handler."}]},"description":"What to do when the call fails. Omitted or empty: the procedure stops and the Agent handles the failure under its instructions.","maxItems":40},"tool":{"type":"string","description":"One of the Agent's integration tools by its tool name, or one of Raíz's own tools (`search_knowledge`, `escalate_to_team`, `transfer_to_human`).","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"type":{"type":"string","const":"tool"}},"additionalProperties":false},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."}]},"description":"What to do when no condition holds; omitted or empty continues.","maxItems":40},"type":{"type":"string","const":"branch"}},"additionalProperties":false,"description":"The first condition that holds runs its steps; then the procedure continues after the branch."},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."}]},"description":"Structured procedures: the steps, in order. Empty for free-form procedures.","maxItems":40},"trigger":{"type":"string","description":"When it applies, from the contact's side: When the contact asks to book or move an appointment. Empty makes a sub-procedure, which only runs when another procedure references it.","maxLength":1000},"type":{"anyOf":[{"type":"string","const":"free_form"},{"type":"string","const":"structured"}],"description":"`free_form`: instructions the Agent adapts. `structured`: steps that run the same way every time. Fixed once created."}},"additionalProperties":false},"RaizAgentProcedureInput":{"type":"object","required":["name","type"],"properties":{"content":{"type":"string","description":"Free-form procedures: what to do, in Markdown, with inline references such as `[tool id=\"buscar_citas\"]`, `[kb id=\"kdc_…\"]`, `[procedure id=\"prc_…\"]`, `[system_tool id=\"end_conversation\"]` and `{{contact_name}}`. Empty for structured procedures.","maxLength":50000},"id":{"type":"string","description":"The procedure's id (`prc_…`), stable for the Agent's life.","examples":["prc_01k8f3w2pqv6xs9mhdr0tz7n3b"],"pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"name":{"type":"string","description":"A short label for people. The model never reads it.","maxLength":120,"minLength":1},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused procedure runs on no channel."},"steps":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["tool","type"],"properties":{"arguments":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,128}$":{"anyOf":[{"type":"object","required":["value"],"properties":{"value":{"description":"Always this value."}},"additionalProperties":false},{"type":"object","required":["variable"],"properties":{"variable":{"type":"string","description":"The current value of this runtime variable.","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"}},"additionalProperties":false},{"type":"object","required":["omit"],"properties":{"omit":{"type":"boolean","const":true,"description":"Leave the parameter out of the call."}},"additionalProperties":false}]}},"additionalProperties":false,"description":"Parameters whose value is fixed, by name; the model fills the others."},"instruction":{"type":"string","description":"How to fill the tool's parameters; omitted leaves it to the model.","maxLength":2000},"onFailure":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."},{"type":"object","required":["maxRetries","type"],"properties":{"maxRetries":{"type":"integer","description":"Calls of the tool after the first one.","maximum":3,"minimum":1},"type":{"type":"string","const":"retry"}},"additionalProperties":false,"description":"Call the failed tool again and, if it fails again, run its failure steps again. Only the last step of a failure handler."}]},"description":"What to do when the call fails. Omitted or empty: the procedure stops and the Agent handles the failure under its instructions.","maxItems":40},"tool":{"type":"string","description":"One of the Agent's integration tools by its tool name, or one of Raíz's own tools (`search_knowledge`, `escalate_to_team`, `transfer_to_human`).","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"type":{"type":"string","const":"tool"}},"additionalProperties":false},{"type":"object","required":["branches","type"],"properties":{"branches":{"type":"array","items":{"type":"object","required":["steps","when"],"properties":{"steps":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["tool","type"],"properties":{"arguments":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,128}$":{"anyOf":[{"type":"object","required":["value"],"properties":{"value":{"description":"Always this value."}},"additionalProperties":false},{"type":"object","required":["variable"],"properties":{"variable":{"type":"string","description":"The current value of this runtime variable.","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"}},"additionalProperties":false},{"type":"object","required":["omit"],"properties":{"omit":{"type":"boolean","const":true,"description":"Leave the parameter out of the call."}},"additionalProperties":false}]}},"additionalProperties":false,"description":"Parameters whose value is fixed, by name; the model fills the others."},"instruction":{"type":"string","description":"How to fill the tool's parameters; omitted leaves it to the model.","maxLength":2000},"onFailure":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."},{"type":"object","required":["maxRetries","type"],"properties":{"maxRetries":{"type":"integer","description":"Calls of the tool after the first one.","maximum":3,"minimum":1},"type":{"type":"string","const":"retry"}},"additionalProperties":false,"description":"Call the failed tool again and, if it fails again, run its failure steps again. Only the last step of a failure handler."}]},"description":"What to do when the call fails. Omitted or empty: the procedure stops and the Agent handles the failure under its instructions.","maxItems":40},"tool":{"type":"string","description":"One of the Agent's integration tools by its tool name, or one of Raíz's own tools (`search_knowledge`, `escalate_to_team`, `transfer_to_human`).","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"type":{"type":"string","const":"tool"}},"additionalProperties":false},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."}]},"maxItems":40,"minItems":1},"when":{"type":"string","description":"A condition the Agent judges from the conversation, such as: The contact says the order already shipped.","maxLength":2000,"minLength":1}},"additionalProperties":false},"maxItems":8,"minItems":1},"otherwise":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["tool","type"],"properties":{"arguments":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,128}$":{"anyOf":[{"type":"object","required":["value"],"properties":{"value":{"description":"Always this value."}},"additionalProperties":false},{"type":"object","required":["variable"],"properties":{"variable":{"type":"string","description":"The current value of this runtime variable.","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"}},"additionalProperties":false},{"type":"object","required":["omit"],"properties":{"omit":{"type":"boolean","const":true,"description":"Leave the parameter out of the call."}},"additionalProperties":false}]}},"additionalProperties":false,"description":"Parameters whose value is fixed, by name; the model fills the others."},"instruction":{"type":"string","description":"How to fill the tool's parameters; omitted leaves it to the model.","maxLength":2000},"onFailure":{"type":"array","items":{"anyOf":[{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to ask, and when an answer counts. The procedure waits here until the contact answers.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"ask"}},"additionalProperties":false},{"type":"object","required":["instruction","type"],"properties":{"instruction":{"type":"string","description":"What to convey, in the Agent's own words. The procedure continues without waiting.","maxLength":2000,"minLength":1},"type":{"type":"string","const":"tell"}},"additionalProperties":false},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"What to say, word for word.","maxLength":2000,"minLength":1},"translations":{"type":"object","patternProperties":{"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$":{"type":"string","maxLength":2000,"minLength":1}},"additionalProperties":false,"description":"The exact message in other languages, by BCP 47 tag, for an Agent that speaks several."},"type":{"type":"string","const":"say"}},"additionalProperties":false},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."},{"type":"object","required":["maxRetries","type"],"properties":{"maxRetries":{"type":"integer","description":"Calls of the tool after the first one.","maximum":3,"minimum":1},"type":{"type":"string","const":"retry"}},"additionalProperties":false,"description":"Call the failed tool again and, if it fails again, run its failure steps again. Only the last step of a failure handler."}]},"description":"What to do when the call fails. Omitted or empty: the procedure stops and the Agent handles the failure under its instructions.","maxItems":40},"tool":{"type":"string","description":"One of the Agent's integration tools by its tool name, or one of Raíz's own tools (`search_knowledge`, `escalate_to_team`, `transfer_to_human`).","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"type":{"type":"string","const":"tool"}},"additionalProperties":false},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."}]},"description":"What to do when no condition holds; omitted or empty continues.","maxItems":40},"type":{"type":"string","const":"branch"}},"additionalProperties":false,"description":"The first condition that holds runs its steps; then the procedure continues after the branch."},{"type":"object","required":["procedureId","type"],"properties":{"procedureId":{"type":"string","description":"Another structured procedure of this Agent. It runs to its end, then this procedure continues.","pattern":"^prc_[0-7][0-9a-hjkmnp-tv-z]{25}$"},"type":{"type":"string","const":"procedure"}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation after this reply (on a call, hang up). Always the last step of its list."}]},"description":"Structured procedures: the steps, in order. Empty for free-form procedures.","maxItems":40},"trigger":{"type":"string","description":"When it applies, from the contact's side: When the contact asks to book or move an appointment. Empty makes a sub-procedure, which only runs when another procedure references it.","maxLength":1000},"type":{"anyOf":[{"type":"string","const":"free_form"},{"type":"string","const":"structured"}],"description":"`free_form`: instructions the Agent adapts. `structured`: steps that run the same way every time. Fixed once created."}},"additionalProperties":false},"RaizAgentProceduresInvalidFailure":{"type":"object","description":"A procedure is incomplete, references a tool, document or procedure the Agent does not have, or breaks the structured step rules. `issues` says where.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["AGENT_PROCEDURES_INVALID"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/RaizAgentProceduresInvalidFailureData"}}},"RaizAgentProceduresInvalidFailureData":{"type":"object","required":["issues"],"properties":{"issues":{"type":"array","items":{"type":"object","required":["code","path"],"properties":{"code":{"type":"string","description":"Why, as a label: content_required, steps_required, unknown_tool, unknown_knowledge, unknown_procedure, sub_procedure_not_structured, consecutive_branches, end_not_last, retry_not_last, type_changed, procedure_cycle, reference_not_allowed, unsupported_on_calls…"},"path":{"type":"string","description":"RFC 6901 pointer to the refused field, such as `/procedures/2/steps/1`."}},"additionalProperties":false},"maxItems":20}},"additionalProperties":false},"RaizAgentResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizAgent"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizAgentSettings":{"type":"object","required":["humanEscalation","recoveryManager","automaticKnowledge","attachmentReader","budgetExhaustedMessage","closingMessage","deferLongOperations","evalGate","followUpAfterMinutes","followUpMessage","greeting","handoffMessage","handoffReturnMinutes","humanReplyTimeoutMinutes","investigationsEnabled","model","modelTrial","monthlyTokenBudget","pauseOnHumanReply","policy","pollPendingOperations","protection","reasoningEffort","replyChoices","sessionCloseAfterMinutes","teamCloseAfterMinutes","temperature","toolDiscovery","voice"],"properties":{"humanEscalation":{"anyOf":[{"type":"object","required":["instructions"],"properties":{"instructions":{"anyOf":[{"type":"string","maxLength":4000,"description":"When this Agent should ask the business's team to intervene, using only its available handoff capabilities. Null keeps the default instructions; an explicit request for a person is always respected."},{"type":"null"}]}},"description":"Per-Agent human escalation policy. Instructions apply to voice and text. Null keeps the default instructions. A WhatsApp handoff stays with the team until a person explicitly resumes AI; no timeout resumes it.","additionalProperties":false},{"type":"null"}]},"recoveryManager":{"anyOf":[{"type":"object","required":["enabled","model","maxAttempts","timeoutMs","maxInputTokens","maxOutputTokens","maxCostUsd","inputUsdPerMillion","outputUsdPerMillion"],"properties":{"enabled":{"type":"boolean"},"instructions":{"anyOf":[{"type":"string","maxLength":4000,"description":"Operator criteria for when the recovery advisor should help or leave the case to a person. They never override consent, tool permissions, unknown-write fences or an explicit human request. Null keeps the default criteria."},{"type":"null"}]},"advisorAgentId":{"anyOf":[{"type":"string","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"Optional active text Agent in the same organization, other than this Agent, whose instructions and procedures provide specialist guidance. The configured recovery model and cost bounds stay unchanged; no specialist tools or conversation history are accessed."},{"type":"null"}]},"model":{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"`arbolito/agile`: quickest and least expensive, for direct conversations. `arbolito/balanced`: more deliberate answers at moderate cost. `arbolito/advanced`: strong reasoning for complex instructions and many tools, with an adjustable `reasoningEffort`. `arbolito/top`: the most capable, for the hardest cases, with an adjustable `reasoningEffort` up to `xhigh`. Every tier reads images and PDF documents."},"maxAttempts":{"type":"number","const":1},"timeoutMs":{"type":"integer","minimum":100,"maximum":15000},"maxInputTokens":{"type":"integer","minimum":4096,"maximum":131072},"maxOutputTokens":{"type":"integer","minimum":128,"maximum":1024},"maxCostUsd":{"type":"number","exclusiveMinimum":0,"maximum":1},"inputUsdPerMillion":{"type":"number","exclusiveMinimum":0,"maximum":1000},"outputUsdPerMillion":{"type":"number","exclusiveMinimum":0,"maximum":1000}},"description":"Optional WhatsApp recovery advisor. Null or enabled=false disables it. A journaled evidence check precedes any paid review. One tool-free model call per turn before autonomous escalation or after terminal provider failure; unresolved terminal recovery hands off. Completed handoffs and conservatively recognized human requests bypass generation. Model selects the existing provider route. Prices must be conservative upper bounds including provider overhead; missing or invalid prices disable recovery. The cost bound covers only the advisor. No tools or automatic provider retries.","additionalProperties":false},{"type":"null"}]},"automaticKnowledge":{"anyOf":[{"type":"boolean","description":"Text Agents. Before a substantive contact message, without a model tool call, retrieve this Agent's relevant active Knowledge: complete documents that fit, and the matching passages, marked as excerpts, of those that do not. Null or false: on-demand search only. Does not store contact memories or learn unreviewed answers."},{"type":"null"}]},"attachmentReader":{"anyOf":[{"anyOf":[{"type":"string","const":"vision"},{"type":"string","const":"ocr"}],"description":"Text Agents on WhatsApp. Who reads an image or PDF when the Agent calls `read_attachment`: `vision` (a vision model describes and transcribes it, with a stronger one when the first reads nothing) or `ocr` (text recognition, which also answers the `fields` the Agent asks for, each null when absent or unclear; the vision model reads the file when recognition cannot). With `ocr` the Agent sees files as markers and reads them with `read_attachment`; with `vision`, tiers that read files themselves see the original. Null: `vision`."},{"type":"null"}]},"budgetExhaustedMessage":{"anyOf":[{"type":"string","description":"Text Agents on WhatsApp. What the contact reads when the Agent has used its `monthlyTokenBudget`: the conversation then goes to the team, as an escalation does, and the Agent writes nothing until the budget is raised or the month ends. Null: `handoffMessage`, including an empty notice when disabled.","maxLength":1000,"minLength":1},{"type":"null"}]},"closingMessage":{"anyOf":[{"type":"string","description":"Text Agents on WhatsApp. After a reply that completed an action (an integration tool that changes data succeeded), explicitly finished the case with end_conversation and left nothing pending (no question, no offered choices, no handoff), a contact message that only thanks or closes («gracias», «ok», «listo», an emoji) gets this text at once, without the model; the Agent still reads both in its next turn. Write it in the Agent's language and ask nothing in it. Null: the Agent answers such messages itself.","maxLength":1000,"minLength":1},{"type":"null"}]},"deferLongOperations":{"anyOf":[{"type":"boolean","description":"Text Agents on WhatsApp, with `pollPendingOperations` on (AGENT_SETTINGS_INVALID otherwise). Nobody waits for a long read: Raíz asks a connected system that supports it to answer early that its work is pending; a reply that only started such reads ends with a fixed notice, without another model call; and the result reaches the contact when it arrives, with one honest update if it takes minutes. Null: disabled."},{"type":"null"}]},"evalGate":{"anyOf":[{"type":"boolean","description":"Text and voice Agents. When true, an `updateAgent` that changes what the model reads (instructions, procedures, connection procedures, `model` or `reasoningEffort`) must send `evalRunId`: a completed `createEvalRun` of this Agent with exactly that content, in which every case passed (EVAL_GATE_UNMET otherwise). A change to `workflow` is refused with EVAL_GATE_UNMET while this is true, because evaluation runs do not replay workflows yet. Null: no requirement."},{"type":"null"}]},"followUpAfterMinutes":{"anyOf":[{"type":"integer","description":"Text Agents. When the Agent spoke last and asked something, send `followUpMessage` once after this many minutes of silence (WhatsApp only, inside its 24-hour window). Null disables follow-ups.","maximum":1440,"minimum":1},{"type":"null"}]},"followUpMessage":{"anyOf":[{"type":"string","description":"Text Agents. The follow-up text. Null uses a short default in the Agent's language.","maxLength":1000,"minLength":1},{"type":"null"}]},"greeting":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentGreeting","description":"Text Agents on WhatsApp. How the Agent answers when a contact opens a conversation and nobody from the business has answered it yet. Null: the Agent answers the first message with its own instructions alone."},{"type":"null"}]},"handoffMessage":{"anyOf":[{"type":"string","description":"Text Agents on WhatsApp. The notice appended after an escalation or a requested human handoff. Null: the current localized review notice or the case-specific notice supplied under the Agent's instructions. An empty string disables the notice; the handoff and pause still happen. The model does not write this notice.","maxLength":1000},{"type":"null"}]},"handoffReturnMinutes":{"anyOf":[{"type":"integer","description":"Text Agents on WhatsApp. A handoff whose cause was technical (a turn that failed, or the Agent's own escalation as `technical_failure` with no write left in doubt) returns to the AI by itself when no person of the team has written this many minutes after it: the Agent reads the current state, continues the pending request and tells the contact what is true. Once per conversation, and only inside WhatsApp's 24-hour window; a handoff the contact asked for, a decision of the team's (`human_authority`), records that contradict each other (`unresolved_evidence`), an uncertain write and a spent budget always wait for a person. Null: every handoff waits for a person.","maximum":1440,"minimum":1},{"type":"null"}]},"humanReplyTimeoutMinutes":{"anyOf":[{"type":"integer","description":"Text Agents on WhatsApp. After a manual takeover, resume automatic replies when the contact's newest message waits this many minutes. An Agent handoff stays with the team until a person explicitly resumes AI, except a technical one under `handoffReturnMinutes`. Null: only a person resumes automatic replies.","maximum":1440,"minimum":1},{"type":"null"}]},"investigationsEnabled":{"anyOf":[{"type":"boolean","description":"Opt this Agent into internal root-cause investigations of tool failures, human escalations, failed outcomes and negative feedback. Incidents are grouped only with participating Agents in the same organization. Null or false: disabled. Turning this off stops new events and pending dispatch when no participating Agent remains; an already active investigation may finish."},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"Text Agents. The tier that writes replies. `arbolito/agile`: quickest and least expensive, for direct conversations. `arbolito/balanced`: more deliberate answers at moderate cost. `arbolito/advanced`: strong reasoning for complex instructions and many tools, with an adjustable `reasoningEffort`. `arbolito/top`: the most capable, for the hardest cases, with an adjustable `reasoningEffort` up to `xhigh`. Every tier reads images and PDF documents. Null: the default, as `arbolito/agile`."},{"type":"null"}]},"modelTrial":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentModelTrial","description":"Text Agents on WhatsApp. Answer a stable share of the Agent's new conversations with another tier, to compare it with `model` on real traffic. A conversation keeps the tier its first reply used while the trial lasts (one already open when the trial starts stays on `model`); removing the trial returns every conversation to `model`. Null: no trial."},{"type":"null"}]},"monthlyTokenBudget":{"anyOf":[{"type":"integer","description":"Text Agents. Tokens (input, cached input included, plus output) the Agent may use per calendar month (UTC), on every channel. On WhatsApp, a reply that would start past it does not run: the contact reads `budgetExhaustedMessage` and the team continues; at 80 % the API logs an alert once a month. Null: no limit.","maximum":1000000000000,"minimum":10000},{"type":"null"}]},"pauseOnHumanReply":{"anyOf":[{"type":"boolean","description":"Text Agents on WhatsApp: pause automatic replies when a live WhatsApp Business App message that says something (not a reaction, an edit or a deletion) proves a person took over. Null: disabled. The recipient stays paused until resumed or until that conversation closes; their next conversation starts with the AI."},{"type":"null"}]},"policy":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentTurnPolicy","description":"Text Agents on WhatsApp. Limits on each reply: model calls, output, writes per step, repeated reads, cached reads and deferred tools. Null keeps every default."},{"type":"null"}]},"pollPendingOperations":{"anyOf":[{"type":"boolean","description":"Text Agents on WhatsApp: when a reply ends while an integration answered that its work is still pending (`status: pending` with an `operationId`) and the same connection offers `getOperation`, Raíz checks it again on its own and the Agent answers with the result, without waiting for the contact to write. Null: disabled."},{"type":"null"}]},"protection":{"anyOf":[{"type":"object","properties":{"spamHours":{"type":"integer","description":"Hours someone stays in spam once they pass a limit (default 6). A person can lift the rule earlier by deleting it.","maximum":720,"minimum":1},"voiceCallsPerHour":{"type":"integer","description":"Inbound calls one number may make in an hour, whoever spoke (default 10). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier.","maximum":1000,"minimum":1},"voiceEnabled":{"type":"boolean","description":"Whether callers can fall into spam (default true). False: no call is ever refused for what its number consumed."},"voiceMinutesPerDay":{"type":"integer","description":"Minutes of inbound calls one number may use in 24 hours (default 60). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts, its calls are not answered.","maximum":1440,"minimum":1},"voiceSilentCallsPerHour":{"type":"integer","description":"Inbound calls of one number in an hour in which the caller never spoke (default 5). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier. A call that failed does not count.","maximum":1000,"minimum":1},"webConversationTokens":{"type":"integer","description":"Tokens one web conversation may use (default 10000000). A conversation that reaches it takes no more messages.","maximum":1000000000000,"minimum":10000},"webEnabled":{"type":"boolean","description":"Whether web chat visitors can fall into spam (default true)."},"webMessagesPerDay":{"type":"integer","description":"Messages one web visitor may send in 24 hours, across their chats (default 100). A visitor who reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts they cannot open a chat. Visitors are told apart by network address, so people who share one count together.","maximum":100000,"minimum":1},"whatsappConversationTokens":{"type":"integer","description":"Tokens (input, cached input included, plus output) one WhatsApp conversation may use since the AI last took it (default 10000000). A contact whose conversation reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier.","maximum":1000000000000,"minimum":10000},"whatsappEnabled":{"type":"boolean","description":"Whether WhatsApp contacts can fall into spam (default true)."},"whatsappRepliesPerHour":{"type":"integer","description":"Replies the AI may write in one WhatsApp conversation in an hour (default 60). A contact whose conversation reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts the AI does not answer them, and their messages are still stored for the team.","maximum":10000,"minimum":1}},"description":"This Agent's own spam limits, written whole: each limit it names replaces the organization's (`settings.protection` of the organization) for the Agent's conversations and calls, and one left out keeps the organization's. Null: the organization's limits.","additionalProperties":false},{"type":"null"}]},"reasoningEffort":{"anyOf":[{"anyOf":[{"type":"string","const":"none"},{"type":"string","const":"low"},{"type":"string","const":"medium"},{"type":"string","const":"high"},{"type":"string","const":"xhigh"}],"description":"Text Agents whose tier reasons (`arbolito/advanced`, `arbolito/top`, or an Agent already running a model that reasons): `none` answers fastest, `high` deliberates most, and `xhigh`, on `arbolito/advanced` and `arbolito/top`, deliberates past it. Null: the tier's default. A tier that does not reason refuses it (AGENT_SETTINGS_INVALID)."},{"type":"null"}]},"replyChoices":{"anyOf":[{"type":"boolean","description":"Text Agents. Let the Agent offer tap-to-answer options (WhatsApp buttons and lists, web reply options). Null: allowed."},{"type":"null"}]},"sessionCloseAfterMinutes":{"anyOf":[{"type":"integer","description":"Text Agents. Close a conversation the AI attends after this many minutes without messages. Null: 120 on WhatsApp (1440 for a conversation the business opened: a campaign's message or a machine client's), 30 on web. If the contact writes later, a new conversation opens and the Agent reads what is known of the contact and the summaries of their earlier conversations. A WhatsApp conversation a person of the team handles follows `teamCloseAfterMinutes` instead.","maximum":10080,"minimum":5},{"type":"null"}]},"teamCloseAfterMinutes":{"anyOf":[{"type":"integer","description":"Text Agents on WhatsApp. Close a conversation a person of the team handles (a handoff the AI made, the AI paused for the recipient, or the AI off for the conversation) after this many minutes without messages, whether the team answered or not. One that closes with a handoff nobody of the team answered is `unattended` and stays among the conversations to review. Closing ends the recipient's pause, so their next message opens a new conversation with the AI. Null: 1440.","maximum":10080,"minimum":5},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number","description":"Text Agents. Sampling temperature of replies. Null: 0.2 (steady answers). `arbolito/advanced` and `arbolito/top` set their own sampling and ignore it.","maximum":1,"minimum":0},{"type":"null"}]},"toolDiscovery":{"anyOf":[{"type":"boolean","description":"Retired: changes nothing. WhatsApp replies (the WhatsApp Agent Worker) offer the Agent's tools directly. Accepted so existing clients that send it stay valid."},{"type":"null"}]},"voice":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentVoiceSettings","description":"Voice Agents only."},{"type":"null"}]}},"additionalProperties":false},"RaizAgentSettingsInput":{"type":"object","properties":{"humanEscalation":{"anyOf":[{"type":"object","required":["instructions"],"properties":{"instructions":{"anyOf":[{"type":"string","maxLength":4000,"description":"When this Agent should ask the business's team to intervene, using only its available handoff capabilities. Null keeps the default instructions; an explicit request for a person is always respected."},{"type":"null"}]}},"description":"Per-Agent human escalation policy. Instructions apply to voice and text. Null keeps the default instructions. A WhatsApp handoff stays with the team until a person explicitly resumes AI; no timeout resumes it.","additionalProperties":false},{"type":"null"}]},"recoveryManager":{"anyOf":[{"type":"object","required":["enabled","model","maxAttempts","timeoutMs","maxInputTokens","maxOutputTokens","maxCostUsd","inputUsdPerMillion","outputUsdPerMillion"],"properties":{"enabled":{"type":"boolean"},"instructions":{"anyOf":[{"type":"string","maxLength":4000,"description":"Operator criteria for when the recovery advisor should help or leave the case to a person. They never override consent, tool permissions, unknown-write fences or an explicit human request. Null keeps the default criteria."},{"type":"null"}]},"advisorAgentId":{"anyOf":[{"type":"string","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"Optional active text Agent in the same organization, other than this Agent, whose instructions and procedures provide specialist guidance. The configured recovery model and cost bounds stay unchanged; no specialist tools or conversation history are accessed."},{"type":"null"}]},"model":{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"`arbolito/agile`: quickest and least expensive, for direct conversations. `arbolito/balanced`: more deliberate answers at moderate cost. `arbolito/advanced`: strong reasoning for complex instructions and many tools, with an adjustable `reasoningEffort`. `arbolito/top`: the most capable, for the hardest cases, with an adjustable `reasoningEffort` up to `xhigh`. Every tier reads images and PDF documents."},"maxAttempts":{"type":"number","const":1},"timeoutMs":{"type":"integer","minimum":100,"maximum":15000},"maxInputTokens":{"type":"integer","minimum":4096,"maximum":131072},"maxOutputTokens":{"type":"integer","minimum":128,"maximum":1024},"maxCostUsd":{"type":"number","exclusiveMinimum":0,"maximum":1},"inputUsdPerMillion":{"type":"number","exclusiveMinimum":0,"maximum":1000},"outputUsdPerMillion":{"type":"number","exclusiveMinimum":0,"maximum":1000}},"description":"Optional WhatsApp recovery advisor. Null or enabled=false disables it. A journaled evidence check precedes any paid review. One tool-free model call per turn before autonomous escalation or after terminal provider failure; unresolved terminal recovery hands off. Completed handoffs and conservatively recognized human requests bypass generation. Model selects the existing provider route. Prices must be conservative upper bounds including provider overhead; missing or invalid prices disable recovery. The cost bound covers only the advisor. No tools or automatic provider retries.","additionalProperties":false},{"type":"null"}]},"automaticKnowledge":{"anyOf":[{"type":"boolean","description":"Text Agents. Before a substantive contact message, without a model tool call, retrieve this Agent's relevant active Knowledge: complete documents that fit, and the matching passages, marked as excerpts, of those that do not. Null or false: on-demand search only. Does not store contact memories or learn unreviewed answers."},{"type":"null"}]},"attachmentReader":{"anyOf":[{"anyOf":[{"type":"string","const":"vision"},{"type":"string","const":"ocr"}],"description":"Text Agents on WhatsApp. Who reads an image or PDF when the Agent calls `read_attachment`: `vision` (a vision model describes and transcribes it, with a stronger one when the first reads nothing) or `ocr` (text recognition, which also answers the `fields` the Agent asks for, each null when absent or unclear; the vision model reads the file when recognition cannot). With `ocr` the Agent sees files as markers and reads them with `read_attachment`; with `vision`, tiers that read files themselves see the original. Null: `vision`."},{"type":"null"}]},"budgetExhaustedMessage":{"anyOf":[{"type":"string","description":"Text Agents on WhatsApp. What the contact reads when the Agent has used its `monthlyTokenBudget`: the conversation then goes to the team, as an escalation does, and the Agent writes nothing until the budget is raised or the month ends. Null: `handoffMessage`, including an empty notice when disabled.","maxLength":1000,"minLength":1},{"type":"null"}]},"businessHours":{"anyOf":[{"$ref":"#/components/schemas/RaizBusinessHours","deprecated":true,"description":"Retired: business hours belong to the number, `updateChannel`'s `businessHours`. Accepted so existing clients that send it stay valid; it changes nothing."},{"type":"null"}]},"closingMessage":{"anyOf":[{"type":"string","description":"Text Agents on WhatsApp. After a reply that completed an action (an integration tool that changes data succeeded), explicitly finished the case with end_conversation and left nothing pending (no question, no offered choices, no handoff), a contact message that only thanks or closes («gracias», «ok», «listo», an emoji) gets this text at once, without the model; the Agent still reads both in its next turn. Write it in the Agent's language and ask nothing in it. Null: the Agent answers such messages itself.","maxLength":1000,"minLength":1},{"type":"null"}]},"deferLongOperations":{"anyOf":[{"type":"boolean","description":"Text Agents on WhatsApp, with `pollPendingOperations` on (AGENT_SETTINGS_INVALID otherwise). Nobody waits for a long read: Raíz asks a connected system that supports it to answer early that its work is pending; a reply that only started such reads ends with a fixed notice, without another model call; and the result reaches the contact when it arrives, with one honest update if it takes minutes. Null: disabled."},{"type":"null"}]},"evalGate":{"anyOf":[{"type":"boolean","description":"Text and voice Agents. When true, an `updateAgent` that changes what the model reads (instructions, procedures, connection procedures, `model` or `reasoningEffort`) must send `evalRunId`: a completed `createEvalRun` of this Agent with exactly that content, in which every case passed (EVAL_GATE_UNMET otherwise). A change to `workflow` is refused with EVAL_GATE_UNMET while this is true, because evaluation runs do not replay workflows yet. Null: no requirement."},{"type":"null"}]},"followUpAfterMinutes":{"anyOf":[{"type":"integer","description":"Text Agents. When the Agent spoke last and asked something, send `followUpMessage` once after this many minutes of silence (WhatsApp only, inside its 24-hour window). Null disables follow-ups.","maximum":1440,"minimum":1},{"type":"null"}]},"followUpMessage":{"anyOf":[{"type":"string","description":"Text Agents. The follow-up text. Null uses a short default in the Agent's language.","maxLength":1000,"minLength":1},{"type":"null"}]},"greeting":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentGreeting","description":"Text Agents on WhatsApp. How the Agent answers when a contact opens a conversation and nobody from the business has answered it yet. Null: the Agent answers the first message with its own instructions alone."},{"type":"null"}]},"handoffMessage":{"anyOf":[{"type":"string","description":"Text Agents on WhatsApp. The notice appended after an escalation or a requested human handoff. Null: the current localized review notice or the case-specific notice supplied under the Agent's instructions. An empty string disables the notice; the handoff and pause still happen. The model does not write this notice.","maxLength":1000},{"type":"null"}]},"handoffReturnMinutes":{"anyOf":[{"type":"integer","description":"Text Agents on WhatsApp. A handoff whose cause was technical (a turn that failed, or the Agent's own escalation as `technical_failure` with no write left in doubt) returns to the AI by itself when no person of the team has written this many minutes after it: the Agent reads the current state, continues the pending request and tells the contact what is true. Once per conversation, and only inside WhatsApp's 24-hour window; a handoff the contact asked for, a decision of the team's (`human_authority`), records that contradict each other (`unresolved_evidence`), an uncertain write and a spent budget always wait for a person. Null: every handoff waits for a person.","maximum":1440,"minimum":1},{"type":"null"}]},"humanReplyTimeoutMinutes":{"anyOf":[{"type":"integer","description":"Text Agents on WhatsApp. After a manual takeover, resume automatic replies when the contact's newest message waits this many minutes. An Agent handoff stays with the team until a person explicitly resumes AI, except a technical one under `handoffReturnMinutes`. Null: only a person resumes automatic replies.","maximum":1440,"minimum":1},{"type":"null"}]},"investigationsEnabled":{"anyOf":[{"type":"boolean","description":"Opt this Agent into internal root-cause investigations of tool failures, human escalations, failed outcomes and negative feedback. Incidents are grouped only with participating Agents in the same organization. Null or false: disabled. Turning this off stops new events and pending dispatch when no participating Agent remains; an already active investigation may finish."},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"Text Agents. The tier that writes replies. `arbolito/agile`: quickest and least expensive, for direct conversations. `arbolito/balanced`: more deliberate answers at moderate cost. `arbolito/advanced`: strong reasoning for complex instructions and many tools, with an adjustable `reasoningEffort`. `arbolito/top`: the most capable, for the hardest cases, with an adjustable `reasoningEffort` up to `xhigh`. Every tier reads images and PDF documents. Null: the default, as `arbolito/agile`."},{"type":"null"}]},"modelTrial":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentModelTrial","description":"Text Agents on WhatsApp. Answer a stable share of the Agent's new conversations with another tier, to compare it with `model` on real traffic. A conversation keeps the tier its first reply used while the trial lasts (one already open when the trial starts stays on `model`); removing the trial returns every conversation to `model`. Null: no trial."},{"type":"null"}]},"monthlyTokenBudget":{"anyOf":[{"type":"integer","description":"Text Agents. Tokens (input, cached input included, plus output) the Agent may use per calendar month (UTC), on every channel. On WhatsApp, a reply that would start past it does not run: the contact reads `budgetExhaustedMessage` and the team continues; at 80 % the API logs an alert once a month. Null: no limit.","maximum":1000000000000,"minimum":10000},{"type":"null"}]},"pauseOnHumanReply":{"anyOf":[{"type":"boolean","description":"Text Agents on WhatsApp: pause automatic replies when a live WhatsApp Business App message that says something (not a reaction, an edit or a deletion) proves a person took over. Null: disabled. The recipient stays paused until resumed or until that conversation closes; their next conversation starts with the AI."},{"type":"null"}]},"policy":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentTurnPolicy","description":"Text Agents on WhatsApp. Limits on each reply: model calls, output, writes per step, repeated reads, cached reads and deferred tools. Null keeps every default."},{"type":"null"}]},"pollPendingOperations":{"anyOf":[{"type":"boolean","description":"Text Agents on WhatsApp: when a reply ends while an integration answered that its work is still pending (`status: pending` with an `operationId`) and the same connection offers `getOperation`, Raíz checks it again on its own and the Agent answers with the result, without waiting for the contact to write. Null: disabled."},{"type":"null"}]},"protection":{"anyOf":[{"type":"object","properties":{"spamHours":{"type":"integer","description":"Hours someone stays in spam once they pass a limit (default 6). A person can lift the rule earlier by deleting it.","maximum":720,"minimum":1},"voiceCallsPerHour":{"type":"integer","description":"Inbound calls one number may make in an hour, whoever spoke (default 10). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier.","maximum":1000,"minimum":1},"voiceEnabled":{"type":"boolean","description":"Whether callers can fall into spam (default true). False: no call is ever refused for what its number consumed."},"voiceMinutesPerDay":{"type":"integer","description":"Minutes of inbound calls one number may use in 24 hours (default 60). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts, its calls are not answered.","maximum":1440,"minimum":1},"voiceSilentCallsPerHour":{"type":"integer","description":"Inbound calls of one number in an hour in which the caller never spoke (default 5). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier. A call that failed does not count.","maximum":1000,"minimum":1},"webConversationTokens":{"type":"integer","description":"Tokens one web conversation may use (default 10000000). A conversation that reaches it takes no more messages.","maximum":1000000000000,"minimum":10000},"webEnabled":{"type":"boolean","description":"Whether web chat visitors can fall into spam (default true)."},"webMessagesPerDay":{"type":"integer","description":"Messages one web visitor may send in 24 hours, across their chats (default 100). A visitor who reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts they cannot open a chat. Visitors are told apart by network address, so people who share one count together.","maximum":100000,"minimum":1},"whatsappConversationTokens":{"type":"integer","description":"Tokens (input, cached input included, plus output) one WhatsApp conversation may use since the AI last took it (default 10000000). A contact whose conversation reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier.","maximum":1000000000000,"minimum":10000},"whatsappEnabled":{"type":"boolean","description":"Whether WhatsApp contacts can fall into spam (default true)."},"whatsappRepliesPerHour":{"type":"integer","description":"Replies the AI may write in one WhatsApp conversation in an hour (default 60). A contact whose conversation reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts the AI does not answer them, and their messages are still stored for the team.","maximum":10000,"minimum":1}},"description":"This Agent's own spam limits, written whole: each limit it names replaces the organization's (`settings.protection` of the organization) for the Agent's conversations and calls, and one left out keeps the organization's. Null: the organization's limits.","additionalProperties":false},{"type":"null"}]},"reasoningEffort":{"anyOf":[{"anyOf":[{"type":"string","const":"none"},{"type":"string","const":"low"},{"type":"string","const":"medium"},{"type":"string","const":"high"},{"type":"string","const":"xhigh"}],"description":"Text Agents whose tier reasons (`arbolito/advanced`, `arbolito/top`, or an Agent already running a model that reasons): `none` answers fastest, `high` deliberates most, and `xhigh`, on `arbolito/advanced` and `arbolito/top`, deliberates past it. Null: the tier's default. A tier that does not reason refuses it (AGENT_SETTINGS_INVALID)."},{"type":"null"}]},"replyChoices":{"anyOf":[{"type":"boolean","description":"Text Agents. Let the Agent offer tap-to-answer options (WhatsApp buttons and lists, web reply options). Null: allowed."},{"type":"null"}]},"sessionCloseAfterMinutes":{"anyOf":[{"type":"integer","description":"Text Agents. Close a conversation the AI attends after this many minutes without messages. Null: 120 on WhatsApp (1440 for a conversation the business opened: a campaign's message or a machine client's), 30 on web. If the contact writes later, a new conversation opens and the Agent reads what is known of the contact and the summaries of their earlier conversations. A WhatsApp conversation a person of the team handles follows `teamCloseAfterMinutes` instead.","maximum":10080,"minimum":5},{"type":"null"}]},"teamCloseAfterMinutes":{"anyOf":[{"type":"integer","description":"Text Agents on WhatsApp. Close a conversation a person of the team handles (a handoff the AI made, the AI paused for the recipient, or the AI off for the conversation) after this many minutes without messages, whether the team answered or not. One that closes with a handoff nobody of the team answered is `unattended` and stays among the conversations to review. Closing ends the recipient's pause, so their next message opens a new conversation with the AI. Null: 1440.","maximum":10080,"minimum":5},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number","description":"Text Agents. Sampling temperature of replies. Null: 0.2 (steady answers). `arbolito/advanced` and `arbolito/top` set their own sampling and ignore it.","maximum":1,"minimum":0},{"type":"null"}]},"toolDiscovery":{"anyOf":[{"type":"boolean","description":"Retired: changes nothing. WhatsApp replies (the WhatsApp Agent Worker) offer the Agent's tools directly. Accepted so existing clients that send it stay valid."},{"type":"null"}]},"voice":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentVoiceSettings","description":"Voice Agents only."},{"type":"null"}]}},"additionalProperties":false},"RaizAgentSettingsInvalidFailure":{"type":"object","description":"The settings do not apply to this Agent's modality, or two settings contradict each other.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["AGENT_SETTINGS_INVALID"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizAgentTurnPolicy":{"type":"object","properties":{"maxOutputTokens":{"type":"integer","description":"Output tokens per model call, reasoning included. Default 4096.","maximum":16384,"minimum":256},"maxSteps":{"type":"integer","description":"Model calls one reply may make: tool rounds plus the answer. The last call never offers tools, so the contact always gets an answer. Default 16.","maximum":32,"minimum":2},"maxWritesPerStep":{"type":"integer","description":"Integration tool calls that change data (`effect: write`) one model step may run. A further one is refused with a fixed reason, and the Agent runs it in its next step after reading the first result. 0 forbids writes. Default 1.","maximum":3,"minimum":0},"repeatedReadLimit":{"type":"integer","description":"Identical reads (same tool, same arguments) one reply may run; the next is refused with a fixed reason. Omitted: no limit, as an Agent that polls a pending operation repeats one read on purpose.","maximum":10,"minimum":1},"tools":{"type":"object","patternProperties":{"^[A-Za-z0-9_-]{1,64}$":{"type":"object","properties":{"cacheSeconds":{"type":"integer","description":"Reuse this read's last successful result for the same arguments in the same conversation for this many seconds, until a write in the conversation succeeds. Never for availability that other contacts change.","maximum":86400,"minimum":1},"deferred":{"type":"boolean","description":"`arbolito/advanced` and `arbolito/top`: leave this integration tool's definition out of each request until the model finds it with its tool search, for rarely used tools of an Agent with many. Other tiers offer it as usual."},"retryDelaysSeconds":{"type":"array","items":{"type":"integer","minimum":1,"maximum":120},"description":"WhatsApp: delays before automatic retries of transient read failures, in seconds (for example [60,120]). Each entry permits one retry, at most three; [] disables retries. The turn deadline may stop earlier. Mutations and uncertain writes are never automatically repeated.","maxItems":3}},"additionalProperties":false}},"additionalProperties":false,"description":"Per-tool rules, by the name the model sees.","maxProperties":64}},"additionalProperties":false},"RaizAgentVoiceSettings":{"type":"object","required":["keywords","maxDurationSeconds","recordCalls","silenceEndCallTimeoutSeconds","similarityBoost","speed","stability","turnTimeoutSeconds","llm","voiceId"],"properties":{"backgroundSound":{"anyOf":[{"type":"object","required":["sound"],"properties":{"sound":{"anyOf":[{"type":"string","const":"office1"},{"type":"string","const":"office2"},{"type":"string","const":"restaurant"},{"type":"string","const":"city"}],"description":"The place: `office1`, `office2`, `restaurant` or `city`."},"volume":{"type":"integer","default":15,"description":"How loud it plays next to the Agent's voice, from 1 to 100. The default, 15, is subtle.","maximum":100,"minimum":1}},"description":"A place that sounds behind the Agent's voice for the whole call, so it sounds less like a quiet studio. Only the caller hears it: it never reaches the transcript. Null turns it off. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published.","additionalProperties":false},{"type":"null"}]},"capacity":{"anyOf":[{"type":"object","required":["callsPerDay","maxHoldSeconds","simultaneousCalls"],"properties":{"callsPerDay":{"anyOf":[{"type":"integer","description":"The most calls this Agent takes in a day. Null: Arbol's limit, 100000.","maximum":100000,"minimum":1},{"type":"null"}]},"maxHoldSeconds":{"anyOf":[{"type":"integer","description":"How long a caller waits on hold for a free place when the Agent is at its limit, before the call is refused. Null: no hold, the call is refused at once.","maximum":1800,"minimum":10},{"type":"null"}]},"simultaneousCalls":{"anyOf":[{"type":"integer","description":"The most calls this Agent is on at once, the calls it places included. Null: no limit of its own.","maximum":1000,"minimum":1},{"type":"null"}]}},"description":"How many calls the Agent takes and how long a caller waits on hold when it is at its limit. Null applies Arbol's defaults: no limit of its own, 100000 calls a day, and a hold of up to 180 seconds. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published.","additionalProperties":false},{"type":"null"}]},"guardrails":{"anyOf":[{"type":"object","required":["blockManipulation","blockedTopics","rules","stayOnTopic"],"properties":{"blockManipulation":{"type":"boolean","description":"End a call in which the caller tries to make the Agent ignore its instructions."},"blockedTopics":{"type":"array","items":{"anyOf":[{"type":"string","const":"sexual"},{"type":"string","const":"violence"},{"type":"string","const":"harassment"},{"type":"string","const":"selfHarm"},{"type":"string","const":"profanity"},{"type":"string","const":"religionOrPolitics"},{"type":"string","const":"medicalAndLegal"}]},"description":"Subjects the Agent must not speak about; a reply that touches one ends the call. Careful with `medicalAndLegal`: it can end the calls of an Agent whose work is to talk about specialties, exams or prescriptions. For `no clinical advice`, a rule of your own says it more exactly.","maxItems":7,"uniqueItems":true},"rules":{"type":"array","items":{"type":"object","required":["blocks","name"],"properties":{"blocks":{"type":"string","description":"What the rule blocks, in plain words: `Any diagnosis, dose or treatment recommendation`.","maxLength":1000,"minLength":1},"name":{"type":"string","description":"A short name for the rule.","maxLength":80,"minLength":1}},"additionalProperties":false},"description":"The organization's own rules. Each one is checked against every reply of the Agent, and a reply that breaks one ends the call.","maxItems":5},"stayOnTopic":{"type":"boolean","description":"Remind the Agent of its instructions throughout a long call, so it stays on its subject. It never ends a call."}},"description":"Checks that run beside the Agent's instructions on every call. Every check other than `stayOnTopic` ends the call when it triggers, and the caller may hear the start of the reply before it is cut. Null turns every check off. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published.","additionalProperties":false},{"type":"null"}]},"ignoreBackgroundVoices":{"type":"boolean","description":"Keep other people talking near the caller out of the conversation, so they neither answer for the caller nor interrupt the Agent. False turns it off. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published."},"keypadInput":{"type":"boolean","description":"Let callers type on their phone's keypad. What they type reaches the Agent as their message, and the Agent is told it may ask for a number that is long or easy to mishear (an identification number, a phone number) to be typed, ending with #. False ignores the keypad. On for an Agent that never set it; left out of a write, the Agent keeps its current value. Phone calls only. Applies to future calls once the Agent is published."},"keywords":{"type":"array","items":{"type":"string","maxLength":64,"minLength":1},"description":"Names and terms the transcriber should favor (people, places, products).","maxItems":50,"uniqueItems":true},"maxDurationMessage":{"anyOf":[{"type":"string","description":"What the Agent says when a call reaches `maxDurationSeconds`, instead of the line going silent. Null: it says nothing. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published.","maxLength":300,"minLength":1},{"type":"null"}]},"maxDurationSeconds":{"anyOf":[{"type":"integer","maximum":7200,"minimum":30,"description":"Hard limit of one call. Null: 600 seconds."},{"type":"null"}]},"nonInterruptingWords":{"type":"array","items":{"type":"string","maxLength":40,"minLength":1},"description":"Short words a caller says while listening (`ajá`, `sí`, `ok`) that must not cut the Agent off. Matched whole, whatever the case. An empty list removes them all. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published.","maxItems":50,"uniqueItems":true},"pronunciations":{"type":"array","items":{"type":"object","required":["spokenAs","term"],"properties":{"spokenAs":{"type":"string","description":"How to say it, written the way it sounds: `Yeison`, `ce pe a pe`.","maxLength":120,"minLength":1},"term":{"type":"string","description":"The word or phrase as the Agent writes it: a surname, a site, a medicine. Matched as a whole word, whatever the case.","maxLength":64,"minLength":1}},"additionalProperties":false},"description":"How the Agent pronounces the organization's own words: each `term` is spoken as its `spokenAs`. Terms are matched whatever their case, so a term repeated in another case keeps only its first entry. An empty list removes them all. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published.","maxItems":100},"recordCalls":{"type":"boolean","description":"Keep the call recording (copied to Raíz after the call)."},"redactKeypadInput":{"type":"boolean","default":false,"description":"Replace numbers entered on the phone keypad with <REDACTED> in stored transcripts and analysis. False (the default) keeps them visible. Applies to future calls; the Agent still receives the digits during the call."},"reasoningEffort":{"anyOf":[{"anyOf":[{"type":"string","const":"none"},{"type":"string","const":"minimal"},{"type":"string","const":"low"},{"type":"string","const":"medium"},{"type":"string","const":"high"},{"type":"string","const":"xhigh"},{"type":"string","const":"max"}],"description":"Reasoning effort on calls, when supported by the selected model. Null uses the model default."},{"type":"null"}]},"replyTiming":{"anyOf":[{"type":"string","const":"patient"},{"type":"string","const":"normal"},{"type":"string","const":"quick"}],"description":"How soon the Agent replies once the caller pauses: `patient` waits longer, for people who think aloud or speak slowly; `normal`; `quick` replies sooner. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published."},"responseDelayMessages":{"type":"boolean","description":"Speak a short contextual message while preparing a slow response. False disables automatic delay messages. Omitted preserves the current runtime setting."},"silenceEndCallTimeoutSeconds":{"anyOf":[{"anyOf":[{"type":"number","const":0},{"type":"integer","maximum":600,"minimum":10}],"description":"Hang up after this many seconds (10 to 600) without the caller speaking. `0`: never hang up on silence. Null: the platform default, 120 seconds."},{"type":"null"}]},"similarityBoost":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}]},"speed":{"anyOf":[{"type":"number","maximum":1.2,"minimum":0.7},{"type":"null"}]},"stability":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}]},"toolCallSound":{"anyOf":[{"anyOf":[{"type":"string","const":"typing"},{"type":"string","const":"music1"},{"type":"string","const":"music2"},{"type":"string","const":"music3"},{"type":"string","const":"music4"}],"description":"What the caller hears while one of the Agent's tools runs, instead of silence: `typing` (a keyboard) or waiting music (`music1` to `music4`). Null: silence. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published."},{"type":"null"}]},"turnTimeoutSeconds":{"anyOf":[{"type":"integer","description":"Seconds to wait for the caller before prompting again. Null: the platform default.","maximum":30,"minimum":1},{"type":"null"}]},"uninterruptibleGreeting":{"type":"boolean","description":"Say the first message whole: the caller cannot cut it off. For a greeting that carries a notice the caller must hear. False lets the caller interrupt it. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published."},"voiceVersion":{"anyOf":[{"type":"string","const":"classic"},{"type":"string","const":"turbo"}],"description":"Which version of the voice speaks. `classic` (what every Agent has spoken with) or `turbo`: it answers sooner and with more expression, ignores `speed`, and a voice can sound somewhat different in it. Left out, the Agent keeps its current value; until it is first set, calls keep behaving as they did. Applies to future calls once the Agent is published."},"backupModels":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"`arbolito/agile`: quickest and least expensive, for direct conversations. `arbolito/balanced`: more deliberate answers at moderate cost. `arbolito/advanced`: strong reasoning for complex instructions and many tools, with an adjustable `reasoningEffort`. `arbolito/top`: the most capable, for the hardest cases, with an adjustable `reasoningEffort` up to `xhigh`. Every tier reads images and PDF documents."},"minItems":1,"maxItems":3,"uniqueItems":true,"description":"Ordered backup tiers when the primary voice model fails. Null restores the runtime default. Omitted preserves the current runtime setting. An empty list is not allowed because calls need a fallback."},{"type":"null"}]},"llm":{"anyOf":[{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"The tier the Agent thinks with on calls. `arbolito/agile`: quickest and least expensive, for direct conversations. `arbolito/balanced`: more deliberate answers at moderate cost. `arbolito/advanced`: strong reasoning for complex instructions and many tools, with an adjustable `reasoningEffort`. `arbolito/top`: the most capable, for the hardest cases, with an adjustable `reasoningEffort` up to `xhigh`. Every tier reads images and PDF documents. Null: the default, as `arbolito/agile`."},{"type":"null"}]},"voiceId":{"anyOf":[{"type":"string","pattern":"^vce_[A-Za-z0-9_-]{20,156}$","description":"A voice from `listVoices`. Null uses the default voice."},{"type":"null"}]}},"additionalProperties":false},"RaizAgentWorkflow":{"type":"object","required":["formatVersion","nodes","startNodeId"],"properties":{"formatVersion":{"type":"number","const":1,"description":"The format of this document."},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","required":["edges","id","instructions","type"],"properties":{"edges":{"type":"array","items":{"type":"object","required":["condition","to"],"properties":{"condition":{"anyOf":[{"type":"object","required":["type","when"],"properties":{"type":{"type":"string","const":"semantic"},"when":{"type":"string","description":"A condition the Agent judges from the conversation, such as: The contact says the order already shipped.","maxLength":1000,"minLength":1}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"unconditional"}},"additionalProperties":false,"description":"Always holds. A conversation node's last edge must be unconditional: its fallback, followed when no earlier condition holds."}]},"to":{"type":"string","examples":["collect_details"],"pattern":"^[a-z][a-z0-9_-]{0,63}$","description":"The node this edge leads to."}},"additionalProperties":false},"description":"Where the conversation goes next, tried in order: the first edge whose condition holds is followed. Each leads to a different node, and the last must be unconditional.","maxItems":9},"id":{"type":"string","description":"The node's id within this workflow, chosen by its author. Keep it across edits: a conversation's progress refers to it.","examples":["collect_details"],"pattern":"^[a-z][a-z0-9_-]{0,63}$"},"instructions":{"type":"string","description":"What the Agent does at this step of the conversation.","maxLength":10000,"minLength":1},"type":{"type":"string","const":"converse"}},"additionalProperties":false,"description":"The Agent talks with the contact under these instructions until one of the node's edges holds."},{"type":"object","required":["arguments","edges","id","tool","type"],"properties":{"arguments":{"type":"object","patternProperties":{"^[A-Za-z0-9_-]{1,128}$":{"description":"Always this value."}},"additionalProperties":false,"description":"Every parameter the call sends, by name, as constant JSON sent exactly as written: the model chooses none of them, and text such as `{{contact_name}}` is not filled in."},"edges":{"type":"array","items":{"type":"object","required":["condition","to"],"properties":{"condition":{"type":"object","required":["outcome","type"],"properties":{"outcome":{"anyOf":[{"type":"string","const":"success"},{"type":"string","const":"failure"}],"description":"How the node's tool call ended. A result that reports a failure and a write whose effect is unknown both count as `failure`."},"type":{"type":"string","const":"result"}},"additionalProperties":false},"to":{"type":"string","examples":["collect_details"],"pattern":"^[a-z][a-z0-9_-]{0,63}$","description":"The node this edge leads to."}},"additionalProperties":false},"description":"Where the conversation goes after the call: one edge for success and one for failure, to different nodes.","maxItems":2},"id":{"type":"string","description":"The node's id within this workflow, chosen by its author. Keep it across edits: a conversation's progress refers to it.","examples":["collect_details"],"pattern":"^[a-z][a-z0-9_-]{0,63}$"},"tool":{"type":"string","description":"One of the Agent's assigned tools, by its tool name.","pattern":"^[A-Za-z0-9_.-]{1,128}$"},"type":{"type":"string","const":"tool"}},"additionalProperties":false,"description":"Runs this tool with these arguments whenever the conversation reaches the node, without asking the model."},{"type":"object","required":["id","type"],"properties":{"id":{"type":"string","description":"The node's id within this workflow, chosen by its author. Keep it across edits: a conversation's progress refers to it.","examples":["collect_details"],"pattern":"^[a-z][a-z0-9_-]{0,63}$"},"type":{"type":"string","const":"end"}},"additionalProperties":false,"description":"Finish the conversation (on a call, hang up)."}]},"description":"The steps. Every node must be reachable from the start, the graph has no cycles, and every path finishes at an end node.","maxItems":64,"minItems":1},"startNodeId":{"type":"string","examples":["collect_details"],"pattern":"^[a-z][a-z0-9_-]{0,63}$","description":"The node the conversation starts at."}},"additionalProperties":false},"RaizAgentWorkflowInvalidFailure":{"type":"object","description":"The workflow breaks the graph rules, leaves a step without a way forward, or uses a tool this Agent cannot run there. `issues` says where.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["AGENT_WORKFLOW_INVALID"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/RaizAgentWorkflowInvalidFailureData"}}},"RaizAgentWorkflowInvalidFailureData":{"type":"object","required":["issues"],"properties":{"issues":{"type":"array","items":{"type":"object","required":["code","path"],"properties":{"code":{"type":"string","description":"Why, as a label: missing_fallback, missing_result_edge, unknown_node, unknown_start_node, unreachable_node, cycle, duplicate_edge, unknown_tool, ambiguous_tool, write_tool_not_supported, unknown_parameter, missing_required_parameter…"},"path":{"type":"string","description":"RFC 6901 pointer to the refused field, such as `/workflow/nodes/2/edges/0/to`."}},"additionalProperties":false},"maxItems":20}},"additionalProperties":false},"RaizAssigneeUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizAssigneeUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizAssigneeUnavailableFailure":{"type":"object","description":"That person cannot take conversations in this organization. `listAssignees` names who can.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["ASSIGNEE_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizBulletin":{"type":"object","required":["agent","createdAt","endsAt","id","startsAt","status","text","updatedAt"],"properties":{"agent":{"anyOf":[{"$ref":"#/components/schemas/RaizBulletinAgent","description":"The one Agent that applies it; null for every Agent of the organization."},{"type":"null"}]},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"endsAt":{"anyOf":[{"type":"string","format":"date-time","description":"When Agents stop applying it, later than its start. Null keeps it until it is deleted."},{"type":"null"}]},"id":{"type":"string","description":"Bulletin id.","examples":["bul_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^bul_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"startsAt":{"type":"string","format":"date-time","description":"When Agents start applying it."},"status":{"anyOf":[{"type":"string","const":"scheduled"},{"type":"string","const":"active"},{"type":"string","const":"ended"}],"description":"`scheduled`: it has not started and no Agent reads it yet. `active`: Agents apply it. `ended`: its period is over and no Agent reads it."},"text":{"type":"string","description":"What is happening, in the words the Agents read."},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"}},"additionalProperties":false},"RaizBulletinAgent":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"name":{"type":"string"}},"additionalProperties":false},"RaizBulletinLimitReachedError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizBulletinLimitReachedFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizBulletinLimitReachedFailure":{"type":"object","description":"The organization already has 30 bulletins in force or scheduled. End or delete one before adding another.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["BULLETIN_LIMIT_REACHED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizBulletinPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizBulletin"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizBulletinPageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizBulletinPage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizBulletinPeriodInvalidError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizBulletinPeriodInvalidFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizBulletinPeriodInvalidFailure":{"type":"object","description":"A bulletin must end after it starts, and a new one must end in the future.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["BULLETIN_PERIOD_INVALID"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizBulletinResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizBulletin"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizBusinessHours":{"type":"object","required":["closedDates","outsideHoursMessage","timeZone","windows"],"properties":{"closedDates":{"type":"array","items":{"type":"string","format":"date"},"description":"Local dates (`YYYY-MM-DD`) closed all day, such as holidays.","maxItems":100,"uniqueItems":true},"closingGraceMinutes":{"anyOf":[{"anyOf":[{"type":"number","const":15},{"type":"number","const":30},{"type":"number","const":60},{"type":"number","const":120}],"description":"Minutes after a closing during which a conversation in progress at it is still attended: the AI keeps answering, with its tools, and no notice is sent. In progress: the contact wrote before the closing, and the AI or a person answered within these minutes before it, or since (a notice is not an answer). New conversations get the notice as always. Null or absent: off."},{"type":"null"}]},"outsideHoursMessage":{"type":"string","description":"What whoever writes outside the hours receives, once per number and closed period (until the hours open again), whether the conversation's AI is on, off or paused. With `outsideHoursTemplate`, the template goes instead, and this text only when WhatsApp refuses the template. The notice is never taken as an answer: the AI answers what the contact wrote when a person turns it on or resumes it in business hours.","maxLength":1000,"minLength":1},"timeZone":{"anyOf":[{"type":"string","description":"IANA time zone of the windows. Null uses the organization's.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},{"type":"null"}]},"windows":{"type":"array","items":{"$ref":"#/components/schemas/RaizBusinessHoursWindow","description":"Open on these days from `from` until `to`, local time."},"description":"Several windows may share a day, for a break at midday or an afternoon shift.","maxItems":28,"minItems":1},"outsideHoursTemplate":{"anyOf":[{"$ref":"#/components/schemas/RaizOutsideHoursTemplate","description":"An approved template of the number's WhatsApp Business Account, by name and language."},{"type":"null"}],"description":"Send the notice as this approved WhatsApp template instead of `outsideHoursMessage`: a template of the number's account with no variables and no document, image or video header (in `list_templates`: `sendable`, with `parameterCount` 0). WhatsApp's approval is checked when the hours are saved. If WhatsApp refuses the template when a notice goes (deleted, paused or disabled since), `outsideHoursMessage` goes instead. Null or absent: the notice is `outsideHoursMessage`."}},"additionalProperties":false},"RaizBusinessHoursWindow":{"type":"object","required":["days","from","to"],"properties":{"days":{"type":"array","items":{"anyOf":[{"type":"string","const":"MO"},{"type":"string","const":"TU"},{"type":"string","const":"WE"},{"type":"string","const":"TH"},{"type":"string","const":"FR"},{"type":"string","const":"SA"},{"type":"string","const":"SU"}]},"description":"RFC 5545 weekdays the window applies to.","maxItems":7,"minItems":1,"uniqueItems":true},"from":{"type":"string","description":"Local wall-clock time `HH:MM` (24-hour).","examples":["08:00"],"pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"to":{"type":"string","description":"Closing time `HH:MM`, exclusive; `24:00` closes at midnight. Must be after `from`: split a window that crosses midnight in two.","examples":["18:00"],"pattern":"^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$"}},"additionalProperties":false},"RaizCallInProgressFailure":{"type":"object","description":"A voice conversation closes by itself when its call ends; it cannot be closed by hand.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CALL_IN_PROGRESS"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizCallRejectedFailure":{"type":"object","description":"The call could not be placed. Check the destination number and the line.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CALL_REJECTED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizCampaign":{"type":"object","required":["agentId","channelId","channelType","contactHours","createdAt","endedAt","errorAt","errorCode","firstMessage","id","instructions","maxAttempts","metadata","name","progress","retryAfterMinutes","retryOn","scheduledEndAt","scheduledStartAt","startedAt","status","template","timeZone","updatedAt","version","waitingUntilAt"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelId":{"anyOf":[{"type":"string","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"The line calls or messages leave from. Null: the Agent's own."},{"type":"null"}]},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"}],"description":"How the campaign reaches people: by call or by WhatsApp."},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.","maxItems":14},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"endedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"errorAt":{"anyOf":[{"type":"string","format":"date-time","description":"When `errorCode` was first seen."},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string","description":"Why the campaign cannot reach anyone now, such as `TEMPLATE_NOT_APPROVED` or `WHATSAPP_RATE_LIMITED`. Null when nothing is wrong. Cleared when a call or message gets through or the campaign changes; nobody loses an attempt to it."},{"type":"null"}]},"firstMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxAttempts":{"type":"integer","maximum":10,"minimum":1},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"name":{"type":"string"},"progress":{"$ref":"#/components/schemas/RaizCampaignProgress","description":"How many recipients are in each state."},"retryAfterMinutes":{"type":"integer","minimum":1},"retryOn":{"type":"array","items":{"anyOf":[{"type":"string","const":"no_answer"},{"type":"string","const":"failure"},{"type":"string","const":"not_delivered"}],"description":"On a call, `no_answer`: nobody answered, the line was busy, or the Agent heard no one; `failure`: it was answered but its analysis judged it unsuccessful. On WhatsApp, `no_answer`: it arrived and the person has not replied once `retryAfterMinutes` pass; `not_delivered`: it did not arrive."},"maxItems":2},"scheduledEndAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"scheduledStartAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","const":"queued"},{"type":"string","const":"running"},{"type":"string","const":"paused"},{"type":"string","const":"completed"},{"type":"string","const":"cancelled"},{"type":"string","const":"failed"}],"description":"`queued`: not started yet (or its start is scheduled). `running`: reaching due recipients. `paused`: started, then paused; what is in progress finishes. `completed`: no recipient is left to reach."},"template":{"anyOf":[{"$ref":"#/components/schemas/RaizCampaignTemplate","description":"The approved template sent to each recipient. WhatsApp only allows a business to start a conversation with one."},{"type":"null"}]},"timeZone":{"type":"string"},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"version":{"type":"integer","minimum":1},"waitingUntilAt":{"anyOf":[{"type":"string","format":"date-time","description":"When it tries again after `errorCode`, later each time the same problem lasts: from fifteen minutes up to six hours."},{"type":"null"}]},"readiness":{"$ref":"#/components/schemas/RaizCampaignReadiness","description":"Whether the campaign can start, checked against its Agent, line, template, recipients and the organization's balance without reaching anyone. Present only when expanded."},"recipients":{"$ref":"#/components/schemas/RaizCampaignRecipientPage","description":"The campaign's recipients in the order they were added, each with its latest attempt. Present only when expanded."},"results":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaignResult"},"description":"What people answered, for each data definition with options their Agent collects that has an answer yet. Answers arrive when a conversation closes and is analyzed, so they can keep arriving after the campaign ends.","maxItems":100}},"additionalProperties":false},"RaizCampaignAgentNotReadyFailure":{"type":"object","description":"The campaign's Agent must be an active text Agent: it answers whoever replies to the message.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CAMPAIGN_AGENT_NOT_READY"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizCampaignBlocker":{"type":"object","required":["code"],"properties":{"address":{"type":"string","description":"The recipient it is about, when it is one."},"code":{"type":"string","description":"The error `startCampaign` would refuse with: `CAMPAIGN_AGENT_NOT_READY`, `CAMPAIGN_NO_RECIPIENTS`, `CAMPAIGN_VARIABLE_MISSING`, `CHANNEL_NOT_READY`, `CREDITS_EXHAUSTED` (see `estimate`), a `TEMPLATE_*` code, `UPSTREAM_UNAVAILABLE` or `VOICE_AGENT_NOT_READY`."},"variable":{"type":"string","description":"The variable it lacks, when it is one."}},"additionalProperties":false},"RaizCampaignEstimate":{"type":"object","required":["callMinutes","covered","credits","degraded","enforced","people"],"properties":{"callMinutes":{"anyOf":[{"type":"object","required":["calls","perCall"],"properties":{"calls":{"type":"integer","description":"How many of those calls the figure comes from.","minimum":0},"perCall":{"type":"number","description":"Minutes billed per call on average, a call nobody answered counting zero.","minimum":0}},"description":"Calls: what each call is counted at, from the organization's own recent outbound calls; an estimate, since a call's length is known only once it happens. Null on WhatsApp, and when the organization has made too few such calls to tell: the calls' minutes are then not counted and `credits` is null.","additionalProperties":false},{"type":"null"}]},"covered":{"type":"boolean","description":"Whether the organization's balance covers `credits`, or the organization is never stopped at zero, as billing answers it now. True when nothing was counted, or billing did not answer (`degraded`)."},"credits":{"anyOf":[{"type":"number","description":"What reaching each of `people` once would cost at the organization's rates, in credits (one credit is one US dollar), valued as billing values what is used. On WhatsApp it counts each opening message, its template and the conversation it opens; on calls, each call's minutes at `callMinutes.perCall`. Never counted: the attempts after the first, the replies, the Agent's answers, what its tools use and a line's own charge when the plan bills it apart. What the plan includes is not discounted, so the real cost can be lower. Null when nothing could be counted or billing did not value it.","minimum":0},{"type":"null"}]},"degraded":{"type":"boolean","description":"Billing did not answer in time: `credits` may be null, and `covered` is assumed."},"enforced":{"type":"boolean","description":"Whether a balance that does not cover what is used stops this organization's work now. When it does and `covered` is false, the campaign cannot start (`CREDITS_EXHAUSTED`); while it does not, it starts anyway. False when nothing was counted."},"people":{"type":"integer","description":"The recipients still to be reached, each counted once.","minimum":0}},"additionalProperties":false},"RaizCampaignHeaderMissingFailure":{"type":"object","description":"A recipient has no file that fits the template's header (a PDF for a document, JPEG or PNG for an image, MP4 for a video). Each recipient brings its own as `header`.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CAMPAIGN_HEADER_MISSING"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizCampaignHeaderNotStoredFailure":{"type":"object","description":"The campaign and its recipients were saved, but some recipients' files were not. Send those recipients again with `addRecipients` on this campaign: their numbers are kept and their files stored. Do not create the campaign again.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CAMPAIGN_HEADER_NOT_STORED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/RaizCampaignHeaderNotStoredFailureData"}}},"RaizCampaignHeaderNotStoredFailureData":{"type":"object","required":["campaignId"],"properties":{"campaignId":{"type":"string","description":"The campaign, saved with its recipients."}},"additionalProperties":false},"RaizCampaignNoRecipientsFailure":{"type":"object","description":"The campaign has nobody left to reach. Add recipients first.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CAMPAIGN_NO_RECIPIENTS"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizCampaignPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaign"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizCampaignPageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizCampaignPage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCampaignProgress":{"type":"object","required":["answered","buttons","completed","delivered","failed","inProgress","noAnswer","noButton","noReply","pending","read","recipients","replied","succeeded"],"properties":{"answered":{"type":"integer","description":"Calls: recipients whose latest call someone answered and its analysis judged.","minimum":0},"buttons":{"type":"array","items":{"type":"object","required":["recipients","text"],"properties":{"recipients":{"type":"integer","description":"How many recipients have it as their last press.","minimum":0},"text":{"type":"string","description":"The button's text, as the template shows it.","maxLength":256,"minLength":1}},"additionalProperties":false},"description":"WhatsApp: the template's quick-reply buttons people pressed, most pressed first, each with how many recipients pressed it last. A recipient counts once, under their latest press. A button nobody pressed is not listed. Read from the reply itself: a written answer is not a button.","maxItems":50},"completed":{"type":"integer","minimum":0},"delivered":{"type":"integer","description":"WhatsApp: recipients who received a message.","minimum":0},"failed":{"type":"integer","minimum":0},"inProgress":{"type":"integer","minimum":0},"noAnswer":{"type":"integer","description":"Calls: recipients who failed because their calls ran out without anyone answering. A voicemail counts here.","minimum":0},"noButton":{"type":"integer","description":"WhatsApp: recipients a message reached (`deliveredAt`) who pressed none of its buttons, whether or not they wrote. People still pending, or whose message never arrived, are not counted.","minimum":0},"noReply":{"type":"integer","description":"WhatsApp: recipients a message reached who neither pressed a button nor wrote: `noButton` less those who answered in writing.","minimum":0},"pending":{"type":"integer","minimum":0},"read":{"type":"integer","description":"WhatsApp: recipients who read a message.","minimum":0},"recipients":{"type":"integer","minimum":0},"replied":{"type":"integer","description":"WhatsApp: recipients who replied.","minimum":0},"succeeded":{"type":"integer","description":"Recipients whose latest conversation's analysis judged it successful.","minimum":0}},"additionalProperties":false},"RaizCampaignReadiness":{"type":"object","required":["blockers","estimate","preview","ready"],"properties":{"blockers":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaignBlocker"},"description":"What has to be fixed first. Empty when it can start."},"estimate":{"$ref":"#/components/schemas/RaizCampaignEstimate","description":"What reaching each pending recipient once would cost, checked against the organization's balance without reaching anyone."},"preview":{"anyOf":[{"type":"string","description":"WhatsApp: the message as the first pending recipient would read it. Null when it cannot be told yet."},{"type":"null"}]},"ready":{"type":"boolean","description":"Whether `startCampaign` would accept it now."}},"additionalProperties":false},"RaizCampaignRecipientInput":{"type":"object","required":["address"],"properties":{"address":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"contactId":{"type":"string","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"The contact this recipient is. Omitted: the contact that owns `address` when the campaign first reaches them, created when the organization has none."},"familyName":{"anyOf":[{"type":"string","maxLength":200,"minLength":1,"description":"See `givenName`."},{"type":"null"}]},"firstMessage":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1,"description":"What the Agent says first when calling this recipient, instead of the campaign's. Calls only: a WhatsApp campaign opens with its template."},{"type":"null"}]},"givenName":{"anyOf":[{"type":"string","maxLength":200,"minLength":1,"description":"The person's name, saved on their contact when the campaign first reaches them, only if the contact has no name yet."},{"type":"null"}]},"header":{"$ref":"#/components/schemas/RaizTemplateHeaderFile","description":"WhatsApp only: this recipient's file for a template whose header is a document, image or video (an appointment's receipts, a ticket), shown above its text. Kept privately with the campaign and sent with this recipient's message; a number the campaign already has keeps its first file, and replacing the whole list replaces them. A request carries at most 2 MiB: send a long list with files in parts with `addRecipients`."},"instructions":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1,"description":"Extra instructions for this recipient, after the campaign's."},{"type":"null"}]},"variables":{"type":"object","patternProperties":{"^[A-Za-z_][A-Za-z0-9_]{0,63}$":{"type":"string","maxLength":1000}},"additionalProperties":false,"description":"Values for the `{{name}}` variables a WhatsApp template's parameters, or the Agent's instructions, first message or this campaign's texts on a call, reference. A reference means the variable that is the same word, whatever its accents and case: `{{País}}` reads `pais`, and an exact name wins. Raíz always provides `contact_name`, `contact_given_name` and `contact_phone`, and on a call also `contact_id`, `conversation_id` and `bulletins` (the business bulletins in force); a recipient's values never replace them.","maxProperties":30}},"additionalProperties":false},"RaizCampaignRecipientPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"type":"object","required":["address","attemptCount","button","contact","contactId","createdAt","deliveredAt","errorCode","familyName","firstMessage","givenName","id","instructions","lastAttempt","nextAttemptAt","readAt","repliedAt","results","status","updatedAt","variables"],"properties":{"address":{"type":"string"},"attemptCount":{"type":"integer","minimum":0},"button":{"anyOf":[{"type":"object","required":["pressedAt","text"],"properties":{"pressedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"text":{"type":"string","description":"The button's text, as the template shows it.","maxLength":256,"minLength":1}},"description":"WhatsApp: the last button of the template this person pressed, and when. A later press replaces an earlier one, also after their conversation closed. Null when they pressed none: a written answer is not a button.","additionalProperties":false},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Contact id.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"name":{"anyOf":[{"type":"string","description":"Their saved name, else the name they show on WhatsApp; null when the organization has neither."},{"type":"null"}]}},"description":"The contact this person is: the one the list named, else the one that owns the number. Null when the organization has none yet; the campaign creates it when it reaches them.","additionalProperties":false},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","description":"Contact id.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","description":"WhatsApp: when this person first received a message of the campaign."},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string","description":"Why the recipient failed, or why its latest message did not arrive while it waits for a retry: `NO_ANSWER` when nobody answered, `CALL_REJECTED` when the call could not be placed, `CALL_FAILED` when it did not achieve its goal, `CONTACT_SUPPRESSED` when a suppression rule forbids the number, a `WHATSAPP_*` code on WhatsApp."},{"type":"null"}]},"familyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"givenName":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","description":"Campaign recipient id.","examples":["rcp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^rcp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAttempt":{"anyOf":[{"type":"object","required":["conversationId","outcome","startedAt","status"],"properties":{"conversationId":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"outcome":{"anyOf":[{"anyOf":[{"type":"string","const":"success"},{"type":"string","const":"failure"},{"type":"string","const":"unknown"}]},{"type":"null"}]},"startedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"status":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"closed"}]}},"description":"The latest call or message to this recipient, or their answer when it came after that conversation closed; its transcript is `getConversation`.","additionalProperties":false},{"type":"null"}]},"nextAttemptAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","description":"WhatsApp: when this person first read a message of the campaign. Some people turn read receipts off."},{"type":"null"}]},"repliedAt":{"anyOf":[{"type":"string","format":"date-time","description":"WhatsApp: when this person first replied."},{"type":"null"}]},"results":{"type":"array","items":{"type":"object","required":["definitionKey","label","value"],"properties":{"definitionKey":{"type":"string","description":"The key of the data definition that read it."},"label":{"type":"string","description":"The answer, as people read it."},"value":{"type":"string","description":"The key of the answer's option."}},"additionalProperties":false},"description":"What this person answered, from their conversations: the latest for each data definition with options their Agent collects. Empty until a conversation they answered closes and is analyzed.","maxItems":100},"status":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"in_progress"},{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"cancelled"}],"description":"`pending`: waiting for its (next) call or message. `in_progress`: being called, or on WhatsApp waiting for a reply until a reminder is due. `completed`: a call succeeded or ended normally with an inconclusive analysis; on WhatsApp, the message arrived. `failed`: its attempts ran out, or it cannot be reached."},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"variables":{"type":"object","patternProperties":{"^[A-Za-z_][A-Za-z0-9_]{0,63}$":{"type":"string","maxLength":1000}},"additionalProperties":false,"description":"Values for the `{{name}}` variables a WhatsApp template's parameters, or the Agent's instructions, first message or this campaign's texts on a call, reference. A reference means the variable that is the same word, whatever its accents and case: `{{País}}` reads `pais`, and an exact name wins. Raíz always provides `contact_name`, `contact_given_name` and `contact_phone`, and on a call also `contact_id`, `conversation_id` and `bulletins` (the business bulletins in force); a recipient's values never replace them.","maxProperties":30}},"additionalProperties":false},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizCampaignResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizCampaign"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCampaignResult":{"type":"object","required":["definition","values"],"properties":{"definition":{"type":"object","required":["key","name"],"properties":{"key":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false},"values":{"type":"array","items":{"type":"object","required":["key","label","people"],"properties":{"key":{"type":"string","description":"The key of the answer's option."},"label":{"type":"string","description":"The answer, as people read it."},"people":{"type":"integer","description":"How many recipients it is the latest answer of. Each counts once, however many conversations they had.","minimum":1}},"additionalProperties":false},"maxItems":100}},"additionalProperties":false},"RaizCampaignTemplate":{"type":"object","required":["language","name","parameters"],"properties":{"language":{"type":"string","description":"The template's language: WhatsApp's code (`es`, `es_MX`) or a BCP 47 tag (`es-MX`).","maxLength":15,"minLength":2},"name":{"type":"string","description":"An approved template of the line's WhatsApp Business Account. Its body may have variables; when its header is a document, image or video, each recipient brings its own file (`header`). Button parameters cannot be used in a campaign.","maxLength":512,"minLength":1},"parameters":{"type":"array","items":{"type":"string","maxLength":1024},"description":"The template's body parameters, in order. Each is a text that may reference each recipient's `variables` as `{{name}}`, for example `{{patient_name}}` or `Dr. {{doctor}}`.","maxItems":20}},"additionalProperties":false},"RaizCampaignTemplateInput":{"type":"object","required":["language","name"],"properties":{"language":{"type":"string","description":"The template's language: WhatsApp's code (`es`, `es_MX`) or a BCP 47 tag (`es-MX`).","maxLength":15,"minLength":2},"name":{"type":"string","description":"An approved template of the line's WhatsApp Business Account. Its body may have variables; when its header is a document, image or video, each recipient brings its own file (`header`). Button parameters cannot be used in a campaign.","maxLength":512,"minLength":1},"parameters":{"type":"array","items":{"type":"string","maxLength":1024},"description":"The template's body parameters, in order. Each is a text that may reference each recipient's `variables` as `{{name}}`, for example `{{patient_name}}` or `Dr. {{doctor}}`.","maxItems":20}},"additionalProperties":false},"RaizCampaignVariableMissingFailure":{"type":"object","description":"A recipient has no value for a variable the template's parameters use. An empty value cannot be sent on WhatsApp.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CAMPAIGN_VARIABLE_MISSING"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/RaizCampaignVariableMissingFailureData"}}},"RaizCampaignVariableMissingFailureData":{"type":"object","required":["address","variable"],"properties":{"address":{"type":"string","description":"The first recipient that lacks the value."},"variable":{"type":"string","description":"The variable of the template's parameters it lacks."}},"additionalProperties":false},"RaizCancelTaskServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCancelTaskServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCancelTaskServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizChange":{"type":"object","required":["action","author","authorId","contactId","createdAt","fields","id","reason","resourceId","resourceType","sourceId"],"properties":{"action":{"anyOf":[{"type":"string","const":"created"},{"type":"string","const":"updated"},{"type":"string","const":"deleted"}]},"author":{"anyOf":[{"type":"string","const":"person"},{"type":"string","const":"ai"},{"type":"string","const":"system"},{"type":"string","const":"import"},{"type":"string","const":"provider"}],"description":"Who wrote the value."},"authorId":{"anyOf":[{"type":"string","description":"The person or client that made the change, when one did (the AI and Raíz itself have none)."},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","description":"The contact the changed resource belongs to.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"fields":{"type":"object","patternProperties":{"^.*$":{"type":"object","required":["from","omitted","to"],"properties":{"from":{"description":"The value before the change."},"omitted":{"type":"boolean","description":"True when `from` or `to` was larger than 2048 bytes of JSON and is shown as null."},"to":{"description":"The value after the change."}},"additionalProperties":false}},"description":"For an update, each changed field (SQL column name) with its value before and after. Empty for creations and deletions.","maxProperties":100},"id":{"type":"string","description":"Change id.","examples":["chg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^chg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"reason":{"anyOf":[{"type":"string","description":"Why, when the writer said so: `merge`, `contact_import`, `conversation_analysis`, `scheduler`, `cancel` and `retry` (tasks), `erasure:<reason>` (a contact erased for good: the only trace left of it), …"},{"type":"null"}]},"resourceId":{"type":"string","description":"Id of the changed resource."},"resourceType":{"type":"string","description":"What changed: `contact`, `contact_point`, `contact_identifier`, `agent`, `agent_tool` (its id is the Agent's), `channel`, `definition`, `knowledge_document`, `campaign`, `suppression`, `bulletin`, `conversation_view`, `provider_account`, `fact`, `task` (a person cancelled or retried it)."},"sourceId":{"anyOf":[{"type":"string","description":"The evidence: the conversation an analysis came from, the task of an import, the survivor of a merge."},{"type":"null"}]}},"additionalProperties":false},"RaizChangePage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizChange"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizChangePageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizChangePage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizChannel":{"type":"object","required":["address","agent","channelType","aiCoveragePercent","businessHours","createdAt","id","inboundEnabled","name","outboundEnabled","provider","providerAccountId","ready","setupExpiresAt","status","updatedAt","version","publication","widget"],"properties":{"address":{"anyOf":[{"type":"string","description":"E.164 number for voice and WhatsApp; for web, the first https origin the widget may be embedded in. Null while a WhatsApp setup is pending."},{"type":"null"}]},"agent":{"anyOf":[{"$ref":"#/components/schemas/RaizChannelAgent","description":"The Agent the channel is assigned to."},{"type":"null"}]},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}],"description":"`voice`: a phone number or the organization's own carrier, for calls. `whatsapp`: a WhatsApp number. `web`: the chat widget on the organization's sites."},"aiCoveragePercent":{"type":"integer","minimum":0,"maximum":100,"description":"Percentage of new inbound WhatsApp conversations assigned to AI. Zero keeps conversations human-managed until explicitly activated. Existing assignments stay unchanged."},"businessHours":{"anyOf":[{"$ref":"#/components/schemas/RaizBusinessHours","description":"WhatsApp numbers: when the number attends, whichever Agent answers it. Outside them the AI runs no model and whoever writes gets the outside-hours notice once per closed period, even with the AI off or paused. Null: it attends at all hours."},{"type":"null"}]},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"id":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"inboundEnabled":{"type":"boolean","description":"Calls and messages from people are answered. Off: inbound traffic is ignored (a web widget is switched off)."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"outboundEnabled":{"type":"boolean","description":"The organization may start calls or WhatsApp conversations from this channel."},"provider":{"anyOf":[{"type":"string","const":"phone"},{"type":"string","const":"sip"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}],"description":"What the endpoint is: `phone` (a phone number: the platform's, or one on the organization's own telephony account when `providerAccountId` is set), `sip` (the organization's own number and carrier, over SIP), `whatsapp` (a WhatsApp number) or `web` (the chat widget, served by Raíz)."},"providerAccountId":{"anyOf":[{"type":"string","description":"The organization's own account the endpoint runs on (its own telephony account, for example); null: the platform's.","examples":["pac_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^pac_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"ready":{"type":"boolean","description":"Active with enabled traffic; WhatsApp outbound notifications do not need an Agent."},"setupExpiresAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"active"},{"type":"string","const":"degraded"}],"description":"`pending`: a WhatsApp number whose setup the customer has not finished. `active`: connected. `degraded`: connected, but the last provider check failed; `verifyChannel` checks again."},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"version":{"type":"integer","minimum":1},"profile":{"anyOf":[{"type":"object","required":["about","address","description","email","pictureUrl","vertical","websites"],"properties":{"about":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"pictureUrl":{"anyOf":[{"type":"string","description":"The profile picture (read only)."},{"type":"null"}]},"vertical":{"anyOf":[{"type":"string","description":"The business category."},{"type":"null"}]},"websites":{"type":"array","items":{"type":"string"},"maxItems":2}},"description":"What people see when they tap the business's name in WhatsApp. Present only when expanded; null for channels that are not connected WhatsApp numbers.","additionalProperties":false},{"type":"null"}]},"publication":{"anyOf":[{"$ref":"#/components/schemas/RaizWidgetPublication","description":"Web channels only; null for every other channel."},{"type":"null"}]},"setup":{"type":"object","required":["expiresAt","url"],"properties":{"expiresAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"url":{"type":"string","description":"Send the customer here to connect their WhatsApp number. Anyone with the link can connect a number to this channel: share it only with the customer."}},"description":"Present only in the response of the action that issued the link: `createChannel`, `renewChannelSetup`, or a `verifyChannel` that replaced an expired one.","additionalProperties":false},"widget":{"anyOf":[{"$ref":"#/components/schemas/RaizWidgetSettings"},{"type":"null"}]}},"additionalProperties":false},"RaizChannelAgent":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"name":{"type":"string"}},"additionalProperties":false},"RaizChannelAgentMismatchFailure":{"type":"object","description":"This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CHANNEL_AGENT_MISMATCH"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizChannelAgentRequiredFailure":{"type":"object","description":"Inbound traffic requires an assigned Agent. Outbound traffic requires one except on WhatsApp notification channels.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CHANNEL_AGENT_REQUIRED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizChannelCreationInAppFailure":{"type":"object","description":"An AI tool creates website chats and forms only. A person adds WhatsApp numbers and phone numbers in Settings → Channels, or through the REST API.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CHANNEL_CREATION_IN_APP"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizChannelEndpointInUseFailure":{"type":"object","description":"Another channel already uses this number or endpoint.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CHANNEL_ENDPOINT_IN_USE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizChannelNotReadyFailure":{"type":"object","description":"The channel is not connected yet, or this kind of traffic is not enabled on it.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CHANNEL_NOT_READY"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizChannelPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizChannel"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizChannelPageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizChannelPage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizChannelResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizChannel"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizChannelTypeMismatchFailure":{"type":"object","description":"This operation or field does not apply to this channel's type.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CHANNEL_TYPE_MISMATCH"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizContact":{"type":"object","required":["conversationCount","createdAt","email","familyName","fullName","givenName","id","lastContactedAt","lastConversation","metadata","nameAuthor","phone","postalAddresses","profileName","summary","summaryAuthor","updatedAt","version","facts","identifiers","points"],"properties":{"conversationCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"email":{"anyOf":[{"type":"string","description":"Preferred email."},{"type":"null"}]},"familyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"fullName":{"anyOf":[{"type":"string","description":"Given and family name."},{"type":"null"}]},"givenName":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","description":"Contact id.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"lastContactedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"lastConversation":{"anyOf":[{"$ref":"#/components/schemas/RaizContactLastConversation"},{"type":"null"}]},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"nameAuthor":{"anyOf":[{"anyOf":[{"type":"string","const":"person"},{"type":"string","const":"ai"},{"type":"string","const":"system"},{"type":"string","const":"import"},{"type":"string","const":"provider"}],"description":"Who wrote the value."},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","description":"Preferred phone number."},{"type":"null"}]},"postalAddresses":{"type":"array","items":{"$ref":"#/components/schemas/RaizPostalAddress"},"maxItems":5},"profileName":{"anyOf":[{"type":"string","description":"The name the person shows on WhatsApp, as WhatsApp sent it. Read-only; `fullName` is the saved name."},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryAuthor":{"anyOf":[{"anyOf":[{"type":"string","const":"person"},{"type":"string","const":"ai"},{"type":"string","const":"system"},{"type":"string","const":"import"},{"type":"string","const":"provider"}],"description":"Who wrote the value."},{"type":"null"}]},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"version":{"type":"integer","minimum":1},"facts":{"type":"array","items":{"$ref":"#/components/schemas/RaizFact"},"description":"The current value of each definition for this subject (the newest assertion that was not rejected).","maxItems":100},"identifiers":{"type":"array","items":{"type":"object","required":["countryCode","createdAt","id","number","type","verifiedAt"],"properties":{"countryCode":{"type":"string"},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"id":{"type":"string","description":"Identity document id.","examples":["cid_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:cid_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:idn)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"number":{"type":"string"},"type":{"type":"string"},"verifiedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]}},"additionalProperties":false},"maxItems":5},"points":{"type":"array","items":{"type":"object","required":["address","createdAt","id","kind","label","preferred","verifiedAt"],"properties":{"address":{"type":"string"},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"id":{"type":"string","description":"Contact point id.","examples":["cpt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:cpt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:idn)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"kind":{"anyOf":[{"type":"string","const":"phone"},{"type":"string","const":"email"},{"type":"string","const":"whatsapp"},{"type":"string","const":"telegram"},{"type":"string","const":"slack"},{"type":"string","const":"web"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"preferred":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]}},"additionalProperties":false},"maxItems":20},"timeline":{"$ref":"#/components/schemas/RaizContactTimelinePage","description":"What happened to the contact (and to the duplicates it absorbed), newest first. Present only when expanded."}},"additionalProperties":false},"RaizContactHoursWindow":{"type":"object","required":["days","from","to"],"properties":{"days":{"type":"array","items":{"anyOf":[{"type":"string","const":"MO"},{"type":"string","const":"TU"},{"type":"string","const":"WE"},{"type":"string","const":"TH"},{"type":"string","const":"FR"},{"type":"string","const":"SA"},{"type":"string","const":"SU"}],"description":"RFC 5545 weekday."},"maxItems":7,"minItems":1,"uniqueItems":true},"from":{"type":"string","description":"Local start time, `HH:MM`, inclusive.","examples":["09:00"],"pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"to":{"type":"string","description":"Local end time, `HH:MM`, exclusive (`24:00` for midnight).","examples":["18:00"],"pattern":"^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$"}},"additionalProperties":false},"RaizContactIdentifierInput":{"type":"object","required":["number","type"],"properties":{"countryCode":{"type":"string","default":"CO","description":"Issuing country, ISO 3166-1 alpha-2.","pattern":"^[A-Z]{2}$"},"number":{"type":"string","description":"Document number, upper case letters and digits only.","pattern":"^[A-Z0-9]{3,20}$"},"type":{"type":"string","description":"Document type code, for example `CC`, `CE`, `PA`, `TI`.","pattern":"^[A-Z]{2,4}$"}},"additionalProperties":false},"RaizContactLastConversation":{"type":"object","required":["agentName","agentReplied","aiEnabled","aiPaused","aiPausedBy","channelType","closeReason","id","operatorReplied","startedAt","status","title"],"properties":{"agentName":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentReplied":{"type":"boolean","description":"The Agent answered it."},"aiEnabled":{"type":"boolean"},"aiPaused":{"type":"boolean"},"aiPausedBy":{"anyOf":[{"anyOf":[{"type":"string","const":"agent"},{"type":"string","const":"operator"}]},{"type":"null"}]},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}]},"closeReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"operatorReplied":{"type":"boolean","description":"People answered it."},"startedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"status":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"closed"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"RaizContactPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizContact"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizContactPageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizContactPage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizContactPointInput":{"anyOf":[{"type":"object","required":["address","kind"],"properties":{"address":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"kind":{"type":"string","const":"phone"},"label":{"anyOf":[{"type":"string","description":"Free label, for example `Office`.","maxLength":200},{"type":"null"}]},"preferred":{"type":"boolean","description":"The address to use for this kind. When no point of a kind is marked, the first one is preferred."}},"additionalProperties":false},{"type":"object","required":["address","kind"],"properties":{"address":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"kind":{"type":"string","const":"email"},"label":{"anyOf":[{"type":"string","description":"Free label, for example `Office`.","maxLength":200},{"type":"null"}]},"preferred":{"type":"boolean","description":"The address to use for this kind. When no point of a kind is marked, the first one is preferred."}},"additionalProperties":false},{"type":"object","required":["address","kind"],"properties":{"address":{"type":"string","maxLength":200,"minLength":1},"kind":{"anyOf":[{"type":"string","const":"whatsapp"},{"type":"string","const":"telegram"},{"type":"string","const":"slack"},{"type":"string","const":"web"}]},"label":{"anyOf":[{"type":"string","description":"Free label, for example `Office`.","maxLength":200},{"type":"null"}]},"preferred":{"type":"boolean","description":"The address to use for this kind. When no point of a kind is marked, the first one is preferred."}},"additionalProperties":false}]},"RaizContactResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizContact"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizContactSuppressedFailure":{"type":"object","description":"A suppression rule of this organization forbids contacting this address.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CONTACT_SUPPRESSED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizContactTimelinePage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"type":"object","required":["author","detail","id","occurredAt","summary","type"],"properties":{"author":{"anyOf":[{"anyOf":[{"type":"string","const":"person"},{"type":"string","const":"ai"},{"type":"string","const":"system"},{"type":"string","const":"import"},{"type":"string","const":"provider"}],"description":"Who wrote the value."},{"type":"null"}]},"detail":{"anyOf":[{"type":"string","description":"Item-specific detail: the channel of a conversation, a fact's value status, the changed fields of a change or the reason of a merge."},{"type":"null"}]},"id":{"type":"string","description":"Id of the conversation, fact, change or merge the item stands for."},"occurredAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"summary":{"anyOf":[{"type":"string","description":"Conversation title, definition name, `<resource>.<action>` of a change, or the absorbed contact's id for a merge."},{"type":"null"}]},"type":{"anyOf":[{"type":"string","const":"conversation"},{"type":"string","const":"fact"},{"type":"string","const":"change"},{"type":"string","const":"merge"}]}},"additionalProperties":false},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizContactUnreachableFailure":{"type":"object","description":"The contact has no phone number. Give the destination number in `to`.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CONTACT_UNREACHABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizContinueConversationBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizContinueConversationBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizContinueConversationBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizContinueConversationBody":{"type":"object","required":[],"properties":{"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"expectedHandoffMessageId":{"type":"string","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"The humanReviewMessageId just reviewed by the operator. A different current handoff refuses the continuation with VERSION_CONFLICT, without resuming or sending anything. Use with expectedVersion after checking that the original blocker is resolved."},"note":{"type":"string","description":"A short internal note about the resolved blocker, authoritative evidence, confirmed appointments and any remaining request. A note does not establish coverage, clinical equivalence, consent or a booking. Preserve explicit human requests and unresolved clinical decisions, identity conflicts or uncertain writes with the team.","maxLength":500},"template":{"type":"object","required":["language","name"],"properties":{"header":{"$ref":"#/components/schemas/RaizTemplateHeaderFile","description":"The file shown above the text of a template whose header is a document, image or video, different on every send (an appointment's receipt, a ticket). Required by such a template, refused by any other."},"language":{"type":"string","maxLength":15,"minLength":2},"name":{"type":"string","maxLength":512,"minLength":1},"parameters":{"type":"array","items":{"type":"string","maxLength":1024},"description":"Body parameters, in order.","maxItems":20}},"additionalProperties":false,"description":"An approved template of the conversation's channel that Raíz sends in this conversation now, from the team. With it the Agent does not write now: it answers when the person replies, reading `note`, so the conversation can be given back outside WhatsApp's 24-hour window. Without it the Agent continues at once, and the person must have written in the last 24 hours (WHATSAPP_WINDOW_CLOSED). Follow the template's `deliveryStatus` in the transcript."}},"additionalProperties":false},"RaizContinueConversationConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizContinueConversationConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizContinueConversationConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizConversationClosedFailure"},{"$ref":"#/components/schemas/RaizConversationNotHandedOffFailure"},{"$ref":"#/components/schemas/RaizHandoffAlreadyContinuedFailure"},{"$ref":"#/components/schemas/RaizChannelNotReadyFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateNotApprovedFailure"},{"$ref":"#/components/schemas/RaizWhatsappWindowClosedFailure"},{"$ref":"#/components/schemas/RaizContactSuppressedFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"CONVERSATION_CLOSED":"#/components/schemas/RaizConversationClosedFailure","CONVERSATION_NOT_HANDED_OFF":"#/components/schemas/RaizConversationNotHandedOffFailure","HANDOFF_ALREADY_CONTINUED":"#/components/schemas/RaizHandoffAlreadyContinuedFailure","CHANNEL_NOT_READY":"#/components/schemas/RaizChannelNotReadyFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","TEMPLATE_NOT_APPROVED":"#/components/schemas/RaizTemplateNotApprovedFailure","WHATSAPP_WINDOW_CLOSED":"#/components/schemas/RaizWhatsappWindowClosedFailure","CONTACT_SUPPRESSED":"#/components/schemas/RaizContactSuppressedFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizContinueConversationNotFoundError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizContinueConversationNotFoundFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizContinueConversationNotFoundFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTemplateNotFoundFailure"},{"$ref":"#/components/schemas/RaizResourceNotFoundFailure"}],"discriminator":{"propertyName":"code","mapping":{"TEMPLATE_NOT_FOUND":"#/components/schemas/RaizTemplateNotFoundFailure","RESOURCE_NOT_FOUND":"#/components/schemas/RaizResourceNotFoundFailure"}}},"RaizContinueConversationServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizContinueConversationServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizContinueConversationServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizContinueConversationUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizContinueConversationUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizContinueConversationUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTemplateHeaderMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateHeaderRequiredFailure"},{"$ref":"#/components/schemas/RaizTemplateParametersMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateUnsupportedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMessageUnsupportedFailure"}],"discriminator":{"propertyName":"code","mapping":{"TEMPLATE_HEADER_MISMATCH":"#/components/schemas/RaizTemplateHeaderMismatchFailure","TEMPLATE_HEADER_REQUIRED":"#/components/schemas/RaizTemplateHeaderRequiredFailure","TEMPLATE_PARAMETERS_MISMATCH":"#/components/schemas/RaizTemplateParametersMismatchFailure","TEMPLATE_UNSUPPORTED":"#/components/schemas/RaizTemplateUnsupportedFailure","WHATSAPP_MESSAGE_UNSUPPORTED":"#/components/schemas/RaizWhatsappMessageUnsupportedFailure"}}},"RaizConversation":{"type":"object","required":["agentId","agentName","agentReplied","aiCoveragePercent","aiEnabled","aiPaused","aiPausedBy","analyzedAt","assignedAt","assignedBy","assigneeId","campaignId","campaignRecipientId","channelAddress","channelId","channelName","channelType","closeReason","contactId","contactName","contactProfileName","counterpartAddress","createdAt","deletedAt","direction","durationSeconds","endedAt","id","language","lastMessageAt","messageCount","metadata","operatorReplied","origin","outcome","profileId","recordingAvailable","requestedBy","sentiment","startedAt","status","subjectContactId","summary","summaryAuthor","title","titleAuthor","unattended","updatedAt","version","waitingOn","waitingSinceAt","workers","toolCalls","usage","analysisErrorCode","facts"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"agentName":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentReplied":{"type":"boolean","description":"The Agent said something to the contact."},"aiCoveragePercent":{"type":"integer","minimum":0,"maximum":100},"aiEnabled":{"type":"boolean","description":"AI assignment for this episode. Manual changes affect only this conversation; recipient pauses still apply."},"aiPaused":{"type":"boolean","description":"WhatsApp automatic replies are paused for this recipient. A pause ends when their open conversation closes, so the next one starts with the AI; a closed conversation keeps the state it ended with."},"aiPausedBy":{"anyOf":[{"anyOf":[{"type":"string","const":"agent"},{"type":"string","const":"operator"}],"description":"Who paused automatic replies for the recipient: the Agent, handing the conversation to a person, or an operator (a person of the organization who wrote to the contact or paused the AI). Null when not paused or unknown."},{"type":"null"}]},"analyzedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"assignedBy":{"anyOf":[{"type":"string","description":"Who gave the case to its owner: a member id, the owner's own when they took it."},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string","description":"The case's owner: the person of the organization who took the conversation or was given it, by their member id as Arbol Account lists it (`account.members.list`). Null while nobody has it. It stays when the AI resumes, so a later handoff of the same conversation returns to the same person."},{"type":"null"}]},"campaignId":{"anyOf":[{"type":"string","description":"Campaign of a campaign attempt.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"campaignRecipientId":{"anyOf":[{"type":"string","description":"Campaign recipient of a campaign attempt.","examples":["rcp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^rcp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"channelAddress":{"anyOf":[{"type":"string","description":"The organization's side: its number or URL."},{"type":"null"}]},"channelId":{"anyOf":[{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}]},"closeReason":{"anyOf":[{"anyOf":[{"type":"string","const":"completed"},{"type":"string","const":"inactivity"},{"type":"string","const":"handoff"},{"type":"string","const":"migration"},{"type":"string","const":"error"},{"type":"string","const":"manual"}]},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","description":"Contact id.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"contactName":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactProfileName":{"anyOf":[{"type":"string","description":"The name the contact shows on WhatsApp (their profile name), as WhatsApp shares it; unverified. `contactName` is the contact's own name."},{"type":"null"}]},"counterpartAddress":{"anyOf":[{"type":"string","description":"The contact's side: their number or address."},{"type":"null"}]},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"deletedAt":{"anyOf":[{"type":"string","description":"When the conversation was deleted. Only the changed feed (`listConversations?sort=changed`) lists deleted conversations, once, as tombstones; everywhere else this is null.","format":"date-time"},{"type":"null"}]},"direction":{"anyOf":[{"type":"string","const":"inbound"},{"type":"string","const":"outbound"}]},"durationSeconds":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"id":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastMessageAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"messageCount":{"type":"integer","minimum":0},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"operatorReplied":{"type":"boolean","description":"The organization's team wrote to the contact, in Raíz or in the WhatsApp Business app. The message a campaign or a machine client opens a conversation with is not the team's (a message's `origin`)."},"origin":{"anyOf":[{"type":"string","const":"inbound"},{"type":"string","const":"manual"},{"type":"string","const":"api"},{"type":"string","const":"campaign"},{"type":"string","const":"import"},{"type":"string","const":"test"}],"description":"How it started: the contact reached out (`inbound`), a person of the organization started it (`manual`: in the Dashboard, or on WhatsApp in the WhatsApp Business app), a client through the API (`api`), a campaign, an import or a person-owned WhatsApp Agent trial (`test`). On WhatsApp, `campaign` and `api` with `direction: inbound` are the contact answering such a message after its conversation closed, which continues it."},"outcome":{"anyOf":[{"anyOf":[{"type":"string","const":"success"},{"type":"string","const":"failure"},{"type":"string","const":"unknown"}]},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string","description":"The communication profile it was started from.","examples":["prf_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^prf_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"recordingAvailable":{"type":"boolean"},"requestedBy":{"anyOf":[{"type":"string","description":"Who started it with `createConversation`: the token's subject, a person's user id or `<client id>@clients` for a machine client. Null for inbound, campaign and imported conversations."},{"type":"null"}]},"sentiment":{"anyOf":[{"anyOf":[{"type":"string","const":"positive"},{"type":"string","const":"neutral"},{"type":"string","const":"negative"}]},{"type":"null"}]},"startedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"status":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"closed"}]},"subjectContactId":{"anyOf":[{"type":"string","description":"The contact the conversation is about when it is not the counterpart (a patient a relative calls for).","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryAuthor":{"anyOf":[{"anyOf":[{"type":"string","const":"person"},{"type":"string","const":"ai"},{"type":"string","const":"system"},{"type":"string","const":"import"},{"type":"string","const":"provider"}],"description":"Who wrote the value."},{"type":"null"}]},"title":{"anyOf":[{"type":"string","description":"The stored intent title, or null while there is insufficient context or generation is pending. Clients can show a localized placeholder from status and messageCount. A person's title is never replaced automatically."},{"type":"null"}]},"titleAuthor":{"anyOf":[{"anyOf":[{"type":"string","const":"person"},{"type":"string","const":"ai"},{"type":"string","const":"system"},{"type":"string","const":"import"},{"type":"string","const":"provider"}],"description":"Who wrote the value."},{"type":"null"}]},"unattended":{"type":"boolean","description":"It closed for inactivity with a handoff nobody of the team answered. Such a conversation is also one to review (`toReview`)."},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"version":{"type":"integer","minimum":1},"waitingOn":{"anyOf":[{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"},{"type":"string","const":"contact"}],"description":"Who an open conversation waits for. `ai`: the AI attends it. While a person of the team handles it (a pending handoff, the AI paused for the recipient or off for the conversation): `team` when the contact wrote after the last answer or nobody of the team answered the handoff, `contact` when a person answered last. Null once closed."},{"type":"null"}]},"waitingSinceAt":{"anyOf":[{"type":"string","description":"Since when it waits for the team or the contact (RFC 3339): the first message nobody answered, or the last answer. Null while the AI attends it and once closed.","format":"date-time"},{"type":"null"}]},"workers":{"type":"array","items":{"$ref":"#/components/schemas/RaizConversationWorker","description":"Who works the conversation for the organization."},"description":"Who works the conversation for the organization, in the order each first wrote something the contact saw (those who have not yet, last): each Agent and the team that wrote in it and, while it is open or when nobody answered it, whoever has it (the assigned Agent while the AI handles it, the team otherwise). A campaign's message and a machine client's opening make nobody a worker: read who sent them from the message's `origin`. `agentId` is the Agent assigned now."},"toolCalls":{"$ref":"#/components/schemas/RaizConversationToolCalls"},"usage":{"$ref":"#/components/schemas/RaizConversationUsage","description":"What the conversation used, as billing valued it. What an integration charged for a tool the Agent ran is part of `tools` once billing hands it over, which it does when the integration names the conversation in its report."},"outcomeReview":{"anyOf":[{"type":"object","required":["confirmationMessageId","evidence","outcome","reason","reviewedAt","reviewedBy"],"properties":{"basis":{"anyOf":[{"type":"string","const":"business_completion"},{"type":"string","const":"policy_referral"}]},"confirmationMessageId":{"anyOf":[{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"evidence":{"type":"string","minLength":10,"maxLength":2000},"outcome":{"anyOf":[{"type":"string","const":"success"},{"type":"string","const":"failure"},{"type":"string","const":"unknown"}]},"policyMessageId":{"anyOf":[{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"reason":{"type":"string","minLength":10,"maxLength":1000},"reviewedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"reviewedBy":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"analysisErrorCode":{"anyOf":[{"type":"string","description":"The stable code of the latest failed analysis attempt; null before a failure or after a successful analysis. A failed attempt may be retried automatically."},{"type":"null"}]},"facts":{"type":"array","items":{"$ref":"#/components/schemas/RaizFact"},"description":"The current value of each definition for this subject (the newest assertion that was not rejected).","maxItems":100},"diagnostics":{"$ref":"#/components/schemas/RaizConversationDiagnostics","description":"Staff-only, live read of a call's provider termination evidence. Never includes provider identifiers, credentials, transcript content or free-form error text. Unavailable evidence is explicit and does not change the stored conversation."},"history":{"type":"array","items":{"$ref":"#/components/schemas/RaizConversationEvent"},"description":"The case's history, oldest first: the handoff, who took it or was given it, the return to the AI, a person's pause or resume, and the closing. Present only when expanded. Who answered the contact is in `workers` and in each message's `memberId`."},"messages":{"$ref":"#/components/schemas/RaizMessagePage","description":"The transcript, oldest first, with tool calls and quoted replies. Present only when expanded."},"recording":{"anyOf":[{"$ref":"#/components/schemas/SignedUrl","description":"A short-lived link to the call recording; null when the conversation has none. Present only when expanded."},{"type":"null"}]}},"additionalProperties":false},"RaizConversationClosedFailure":{"type":"object","description":"The conversation is closed. Start a new conversation to write again.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CONVERSATION_CLOSED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizConversationCount":{"type":"object","required":["capped","count","averageDurationSeconds","averageMessageCount","groups"],"properties":{"capped":{"type":"boolean","description":"True when the count reached 10000: at least that many match."},"count":{"type":"integer","description":"How many match the filters, counted up to 10000.","maximum":10000,"minimum":0},"averageDurationSeconds":{"anyOf":[{"type":"number","description":"The average duration of the calls among them, in seconds; null when none has one.","minimum":0},{"type":"null"}]},"averageMessageCount":{"anyOf":[{"type":"number","description":"Their average number of messages; null when there are none.","minimum":0},{"type":"null"}]},"groups":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RaizConversationGroup"},"description":"With `groupBy`: the counted conversations by group, largest first, at most 100. A conversation counts once per group; with `tool`, once in each tool it used.","maxItems":100},{"type":"null"}]}},"additionalProperties":false},"RaizConversationCountResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizConversationCount"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizConversationDiagnostics":{"type":"object","required":["errorCode","providerErrorCode","providerErrorPresent","providerStatus","signals","status","terminationReasonPresent"],"properties":{"errorCode":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"providerErrorCode":{"anyOf":[{"type":"integer"},{"type":"null"}]},"providerErrorPresent":{"type":"boolean"},"providerStatus":{"anyOf":[{"anyOf":[{"type":"string","const":"initiated"},{"type":"string","const":"active"},{"type":"string","const":"processing"},{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"unknown"}]},{"type":"null"}]},"signals":{"type":"array","items":{"anyOf":[{"type":"string","const":"model"},{"type":"string","const":"speech"},{"type":"string","const":"tool"},{"type":"string","const":"timeout"},{"type":"string","const":"quota"},{"type":"string","const":"transport"},{"type":"string","const":"client_disconnected"},{"type":"string","const":"inactivity"},{"type":"string","const":"duration_limit"},{"type":"string","const":"normal_end"}]},"maxItems":10,"uniqueItems":true,"description":"Words explicitly present in the provider's termination/error evidence, normalized to a fixed vocabulary. They are diagnostic signals, not proof of a business outcome or an exhaustive root cause; an empty list preserves an unclassified failure."},"status":{"anyOf":[{"type":"string","const":"available"},{"type":"string","const":"unavailable"},{"type":"string","const":"not_recorded"},{"type":"string","const":"not_applicable"}]},"terminationReasonPresent":{"type":"boolean"}},"additionalProperties":false},"RaizConversationEvent":{"type":"object","required":["at","author","authorId","kind"],"properties":{"assigneeId":{"type":"string","description":"For `assigned`: the member who has the case from then on."},"at":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"author":{"anyOf":[{"type":"string","const":"person"},{"type":"string","const":"ai"},{"type":"string","const":"system"},{"type":"string","const":"import"},{"type":"string","const":"provider"}],"description":"Who did it: a `person` of the organization, the `ai`, or the `system` (a rule, such as the inactivity close)."},"authorId":{"anyOf":[{"type":"string","description":"The member id of the person, or the Agent's id; null for the system."},{"type":"null"}]},"automatic":{"type":"boolean","description":"For `returned_to_ai`: nobody of the team asked for it; an unanswered technical handoff came back by itself."},"closeReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","const":"handed_off"},{"type":"string","const":"assigned"},{"type":"string","const":"unassigned"},{"type":"string","const":"returned_to_ai"},{"type":"string","const":"ai_paused"},{"type":"string","const":"ai_resumed"},{"type":"string","const":"closed"}],"description":"`handed_off`: the AI passed the conversation to the team (`messageId` is its handoff message). `assigned`: a person took the case or was given it (`authorId` is who decided, `assigneeId` who has it, `previousAssigneeId` who had it). `unassigned`: it was left with nobody. `returned_to_ai`: the team gave it back to the AI. `ai_paused`, `ai_resumed`: a person paused or resumed the AI for the recipient. `closed`: it closed, with `closeReason`."},"messageId":{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"previousAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"RaizConversationGroup":{"type":"object","required":["averageDurationSeconds","averageMessageCount","count","failed","key","label","outcomes"],"properties":{"averageDurationSeconds":{"anyOf":[{"type":"number","description":"The average duration of the calls among them, in seconds; null when none has one.","minimum":0},{"type":"null"}]},"averageMessageCount":{"anyOf":[{"type":"number","description":"Their average number of messages; null when there are none.","minimum":0},{"type":"null"}]},"count":{"type":"integer","description":"Conversations in the group.","minimum":0},"failed":{"anyOf":[{"type":"integer","description":"For `tool`: conversations where a call of the tool failed. Null for other groupings.","minimum":0},{"type":"null"}]},"key":{"anyOf":[{"type":"string","description":"The group's value: an outcome, status, channel type, Agent id, sentiment, tool name, error code (or message, when a failure has no code) or fact value (an option's key or the text). Null: conversations without one (not analyzed, no Agent, no value)."},{"type":"null"}]},"label":{"anyOf":[{"type":"string","description":"The value's name when the records have one: the Agent's name, the option's label, the most frequent error message."},{"type":"null"}]},"outcomes":{"$ref":"#/components/schemas/RaizConversationOutcomeCounts"}},"additionalProperties":false},"RaizConversationNotHandedOffFailure":{"type":"object","description":"The AI has not handed this conversation to the team, so there is nothing to give back to it.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CONVERSATION_NOT_HANDED_OFF"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizConversationOpenFailure":{"type":"object","description":"The conversation is still open. Close it first.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CONVERSATION_OPEN"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizConversationOutcomeCounts":{"type":"object","required":["failure","pending","success","unknown"],"properties":{"failure":{"type":"integer","minimum":0},"pending":{"type":"integer","description":"Not analyzed yet.","minimum":0},"success":{"type":"integer","minimum":0},"unknown":{"type":"integer","minimum":0}},"additionalProperties":false},"RaizConversationPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizConversation"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizConversationPageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizConversationPage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizConversationResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizConversation"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizConversationToolCalls":{"type":"object","required":["count","failed","lastFailure"],"properties":{"count":{"type":"integer","description":"The Agent's tool calls in the conversation.","minimum":0},"failed":{"type":"integer","description":"How many of them failed.","minimum":0},"lastFailure":{"anyOf":[{"$ref":"#/components/schemas/RaizConversationToolFailure","description":"The conversation's latest failed tool call; null when none failed."},{"type":"null"}]}},"additionalProperties":false},"RaizConversationToolFailure":{"type":"object","required":["errorCode","errorMessage","toolName"],"properties":{"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string","description":"What the tool answered when it failed, up to 500 characters; the transcript has all of it."},{"type":"null"}]},"toolName":{"type":"string"}},"additionalProperties":false},"RaizConversationUsage":{"type":"object","required":["credits","items","pending"],"properties":{"credits":{"anyOf":[{"type":"number","description":"What the conversation used, in credits at the organization's rates when each part was reported; null while nothing has its value yet.","minimum":0},{"type":"null"}]},"items":{"type":"array","items":{"$ref":"#/components/schemas/RaizConversationUsageItem"},"maxItems":8},"pending":{"type":"boolean","description":"Part of the usage is still waiting for its value in credits."}},"additionalProperties":false},"RaizConversationUsageItem":{"type":"object","required":["credits","kind","units"],"properties":{"credits":{"anyOf":[{"type":"number","description":"Credits of this kind; null while none of it has its value yet.","minimum":0},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"phone_line"},{"type":"string","const":"phone_numbers"},{"type":"string","const":"messages"},{"type":"string","const":"templates"},{"type":"string","const":"conversations"},{"type":"string","const":"tools"},{"type":"string","const":"ai"}],"description":"`voice`: minutes of the voice Agent, rounded up per call. `phone_line`: minutes of the phone line; its credits include what the line was charged when the plan bills it apart. `phone_numbers`: a number's month. `messages`: WhatsApp messages, in and out. `templates`: WhatsApp templates sent. `conversations`: WhatsApp conversations started. `tools`: integration tools the Agent ran; its credits include what an integration charged for a run, once billing hands that over. `ai`: model calls."},"units":{"type":"number","description":"How much of it: minutes, messages, templates, conversations, tool runs or model calls.","minimum":0}},"additionalProperties":false},"RaizConversationViewAuthorOnlyFailure":{"type":"object","description":"Only the person who saved this view can make it private; it would disappear for the rest of the team.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CONVERSATION_VIEW_AUTHOR_ONLY"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizConversationViewLimitReachedFailure":{"type":"object","description":"The organization already has 200 saved views. Delete one before saving another.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CONVERSATION_VIEW_LIMIT_REACHED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizConversationViewNameTakenFailure":{"type":"object","description":"Another saved view already has this name. Choose a different name.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CONVERSATION_VIEW_NAME_TAKEN"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizConversationWorker":{"anyOf":[{"type":"object","required":["agentId","answering","kind","name","firstMessageAt","lastMessageAt","messageCount"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"answering":{"type":"boolean","description":"Answers the contact now, only while the conversation is open: the assigned Agent while the AI handles it, the team while people do."},"kind":{"type":"string","const":"agent"},"name":{"type":"string"},"firstMessageAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"lastMessageAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"messageCount":{"type":"integer","description":"Messages the contact saw (call turns on a call). Tool calls, reactions and edits do not count.","minimum":0}},"description":"An Agent that wrote in the conversation, or its assigned Agent while the AI has it.","additionalProperties":false},{"type":"object","required":["answering","kind","members","firstMessageAt","lastMessageAt","messageCount"],"properties":{"answering":{"type":"boolean","description":"Answers the contact now, only while the conversation is open: the assigned Agent while the AI handles it, the team while people do."},"kind":{"type":"string","const":"team"},"members":{"type":"array","items":{"type":"object","required":["memberId","firstMessageAt","lastMessageAt","messageCount"],"properties":{"memberId":{"type":"string","description":"A person of the organization: their member id, as Arbol Account lists it (`account.members.list`).","maxLength":255,"minLength":1},"firstMessageAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"lastMessageAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"messageCount":{"type":"integer","description":"Messages the contact saw (call turns on a call). Tool calls, reactions and edits do not count.","minimum":0}},"additionalProperties":false},"description":"The people Raíz knows wrote, in the order they first did. What the WhatsApp Business app sends counts for the team without naming anyone; what a campaign or a machine client's opening sends does not count for the team."},"firstMessageAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"lastMessageAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"messageCount":{"type":"integer","description":"Messages the contact saw (call turns on a call). Tool calls, reactions and edits do not count.","minimum":0}},"description":"The organization's people, once: when one of them wrote, or while the conversation is theirs (a WhatsApp chat with the AI off or paused).","additionalProperties":false}]},"RaizCount":{"type":"object","required":["capped","count"],"properties":{"capped":{"type":"boolean","description":"True when the count reached 10000: at least that many match."},"count":{"type":"integer","description":"How many match the filters, counted up to 10000.","maximum":10000,"minimum":0}},"additionalProperties":false},"RaizCountContactsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCountContactsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCountContactsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCountConversationsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCountConversationsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCountConversationsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCountResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizCount"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCrawlSettings":{"type":"object","required":["maxDepth","maxPages"],"properties":{"maxDepth":{"type":"integer","description":"Path depth below the source URL to follow; 0 imports only that page.","maximum":5,"minimum":0},"maxPages":{"type":"integer","description":"Pages to import at most.","maximum":50,"minimum":1}},"additionalProperties":false},"RaizCreateAgentBody":{"type":"object","required":["modality","name"],"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"firstMessage":{"anyOf":[{"type":"string","description":"What a voice Agent says first when a call connects, inbound or outbound. Text Agents do not use it: how they open a WhatsApp conversation is `settings.greeting`, and an outbound WhatsApp conversation opens with an approved template.","maxLength":2000,"minLength":1},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","description":"What the Agent does and how: its role, what it may and may not do, the facts it relies on.","maxLength":100000,"minLength":1},{"type":"null"}]},"integrationProcedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentIntegrationProcedureInput"},"description":"Text Agents. Procedures a connection publishes (`listConnections`, checked live in Account), each saved with its current text and run as a free-form procedure beside `procedures`. In an update, the complete new set.","maxItems":32},"integrationTools":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentIntegrationToolInput"},"description":"The integrations' tools the Agent may call, each on one of the organization's connections (`listConnections`, checked live in Account). The Agent runs each as its connection lists it at every turn. In an update, the complete new set.","maxItems":200},"knowledgeDocumentIds":{"type":"array","items":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Knowledge documents the Agent consults. In an update, the complete new set.","maxItems":100,"uniqueItems":true},"language":{"type":"string","description":"BCP 47 language tag.","examples":["es-CO"],"pattern":"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"procedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentProcedureInput"},"description":"The Agent's procedures, as a complete set: a procedure left out is removed. Keep each existing procedure's `id`; a new one may omit it.","maxItems":64},"settings":{"$ref":"#/components/schemas/RaizAgentSettingsInput","description":"How the Agent behaves. In an update, only the keys you send change: a key left out stays and `null` returns it to its default. A key's own value, such as `policy` or `voice`, is replaced whole. An update that changes `modality` starts from the defaults. Text and voice settings apply only to Agents of that modality."},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused Agent answers nothing and places no calls."},"timeZone":{"anyOf":[{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},{"type":"null"}]},"workflow":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentWorkflow"},{"type":"null"}],"description":"The conversation graph the Agent follows beside its instructions and procedures: conversation steps, tool steps and endings, with no loops and a way forward from every step. A tool step needs one of the Agent's integration tools that only reads and that exactly one connection holds. It runs by itself, with the step's constant arguments and without the model choosing them, and follows its success or failure edge; on a call, a step that cannot run follows its failure edge. Checked against the Agent as it will be once saved (AGENT_WORKFLOW_INVALID says where one is wrong), also when an update changes the Agent's tools. In an update, omit it to keep the current one and send `null` to remove it."},"modality":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"text"}],"description":"`voice`: phone calls. `text`: WhatsApp and web chat."},"name":{"type":"string","maxLength":120,"minLength":1}},"additionalProperties":false},"RaizCreateAgentConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateAgentConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateAgentConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAgentInUseFailure"},{"$ref":"#/components/schemas/RaizAgentModalityLockedFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"AGENT_IN_USE":"#/components/schemas/RaizAgentInUseFailure","AGENT_MODALITY_LOCKED":"#/components/schemas/RaizAgentModalityLockedFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizCreateAgentServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateAgentServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateAgentServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","VOICE_UNAVAILABLE":"#/components/schemas/RaizVoiceUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateAgentUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateAgentUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateAgentUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAgentProceduresInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentWorkflowInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentSettingsInvalidFailure"},{"$ref":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationToolUnavailableFailure"},{"$ref":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"AGENT_PROCEDURES_INVALID":"#/components/schemas/RaizAgentProceduresInvalidFailure","AGENT_WORKFLOW_INVALID":"#/components/schemas/RaizAgentWorkflowInvalidFailure","AGENT_SETTINGS_INVALID":"#/components/schemas/RaizAgentSettingsInvalidFailure","INTEGRATION_PROCEDURE_UNAVAILABLE":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure","INTEGRATION_TOOL_UNAVAILABLE":"#/components/schemas/RaizIntegrationToolUnavailableFailure","KNOWLEDGE_DOCUMENT_UNAVAILABLE":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure"}}},"RaizCreateBulletinBody":{"type":"object","required":["text"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"The one Agent that applies it; null for every Agent of the organization.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string","format":"date-time","description":"When Agents stop applying it, later than its start. Null keeps it until it is deleted."},{"type":"null"}],"description":"When Agents stop applying it, later than its start and than now. Omit it or send null to keep it until it is deleted."},"startsAt":{"type":"string","format":"date-time","description":"When Agents start applying it; default now. No Agent reads it before. For Agents to know ahead (so they book no appointment on a closed day), start it now and write the dates in the text."},"text":{"type":"string","description":"What is happening and what the Agents should do about it, written as you would tell them. One situation per bulletin; long reference material belongs in Knowledge.","examples":["There is no nutrition service this week. If someone asks for it, offer general medicine."],"maxLength":1000,"minLength":1,"pattern":"\\S"}},"additionalProperties":false},"RaizCreateCampaignBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateCampaignBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateCampaignBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizCreateCampaignBody":{"anyOf":[{"type":"object","required":["agentId","name"],"properties":{"channelId":{"anyOf":[{"type":"string","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"The line calls or messages leave from, of the campaign's kind. Null: the Agent's own."},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.","maxItems":14},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"scheduledEndAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled."},{"type":"null"}]},"scheduledStartAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing starts before this instant, even once the campaign is started."},{"type":"null"}]},"timeZone":{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"name":{"type":"string","maxLength":200,"minLength":1},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaignRecipientInput"},"maxItems":10000,"description":"Who to reach, unique by `address`. Each becomes `contactId`, or else the contact that owns their number (created when the organization has none), when the campaign first reaches them. Send a longer list in parts with `updateCampaign` and `addRecipients`."},"maxAttempts":{"type":"integer","description":"Calls per recipient at most, retries included. Default 1.","maximum":10,"minimum":1},"retryAfterMinutes":{"type":"integer","description":"Wait before a retry, up to a week. Default 60. For several tries in a day use a few hours; for several in a month, a week, with `scheduledEndAt` as the last day.","maximum":10080,"minimum":1},"retryOn":{"type":"array","items":{"anyOf":[{"type":"string","const":"no_answer"},{"type":"string","const":"failure"}]},"description":"Which results earn another call. Default `[\"no_answer\"]`: nobody answered, busy or silence; `failure`: answered but judged unsuccessful.","maxItems":2,"uniqueItems":true},"channelType":{"type":"string","const":"voice"},"firstMessage":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1,"description":"What the Agent says first on every call. Null: the Agent's own first message."},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1,"description":"What these calls are about, added to the Agent's instructions on every call."},{"type":"null"}]}},"description":"A campaign that calls each recipient with a voice Agent. The default.","additionalProperties":false},{"type":"object","required":["agentId","name","channelType","template"],"properties":{"channelId":{"anyOf":[{"type":"string","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"The line calls or messages leave from, of the campaign's kind. Null: the Agent's own."},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.","maxItems":14},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"scheduledEndAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled."},{"type":"null"}]},"scheduledStartAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing starts before this instant, even once the campaign is started."},{"type":"null"}]},"timeZone":{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"name":{"type":"string","maxLength":200,"minLength":1},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaignRecipientInput"},"maxItems":10000,"description":"Who to reach, unique by `address`. Each becomes `contactId`, or else the contact that owns their number (created when the organization has none), when the campaign first reaches them. Send a longer list in parts with `updateCampaign` and `addRecipients`."},"maxAttempts":{"type":"integer","description":"Messages per recipient at most, reminders included. Default 2. WhatsApp penalizes a number people block or report, so keep it low.","maximum":10,"minimum":1},"retryAfterMinutes":{"type":"integer","description":"Wait from one message to the next, up to a week. Default 1440, a day. A person WhatsApp limited waits at least a day whatever this says.","maximum":10080,"minimum":1},"retryOn":{"type":"array","items":{"anyOf":[{"type":"string","const":"no_answer"},{"type":"string","const":"not_delivered"}]},"description":"What earns another message. Default `[\"not_delivered\"]`: only when it did not arrive. Add `no_answer` to remind whoever received it and has not replied. A person who replies, or who cannot receive it, is never sent another.","maxItems":2,"uniqueItems":true},"channelType":{"type":"string","const":"whatsapp"},"instructions":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1,"description":"What the Agent should know when someone replies: what the message is about and what to do next."},{"type":"null"}]},"template":{"$ref":"#/components/schemas/RaizCampaignTemplateInput","description":"The approved template sent to each recipient. WhatsApp only allows a business to start a conversation with one."}},"description":"A campaign that sends each recipient an approved WhatsApp template; its text Agent answers whoever replies.","additionalProperties":false}]},"RaizCreateCampaignConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateCampaignConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateCampaignConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizCampaignAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizCampaignNoRecipientsFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizVoiceAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"CAMPAIGN_AGENT_NOT_READY":"#/components/schemas/RaizCampaignAgentNotReadyFailure","CAMPAIGN_NO_RECIPIENTS":"#/components/schemas/RaizCampaignNoRecipientsFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","VOICE_AGENT_NOT_READY":"#/components/schemas/RaizVoiceAgentNotReadyFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizCreateCampaignServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateCampaignServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateCampaignServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizCampaignHeaderNotStoredFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","CAMPAIGN_HEADER_NOT_STORED":"#/components/schemas/RaizCampaignHeaderNotStoredFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateCampaignUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateCampaignUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateCampaignUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTimeZoneUnknownFailure"},{"$ref":"#/components/schemas/RaizCampaignVariableMissingFailure"},{"$ref":"#/components/schemas/RaizChannelAgentMismatchFailure"}],"discriminator":{"propertyName":"code","mapping":{"TIME_ZONE_UNKNOWN":"#/components/schemas/RaizTimeZoneUnknownFailure","CAMPAIGN_VARIABLE_MISSING":"#/components/schemas/RaizCampaignVariableMissingFailure","CHANNEL_AGENT_MISMATCH":"#/components/schemas/RaizChannelAgentMismatchFailure"}}},"RaizCreateChannelBadGatewayError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelBadGatewayFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelBadGatewayFailure":{"oneOf":[{"$ref":"#/components/schemas/OutcomeUnknownFailure"},{"$ref":"#/components/schemas/RaizWhatsappDeliveryFailedFailure"}],"discriminator":{"propertyName":"code","mapping":{"OUTCOME_UNKNOWN":"#/components/schemas/OutcomeUnknownFailure","WHATSAPP_DELIVERY_FAILED":"#/components/schemas/RaizWhatsappDeliveryFailedFailure"}}},"RaizCreateChannelBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizReportFilterUnsupportedFailure"},{"$ref":"#/components/schemas/RaizReportRangeInvalidFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","REPORT_FILTER_UNSUPPORTED":"#/components/schemas/RaizReportFilterUnsupportedFailure","REPORT_RANGE_INVALID":"#/components/schemas/RaizReportRangeInvalidFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizCreateChannelBody":{"anyOf":[{"type":"object","required":["channelType"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"inboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"name":{"type":"string","maxLength":120,"minLength":1},"outboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"channelType":{"type":"string","const":"whatsapp"}},"description":"A pending WhatsApp channel and the setup link where the customer connects their number. Call `verifyChannel` once they finish.","additionalProperties":false},{"type":"object","required":["channelType","endpoint"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"inboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"name":{"type":"string","maxLength":120,"minLength":1},"outboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"channelType":{"type":"string","const":"voice"},"endpoint":{"anyOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","const":"platform_number","description":"A phone number the platform already owns."},"label":{"type":"string","maxLength":120},"phone":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"phoneNumber":{"$ref":"#/components/schemas/RaizPhoneNumber","deprecated":true,"description":"Deprecated: use `phone`. Answered until 2027-01-28."}},"additionalProperties":false},{"type":"object","required":["address","kind"],"properties":{"address":{"type":"string","description":"The SIP host or IP the carrier receives calls at, with an optional port.","maxLength":253,"pattern":"^[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?(:[0-9]{1,5})?$"},"kind":{"type":"string","const":"sip_trunk","description":"The organization's own carrier, reached over SIP."},"label":{"type":"string","maxLength":120},"mediaEncryption":{"anyOf":[{"type":"string","const":"disabled"},{"type":"string","const":"allowed"},{"type":"string","const":"required"}]},"password":{"type":"string","description":"Digest credentials, used once to connect the carrier and never stored.","maxLength":256,"writeOnly":true},"phone":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"transport":{"anyOf":[{"type":"string","const":"auto"},{"type":"string","const":"udp"},{"type":"string","const":"tcp"},{"type":"string","const":"tls"}]},"username":{"type":"string","maxLength":256},"phoneNumber":{"$ref":"#/components/schemas/RaizPhoneNumber","deprecated":true,"description":"Deprecated: use `phone`. Answered until 2027-01-28."}},"additionalProperties":false}]}},"description":"A voice number, connected at once.","additionalProperties":false},{"type":"object","required":["channelType","widget"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"inboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"name":{"type":"string","maxLength":120,"minLength":1},"outboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"channelType":{"type":"string","const":"web"},"widget":{"$ref":"#/components/schemas/RaizWidgetSettingsInput","description":"The web chat widget's configuration."}},"description":"The chat widget, with its configuration.","additionalProperties":false}]},"RaizCreateChannelConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAgentNotTextFailure"},{"$ref":"#/components/schemas/RaizCallInProgressFailure"},{"$ref":"#/components/schemas/RaizConversationClosedFailure"},{"$ref":"#/components/schemas/RaizConversationNotHandedOffFailure"},{"$ref":"#/components/schemas/RaizConversationOpenFailure"},{"$ref":"#/components/schemas/RaizDailyReportInProgressFailure"},{"$ref":"#/components/schemas/RaizDefinitionNotActiveFailure"},{"$ref":"#/components/schemas/RaizDefinitionRetiredFailure"},{"$ref":"#/components/schemas/RaizDefinitionTypeLockedFailure"},{"$ref":"#/components/schemas/RaizHandoffAlreadyContinuedFailure"},{"$ref":"#/components/schemas/RaizReplyInProgressFailure"},{"$ref":"#/components/schemas/RaizOutsideContactHoursFailure"},{"$ref":"#/components/schemas/RaizProviderAccountExistsFailure"},{"$ref":"#/components/schemas/RaizProviderAccountInUseFailure"},{"$ref":"#/components/schemas/RaizSourceConversationOpenFailure"},{"$ref":"#/components/schemas/RaizSuppressionExistsFailure"},{"$ref":"#/components/schemas/RaizTaskNotRetryableFailure"},{"$ref":"#/components/schemas/RaizCampaignAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizCampaignNoRecipientsFailure"},{"$ref":"#/components/schemas/RaizChannelAgentRequiredFailure"},{"$ref":"#/components/schemas/RaizChannelEndpointInUseFailure"},{"$ref":"#/components/schemas/RaizChannelNotReadyFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizConversationViewLimitReachedFailure"},{"$ref":"#/components/schemas/RaizConversationViewNameTakenFailure"},{"$ref":"#/components/schemas/RaizTemplateNotApprovedFailure"},{"$ref":"#/components/schemas/RaizWhatsappAccountRestrictedFailure"},{"$ref":"#/components/schemas/RaizWhatsappAiPausedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMarketingStoppedFailure"},{"$ref":"#/components/schemas/RaizWhatsappWindowClosedFailure"},{"$ref":"#/components/schemas/RaizProviderAccountMismatchFailure"},{"$ref":"#/components/schemas/RaizProviderSecretUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizVoiceLineUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceNumberInUseFailure"},{"$ref":"#/components/schemas/RaizAgentInUseFailure"},{"$ref":"#/components/schemas/RaizAgentModalityLockedFailure"},{"$ref":"#/components/schemas/RaizBulletinLimitReachedFailure"},{"$ref":"#/components/schemas/RaizEvalCasesUnavailableFailure"},{"$ref":"#/components/schemas/RaizEvalGateUnmetFailure"},{"$ref":"#/components/schemas/RaizWidgetConflictFailure"},{"$ref":"#/components/schemas/RaizAddressInUseFailure"},{"$ref":"#/components/schemas/RaizIdentifierInUseFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"},{"$ref":"#/components/schemas/RaizKeyInUseFailure"},{"$ref":"#/components/schemas/RaizContactSuppressedFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"AGENT_NOT_TEXT":"#/components/schemas/RaizAgentNotTextFailure","CALL_IN_PROGRESS":"#/components/schemas/RaizCallInProgressFailure","CONVERSATION_CLOSED":"#/components/schemas/RaizConversationClosedFailure","CONVERSATION_NOT_HANDED_OFF":"#/components/schemas/RaizConversationNotHandedOffFailure","CONVERSATION_OPEN":"#/components/schemas/RaizConversationOpenFailure","DAILY_REPORT_IN_PROGRESS":"#/components/schemas/RaizDailyReportInProgressFailure","DEFINITION_NOT_ACTIVE":"#/components/schemas/RaizDefinitionNotActiveFailure","DEFINITION_RETIRED":"#/components/schemas/RaizDefinitionRetiredFailure","DEFINITION_TYPE_LOCKED":"#/components/schemas/RaizDefinitionTypeLockedFailure","HANDOFF_ALREADY_CONTINUED":"#/components/schemas/RaizHandoffAlreadyContinuedFailure","REPLY_IN_PROGRESS":"#/components/schemas/RaizReplyInProgressFailure","OUTSIDE_CONTACT_HOURS":"#/components/schemas/RaizOutsideContactHoursFailure","PROVIDER_ACCOUNT_EXISTS":"#/components/schemas/RaizProviderAccountExistsFailure","PROVIDER_ACCOUNT_IN_USE":"#/components/schemas/RaizProviderAccountInUseFailure","SOURCE_CONVERSATION_OPEN":"#/components/schemas/RaizSourceConversationOpenFailure","SUPPRESSION_EXISTS":"#/components/schemas/RaizSuppressionExistsFailure","TASK_NOT_RETRYABLE":"#/components/schemas/RaizTaskNotRetryableFailure","CAMPAIGN_AGENT_NOT_READY":"#/components/schemas/RaizCampaignAgentNotReadyFailure","CAMPAIGN_NO_RECIPIENTS":"#/components/schemas/RaizCampaignNoRecipientsFailure","CHANNEL_AGENT_REQUIRED":"#/components/schemas/RaizChannelAgentRequiredFailure","CHANNEL_ENDPOINT_IN_USE":"#/components/schemas/RaizChannelEndpointInUseFailure","CHANNEL_NOT_READY":"#/components/schemas/RaizChannelNotReadyFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","CONVERSATION_VIEW_LIMIT_REACHED":"#/components/schemas/RaizConversationViewLimitReachedFailure","CONVERSATION_VIEW_NAME_TAKEN":"#/components/schemas/RaizConversationViewNameTakenFailure","TEMPLATE_NOT_APPROVED":"#/components/schemas/RaizTemplateNotApprovedFailure","WHATSAPP_ACCOUNT_RESTRICTED":"#/components/schemas/RaizWhatsappAccountRestrictedFailure","WHATSAPP_AI_PAUSED":"#/components/schemas/RaizWhatsappAiPausedFailure","WHATSAPP_MARKETING_STOPPED":"#/components/schemas/RaizWhatsappMarketingStoppedFailure","WHATSAPP_WINDOW_CLOSED":"#/components/schemas/RaizWhatsappWindowClosedFailure","PROVIDER_ACCOUNT_MISMATCH":"#/components/schemas/RaizProviderAccountMismatchFailure","PROVIDER_SECRET_UNAVAILABLE":"#/components/schemas/RaizProviderSecretUnavailableFailure","VOICE_AGENT_NOT_READY":"#/components/schemas/RaizVoiceAgentNotReadyFailure","VOICE_LINE_UNAVAILABLE":"#/components/schemas/RaizVoiceLineUnavailableFailure","VOICE_NUMBER_IN_USE":"#/components/schemas/RaizVoiceNumberInUseFailure","AGENT_IN_USE":"#/components/schemas/RaizAgentInUseFailure","AGENT_MODALITY_LOCKED":"#/components/schemas/RaizAgentModalityLockedFailure","BULLETIN_LIMIT_REACHED":"#/components/schemas/RaizBulletinLimitReachedFailure","EVAL_CASES_UNAVAILABLE":"#/components/schemas/RaizEvalCasesUnavailableFailure","EVAL_GATE_UNMET":"#/components/schemas/RaizEvalGateUnmetFailure","WIDGET_CONFLICT":"#/components/schemas/RaizWidgetConflictFailure","ADDRESS_IN_USE":"#/components/schemas/RaizAddressInUseFailure","IDENTIFIER_IN_USE":"#/components/schemas/RaizIdentifierInUseFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure","KEY_IN_USE":"#/components/schemas/RaizKeyInUseFailure","CONTACT_SUPPRESSED":"#/components/schemas/RaizContactSuppressedFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizCreateChannelContentTooLargeError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelContentTooLargeFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelContentTooLargeFailure":{"oneOf":[{"$ref":"#/components/schemas/RequestTooLargeFailure"},{"$ref":"#/components/schemas/RaizImportFileTooLargeFailure"}],"discriminator":{"propertyName":"code","mapping":{"REQUEST_TOO_LARGE":"#/components/schemas/RequestTooLargeFailure","IMPORT_FILE_TOO_LARGE":"#/components/schemas/RaizImportFileTooLargeFailure"}}},"RaizCreateChannelForbiddenError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelForbiddenFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelForbiddenFailure":{"oneOf":[{"$ref":"#/components/schemas/ForbiddenFailure"},{"$ref":"#/components/schemas/RaizChannelCreationInAppFailure"},{"$ref":"#/components/schemas/RaizConversationViewAuthorOnlyFailure"},{"$ref":"#/components/schemas/RaizOutboundChannelRefusedFailure"},{"$ref":"#/components/schemas/RaizWhatsappChannelRefusedFailure"},{"$ref":"#/components/schemas/RaizWidgetRefusedFailure"}],"discriminator":{"propertyName":"code","mapping":{"FORBIDDEN":"#/components/schemas/ForbiddenFailure","CHANNEL_CREATION_IN_APP":"#/components/schemas/RaizChannelCreationInAppFailure","CONVERSATION_VIEW_AUTHOR_ONLY":"#/components/schemas/RaizConversationViewAuthorOnlyFailure","OUTBOUND_CHANNEL_REFUSED":"#/components/schemas/RaizOutboundChannelRefusedFailure","WHATSAPP_CHANNEL_REFUSED":"#/components/schemas/RaizWhatsappChannelRefusedFailure","WIDGET_REFUSED":"#/components/schemas/RaizWidgetRefusedFailure"}}},"RaizCreateChannelGatewayTimeoutError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelGatewayTimeoutFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelGatewayTimeoutFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamTimeoutFailure"},{"$ref":"#/components/schemas/RaizWhatsappDeliveryUnconfirmedFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_TIMEOUT":"#/components/schemas/UpstreamTimeoutFailure","WHATSAPP_DELIVERY_UNCONFIRMED":"#/components/schemas/RaizWhatsappDeliveryUnconfirmedFailure"}}},"RaizCreateChannelInternalServerErrorError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelInternalServerErrorFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelInternalServerErrorFailure":{"oneOf":[{"$ref":"#/components/schemas/InternalFailure"},{"$ref":"#/components/schemas/RaizOutboundChannelInternalFailure"},{"$ref":"#/components/schemas/RaizWhatsappChannelInternalFailure"},{"$ref":"#/components/schemas/RaizWhatsappNotSentFailure"},{"$ref":"#/components/schemas/RaizWidgetInternalFailure"}],"discriminator":{"propertyName":"code","mapping":{"INTERNAL_ERROR":"#/components/schemas/InternalFailure","OUTBOUND_CHANNEL_INTERNAL":"#/components/schemas/RaizOutboundChannelInternalFailure","WHATSAPP_CHANNEL_INTERNAL":"#/components/schemas/RaizWhatsappChannelInternalFailure","WHATSAPP_NOT_SENT":"#/components/schemas/RaizWhatsappNotSentFailure","WIDGET_INTERNAL":"#/components/schemas/RaizWidgetInternalFailure"}}},"RaizCreateChannelNotFoundError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelNotFoundFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelNotFoundFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTemplateNotFoundFailure"},{"$ref":"#/components/schemas/RaizResourceNotFoundFailure"}],"discriminator":{"propertyName":"code","mapping":{"TEMPLATE_NOT_FOUND":"#/components/schemas/RaizTemplateNotFoundFailure","RESOURCE_NOT_FOUND":"#/components/schemas/RaizResourceNotFoundFailure"}}},"RaizCreateChannelServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizTeamUnavailableFailure"},{"$ref":"#/components/schemas/RaizCampaignHeaderNotStoredFailure"},{"$ref":"#/components/schemas/RaizVoiceUnavailableFailure"},{"$ref":"#/components/schemas/RaizFeedbackProposalUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","TEAM_UNAVAILABLE":"#/components/schemas/RaizTeamUnavailableFailure","CAMPAIGN_HEADER_NOT_STORED":"#/components/schemas/RaizCampaignHeaderNotStoredFailure","VOICE_UNAVAILABLE":"#/components/schemas/RaizVoiceUnavailableFailure","FEEDBACK_PROPOSAL_UNAVAILABLE":"#/components/schemas/RaizFeedbackProposalUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateChannelTooManyRequestsError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelTooManyRequestsFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelTooManyRequestsFailure":{"oneOf":[{"$ref":"#/components/schemas/RateLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappEngagementLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRateLimitedFailure"},{"$ref":"#/components/schemas/RaizWidgetLimitReachedFailure"}],"discriminator":{"propertyName":"code","mapping":{"RATE_LIMITED":"#/components/schemas/RateLimitedFailure","WHATSAPP_ENGAGEMENT_LIMITED":"#/components/schemas/RaizWhatsappEngagementLimitedFailure","WHATSAPP_RATE_LIMITED":"#/components/schemas/RaizWhatsappRateLimitedFailure","WIDGET_LIMIT_REACHED":"#/components/schemas/RaizWidgetLimitReachedFailure"}}},"RaizCreateChannelUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateChannelUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateChannelUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAssigneeUnavailableFailure"},{"$ref":"#/components/schemas/RaizContactUnreachableFailure"},{"$ref":"#/components/schemas/RaizDailyReportRecipientsMissingFailure"},{"$ref":"#/components/schemas/RaizDefinitionOptionsInvalidFailure"},{"$ref":"#/components/schemas/RaizFactSubjectMismatchFailure"},{"$ref":"#/components/schemas/RaizFactValueInvalidFailure"},{"$ref":"#/components/schemas/RaizImportFileInvalidFailure"},{"$ref":"#/components/schemas/RaizIpNetworkInvalidFailure"},{"$ref":"#/components/schemas/RaizProfileVariableMissingFailure"},{"$ref":"#/components/schemas/RaizTimeZoneUnknownFailure"},{"$ref":"#/components/schemas/RaizCampaignHeaderMissingFailure"},{"$ref":"#/components/schemas/RaizCampaignVariableMissingFailure"},{"$ref":"#/components/schemas/RaizChannelAgentMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateHeaderMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateHeaderRequiredFailure"},{"$ref":"#/components/schemas/RaizTemplateParametersMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateUnsupportedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMediaRejectedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMessageUnsupportedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRecipientUnavailableFailure"},{"$ref":"#/components/schemas/RaizCallRejectedFailure"},{"$ref":"#/components/schemas/RaizProviderAccountUnsupportedFailure"},{"$ref":"#/components/schemas/RaizProviderCredentialsRejectedFailure"},{"$ref":"#/components/schemas/RaizVoiceNotAvailableFailure"},{"$ref":"#/components/schemas/RaizVoiceNumberNotOwnedFailure"},{"$ref":"#/components/schemas/RaizAgentProceduresInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentWorkflowInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentSettingsInvalidFailure"},{"$ref":"#/components/schemas/RaizBulletinPeriodInvalidFailure"},{"$ref":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationToolUnavailableFailure"},{"$ref":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure"},{"$ref":"#/components/schemas/RaizKnowledgeFileInvalidFailure"},{"$ref":"#/components/schemas/RaizKnowledgeKindMismatchFailure"},{"$ref":"#/components/schemas/RaizWebsiteNotApprovedFailure"},{"$ref":"#/components/schemas/RaizWidgetVoiceUnheardFailure"},{"$ref":"#/components/schemas/RaizProviderRejectedFailure"}],"discriminator":{"propertyName":"code","mapping":{"ASSIGNEE_UNAVAILABLE":"#/components/schemas/RaizAssigneeUnavailableFailure","CONTACT_UNREACHABLE":"#/components/schemas/RaizContactUnreachableFailure","DAILY_REPORT_RECIPIENTS_MISSING":"#/components/schemas/RaizDailyReportRecipientsMissingFailure","DEFINITION_OPTIONS_INVALID":"#/components/schemas/RaizDefinitionOptionsInvalidFailure","FACT_SUBJECT_MISMATCH":"#/components/schemas/RaizFactSubjectMismatchFailure","FACT_VALUE_INVALID":"#/components/schemas/RaizFactValueInvalidFailure","IMPORT_FILE_INVALID":"#/components/schemas/RaizImportFileInvalidFailure","IP_NETWORK_INVALID":"#/components/schemas/RaizIpNetworkInvalidFailure","PROFILE_VARIABLE_MISSING":"#/components/schemas/RaizProfileVariableMissingFailure","TIME_ZONE_UNKNOWN":"#/components/schemas/RaizTimeZoneUnknownFailure","CAMPAIGN_HEADER_MISSING":"#/components/schemas/RaizCampaignHeaderMissingFailure","CAMPAIGN_VARIABLE_MISSING":"#/components/schemas/RaizCampaignVariableMissingFailure","CHANNEL_AGENT_MISMATCH":"#/components/schemas/RaizChannelAgentMismatchFailure","TEMPLATE_HEADER_MISMATCH":"#/components/schemas/RaizTemplateHeaderMismatchFailure","TEMPLATE_HEADER_REQUIRED":"#/components/schemas/RaizTemplateHeaderRequiredFailure","TEMPLATE_PARAMETERS_MISMATCH":"#/components/schemas/RaizTemplateParametersMismatchFailure","TEMPLATE_UNSUPPORTED":"#/components/schemas/RaizTemplateUnsupportedFailure","WHATSAPP_MEDIA_REJECTED":"#/components/schemas/RaizWhatsappMediaRejectedFailure","WHATSAPP_MESSAGE_UNSUPPORTED":"#/components/schemas/RaizWhatsappMessageUnsupportedFailure","WHATSAPP_RECIPIENT_UNAVAILABLE":"#/components/schemas/RaizWhatsappRecipientUnavailableFailure","CALL_REJECTED":"#/components/schemas/RaizCallRejectedFailure","PROVIDER_ACCOUNT_UNSUPPORTED":"#/components/schemas/RaizProviderAccountUnsupportedFailure","PROVIDER_CREDENTIALS_REJECTED":"#/components/schemas/RaizProviderCredentialsRejectedFailure","VOICE_NOT_AVAILABLE":"#/components/schemas/RaizVoiceNotAvailableFailure","VOICE_NUMBER_NOT_OWNED":"#/components/schemas/RaizVoiceNumberNotOwnedFailure","AGENT_PROCEDURES_INVALID":"#/components/schemas/RaizAgentProceduresInvalidFailure","AGENT_WORKFLOW_INVALID":"#/components/schemas/RaizAgentWorkflowInvalidFailure","AGENT_SETTINGS_INVALID":"#/components/schemas/RaizAgentSettingsInvalidFailure","BULLETIN_PERIOD_INVALID":"#/components/schemas/RaizBulletinPeriodInvalidFailure","INTEGRATION_PROCEDURE_UNAVAILABLE":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure","INTEGRATION_TOOL_UNAVAILABLE":"#/components/schemas/RaizIntegrationToolUnavailableFailure","KNOWLEDGE_DOCUMENT_UNAVAILABLE":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure","KNOWLEDGE_FILE_INVALID":"#/components/schemas/RaizKnowledgeFileInvalidFailure","KNOWLEDGE_KIND_MISMATCH":"#/components/schemas/RaizKnowledgeKindMismatchFailure","WEBSITE_NOT_APPROVED":"#/components/schemas/RaizWebsiteNotApprovedFailure","WIDGET_VOICE_UNHEARD":"#/components/schemas/RaizWidgetVoiceUnheardFailure","PROVIDER_REJECTED":"#/components/schemas/RaizProviderRejectedFailure"}}},"RaizCreateContactBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateContactBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateContactBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizCreateContactBody":{"type":"object","properties":{"familyName":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}]},"givenName":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}]},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactIdentifierInput"},"description":"Identity documents. In an update, the complete new set: documents not listed are removed.","maxItems":5},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"points":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactPointInput"},"description":"Phones, emails and other addresses. In an update, the complete new set: points not listed are removed; listed ones keep their id and verification.","maxItems":20},"postalAddresses":{"type":"array","items":{"$ref":"#/components/schemas/RaizPostalAddress"},"maxItems":5},"summary":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"additionalProperties":false},"RaizCreateContactConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateContactConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateContactConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAddressInUseFailure"},{"$ref":"#/components/schemas/RaizIdentifierInUseFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"ADDRESS_IN_USE":"#/components/schemas/RaizAddressInUseFailure","IDENTIFIER_IN_USE":"#/components/schemas/RaizIdentifierInUseFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizCreateContactServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateContactServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateContactServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateDefinitionBody":{"type":"object","required":["key","kind","name","subject","valueType"],"properties":{"agentIds":{"type":"array","items":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Agents that use the definition; empty for every Agent. In an update, the complete new set.","maxItems":100,"uniqueItems":true},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"options":{"type":"array","items":{"$ref":"#/components/schemas/RaizDefinitionOptionInput"},"description":"The options of an `option` definition, in order, with unique keys. In an update, the complete new set: an option is matched by key and keeps its id; one left out is retired, never deleted, because facts reference it.","maxItems":100},"status":{"anyOf":[{"type":"string","const":"draft"},{"type":"string","const":"active"}],"description":"`active` definitions accept facts and Agents use them; `draft` ones are being prepared. Retiring is `deleteDefinition`."},"unit":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}]},"key":{"type":"string","description":"Stable machine name: lower case letters, digits and `_`, starting with a letter. A CSV column with this header imports into the definition.","examples":["eps"],"pattern":"^[a-z][a-z0-9_]{0,63}$"},"kind":{"anyOf":[{"type":"string","const":"attribute"},{"type":"string","const":"assessment"},{"type":"string","const":"category"},{"type":"string","const":"metric"}],"description":"`attribute`: a property of the subject. `assessment`: a judgement about a conversation (yes/no assessments feed the assessment report). `category`: a classification. `metric`: a measured number, with a `unit`."},"name":{"type":"string","maxLength":120,"minLength":1},"subject":{"anyOf":[{"type":"string","const":"contact"},{"type":"string","const":"conversation"}],"description":"What the facts describe."},"valueType":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"number"},{"type":"string","const":"boolean"},{"type":"string","const":"date"},{"type":"string","const":"option"}],"description":"The JSON type of the facts' values: a string, a number, a boolean, a `YYYY-MM-DD` date, or the key of one of the options."}},"additionalProperties":false},"RaizCreateDefinitionConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateDefinitionConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateDefinitionConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizDefinitionRetiredFailure"},{"$ref":"#/components/schemas/RaizDefinitionTypeLockedFailure"},{"$ref":"#/components/schemas/RaizKeyInUseFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"DEFINITION_RETIRED":"#/components/schemas/RaizDefinitionRetiredFailure","DEFINITION_TYPE_LOCKED":"#/components/schemas/RaizDefinitionTypeLockedFailure","KEY_IN_USE":"#/components/schemas/RaizKeyInUseFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizCreateDefinitionServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateDefinitionServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateDefinitionServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateEvalCaseBody":{"type":"object","required":["conversationId","replyMessageId","expectation","preferredResponse","feedbackKind"],"properties":{"conversationId":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"replyMessageId":{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"expectation":{"type":"string","description":"What the Agent should have done instead, for whoever replays the case: a short rubric, never the contact's personal data.","maxLength":4000,"minLength":1,"pattern":"\\S"},"preferredResponse":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S","description":"The team's preferred reply or procedure. Private evidence, never automatically instructions."},"feedbackKind":{"anyOf":[{"type":"string","const":"incorrect"},{"type":"string","const":"simpler"},{"type":"string","const":"incomplete"}]}},"additionalProperties":false},"RaizCreateEvalRunBody":{"type":"object","required":["agentId","confirmCost"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"candidate":{"type":"object","properties":{"instructions":{"anyOf":[{"type":"string","description":"What the Agent does and how: its role, what it may and may not do, the facts it relies on.","maxLength":100000,"minLength":1},{"type":"null"}]},"integrationProcedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentIntegrationProcedureInput"},"description":"Text Agents. Procedures a connection publishes (`listConnections`, checked live in Account), each saved with its current text and run as a free-form procedure beside `procedures`. In an update, the complete new set.","maxItems":32},"model":{"anyOf":[{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"Text Agents. The tier that writes replies. `arbolito/agile`: quickest and least expensive, for direct conversations. `arbolito/balanced`: more deliberate answers at moderate cost. `arbolito/advanced`: strong reasoning for complex instructions and many tools, with an adjustable `reasoningEffort`. `arbolito/top`: the most capable, for the hardest cases, with an adjustable `reasoningEffort` up to `xhigh`. Every tier reads images and PDF documents. Null: the default, as `arbolito/agile`."},{"type":"null"}]},"procedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentProcedureInput"},"description":"The Agent's procedures, as a complete set: a procedure left out is removed. Keep each existing procedure's `id`; a new one may omit it.","maxItems":64},"reasoningEffort":{"anyOf":[{"anyOf":[{"type":"string","const":"none"},{"type":"string","const":"low"},{"type":"string","const":"medium"},{"type":"string","const":"high"},{"type":"string","const":"xhigh"}],"description":"Text Agents whose tier reasons (`arbolito/advanced`, `arbolito/top`, or an Agent already running a model that reasons): `none` answers fastest, `high` deliberates most, and `xhigh`, on `arbolito/advanced` and `arbolito/top`, deliberates past it. Null: the tier's default. A tier that does not reason refuses it (AGENT_SETTINGS_INVALID)."},{"type":"null"}]}},"description":"The candidate version: what changes in what the model reads. Omitted fields keep the live Agent's; `integrationProcedures` and `procedures` are complete sets, as in `updateAgent`.","additionalProperties":false},"feedbackCaseId":{"type":"string","description":"Evaluation case id.","examples":["evc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"caseIds":{"type":"array","items":{"type":"string","description":"Evaluation case id.","examples":["evc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Agent's kept cases to replay. Omitted: its 50 newest kept cases.","maxItems":50,"minItems":1,"uniqueItems":true},"confirmCost":{"type":"boolean","const":true,"description":"A run calls paid models: the candidate's model on every step of each case's reply, then a small judge model per case. Send `true` to accept that cost."}},"additionalProperties":false},"RaizCreateEvalRunConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateEvalRunConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateEvalRunConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizEvalCasesUnavailableFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"}],"discriminator":{"propertyName":"code","mapping":{"EVAL_CASES_UNAVAILABLE":"#/components/schemas/RaizEvalCasesUnavailableFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure"}}},"RaizCreateEvalRunServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateEvalRunServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateEvalRunServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizFeedbackProposalUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","FEEDBACK_PROPOSAL_UNAVAILABLE":"#/components/schemas/RaizFeedbackProposalUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateEvalRunUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateEvalRunUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateEvalRunUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAgentProceduresInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentSettingsInvalidFailure"},{"$ref":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"AGENT_PROCEDURES_INVALID":"#/components/schemas/RaizAgentProceduresInvalidFailure","AGENT_SETTINGS_INVALID":"#/components/schemas/RaizAgentSettingsInvalidFailure","INTEGRATION_PROCEDURE_UNAVAILABLE":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure"}}},"RaizCreateFactBody":{"type":"object","required":["definitionId"],"properties":{"contactId":{"type":"string","description":"The contact the fact is about, for a definition whose subject is `contact`. Give it or `conversationId`, not both. The id of a merged duplicate asserts on the contact that absorbed it.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"conversationId":{"type":"string","description":"The conversation the fact is about, for a definition whose subject is `conversation`.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"definitionId":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"observedAt":{"type":"string","description":"When the value was true or observed (RFC 3339). Defaults to now. The current fact is the newest observation that was not rejected.","format":"date-time"},"reason":{"type":"string","description":"Why it holds: the evidence, in a sentence.","maxLength":2000,"minLength":1},"sourceConversationId":{"type":"string","description":"A closed conversation where the value was learned, cited as evidence.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"sourceMessageId":{"type":"string","description":"The message of `sourceConversationId` that says it. Requires `sourceConversationId`.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"value":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}],"description":"A string (text), number, boolean, ISO date `YYYY-MM-DD` (date) or option key (option), per the definition's value type."},"valueStatus":{"anyOf":[{"type":"string","const":"known"},{"type":"string","const":"unknown"},{"type":"string","const":"not_applicable"}],"default":"known","description":"`known` asserts `value`; `unknown` and `not_applicable` assert that there is no value (FHIR data-absent reasons) and take no `value`."}},"additionalProperties":false},"RaizCreateFactConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateFactConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateFactConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizDefinitionNotActiveFailure"},{"$ref":"#/components/schemas/RaizSourceConversationOpenFailure"}],"discriminator":{"propertyName":"code","mapping":{"DEFINITION_NOT_ACTIVE":"#/components/schemas/RaizDefinitionNotActiveFailure","SOURCE_CONVERSATION_OPEN":"#/components/schemas/RaizSourceConversationOpenFailure"}}},"RaizCreateFactServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateFactServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateFactServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateFactUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateFactUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateFactUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizFactSubjectMismatchFailure"},{"$ref":"#/components/schemas/RaizFactValueInvalidFailure"}],"discriminator":{"propertyName":"code","mapping":{"FACT_SUBJECT_MISMATCH":"#/components/schemas/RaizFactSubjectMismatchFailure","FACT_VALUE_INVALID":"#/components/schemas/RaizFactValueInvalidFailure"}}},"RaizCreateKnowledgeDocumentBody":{"type":"object","required":["kind","title"],"properties":{"crawl":{"$ref":"#/components/schemas/RaizCrawlSettings","description":"Website documents only. Default: 20 pages, depth 2."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"file":{"$ref":"#/components/schemas/RaizKnowledgeFileInput","description":"File documents only."},"kind":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"file"},{"type":"string","const":"website"}],"description":"`text`: written inline. `file`: an uploaded document (PDF, Word, Excel, HTML, CSV, plain text or Markdown). `website`: a snapshot of approved web pages."},"sourceUrl":{"$ref":"#/components/schemas/HttpsUrl","description":"Website documents only: the HTTPS page to start from. Its origin must be approved for this deployment; only same-origin pages under its path are followed, and robots.txt is respected."},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused document is never searched; its index is kept."},"text":{"type":"string","description":"Text documents only: the content, plain text or Markdown.","maxLength":1000000,"minLength":1},"title":{"type":"string","maxLength":200,"minLength":1}},"additionalProperties":false},"RaizCreateKnowledgeDocumentServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateKnowledgeDocumentServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateKnowledgeDocumentServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateKnowledgeDocumentUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateKnowledgeDocumentUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateKnowledgeDocumentUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizKnowledgeFileInvalidFailure"},{"$ref":"#/components/schemas/RaizKnowledgeKindMismatchFailure"},{"$ref":"#/components/schemas/RaizWebsiteNotApprovedFailure"}],"discriminator":{"propertyName":"code","mapping":{"KNOWLEDGE_FILE_INVALID":"#/components/schemas/RaizKnowledgeFileInvalidFailure","KNOWLEDGE_KIND_MISMATCH":"#/components/schemas/RaizKnowledgeKindMismatchFailure","WEBSITE_NOT_APPROVED":"#/components/schemas/RaizWebsiteNotApprovedFailure"}}},"RaizCreateProfileBody":{"anyOf":[{"type":"object","required":["agentId","name","channelType"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelId":{"anyOf":[{"type":"string","description":"The line to contact from, of the profile's channel type. Null: the Agent's own channel; for calls, then the platform's shared line.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When a conversation may start, in the profile's time zone. Empty: any time. Outside them `createConversation` fails with OUTSIDE_CONTACT_HOURS and nothing is sent.","maxItems":14},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"name":{"type":"string","description":"What the profile is for, as people read it.","maxLength":200,"minLength":1},"timeZone":{"anyOf":[{"type":"string","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$","description":"IANA time zone of the contact hours. Null: the organization's."},{"type":"null"}]},"channelType":{"type":"string","const":"voice"},"firstMessage":{"anyOf":[{"type":"string","description":"What the Agent says first on every call, instead of its own first message. May reference request variables as `{{name}}`.","maxLength":2000,"minLength":1},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","description":"What these calls are about, added to the Agent's instructions on every call. May reference request variables as `{{name}}`.","maxLength":8000,"minLength":1},{"type":"null"}]}},"description":"A profile that places calls with a voice Agent.","additionalProperties":false},{"type":"object","required":["agentId","name","channelType","template"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelId":{"anyOf":[{"type":"string","description":"The line to contact from, of the profile's channel type. Null: the Agent's own channel; for calls, then the platform's shared line.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When a conversation may start, in the profile's time zone. Empty: any time. Outside them `createConversation` fails with OUTSIDE_CONTACT_HOURS and nothing is sent.","maxItems":14},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"name":{"type":"string","description":"What the profile is for, as people read it.","maxLength":200,"minLength":1},"timeZone":{"anyOf":[{"type":"string","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$","description":"IANA time zone of the contact hours. Null: the organization's."},{"type":"null"}]},"channelType":{"type":"string","const":"whatsapp"},"template":{"$ref":"#/components/schemas/RaizProfileTemplateInput","description":"The approved template that opens every conversation. WhatsApp allows a business to start a conversation only with one."}},"description":"A profile that opens WhatsApp conversations with an approved template; its text Agent answers the contact's replies.","additionalProperties":false}]},"RaizCreateProfileConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateProfileConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateProfileConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizCreateProfileServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateProfileServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateProfileServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateProfileUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateProfileUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateProfileUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTimeZoneUnknownFailure"},{"$ref":"#/components/schemas/RaizChannelAgentMismatchFailure"}],"discriminator":{"propertyName":"code","mapping":{"TIME_ZONE_UNKNOWN":"#/components/schemas/RaizTimeZoneUnknownFailure","CHANNEL_AGENT_MISMATCH":"#/components/schemas/RaizChannelAgentMismatchFailure"}}},"RaizCreateSuppressionBody":{"anyOf":[{"type":"object","required":["kind","phone","reason"],"properties":{"kind":{"type":"string","const":"phone"},"phone":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"reason":{"type":"string","description":"Why contacting is forbidden, for the people who review rules.","maxLength":500,"minLength":1}},"description":"Forbid one phone number.","additionalProperties":false},{"type":"object","required":["kind","phonePrefix","reason"],"properties":{"kind":{"type":"string","const":"phone_prefix"},"phonePrefix":{"type":"string","description":"`+` and the leading digits of the numbers to forbid: a country code (`+57`) or a range (`+57300`).","examples":["+57300"],"pattern":"^\\+[1-9][0-9]{0,13}$"},"reason":{"type":"string","description":"Why contacting is forbidden, for the people who review rules.","maxLength":500,"minLength":1}},"description":"Forbid every number that starts with a prefix.","additionalProperties":false},{"type":"object","required":["ipNetwork","kind","reason"],"properties":{"ipNetwork":{"type":"string","description":"An IPv4 or IPv6 address or CIDR network (`203.0.113.0/24`). Host bits are cleared: `203.0.113.7/24` stores `203.0.113.0/24`.","examples":["203.0.113.0/24"],"maxLength":64,"minLength":2},"kind":{"type":"string","const":"ip_network"},"reason":{"type":"string","description":"Why contacting is forbidden, for the people who review rules.","maxLength":500,"minLength":1}},"description":"Forbid web visitors from an IP network (the Widget).","additionalProperties":false},{"type":"object","required":["countryCode","kind","reason"],"properties":{"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code.","pattern":"^[A-Z]{2}$"},"kind":{"type":"string","const":"country"},"reason":{"type":"string","description":"Why contacting is forbidden, for the people who review rules.","maxLength":500,"minLength":1}},"description":"Forbid a country. Each channel matches it against what it knows: a phone number's country, a web visitor's location.","additionalProperties":false}]},"RaizCreateSuppressionServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateSuppressionServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateSuppressionServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateTemplateBody":{"type":"object","required":["body","category","channelId","language","name"],"properties":{"body":{"type":"object","required":["text"],"properties":{"examples":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1},"description":"One sample value per variable, in order. Required when the text has variables: WhatsApp reviews them.","maxItems":20},"text":{"type":"string","description":"Up to 1024 characters. Variables are `{{1}}`, `{{2}}`, … in order; sending fills them from `template.parameters`.","maxLength":1024,"minLength":1}},"additionalProperties":false},"buttons":{"type":"array","items":{"anyOf":[{"type":"object","required":["text","type"],"properties":{"text":{"type":"string","maxLength":25,"minLength":1},"type":{"type":"string","const":"quick_reply"}},"additionalProperties":false},{"type":"object","required":["text","type","url"],"properties":{"text":{"type":"string","maxLength":25,"minLength":1},"type":{"type":"string","const":"url"},"url":{"type":"string","description":"A fixed https link (no variables).","maxLength":2000,"pattern":"^https://[^{}\\s]+$"}},"additionalProperties":false},{"type":"object","required":["text","type"],"properties":{"phone":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"text":{"type":"string","maxLength":25,"minLength":1},"type":{"type":"string","const":"phone_number"},"phoneNumber":{"$ref":"#/components/schemas/RaizPhoneNumber","deprecated":true,"description":"Deprecated: use `phone`. Answered until 2027-01-28."}},"additionalProperties":false}]},"description":"Up to 10 buttons: at most 2 links and 1 phone number; quick replies stay together, before or after the others.","maxItems":10},"category":{"anyOf":[{"type":"string","const":"marketing"},{"type":"string","const":"utility"}],"description":"`utility` for messages about something the person asked for (appointments, orders); `marketing` for promotions. WhatsApp may recategorize."},"channelId":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"footer":{"type":"string","maxLength":60,"minLength":1},"header":{"anyOf":[{"type":"object","required":["format","text"],"properties":{"format":{"type":"string","const":"text"},"text":{"type":"string","description":"Without variables.","maxLength":60,"minLength":1,"pattern":"^[^{}]*$"}},"additionalProperties":false},{"type":"object","required":["example","format"],"properties":{"example":{"type":"object","required":["data","mediaType"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in base64, at most 5242880 bytes decoded.","maxLength":6990508,"minLength":4},"fileName":{"type":"string","description":"The name the contact sees for a document.","maxLength":240,"minLength":1,"pattern":"^[^/\\\\\\u0000-\\u001f\\u007f]+$"},"mediaType":{"type":"string","const":"application/pdf"}},"additionalProperties":false},"format":{"type":"string","const":"document"}},"additionalProperties":false},{"type":"object","required":["example","format"],"properties":{"example":{"type":"object","required":["data","mediaType"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in base64, at most 5242880 bytes decoded.","maxLength":6990508,"minLength":4},"mediaType":{"anyOf":[{"type":"string","const":"image/jpeg"},{"type":"string","const":"image/png"}]}},"additionalProperties":false},"format":{"type":"string","const":"image"}},"additionalProperties":false},{"type":"object","required":["example","format"],"properties":{"example":{"type":"object","required":["data","mediaType"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in base64, at most 5242880 bytes decoded.","maxLength":6990508,"minLength":4},"mediaType":{"type":"string","const":"video/mp4"}},"additionalProperties":false},"format":{"type":"string","const":"video"}},"additionalProperties":false}],"description":"Shown above the body: a fixed `text`, or a `document` (PDF), `image` (JPEG or PNG) or `video` (MP4) whose file each send provides. A media header needs a sample `example` for WhatsApp's review; it is used only for that review."},"language":{"type":"string","description":"WhatsApp's language code, for example `es`, `es_MX` or `en_US`.","examples":["es"],"pattern":"^[a-z]{2,3}(_[A-Z]{2})?$"},"name":{"type":"string","description":"Lower case letters, digits and underscores.","examples":["appointment_reminder"],"pattern":"^[a-z0-9_]{1,512}$"}},"additionalProperties":false},"RaizCreateTemplateConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateTemplateConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateTemplateConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizChannelNotReadyFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"}],"discriminator":{"propertyName":"code","mapping":{"CHANNEL_NOT_READY":"#/components/schemas/RaizChannelNotReadyFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure"}}},"RaizCreateTemplateNotFoundError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateTemplateNotFoundFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateTemplateNotFoundFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTemplateNotFoundFailure"},{"$ref":"#/components/schemas/RaizResourceNotFoundFailure"}],"discriminator":{"propertyName":"code","mapping":{"TEMPLATE_NOT_FOUND":"#/components/schemas/RaizTemplateNotFoundFailure","RESOURCE_NOT_FOUND":"#/components/schemas/RaizResourceNotFoundFailure"}}},"RaizCreateTemplateServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateTemplateServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateTemplateServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizCreateTemplateTooManyRequestsError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreateTemplateTooManyRequestsFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreateTemplateTooManyRequestsFailure":{"oneOf":[{"$ref":"#/components/schemas/RateLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRateLimitedFailure"}],"discriminator":{"propertyName":"code","mapping":{"RATE_LIMITED":"#/components/schemas/RateLimitedFailure","WHATSAPP_RATE_LIMITED":"#/components/schemas/RaizWhatsappRateLimitedFailure"}}},"RaizCreditsExhaustedError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizCreditsExhaustedFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizCreditsExhaustedFailure":{"type":"object","description":"The organization's credits do not cover this, so nothing was started. Try again once the organization adds credits.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["CREDITS_EXHAUSTED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizDailyReportInProgressError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDailyReportInProgressFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDailyReportInProgressFailure":{"type":"object","description":"The daily report you asked for is still on its way; it arrives within a minute.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["DAILY_REPORT_IN_PROGRESS"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizDailyReportRecipientsMissingError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDailyReportRecipientsMissingFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDailyReportRecipientsMissingFailure":{"type":"object","description":"The daily report has no recipients. Add them in `settings.dailyReport.recipients` first.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["DAILY_REPORT_RECIPIENTS_MISSING"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizDefinition":{"type":"object","required":["agentIds","createdAt","description","id","instructions","key","kind","name","options","status","subject","unit","updatedAt","valueType","version"],"properties":{"agentIds":{"type":"array","items":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Agents that use the definition. Empty: every Agent of the organization.","maxItems":100},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"instructions":{"anyOf":[{"type":"string","description":"How the AI decides the value."},{"type":"null"}]},"key":{"type":"string"},"kind":{"anyOf":[{"type":"string","const":"attribute"},{"type":"string","const":"assessment"},{"type":"string","const":"category"},{"type":"string","const":"metric"}],"description":"`attribute`: a property of the subject. `assessment`: a judgement about a conversation (yes/no assessments feed the assessment report). `category`: a classification. `metric`: a measured number, with a `unit`."},"name":{"type":"string"},"options":{"type":"array","items":{"type":"object","required":["description","id","key","label"],"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","description":"Option id.","examples":["opt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^opt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"key":{"type":"string"},"label":{"type":"string"}},"additionalProperties":false},"description":"The active options, in order. Retired options keep typing the facts that use them but are not listed.","maxItems":100},"status":{"anyOf":[{"type":"string","const":"draft"},{"type":"string","const":"active"},{"type":"string","const":"retired"}]},"subject":{"anyOf":[{"type":"string","const":"contact"},{"type":"string","const":"conversation"}],"description":"What the facts describe."},"unit":{"anyOf":[{"type":"string","description":"UCUM unit of a metric."},{"type":"null"}]},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"valueType":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"number"},{"type":"string","const":"boolean"},{"type":"string","const":"date"},{"type":"string","const":"option"}],"description":"The JSON type of the facts' values: a string, a number, a boolean, a `YYYY-MM-DD` date, or the key of one of the options."},"version":{"type":"integer","minimum":1}},"additionalProperties":false},"RaizDefinitionNotActiveFailure":{"type":"object","description":"Facts can be asserted only under an active definition.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["DEFINITION_NOT_ACTIVE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizDefinitionOptionInput":{"type":"object","required":["key","label"],"properties":{"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"key":{"type":"string","description":"Stable machine name of the option; a fact's value is this key.","pattern":"^[a-z][a-z0-9_]{0,63}$"},"label":{"type":"string","maxLength":120,"minLength":1}},"additionalProperties":false},"RaizDefinitionOptionsInvalidError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDefinitionOptionsInvalidFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDefinitionOptionsInvalidFailure":{"type":"object","description":"Only a definition whose value type is `option` has options; it needs at least one, and option keys must be unique.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["DEFINITION_OPTIONS_INVALID"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizDefinitionPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizDefinition"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizDefinitionPageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizDefinitionPage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDefinitionResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizDefinition"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDefinitionRetiredFailure":{"type":"object","description":"The definition is retired and can no longer change.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["DEFINITION_RETIRED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizDefinitionTypeLockedFailure":{"type":"object","description":"The value type and subject of a definition cannot change once it has facts. Retire it and create a new one instead.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["DEFINITION_TYPE_LOCKED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizDeleteAgentConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteAgentConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteAgentConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAgentInUseFailure"},{"$ref":"#/components/schemas/RaizAgentModalityLockedFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"AGENT_IN_USE":"#/components/schemas/RaizAgentInUseFailure","AGENT_MODALITY_LOCKED":"#/components/schemas/RaizAgentModalityLockedFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizDeleteChannelBadGatewayError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteChannelBadGatewayFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteChannelBadGatewayFailure":{"oneOf":[{"$ref":"#/components/schemas/OutcomeUnknownFailure"},{"$ref":"#/components/schemas/RaizWhatsappDeliveryFailedFailure"}],"discriminator":{"propertyName":"code","mapping":{"OUTCOME_UNKNOWN":"#/components/schemas/OutcomeUnknownFailure","WHATSAPP_DELIVERY_FAILED":"#/components/schemas/RaizWhatsappDeliveryFailedFailure"}}},"RaizDeleteChannelBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteChannelBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteChannelBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizReportFilterUnsupportedFailure"},{"$ref":"#/components/schemas/RaizReportRangeInvalidFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","REPORT_FILTER_UNSUPPORTED":"#/components/schemas/RaizReportFilterUnsupportedFailure","REPORT_RANGE_INVALID":"#/components/schemas/RaizReportRangeInvalidFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizDeleteChannelConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteChannelConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteChannelConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAgentNotTextFailure"},{"$ref":"#/components/schemas/RaizCallInProgressFailure"},{"$ref":"#/components/schemas/RaizConversationClosedFailure"},{"$ref":"#/components/schemas/RaizConversationNotHandedOffFailure"},{"$ref":"#/components/schemas/RaizConversationOpenFailure"},{"$ref":"#/components/schemas/RaizDailyReportInProgressFailure"},{"$ref":"#/components/schemas/RaizDefinitionNotActiveFailure"},{"$ref":"#/components/schemas/RaizDefinitionRetiredFailure"},{"$ref":"#/components/schemas/RaizDefinitionTypeLockedFailure"},{"$ref":"#/components/schemas/RaizHandoffAlreadyContinuedFailure"},{"$ref":"#/components/schemas/RaizReplyInProgressFailure"},{"$ref":"#/components/schemas/RaizOutsideContactHoursFailure"},{"$ref":"#/components/schemas/RaizProviderAccountExistsFailure"},{"$ref":"#/components/schemas/RaizProviderAccountInUseFailure"},{"$ref":"#/components/schemas/RaizSourceConversationOpenFailure"},{"$ref":"#/components/schemas/RaizSuppressionExistsFailure"},{"$ref":"#/components/schemas/RaizTaskNotRetryableFailure"},{"$ref":"#/components/schemas/RaizCampaignAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizCampaignNoRecipientsFailure"},{"$ref":"#/components/schemas/RaizChannelAgentRequiredFailure"},{"$ref":"#/components/schemas/RaizChannelEndpointInUseFailure"},{"$ref":"#/components/schemas/RaizChannelNotReadyFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizConversationViewLimitReachedFailure"},{"$ref":"#/components/schemas/RaizConversationViewNameTakenFailure"},{"$ref":"#/components/schemas/RaizTemplateNotApprovedFailure"},{"$ref":"#/components/schemas/RaizWhatsappAccountRestrictedFailure"},{"$ref":"#/components/schemas/RaizWhatsappAiPausedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMarketingStoppedFailure"},{"$ref":"#/components/schemas/RaizWhatsappWindowClosedFailure"},{"$ref":"#/components/schemas/RaizProviderAccountMismatchFailure"},{"$ref":"#/components/schemas/RaizProviderSecretUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizVoiceLineUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceNumberInUseFailure"},{"$ref":"#/components/schemas/RaizAgentInUseFailure"},{"$ref":"#/components/schemas/RaizAgentModalityLockedFailure"},{"$ref":"#/components/schemas/RaizBulletinLimitReachedFailure"},{"$ref":"#/components/schemas/RaizEvalCasesUnavailableFailure"},{"$ref":"#/components/schemas/RaizEvalGateUnmetFailure"},{"$ref":"#/components/schemas/RaizWidgetConflictFailure"},{"$ref":"#/components/schemas/RaizAddressInUseFailure"},{"$ref":"#/components/schemas/RaizIdentifierInUseFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"},{"$ref":"#/components/schemas/RaizKeyInUseFailure"},{"$ref":"#/components/schemas/RaizContactSuppressedFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"AGENT_NOT_TEXT":"#/components/schemas/RaizAgentNotTextFailure","CALL_IN_PROGRESS":"#/components/schemas/RaizCallInProgressFailure","CONVERSATION_CLOSED":"#/components/schemas/RaizConversationClosedFailure","CONVERSATION_NOT_HANDED_OFF":"#/components/schemas/RaizConversationNotHandedOffFailure","CONVERSATION_OPEN":"#/components/schemas/RaizConversationOpenFailure","DAILY_REPORT_IN_PROGRESS":"#/components/schemas/RaizDailyReportInProgressFailure","DEFINITION_NOT_ACTIVE":"#/components/schemas/RaizDefinitionNotActiveFailure","DEFINITION_RETIRED":"#/components/schemas/RaizDefinitionRetiredFailure","DEFINITION_TYPE_LOCKED":"#/components/schemas/RaizDefinitionTypeLockedFailure","HANDOFF_ALREADY_CONTINUED":"#/components/schemas/RaizHandoffAlreadyContinuedFailure","REPLY_IN_PROGRESS":"#/components/schemas/RaizReplyInProgressFailure","OUTSIDE_CONTACT_HOURS":"#/components/schemas/RaizOutsideContactHoursFailure","PROVIDER_ACCOUNT_EXISTS":"#/components/schemas/RaizProviderAccountExistsFailure","PROVIDER_ACCOUNT_IN_USE":"#/components/schemas/RaizProviderAccountInUseFailure","SOURCE_CONVERSATION_OPEN":"#/components/schemas/RaizSourceConversationOpenFailure","SUPPRESSION_EXISTS":"#/components/schemas/RaizSuppressionExistsFailure","TASK_NOT_RETRYABLE":"#/components/schemas/RaizTaskNotRetryableFailure","CAMPAIGN_AGENT_NOT_READY":"#/components/schemas/RaizCampaignAgentNotReadyFailure","CAMPAIGN_NO_RECIPIENTS":"#/components/schemas/RaizCampaignNoRecipientsFailure","CHANNEL_AGENT_REQUIRED":"#/components/schemas/RaizChannelAgentRequiredFailure","CHANNEL_ENDPOINT_IN_USE":"#/components/schemas/RaizChannelEndpointInUseFailure","CHANNEL_NOT_READY":"#/components/schemas/RaizChannelNotReadyFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","CONVERSATION_VIEW_LIMIT_REACHED":"#/components/schemas/RaizConversationViewLimitReachedFailure","CONVERSATION_VIEW_NAME_TAKEN":"#/components/schemas/RaizConversationViewNameTakenFailure","TEMPLATE_NOT_APPROVED":"#/components/schemas/RaizTemplateNotApprovedFailure","WHATSAPP_ACCOUNT_RESTRICTED":"#/components/schemas/RaizWhatsappAccountRestrictedFailure","WHATSAPP_AI_PAUSED":"#/components/schemas/RaizWhatsappAiPausedFailure","WHATSAPP_MARKETING_STOPPED":"#/components/schemas/RaizWhatsappMarketingStoppedFailure","WHATSAPP_WINDOW_CLOSED":"#/components/schemas/RaizWhatsappWindowClosedFailure","PROVIDER_ACCOUNT_MISMATCH":"#/components/schemas/RaizProviderAccountMismatchFailure","PROVIDER_SECRET_UNAVAILABLE":"#/components/schemas/RaizProviderSecretUnavailableFailure","VOICE_AGENT_NOT_READY":"#/components/schemas/RaizVoiceAgentNotReadyFailure","VOICE_LINE_UNAVAILABLE":"#/components/schemas/RaizVoiceLineUnavailableFailure","VOICE_NUMBER_IN_USE":"#/components/schemas/RaizVoiceNumberInUseFailure","AGENT_IN_USE":"#/components/schemas/RaizAgentInUseFailure","AGENT_MODALITY_LOCKED":"#/components/schemas/RaizAgentModalityLockedFailure","BULLETIN_LIMIT_REACHED":"#/components/schemas/RaizBulletinLimitReachedFailure","EVAL_CASES_UNAVAILABLE":"#/components/schemas/RaizEvalCasesUnavailableFailure","EVAL_GATE_UNMET":"#/components/schemas/RaizEvalGateUnmetFailure","WIDGET_CONFLICT":"#/components/schemas/RaizWidgetConflictFailure","ADDRESS_IN_USE":"#/components/schemas/RaizAddressInUseFailure","IDENTIFIER_IN_USE":"#/components/schemas/RaizIdentifierInUseFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure","KEY_IN_USE":"#/components/schemas/RaizKeyInUseFailure","CONTACT_SUPPRESSED":"#/components/schemas/RaizContactSuppressedFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizDeleteChannelForbiddenError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteChannelForbiddenFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteChannelForbiddenFailure":{"oneOf":[{"$ref":"#/components/schemas/ForbiddenFailure"},{"$ref":"#/components/schemas/RaizChannelCreationInAppFailure"},{"$ref":"#/components/schemas/RaizConversationViewAuthorOnlyFailure"},{"$ref":"#/components/schemas/RaizOutboundChannelRefusedFailure"},{"$ref":"#/components/schemas/RaizWhatsappChannelRefusedFailure"},{"$ref":"#/components/schemas/RaizWidgetRefusedFailure"}],"discriminator":{"propertyName":"code","mapping":{"FORBIDDEN":"#/components/schemas/ForbiddenFailure","CHANNEL_CREATION_IN_APP":"#/components/schemas/RaizChannelCreationInAppFailure","CONVERSATION_VIEW_AUTHOR_ONLY":"#/components/schemas/RaizConversationViewAuthorOnlyFailure","OUTBOUND_CHANNEL_REFUSED":"#/components/schemas/RaizOutboundChannelRefusedFailure","WHATSAPP_CHANNEL_REFUSED":"#/components/schemas/RaizWhatsappChannelRefusedFailure","WIDGET_REFUSED":"#/components/schemas/RaizWidgetRefusedFailure"}}},"RaizDeleteChannelGatewayTimeoutError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteChannelGatewayTimeoutFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteChannelGatewayTimeoutFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamTimeoutFailure"},{"$ref":"#/components/schemas/RaizWhatsappDeliveryUnconfirmedFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_TIMEOUT":"#/components/schemas/UpstreamTimeoutFailure","WHATSAPP_DELIVERY_UNCONFIRMED":"#/components/schemas/RaizWhatsappDeliveryUnconfirmedFailure"}}},"RaizDeleteChannelInternalServerErrorError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteChannelInternalServerErrorFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteChannelInternalServerErrorFailure":{"oneOf":[{"$ref":"#/components/schemas/InternalFailure"},{"$ref":"#/components/schemas/RaizOutboundChannelInternalFailure"},{"$ref":"#/components/schemas/RaizWhatsappChannelInternalFailure"},{"$ref":"#/components/schemas/RaizWhatsappNotSentFailure"},{"$ref":"#/components/schemas/RaizWidgetInternalFailure"}],"discriminator":{"propertyName":"code","mapping":{"INTERNAL_ERROR":"#/components/schemas/InternalFailure","OUTBOUND_CHANNEL_INTERNAL":"#/components/schemas/RaizOutboundChannelInternalFailure","WHATSAPP_CHANNEL_INTERNAL":"#/components/schemas/RaizWhatsappChannelInternalFailure","WHATSAPP_NOT_SENT":"#/components/schemas/RaizWhatsappNotSentFailure","WIDGET_INTERNAL":"#/components/schemas/RaizWidgetInternalFailure"}}},"RaizDeleteChannelNotFoundError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteChannelNotFoundFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteChannelNotFoundFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTemplateNotFoundFailure"},{"$ref":"#/components/schemas/RaizResourceNotFoundFailure"}],"discriminator":{"propertyName":"code","mapping":{"TEMPLATE_NOT_FOUND":"#/components/schemas/RaizTemplateNotFoundFailure","RESOURCE_NOT_FOUND":"#/components/schemas/RaizResourceNotFoundFailure"}}},"RaizDeleteChannelServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteChannelServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteChannelServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizTeamUnavailableFailure"},{"$ref":"#/components/schemas/RaizCampaignHeaderNotStoredFailure"},{"$ref":"#/components/schemas/RaizVoiceUnavailableFailure"},{"$ref":"#/components/schemas/RaizFeedbackProposalUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","TEAM_UNAVAILABLE":"#/components/schemas/RaizTeamUnavailableFailure","CAMPAIGN_HEADER_NOT_STORED":"#/components/schemas/RaizCampaignHeaderNotStoredFailure","VOICE_UNAVAILABLE":"#/components/schemas/RaizVoiceUnavailableFailure","FEEDBACK_PROPOSAL_UNAVAILABLE":"#/components/schemas/RaizFeedbackProposalUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizDeleteChannelTooManyRequestsError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteChannelTooManyRequestsFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteChannelTooManyRequestsFailure":{"oneOf":[{"$ref":"#/components/schemas/RateLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappEngagementLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRateLimitedFailure"},{"$ref":"#/components/schemas/RaizWidgetLimitReachedFailure"}],"discriminator":{"propertyName":"code","mapping":{"RATE_LIMITED":"#/components/schemas/RateLimitedFailure","WHATSAPP_ENGAGEMENT_LIMITED":"#/components/schemas/RaizWhatsappEngagementLimitedFailure","WHATSAPP_RATE_LIMITED":"#/components/schemas/RaizWhatsappRateLimitedFailure","WIDGET_LIMIT_REACHED":"#/components/schemas/RaizWidgetLimitReachedFailure"}}},"RaizDeleteChannelUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteChannelUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteChannelUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAssigneeUnavailableFailure"},{"$ref":"#/components/schemas/RaizContactUnreachableFailure"},{"$ref":"#/components/schemas/RaizDailyReportRecipientsMissingFailure"},{"$ref":"#/components/schemas/RaizDefinitionOptionsInvalidFailure"},{"$ref":"#/components/schemas/RaizFactSubjectMismatchFailure"},{"$ref":"#/components/schemas/RaizFactValueInvalidFailure"},{"$ref":"#/components/schemas/RaizImportFileInvalidFailure"},{"$ref":"#/components/schemas/RaizIpNetworkInvalidFailure"},{"$ref":"#/components/schemas/RaizProfileVariableMissingFailure"},{"$ref":"#/components/schemas/RaizTimeZoneUnknownFailure"},{"$ref":"#/components/schemas/RaizCampaignHeaderMissingFailure"},{"$ref":"#/components/schemas/RaizCampaignVariableMissingFailure"},{"$ref":"#/components/schemas/RaizChannelAgentMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateHeaderMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateHeaderRequiredFailure"},{"$ref":"#/components/schemas/RaizTemplateParametersMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateUnsupportedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMediaRejectedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMessageUnsupportedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRecipientUnavailableFailure"},{"$ref":"#/components/schemas/RaizCallRejectedFailure"},{"$ref":"#/components/schemas/RaizProviderAccountUnsupportedFailure"},{"$ref":"#/components/schemas/RaizProviderCredentialsRejectedFailure"},{"$ref":"#/components/schemas/RaizVoiceNotAvailableFailure"},{"$ref":"#/components/schemas/RaizVoiceNumberNotOwnedFailure"},{"$ref":"#/components/schemas/RaizAgentProceduresInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentWorkflowInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentSettingsInvalidFailure"},{"$ref":"#/components/schemas/RaizBulletinPeriodInvalidFailure"},{"$ref":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationToolUnavailableFailure"},{"$ref":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure"},{"$ref":"#/components/schemas/RaizKnowledgeFileInvalidFailure"},{"$ref":"#/components/schemas/RaizKnowledgeKindMismatchFailure"},{"$ref":"#/components/schemas/RaizWebsiteNotApprovedFailure"},{"$ref":"#/components/schemas/RaizWidgetVoiceUnheardFailure"},{"$ref":"#/components/schemas/RaizProviderRejectedFailure"}],"discriminator":{"propertyName":"code","mapping":{"ASSIGNEE_UNAVAILABLE":"#/components/schemas/RaizAssigneeUnavailableFailure","CONTACT_UNREACHABLE":"#/components/schemas/RaizContactUnreachableFailure","DAILY_REPORT_RECIPIENTS_MISSING":"#/components/schemas/RaizDailyReportRecipientsMissingFailure","DEFINITION_OPTIONS_INVALID":"#/components/schemas/RaizDefinitionOptionsInvalidFailure","FACT_SUBJECT_MISMATCH":"#/components/schemas/RaizFactSubjectMismatchFailure","FACT_VALUE_INVALID":"#/components/schemas/RaizFactValueInvalidFailure","IMPORT_FILE_INVALID":"#/components/schemas/RaizImportFileInvalidFailure","IP_NETWORK_INVALID":"#/components/schemas/RaizIpNetworkInvalidFailure","PROFILE_VARIABLE_MISSING":"#/components/schemas/RaizProfileVariableMissingFailure","TIME_ZONE_UNKNOWN":"#/components/schemas/RaizTimeZoneUnknownFailure","CAMPAIGN_HEADER_MISSING":"#/components/schemas/RaizCampaignHeaderMissingFailure","CAMPAIGN_VARIABLE_MISSING":"#/components/schemas/RaizCampaignVariableMissingFailure","CHANNEL_AGENT_MISMATCH":"#/components/schemas/RaizChannelAgentMismatchFailure","TEMPLATE_HEADER_MISMATCH":"#/components/schemas/RaizTemplateHeaderMismatchFailure","TEMPLATE_HEADER_REQUIRED":"#/components/schemas/RaizTemplateHeaderRequiredFailure","TEMPLATE_PARAMETERS_MISMATCH":"#/components/schemas/RaizTemplateParametersMismatchFailure","TEMPLATE_UNSUPPORTED":"#/components/schemas/RaizTemplateUnsupportedFailure","WHATSAPP_MEDIA_REJECTED":"#/components/schemas/RaizWhatsappMediaRejectedFailure","WHATSAPP_MESSAGE_UNSUPPORTED":"#/components/schemas/RaizWhatsappMessageUnsupportedFailure","WHATSAPP_RECIPIENT_UNAVAILABLE":"#/components/schemas/RaizWhatsappRecipientUnavailableFailure","CALL_REJECTED":"#/components/schemas/RaizCallRejectedFailure","PROVIDER_ACCOUNT_UNSUPPORTED":"#/components/schemas/RaizProviderAccountUnsupportedFailure","PROVIDER_CREDENTIALS_REJECTED":"#/components/schemas/RaizProviderCredentialsRejectedFailure","VOICE_NOT_AVAILABLE":"#/components/schemas/RaizVoiceNotAvailableFailure","VOICE_NUMBER_NOT_OWNED":"#/components/schemas/RaizVoiceNumberNotOwnedFailure","AGENT_PROCEDURES_INVALID":"#/components/schemas/RaizAgentProceduresInvalidFailure","AGENT_WORKFLOW_INVALID":"#/components/schemas/RaizAgentWorkflowInvalidFailure","AGENT_SETTINGS_INVALID":"#/components/schemas/RaizAgentSettingsInvalidFailure","BULLETIN_PERIOD_INVALID":"#/components/schemas/RaizBulletinPeriodInvalidFailure","INTEGRATION_PROCEDURE_UNAVAILABLE":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure","INTEGRATION_TOOL_UNAVAILABLE":"#/components/schemas/RaizIntegrationToolUnavailableFailure","KNOWLEDGE_DOCUMENT_UNAVAILABLE":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure","KNOWLEDGE_FILE_INVALID":"#/components/schemas/RaizKnowledgeFileInvalidFailure","KNOWLEDGE_KIND_MISMATCH":"#/components/schemas/RaizKnowledgeKindMismatchFailure","WEBSITE_NOT_APPROVED":"#/components/schemas/RaizWebsiteNotApprovedFailure","WIDGET_VOICE_UNHEARD":"#/components/schemas/RaizWidgetVoiceUnheardFailure","PROVIDER_REJECTED":"#/components/schemas/RaizProviderRejectedFailure"}}},"RaizDeleteConversationConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizDeleteConversationConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizDeleteConversationConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizCallInProgressFailure"},{"$ref":"#/components/schemas/RaizConversationOpenFailure"},{"$ref":"#/components/schemas/RaizReplyInProgressFailure"},{"$ref":"#/components/schemas/RaizChannelNotReadyFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"CALL_IN_PROGRESS":"#/components/schemas/RaizCallInProgressFailure","CONVERSATION_OPEN":"#/components/schemas/RaizConversationOpenFailure","REPLY_IN_PROGRESS":"#/components/schemas/RaizReplyInProgressFailure","CHANNEL_NOT_READY":"#/components/schemas/RaizChannelNotReadyFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizEmailAddress":{"type":"string","format":"email","maxLength":254},"RaizEvalCase":{"type":"object","required":["agentId","agentVersionId","conversationId","correctionMessageId","createdAt","expectation","preferredResponse","feedbackKind","version","latestRunId","id","replyMessageId","source","status","updatedAt"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"agentVersionId":{"anyOf":[{"type":"string","description":"The Agent version that wrote the reply (`agv_…`), when its turn recorded one."},{"type":"null"}]},"conversationId":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"correctionMessageId":{"anyOf":[{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"expectation":{"anyOf":[{"type":"string"},{"type":"null"}]},"preferredResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"feedbackKind":{"anyOf":[{"anyOf":[{"type":"string","const":"incorrect"},{"type":"string","const":"simpler"},{"type":"string","const":"incomplete"}]},{"type":"null"}]},"version":{"type":"integer","minimum":1},"latestRunId":{"anyOf":[{"type":"string","description":"The latest candidate prepared from this correction.","examples":["evr_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evr_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"id":{"type":"string","description":"Evaluation case id.","examples":["evc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"replyMessageId":{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"source":{"anyOf":[{"type":"string","const":"correction"},{"type":"string","const":"sample"},{"type":"string","const":"authored"}],"description":"`correction`: a person wrote right after the reply. `authored`: explicit internal team feedback. `sample`: a sampled reply."},"status":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"kept"},{"type":"string","const":"dismissed"}],"description":"`open`: not reviewed yet. `kept`: a candidate version must handle it. `dismissed`: not a case (the person only continued after a handoff, for example)."},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"}},"additionalProperties":false},"RaizEvalCasePage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizEvalCase"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizEvalCasePageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizEvalCasePage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizEvalCaseResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizEvalCase"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizEvalCasesUnavailableFailure":{"type":"object","description":"The Agent has no kept evaluation case to replay, or a named case is not one of its kept cases.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["EVAL_CASES_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizEvalGateUnmetFailure":{"type":"object","description":"This Agent requires a completed evaluation run of exactly this content, in which every case passed, before what its model reads changes. Create one with createEvalRun and send its id as evalRunId.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["EVAL_GATE_UNMET"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizEvalRun":{"type":"object","required":["agentId","evaluationMode","baseVersion","feedbackCaseVersion","baseVersionId","caseIds","feedbackCaseId","proposal","proposedInstructions","contentSha256","createdAt","endedAt","errorCode","errors","failed","id","passed","results","status","updatedAt"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"evaluationMode":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"voice_text"}],"description":"voice_text tests spoken response content with an independent model; it does not test the live voice model, audio, interruptions or telephony. Human review is required before approval."},"baseVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"feedbackCaseVersion":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"baseVersionId":{"anyOf":[{"type":"string","description":"The Agent version that was live when the run was created (`agv_…`)."},{"type":"null"}]},"caseIds":{"type":"array","items":{"type":"string","description":"Evaluation case id.","examples":["evc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"maxItems":50},"feedbackCaseId":{"anyOf":[{"type":"string","description":"Evaluation case id.","examples":["evc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"proposal":{"anyOf":[{"type":"object","required":["appliesWhen","guidance","exceptions"],"properties":{"replaceText":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]},"appliesWhen":{"type":"string","minLength":1,"maxLength":600},"guidance":{"type":"string","minLength":1,"maxLength":1200},"exceptions":{"type":"string","minLength":1,"maxLength":600}},"additionalProperties":false},{"type":"null"}]},"proposedInstructions":{"anyOf":[{"type":"string","description":"For a feedback proposal, the exact candidate instructions to review and send to updateAgent with evalRunId and expectedVersion. No live Agent has changed."},{"type":"null"}]},"contentSha256":{"type":"string","description":"SHA-256 of the candidate's content (instructions, procedures, connection procedures, model, reasoning effort): what `settings.evalGate` compares with an update's.","pattern":"^[a-f0-9]{64}$"},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"endedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string","description":"Why a `failed` run stopped: `agent_not_found`, or `integrations_unavailable` (Account could not describe the Agent's tools for 15 minutes)."},{"type":"null"}]},"errors":{"type":"integer","description":"Cases that could not be replayed or judged.","minimum":0},"failed":{"type":"integer","minimum":0},"id":{"type":"string","description":"Evaluation run id.","examples":["evr_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evr_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"passed":{"type":"integer","minimum":0},"results":{"type":"array","items":{"type":"object","required":["caseId","createdAt","errorCode","escalated","handedOff","reasons","reply","toolCalls","usage","verdict"],"properties":{"caseId":{"type":"string","description":"Evaluation case id.","examples":["evc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"errorCode":{"anyOf":[{"type":"string","description":"`empty_reply`: the candidate wrote nothing, so the contact would have read the fallback. `case_turn_missing`: the case's turn or conversation is gone. `model_error`, `timeout`, `replay_failed`: the replay or the judge failed."},{"type":"null"}]},"escalated":{"type":"boolean","description":"The candidate escalated the conversation to the team."},"handedOff":{"type":"boolean","description":"The candidate handed the conversation to a person."},"reasons":{"anyOf":[{"type":"string","description":"The judge's reasons, without personal data."},{"type":"null"}]},"reply":{"anyOf":[{"type":"string","description":"The candidate's reply as the contact would have read it, with the options it offered in brackets. Personal data like any message: it is erased with its case."},{"type":"null"}]},"toolCalls":{"type":"array","items":{"type":"string"},"description":"The tools the candidate called, in order, by name. None ran: each answered with what it answered in the original conversation."},"usage":{"anyOf":[{"type":"object","patternProperties":{"^.*$":{"type":"integer"}},"description":"Tokens and model calls the replay and the judge used."},{"type":"null"}]},"verdict":{"anyOf":[{"type":"string","const":"passed"},{"type":"string","const":"failed"},{"type":"string","const":"error"}],"description":"`passed`: the judge found the new reply does what the team expects. `failed`: it does not, or the candidate wrote no reply. `error`: the case could not be replayed or judged (`errorCode`)."}},"additionalProperties":false},"maxItems":50},"status":{"anyOf":[{"type":"string","const":"queued"},{"type":"string","const":"running"},{"type":"string","const":"completed"},{"type":"string","const":"failed"}],"description":"`queued` until the channel evaluator takes it (within a minute), `running` while cases are replayed (each result appears as it is judged), `completed` once every case has a result, `failed` when it could not continue."},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"}},"additionalProperties":false},"RaizEvalRunResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizEvalRun"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizFact":{"type":"object","required":["author","confidence","contactId","conversationId","createdAt","definition","id","observedAt","optionLabel","reviewStatus","value","valueStatus"],"properties":{"author":{"anyOf":[{"type":"string","const":"person"},{"type":"string","const":"ai"},{"type":"string","const":"system"},{"type":"string","const":"import"},{"type":"string","const":"provider"}],"description":"Who wrote the value."},"confidence":{"anyOf":[{"type":"number","description":"How sure the AI was, from 0 to 1. Null for people.","maximum":1,"minimum":0},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","description":"The contact the fact is about, for contact facts.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"conversationId":{"anyOf":[{"type":"string","description":"The conversation the fact is about, for conversation facts.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"definition":{"type":"object","required":["id","key","kind","name","valueType"],"properties":{"id":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"key":{"type":"string"},"kind":{"anyOf":[{"type":"string","const":"attribute"},{"type":"string","const":"assessment"},{"type":"string","const":"category"},{"type":"string","const":"metric"}],"description":"What the definition captures: an `attribute` (a datum), an `assessment` (a yes/no check of the conversation), a `category` (a classification such as the reason for contact) or a `metric`."},"name":{"type":"string"},"valueType":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"number"},{"type":"string","const":"boolean"},{"type":"string","const":"date"},{"type":"string","const":"option"}]}},"additionalProperties":false},"id":{"type":"string","description":"Fact id.","examples":["fct_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^fct_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"observedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"optionLabel":{"anyOf":[{"type":"string","description":"The option's label, for option facts."},{"type":"null"}]},"reviewStatus":{"anyOf":[{"type":"string","const":"unreviewed"},{"type":"string","const":"confirmed"},{"type":"string","const":"rejected"}]},"value":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}],"description":"A string (text), number, boolean, ISO date `YYYY-MM-DD` (date) or option key (option), per the definition's value type."},"valueStatus":{"anyOf":[{"type":"string","const":"known"},{"type":"string","const":"unknown"},{"type":"string","const":"not_applicable"}]}},"additionalProperties":false},"RaizFactResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizFact"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizFactSubjectMismatchFailure":{"type":"object","description":"The fact's subject (a contact or a conversation) does not match what its definition describes.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["FACT_SUBJECT_MISMATCH"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizFactValueInvalidFailure":{"type":"object","description":"The value does not match the definition's value type, or names no active option.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["FACT_VALUE_INVALID"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizFeedbackProposalUnavailableFailure":{"type":"object","description":"A usable improvement could not be prepared. The Agent has not changed. Try again later.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["FEEDBACK_PROPOSAL_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizGetAgentServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetAgentServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetAgentServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","VOICE_UNAVAILABLE":"#/components/schemas/RaizVoiceUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizGetCampaignBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetCampaignBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetCampaignBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizGetCampaignServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetCampaignServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetCampaignServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizGetChannelServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetChannelServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetChannelServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizGetChannelTooManyRequestsError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetChannelTooManyRequestsFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetChannelTooManyRequestsFailure":{"oneOf":[{"$ref":"#/components/schemas/RateLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRateLimitedFailure"}],"discriminator":{"propertyName":"code","mapping":{"RATE_LIMITED":"#/components/schemas/RateLimitedFailure","WHATSAPP_RATE_LIMITED":"#/components/schemas/RaizWhatsappRateLimitedFailure"}}},"RaizGetContactBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetContactBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetContactBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizGetContactServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetContactServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetContactServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizGetConversationBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetConversationBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetConversationBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizGetConversationServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetConversationServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetConversationServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizGetDefinitionServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetDefinitionServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetDefinitionServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizGetKnowledgeDocumentServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetKnowledgeDocumentServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetKnowledgeDocumentServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizGetOrganizationServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetOrganizationServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetOrganizationServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizGetProfileServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetProfileServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetProfileServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizGetReportBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetReportBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetReportBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizReportFilterUnsupportedFailure"},{"$ref":"#/components/schemas/RaizReportRangeInvalidFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","REPORT_FILTER_UNSUPPORTED":"#/components/schemas/RaizReportFilterUnsupportedFailure","REPORT_RANGE_INVALID":"#/components/schemas/RaizReportRangeInvalidFailure"}}},"RaizGetReportServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetReportServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetReportServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizGetTaskServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizGetTaskServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizGetTaskServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizHandoffAlreadyContinuedFailure":{"type":"object","description":"This handoff was already given back to the AI to continue. It continues once per handoff; a new escalation can be given back again.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["HANDOFF_ALREADY_CONTINUED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizIdentifierInUseFailure":{"type":"object","description":"Another contact in this organization already has this identity document.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["IDENTIFIER_IN_USE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizImportContactsBody":{"type":"object","properties":{"countryCode":{"type":"string","default":"CO","description":"Country assumed for phone numbers written without `+` and country code (ISO 3166-1 alpha-2).","pattern":"^[A-Z]{2}$"},"csv":{"type":"string","description":"The CSV as text. UTF-8 CSV with a header row (`,`, `;` or tab). Recognized columns: `given_name`, `family_name`, `phone`, `whatsapp`, `email`, `document_type`, `document_number`, `summary`; any other column is stored as metadata, or as a fact when its header is an active contact definition's key. Rows whose phone, WhatsApp, email or document matches an existing contact update that contact. Give `csv` or `file`, not both.","maxLength":12000000,"minLength":1},"file":{"type":"object","required":["data"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in standard base64, at most 12 MB decoded.","maxLength":16000000,"minLength":4}},"description":"The CSV file as read from disk, in base64, as Knowledge files are sent. UTF-8 CSV with a header row (`,`, `;` or tab). Recognized columns: `given_name`, `family_name`, `phone`, `whatsapp`, `email`, `document_type`, `document_number`, `summary`; any other column is stored as metadata, or as a fact when its header is an active contact definition's key. Rows whose phone, WhatsApp, email or document matches an existing contact update that contact.","additionalProperties":false}},"additionalProperties":false},"RaizImportContactsContentTooLargeError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizImportContactsContentTooLargeFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizImportContactsContentTooLargeFailure":{"oneOf":[{"$ref":"#/components/schemas/RequestTooLargeFailure"},{"$ref":"#/components/schemas/RaizImportFileTooLargeFailure"}],"discriminator":{"propertyName":"code","mapping":{"REQUEST_TOO_LARGE":"#/components/schemas/RequestTooLargeFailure","IMPORT_FILE_TOO_LARGE":"#/components/schemas/RaizImportFileTooLargeFailure"}}},"RaizImportContactsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizImportContactsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizImportContactsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizImportFileInvalidError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizImportFileInvalidFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizImportFileInvalidFailure":{"type":"object","description":"The import file is not valid base64 of UTF-8 text. Save the spreadsheet as CSV UTF-8 and try again.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["IMPORT_FILE_INVALID"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizImportFileTooLargeError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizImportFileTooLargeFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizImportFileTooLargeFailure":{"type":"object","description":"The import file is larger than 12 MB. Split it into several files.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["IMPORT_FILE_TOO_LARGE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizIntegrationProcedureUnavailableFailure":{"type":"object","description":"A procedure does not exist in this organization's connections, Raíz cannot run its connection, or the Agent is not a text Agent.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["INTEGRATION_PROCEDURE_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizIntegrationToolUnavailableFailure":{"type":"object","description":"An integration tool does not exist in this organization's connections, or Raíz cannot run it.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["INTEGRATION_TOOL_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizIntegrationsUnavailableFailure":{"type":"object","description":"The organization's integrations cannot be read right now. Try again shortly.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["INTEGRATIONS_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizInvalidCursorFailure":{"type":"object","description":"The cursor is malformed or belongs to a different list.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["INVALID_CURSOR"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizInvalidStateError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizInvalidStateFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizInvalidStateFailure":{"type":"object","description":"The resource is not in a state that allows this operation.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["INVALID_STATE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizIpNetworkInvalidError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizIpNetworkInvalidFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizIpNetworkInvalidFailure":{"type":"object","description":"The IP network is not a valid IPv4 or IPv6 address or CIDR block.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["IP_NETWORK_INVALID"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizKeyInUseFailure":{"type":"object","description":"Another active resource in this organization already uses this key.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["KEY_IN_USE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizKnowledgeDocument":{"type":"object","required":["byteSize","createdAt","description","fileName","id","indexErrorCode","indexedAt","indexStatus","kind","mediaType","sha256","sourceUrl","status","title","updatedAt","version"],"properties":{"byteSize":{"anyOf":[{"type":"integer","description":"Size of the stored source, bytes.","minimum":0},{"type":"null"}]},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileName":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"indexErrorCode":{"anyOf":[{"type":"string","description":"Why the last indexing failed."},{"type":"null"}]},"indexedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"indexStatus":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"indexing"},{"type":"string","const":"ready"},{"type":"string","const":"failed"}],"description":"`pending`: waiting to be crawled or indexed. `indexing`: in progress. `ready`: searchable. `failed`: see `indexErrorCode`; failed documents are retried automatically."},"kind":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"file"},{"type":"string","const":"website"}],"description":"`text`: written inline. `file`: an uploaded document (PDF, Word, Excel, HTML, CSV, plain text or Markdown). `website`: a snapshot of approved web pages."},"mediaType":{"anyOf":[{"type":"string"},{"type":"null"}]},"sha256":{"anyOf":[{"type":"string","description":"SHA-256 of the stored source, hex."},{"type":"null"}]},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused document is never searched; its index is kept."},"title":{"type":"string"},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"version":{"type":"integer","minimum":1},"content":{"type":"object","required":["text","truncated"],"properties":{"text":{"type":"string","description":"The text as indexed (Markdown), at most 200000 characters."},"truncated":{"type":"boolean"}},"description":"The extracted text. Null until the document was indexed once. Present only when expanded.","additionalProperties":false}},"additionalProperties":false},"RaizKnowledgeDocumentPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizKnowledgeDocument"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizKnowledgeDocumentPageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizKnowledgeDocumentPage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizKnowledgeDocumentResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizKnowledgeDocument"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizKnowledgeDocumentUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizKnowledgeDocumentUnavailableFailure":{"type":"object","description":"A Knowledge document does not exist in this organization.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["KNOWLEDGE_DOCUMENT_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizKnowledgeFileInput":{"type":"object","required":["data","mediaType","name"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in standard base64, at most 8 MiB decoded.","maxLength":11184812,"minLength":4},"mediaType":{"anyOf":[{"type":"string","const":"application/pdf"},{"type":"string","const":"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{"type":"string","const":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{"type":"string","const":"text/csv"},{"type":"string","const":"text/html"},{"type":"string","const":"text/markdown"},{"type":"string","const":"text/plain"}],"description":"The file's media type; it must match its content."},"name":{"type":"string","description":"File name, for people (`Tarifas 2026.pdf`).","maxLength":200,"minLength":1,"pattern":"^[^/\\\\\\u0000-\\u001f\\u007f]+$"}},"additionalProperties":false},"RaizKnowledgeFileInvalidFailure":{"type":"object","description":"The file is not valid base64, exceeds the size limit or does not match its declared type.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["KNOWLEDGE_FILE_INVALID"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizKnowledgeKindMismatchFailure":{"type":"object","description":"The change does not apply to this kind of Knowledge document.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["KNOWLEDGE_KIND_MISMATCH"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizKnowledgePassage":{"type":"object","required":["knowledgeDocumentId","score","text","title"],"properties":{"knowledgeDocumentId":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"score":{"type":"number","description":"Similarity to the query, higher is closer."},"text":{"type":"string","description":"The passage."},"title":{"type":"string","description":"The document's title."}},"additionalProperties":false},"RaizKnowledgePassagePage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizKnowledgePassage"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizKnowledgePassagePageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizKnowledgePassagePage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListAgentsBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListAgentsBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListAgentsBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListAgentsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListAgentsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListAgentsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","VOICE_UNAVAILABLE":"#/components/schemas/RaizVoiceUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListBulletinsBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListBulletinsBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListBulletinsBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListCampaignsBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListCampaignsBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListCampaignsBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListCampaignsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListCampaignsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListCampaignsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListChangesBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListChangesBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListChangesBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListChangesServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListChangesServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListChangesServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListChannelsBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListChannelsBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListChannelsBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListChannelsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListChannelsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListChannelsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListContactsBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListContactsBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListContactsBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListContactsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListContactsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListContactsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListConversationsBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListConversationsBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListConversationsBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListConversationsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListConversationsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListConversationsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListDefinitionsBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListDefinitionsBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListDefinitionsBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListDefinitionsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListDefinitionsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListDefinitionsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListEvalCasesBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListEvalCasesBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListEvalCasesBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListKnowledgeDocumentsBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListKnowledgeDocumentsBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListKnowledgeDocumentsBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListKnowledgeDocumentsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListKnowledgeDocumentsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListKnowledgeDocumentsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListProfilesBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListProfilesBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListProfilesBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListProfilesServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListProfilesServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListProfilesServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListSuppressionsBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListSuppressionsBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListSuppressionsBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListSuppressionsServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListSuppressionsServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListSuppressionsServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListTasksBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListTasksBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListTasksBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListTasksServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListTasksServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListTasksServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListTemplatesBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListTemplatesBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListTemplatesBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListTemplatesConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListTemplatesConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListTemplatesConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizChannelNotReadyFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"}],"discriminator":{"propertyName":"code","mapping":{"CHANNEL_NOT_READY":"#/components/schemas/RaizChannelNotReadyFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure"}}},"RaizListTemplatesNotFoundError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListTemplatesNotFoundFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListTemplatesNotFoundFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTemplateNotFoundFailure"},{"$ref":"#/components/schemas/RaizResourceNotFoundFailure"}],"discriminator":{"propertyName":"code","mapping":{"TEMPLATE_NOT_FOUND":"#/components/schemas/RaizTemplateNotFoundFailure","RESOURCE_NOT_FOUND":"#/components/schemas/RaizResourceNotFoundFailure"}}},"RaizListTemplatesServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListTemplatesServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListTemplatesServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizListTemplatesTooManyRequestsError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListTemplatesTooManyRequestsFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListTemplatesTooManyRequestsFailure":{"oneOf":[{"$ref":"#/components/schemas/RateLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRateLimitedFailure"}],"discriminator":{"propertyName":"code","mapping":{"RATE_LIMITED":"#/components/schemas/RateLimitedFailure","WHATSAPP_RATE_LIMITED":"#/components/schemas/RaizWhatsappRateLimitedFailure"}}},"RaizListVoicesBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListVoicesBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListVoicesBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizListVoicesServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizListVoicesServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizListVoicesServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","VOICE_UNAVAILABLE":"#/components/schemas/RaizVoiceUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizMessage":{"type":"object","required":["agentId","content","createdAt","deliveredAt","deliveryErrorCode","deliveryStatus","generation","id","memberId","occurredAt","origin","parts","position","readAt","replyTo","role"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"The Agent that wrote an Agent message. Null for every other role.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"content":{"type":"string","description":"The plain text of the parts."},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"deliveredAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"deliveryErrorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveryStatus":{"anyOf":[{"anyOf":[{"type":"string","const":"sending"},{"type":"string","const":"uncertain"},{"type":"string","const":"sent"},{"type":"string","const":"delivered"},{"type":"string","const":"read"},{"type":"string","const":"played"},{"type":"string","const":"failed"}],"description":"Delivery of an Agent or operator message on channels that report it; it only moves forward. `uncertain`: the provider did not confirm, and Raíz asks it again."},{"type":"null"}]},"generation":{"anyOf":[{"type":"object","required":["firstTokenMs","inputCachedTokens","inputTokens","model","modelCalls","outputTokens","reasoningTokens","responseMs","speechToTextMs","textToSpeechMs"],"properties":{"firstTokenMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"inputCachedTokens":{"anyOf":[{"type":"number"},{"type":"null"}]},"inputTokens":{"anyOf":[{"type":"number"},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"The tier that wrote the message."},{"type":"null"}]},"modelCalls":{"anyOf":[{"type":"number"},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"number"},{"type":"null"}]},"reasoningTokens":{"anyOf":[{"type":"number"},{"type":"null"}]},"responseMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"speechToTextMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"textToSpeechMs":{"anyOf":[{"type":"number"},{"type":"null"}]}},"description":"How the AI produced an Agent message.","additionalProperties":false},{"type":"null"}]},"id":{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"memberId":{"anyOf":[{"type":"string","description":"The person of the organization who wrote an operator message in Raíz: their member id, as Arbol Account lists it (`account.members.list`). Null when no person of the team wrote it in Raíz (see `origin`), when a machine client did, and for every other role.","maxLength":255,"minLength":1},{"type":"null"}]},"occurredAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"origin":{"anyOf":[{"anyOf":[{"type":"string","const":"business_app"},{"type":"string","const":"campaign"},{"type":"string","const":"api"}],"description":"Where an operator message came from. `business_app`: a person of the team wrote it in the WhatsApp Business app (the phone app or WhatsApp Web) on a number Raíz shares. `campaign`: a campaign sent it, and nobody of the team wrote it; the conversation's `campaignId` names the campaign. `api`: a machine client sent it to open the conversation with `createConversation`; the conversation's `requestedBy` names the client. Null for a message written in Raíz for the team (by a person, see `memberId`, or by a machine client with `sendMessage`) and for every other role."},{"type":"null"}]},"parts":{"type":"array","items":{"anyOf":[{"type":"object","required":["format","interrupted","text","type"],"properties":{"format":{"anyOf":[{"type":"string","const":"plain"},{"type":"string","const":"markdown"}]},"interrupted":{"type":"boolean","description":"The speaker was cut off (voice)."},"text":{"type":"string"},"type":{"type":"string","const":"text"}},"additionalProperties":false},{"type":"object","required":["animated","byteSize","caption","durationSeconds","fileName","kind","mediaType","transcript","type","url","urlExpiresAt"],"properties":{"animated":{"type":"boolean"},"byteSize":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"caption":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationSeconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"fileName":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","const":"image"},{"type":"string","const":"video"},{"type":"string","const":"audio"},{"type":"string","const":"voice_note"},{"type":"string","const":"document"},{"type":"string","const":"sticker"},{"type":"string","const":"recording"}]},"mediaType":{"type":"string"},"transcript":{"anyOf":[{"type":"string","description":"What a voice note or audio says."},{"type":"null"}]},"type":{"type":"string","const":"file"},"url":{"anyOf":[{"type":"string","description":"A short-lived link to the file (see `urlExpiresAt`); read the conversation again for a fresh one."},{"type":"null"}]},"urlExpiresAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]}},"additionalProperties":false},{"type":"object","required":["address","latitude","longitude","name","type","url"],"properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"type":"number"},"longitude":{"type":"number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","const":"location"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"object","required":["type","vcard"],"properties":{"type":{"type":"string","const":"contact_card"},"vcard":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["items","layout","type"],"properties":{"items":{"type":"array","items":{"type":"object","required":["description","id","title"],"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"title":{"type":"string"}},"additionalProperties":false},"maxItems":100},"layout":{"anyOf":[{"type":"string","const":"buttons"},{"type":"string","const":"list"}]},"type":{"type":"string","const":"actions"}},"additionalProperties":false},{"type":"object","required":["actionId","targetMessageId","title","type"],"properties":{"actionId":{"type":"string"},"targetMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","const":"action_reply"}},"additionalProperties":false},{"type":"object","required":["emoji","targetMessageId","type"],"properties":{"emoji":{"anyOf":[{"type":"string","description":"Null when the reaction was removed."},{"type":"null"}]},"targetMessageId":{"type":"string"},"type":{"type":"string","const":"reaction"}},"additionalProperties":false},{"type":"object","required":["category","language","name","type"],"properties":{"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","const":"template"}},"additionalProperties":false},{"type":"object","required":["connectionId","durationMs","errorCode","errorMessage","executedBy","input","output","startedAt","status","toolCallId","toolkit","toolName","truncated","type"],"properties":{"connectionId":{"anyOf":[{"type":"string","description":"The integration connection the tool ran on, for an integration's tool."},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"executedBy":{"anyOf":[{"type":"string","const":"arbol"},{"type":"string","const":"browser"},{"type":"string","const":"voice"},{"type":"string","const":"gateway"},{"type":"string","const":"custom"}],"description":"Who ran it: `arbol` (Raíz itself), `browser` (the visitor's browser), `voice` (Raíz, during a call), `gateway` (an Arbol integration through the platform) or `custom` (the organization's own server)."},"input":{"description":"The arguments the AI passed."},"output":{"description":"What the tool returned."},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"denied"}]},"toolCallId":{"type":"string"},"toolkit":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolName":{"type":"string"},"truncated":{"type":"boolean","description":"True when the input or output is shown as null because it is too large (more than 16384 bytes here, or stored outside the transcript)."},"type":{"type":"string","const":"tool"}},"additionalProperties":false},{"type":"object","required":["name","targetMessageId","type"],"properties":{"name":{"type":"string"},"targetMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","const":"event"}},"additionalProperties":false},{"type":"object","required":["providerType","type"],"properties":{"providerType":{"type":"string","description":"What the channel sent that Raíz does not represent."},"type":{"type":"string","const":"unsupported"}},"additionalProperties":false},{"type":"object","required":["subject","type"],"properties":{"subject":{"type":"string"},"type":{"type":"string","const":"email"}},"additionalProperties":false}]},"maxItems":50},"position":{"type":"integer","description":"Order in the transcript, from 0.","minimum":0},"readAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"replyTo":{"anyOf":[{"type":"object","required":["content","messageId","role"],"properties":{"content":{"anyOf":[{"type":"string","description":"Up to 280 characters."},{"type":"null"}]},"messageId":{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"role":{"anyOf":[{"type":"string"},{"type":"null"}]}},"description":"The message this one quotes.","additionalProperties":false},{"type":"null"}]},"role":{"anyOf":[{"type":"string","const":"contact"},{"type":"string","const":"agent"},{"type":"string","const":"operator"},{"type":"string","const":"system"}]}},"additionalProperties":false},"RaizMessagePage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizMessage"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizMessageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizMessage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizOrganization":{"type":"object","required":["capabilities","createdAt","id","language","name","settings","timeZone","updatedAt"],"properties":{"capabilities":{"type":"object","required":["managedVoiceOutbound"],"properties":{"managedVoiceOutbound":{"type":"boolean","description":"Whether this deployment has a configured shared outbound line. Agents in the platform voice workspace may use it while settings.channels.managedVoiceOutboundEnabled is true. This does not verify provider service health."}},"additionalProperties":false},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"id":{"$ref":"#/components/schemas/OrganizationId","description":"Verified organization identifier."},"language":{"type":"string","description":"Default language of the organization's Agents (BCP 47)."},"name":{"type":"string"},"settings":{"type":"object","required":["channels","dailyReport","productNotices","notifications","protection","whatsapp"],"properties":{"channels":{"type":"object","required":["managedVoiceOutboundEnabled","maxConcurrentOutboundCalls"],"properties":{"managedVoiceOutboundEnabled":{"type":"boolean","description":"Whether Agents without a line of their own may call out from the platform's shared number (default true)."},"maxConcurrentOutboundCalls":{"type":"integer","description":"Campaign calls the organization places at once (default 5). The scheduler starts new ones only into free slots.","minimum":1}},"additionalProperties":false},"dailyReport":{"type":"object","required":["enabled","recipients","sendAt"],"properties":{"enabled":{"type":"boolean","description":"Email the daily report every day at `sendAt`, in the organization's time zone: the calls and conversations registered in the last 24 hours, the conversations waiting for the team and those that need a review (default true). A day without activity sends nothing."},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"description":"Additional recipients for the daily report alongside eligible workspace owners, at most 10 addresses (default none). It lists the contacts of calls and conversations by name and number: choose recipients who may read the organization's conversations.","maxItems":10,"uniqueItems":true},"sendAt":{"type":"string","description":"The local time the daily report goes out, `HH:MM` in 24 hours (default `18:00`). Moving it later the same day sends nothing more that day; turning the report on after the day's time sends that day's report at once.","examples":["18:00"],"pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"}},"additionalProperties":false},"productNotices":{"type":"object","required":["events","recipients","administrators"],"properties":{"events":{"type":"array","items":{"anyOf":[{"type":"string","const":"agent-idle"},{"type":"string","const":"agent-live"},{"type":"string","const":"budget-reached"},{"type":"string","const":"budget-warning"},{"type":"string","const":"campaign-finished"},{"type":"string","const":"channel-disconnected"},{"type":"string","const":"channel-limit"},{"type":"string","const":"channel-quality"},{"type":"string","const":"channel-restored"},{"type":"string","const":"credits-exhausted"},{"type":"string","const":"import-finished"},{"type":"string","const":"knowledge-failed"},{"type":"string","const":"milestone"},{"type":"string","const":"monthly-summary"},{"type":"string","const":"outage-resolved"},{"type":"string","const":"spam-blocked"},{"type":"string","const":"template-approved"},{"type":"string","const":"template-rejected"},{"type":"string","const":"weekly-summary"}]},"description":"Product emails enabled for this organization. All are enabled unless the organization saves a selection. An empty selection turns all of them off.","uniqueItems":true,"maxItems":19},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"maxItems":10},"administrators":{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"maxItems":10}},"additionalProperties":false},"notifications":{"type":"object","required":["escalations","failedOutcomes","failures","firstReplyMinutes","frequency","phones","recipients"],"properties":{"escalations":{"type":"boolean","description":"Email the recipients, and send the phones a WhatsApp message, when the AI hands a conversation to the team: it escalates a request it cannot resolve, the contact asks for a person, or the Agent's monthly budget is spent (default true)."},"failedOutcomes":{"type":"boolean","description":"Email the recipients when the analysis of a closed conversation concludes that the contact's request was not resolved (outcome failure). A conversation closed for inactivity never counts (default true)."},"failures":{"type":"boolean","description":"Email the recipients when the AI could not answer: a WhatsApp reply that ended with the fallback message, or a call that failed or in which one of the Agent's functions failed (default true)."},"firstReplyMinutes":{"type":"integer","description":"Within how many minutes a person of the team should answer a conversation the AI handed over (default 15). Past it, the case's owner (`assigneeId`), or the team's recipients while nobody has it, is reminded once; at four times that, the organization's owners and its `productNotices.administrators` hear that it is overdue. Each wait is announced once: a contact who writes again after the team answered starts another. With a digest `frequency`, the conversation is listed again in the next digest instead. `0`: no reminders.","maximum":1440,"minimum":0},"frequency":{"anyOf":[{"type":"string","const":"immediate"},{"type":"string","const":"hourly"},{"type":"string","const":"every3Hours"},{"type":"string","const":"every6Hours"},{"type":"string","const":"every12Hours"}],"description":"How often the notices reach the team (default `immediate`). `immediate` sends each notice as it happens, one email per conversation; a failure that repeats is notified once when its cause first appears, and the conversations the same cause touches in the next hour go out together an hour later, one follow-up an hour while it lasts. `hourly`, `every3Hours`, `every6Hours` and `every12Hours` send one digest at the end of each window of that length, counted from local midnight in the organization's time zone (every six hours: 00:00, 06:00, 12:00 and 18:00), listing the conversations that still need the team; the escalation's WhatsApp message follows the same schedule. A window without notices sends nothing."},"phones":{"type":"array","items":{"type":"string","description":"A number in E.164, with its country code.","pattern":"^\\+[1-9][0-9]{7,14}$"},"description":"Who also receives the escalation notice by WhatsApp, at most 10 numbers in E.164 (default none). The message names the Agent, the organization and why the conversation was handed over, with a link to it; never the contact, the summary or the transcript. The other notices go by email only.","maxItems":10,"uniqueItems":true},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"description":"Additional recipients for team notices alongside eligible workspace owners, at most 10 addresses (default none). An email carries the conversation's link, channel, times, Agent and state, its title and summary and the analysis' evaluations; never the transcript or the captured data. A summary may name the person: choose recipients who may read the organization's conversations.","maxItems":10,"uniqueItems":true}},"additionalProperties":false},"protection":{"type":"object","required":["spamHours","voiceCallsPerHour","voiceEnabled","voiceMinutesPerDay","voiceSilentCallsPerHour","webConversationTokens","webEnabled","webMessagesPerDay","whatsappConversationTokens","whatsappEnabled","whatsappRepliesPerHour"],"properties":{"spamHours":{"type":"integer","description":"Hours someone stays in spam once they pass a limit (default 6). A person can lift the rule earlier by deleting it.","maximum":720,"minimum":1},"voiceCallsPerHour":{"type":"integer","description":"Inbound calls one number may make in an hour, whoever spoke (default 10). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier.","maximum":1000,"minimum":1},"voiceEnabled":{"type":"boolean","description":"Whether callers can fall into spam (default true). False: no call is ever refused for what its number consumed."},"voiceMinutesPerDay":{"type":"integer","description":"Minutes of inbound calls one number may use in 24 hours (default 60). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts, its calls are not answered.","maximum":1440,"minimum":1},"voiceSilentCallsPerHour":{"type":"integer","description":"Inbound calls of one number in an hour in which the caller never spoke (default 5). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier. A call that failed does not count.","maximum":1000,"minimum":1},"webConversationTokens":{"type":"integer","description":"Tokens one web conversation may use (default 10000000). A conversation that reaches it takes no more messages.","maximum":1000000000000,"minimum":10000},"webEnabled":{"type":"boolean","description":"Whether web chat visitors can fall into spam (default true)."},"webMessagesPerDay":{"type":"integer","description":"Messages one web visitor may send in 24 hours, across their chats (default 100). A visitor who reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts they cannot open a chat. Visitors are told apart by network address, so people who share one count together.","maximum":100000,"minimum":1},"whatsappConversationTokens":{"type":"integer","description":"Tokens (input, cached input included, plus output) one WhatsApp conversation may use since the AI last took it (default 10000000). A contact whose conversation reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier.","maximum":1000000000000,"minimum":10000},"whatsappEnabled":{"type":"boolean","description":"Whether WhatsApp contacts can fall into spam (default true)."},"whatsappRepliesPerHour":{"type":"integer","description":"Replies the AI may write in one WhatsApp conversation in an hour (default 60). A contact whose conversation reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts the AI does not answer them, and their messages are still stored for the team.","maximum":10000,"minimum":1}},"additionalProperties":false},"whatsapp":{"type":"object","required":["maxConcurrentReplies"],"properties":{"maxConcurrentReplies":{"type":"integer","description":"WhatsApp replies the organization's Agents write at once (default 20). A reply past it waits for the next scheduler tick, so a peak in one organization never slows the others.","minimum":1}},"additionalProperties":false}},"additionalProperties":false},"timeZone":{"type":"string","description":"IANA time zone. Reports count days in it and campaigns default to it."},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"}},"additionalProperties":false},"RaizOrganizationResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizOrganization"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizOutboundChannelInternalFailure":{"type":"object","description":"What became of the send could not be read back. Asking again never reaches the person twice.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["OUTBOUND_CHANNEL_INTERNAL"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizOutboundChannelRefusedFailure":{"type":"object","description":"Only the Campaigns Worker sends through this service, and only for a recipient of a campaign of that organization.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["OUTBOUND_CHANNEL_REFUSED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizOutsideContactHoursFailure":{"type":"object","description":"The profile's contact hours do not allow starting a conversation now. Try again within them.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["OUTSIDE_CONTACT_HOURS"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizOutsideHoursTemplate":{"type":"object","required":["language","name"],"properties":{"language":{"type":"string","description":"The template's language in WhatsApp's code, for example `es` or `es_MX`.","examples":["es"],"pattern":"^[a-z]{2,3}(_[A-Z]{2})?$"},"name":{"type":"string","description":"The template's name.","examples":["outside_hours_notice"],"pattern":"^[a-z0-9_]{1,512}$"}},"additionalProperties":false},"RaizPhoneNumber":{"type":"string","pattern":"^\\+[1-9][0-9]{1,14}$"},"RaizPostalAddress":{"type":"object","properties":{"city":{"type":"string","maxLength":120},"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2.","pattern":"^[A-Z]{2}$"},"line":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":4},"postalCode":{"type":"string","maxLength":20},"state":{"type":"string","maxLength":120},"use":{"anyOf":[{"type":"string","const":"home"},{"type":"string","const":"work"}]}},"additionalProperties":false},"RaizProfile":{"type":"object","required":["agentId","agentName","channelId","channelType","contactHours","createdAt","firstMessage","id","instructions","line","metadata","name","template","timeZone","updatedAt","version"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"agentName":{"type":"string"},"channelId":{"anyOf":[{"type":"string","description":"The channel the profile names; null to use its Agent's (see `line`).","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"}],"description":"How the profile contacts: a call with a voice Agent (`voice`), or a WhatsApp conversation opened with an approved template and held by a text Agent (`whatsapp`). Fixed at creation."},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When a conversation may start, in the profile's time zone. Empty: any time. Outside them `createConversation` fails with OUTSIDE_CONTACT_HOURS and nothing is sent.","maxItems":14},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"firstMessage":{"anyOf":[{"type":"string","description":"What the Agent says first on every call, instead of its own first message. May reference request variables as `{{name}}`.","maxLength":2000,"minLength":1},{"type":"null"}]},"id":{"type":"string","description":"Communication profile id.","examples":["prf_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^prf_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"instructions":{"anyOf":[{"type":"string","description":"What these calls are about, added to the Agent's instructions on every call. May reference request variables as `{{name}}`.","maxLength":8000,"minLength":1},{"type":"null"}]},"line":{"anyOf":[{"type":"object","required":["address","id","name"],"properties":{"address":{"anyOf":[{"type":"string","description":"The number, in E.164 form."},{"type":"null"}]},"id":{"type":"string","description":"The line to contact from, of the profile's channel type. Null: the Agent's own channel; for calls, then the platform's shared line.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"description":"The line conversations start from: the profile's own channel, or for WhatsApp its Agent's oldest line that can send. Null for a voice profile without a channel (each call uses the Agent's own line, else the managed line) or when no line can send.","additionalProperties":false},{"type":"null"}]},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"name":{"type":"string"},"template":{"anyOf":[{"type":"object","required":["language","name","parameters"],"properties":{"language":{"type":"string","description":"The template's language: WhatsApp's code (`es`, `es_MX`) or a BCP 47 tag (`es-MX`).","maxLength":15,"minLength":2},"name":{"type":"string","description":"An approved template of the channel's WhatsApp Business Account. Its body may have variables; header media and button parameters are not supported.","maxLength":512,"minLength":1},"parameters":{"type":"array","items":{"type":"string","maxLength":1024},"description":"The template's body parameters, in order. Each is a text that may reference the request's `variables` as `{{name}}`, for example `{{patient_name}}` or `Dr. {{doctor}}`.","maxItems":20}},"description":"WhatsApp profiles only.","additionalProperties":false},{"type":"null"}]},"timeZone":{"anyOf":[{"type":"string","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$","description":"IANA time zone of the contact hours. Null: the organization's."},{"type":"null"}]},"updatedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"version":{"type":"integer","minimum":1}},"additionalProperties":false},"RaizProfilePage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizProfile"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizProfilePageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizProfilePage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizProfileResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizProfile"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizProfileTemplateInput":{"type":"object","required":["language","name"],"properties":{"language":{"type":"string","description":"The template's language: WhatsApp's code (`es`, `es_MX`) or a BCP 47 tag (`es-MX`).","maxLength":15,"minLength":2},"name":{"type":"string","description":"An approved template of the channel's WhatsApp Business Account. Its body may have variables; header media and button parameters are not supported.","maxLength":512,"minLength":1},"parameters":{"type":"array","items":{"type":"string","maxLength":1024},"description":"The template's body parameters, in order. Each is a text that may reference the request's `variables` as `{{name}}`, for example `{{patient_name}}` or `Dr. {{doctor}}`.","maxItems":20}},"additionalProperties":false},"RaizProfileVariableMissingFailure":{"type":"object","description":"The profile's template parameters reference a variable that `variables` does not give.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["PROFILE_VARIABLE_MISSING"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizProviderAccountExistsFailure":{"type":"object","description":"This provider account is already registered.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["PROVIDER_ACCOUNT_EXISTS"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizProviderAccountInUseFailure":{"type":"object","description":"Channels or Agents still use this provider account. Move them to another account first.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["PROVIDER_ACCOUNT_IN_USE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizProviderAccountMismatchFailure":{"type":"object","description":"The number and the Agent belong to different voice accounts. A voice Agent answers and dials only numbers of its own account.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["PROVIDER_ACCOUNT_MISMATCH"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizProviderAccountUnsupportedFailure":{"type":"object","description":"This deployment cannot use provider accounts of this provider yet; the platform's own account is used instead.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["PROVIDER_ACCOUNT_UNSUPPORTED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizProviderCredentialsRejectedFailure":{"type":"object","description":"The provider refused the provider account's credentials, or the account is not active there.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["PROVIDER_CREDENTIALS_REJECTED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizProviderRejectedError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizProviderRejectedFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizProviderRejectedFailure":{"type":"object","description":"The provider refused the request. Check the configuration and try again.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["PROVIDER_REJECTED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizProviderSecretUnavailableFailure":{"type":"object","description":"A secret the provider account needs is not available to this deployment. Name a TENANT_ Secrets Store entry that this deployment has a binding for.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["PROVIDER_SECRET_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizRenewChannelSetupConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizRenewChannelSetupConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizRenewChannelSetupConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizChannelAgentRequiredFailure"},{"$ref":"#/components/schemas/RaizChannelEndpointInUseFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"CHANNEL_AGENT_REQUIRED":"#/components/schemas/RaizChannelAgentRequiredFailure","CHANNEL_ENDPOINT_IN_USE":"#/components/schemas/RaizChannelEndpointInUseFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizRenewChannelSetupTooManyRequestsError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizRenewChannelSetupTooManyRequestsFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizRenewChannelSetupTooManyRequestsFailure":{"oneOf":[{"$ref":"#/components/schemas/RateLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRateLimitedFailure"}],"discriminator":{"propertyName":"code","mapping":{"RATE_LIMITED":"#/components/schemas/RateLimitedFailure","WHATSAPP_RATE_LIMITED":"#/components/schemas/RaizWhatsappRateLimitedFailure"}}},"RaizReplyInProgressFailure":{"type":"object","description":"The Agent is still replying in this conversation. Try again once the reply is delivered.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["REPLY_IN_PROGRESS"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizReport":{"anyOf":[{"type":"object","required":["from","hasMore","to","name","rows"],"properties":{"from":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"hasMore":{"type":"boolean","description":"More than 1000 rows matched: narrow the range or the filters."},"to":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"name":{"type":"string","const":"conversations_daily"},"rows":{"type":"array","items":{"type":"object","required":["agentId","agentName","avgDurationSeconds","channelType","conversationCount","day","direction","escalatedCount","failureCount","negativeCount","successCount","toReviewCount"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"agentName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avgDurationSeconds":{"anyOf":[{"type":"number","description":"Average call duration; voice only."},{"type":"null"}]},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}]},"conversationCount":{"type":"integer","minimum":0},"day":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"direction":{"anyOf":[{"type":"string","const":"inbound"},{"type":"string","const":"outbound"}]},"escalatedCount":{"type":"integer","description":"Conversations the AI handed to the team: a request it could not resolve, a contact who asked for a person, or a spent budget. Still counted after the team gives one back to the AI.","minimum":0},"failureCount":{"type":"integer","minimum":0},"negativeCount":{"type":"integer","description":"Conversations whose sentiment was negative.","minimum":0},"successCount":{"type":"integer","minimum":0},"toReviewCount":{"type":"integer","description":"Conversations to review: unresolved escalations or evaluated failures, each counted once. A successful conversation explicitly resolved by the team leaves this queue; its historical escalation remains counted.","minimum":0}},"additionalProperties":false},"maxItems":1000}},"additionalProperties":false},{"type":"object","required":["from","hasMore","to","name","rows"],"properties":{"from":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"hasMore":{"type":"boolean","description":"More than 1000 rows matched: narrow the range or the filters."},"to":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"name":{"type":"string","const":"handoffs_daily"},"rows":{"type":"array","items":{"type":"object","required":["agentId","agentName","answeredCount","answeredInTimeCount","avgFirstReplySeconds","day","handoffCount","memberId","returnedCount","unattendedCount","waitingCount"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"agentName":{"anyOf":[{"type":"string"},{"type":"null"}]},"answeredCount":{"type":"integer","description":"Handoffs a person of the team answered.","minimum":0},"answeredInTimeCount":{"type":"integer","description":"Of those, the ones answered within the organization's first-reply time (`settings.notifications.firstReplyMinutes`, as it is set now).","minimum":0},"avgFirstReplySeconds":{"anyOf":[{"type":"number","description":"Average seconds from the handoff to the first message of a person of the team; null when none was answered."},{"type":"null"}]},"day":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"handoffCount":{"type":"integer","description":"Conversations the AI handed to the team that day, each once, by the handoff it keeps (its last).","minimum":0},"memberId":{"anyOf":[{"type":"string","description":"Who answered first, else the case's owner: a member id, as Arbol Account lists it. Null when nobody is named: nobody answered an unassigned case, or the answer came from the WhatsApp Business app."},{"type":"null"}]},"returnedCount":{"type":"integer","description":"Handoffs the team gave back to the AI.","minimum":0},"unattendedCount":{"type":"integer","description":"Handoffs that closed with nobody of the team answering and without going back to the AI.","minimum":0},"waitingCount":{"type":"integer","description":"Handoffs still open that nobody of the team answered.","minimum":0}},"additionalProperties":false},"maxItems":1000}},"additionalProperties":false},{"type":"object","required":["from","hasMore","to","name","rows"],"properties":{"from":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"hasMore":{"type":"boolean","description":"More than 1000 rows matched: narrow the range or the filters."},"to":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"name":{"type":"string","const":"pqrsf_daily"},"rows":{"type":"array","items":{"type":"object","required":["day","conversationCount","analyzedCount","informativeResolvedCount","informativeUnresolvedCount","formalPqrsfCount","unclassifiedCount","confirmedResolutionCount","referralRequiredCount","referralCorrectCount","referralIncorrectCount","referralPendingCount"],"properties":{"day":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"conversationCount":{"type":"integer","minimum":0},"analyzedCount":{"type":"integer","minimum":0},"informativeResolvedCount":{"type":"integer","minimum":0},"informativeUnresolvedCount":{"type":"integer","minimum":0},"formalPqrsfCount":{"type":"integer","minimum":0},"unclassifiedCount":{"type":"integer","minimum":0},"confirmedResolutionCount":{"type":"integer","minimum":0},"referralRequiredCount":{"type":"integer","minimum":0},"referralCorrectCount":{"type":"integer","minimum":0},"referralIncorrectCount":{"type":"integer","minimum":0},"referralPendingCount":{"type":"integer","minimum":0}},"additionalProperties":false},"maxItems":1000}},"additionalProperties":false},{"type":"object","required":["from","hasMore","to","name","rows"],"properties":{"from":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"hasMore":{"type":"boolean","description":"More than 1000 rows matched: narrow the range or the filters."},"to":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"name":{"type":"string","const":"tool_calls_daily"},"rows":{"type":"array","items":{"type":"object","required":["agentId","agentName","avgDurationMs","callCount","day","failedCount","p95DurationMs","toolkit","toolName"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"agentName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avgDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"callCount":{"type":"integer","minimum":0},"day":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"failedCount":{"type":"integer","minimum":0},"p95DurationMs":{"anyOf":[{"type":"number","description":"95th percentile of the call duration."},{"type":"null"}]},"toolkit":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"maxItems":1000}},"additionalProperties":false},{"type":"object","required":["from","hasMore","to","name","rows"],"properties":{"from":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"hasMore":{"type":"boolean","description":"More than 1000 rows matched: narrow the range or the filters."},"to":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"name":{"type":"string","const":"tool_calls"},"rows":{"type":"array","items":{"type":"object","required":["agentId","agentName","connectionId","conversationId","durationMs","errorCode","executedBy","messageId","occurredAt","requestId","status","toolCallId","toolkit","toolName"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"agentName":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string","description":"The integration connection the tool ran on, for an integration's tool."},{"type":"null"}]},"conversationId":{"type":"string","description":"The conversation the call was in.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"durationMs":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string","description":"Why the call failed, when it failed."},{"type":"null"}]},"executedBy":{"anyOf":[{"type":"string","description":"Who ran it: `arbol` (a Raíz tool), `browser`, `voice` (Raíz, during a call), `gateway` (an Arbol integration through the platform) or `custom` (the organization's own server)."},{"type":"null"}]},"messageId":{"type":"string","description":"The Agent message that made the call.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"occurredAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"requestId":{"anyOf":[{"type":"string","description":"The id an integration call carried; the integration's own logs of the call carry it too."},{"type":"null"}]},"status":{"anyOf":[{"type":"string","description":"`pending`, `completed`, `failed` or `denied`."},{"type":"null"}]},"toolCallId":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolkit":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"maxItems":1000}},"additionalProperties":false},{"type":"object","required":["from","hasMore","to","name","rows"],"properties":{"from":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"hasMore":{"type":"boolean","description":"More than 1000 rows matched: narrow the range or the filters."},"to":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"name":{"type":"string","const":"booking_outcomes"},"rows":{"type":"array","items":{"type":"object","required":["agentId","agentName","day","source","createdCount","confirmedCount","rescheduledCount","cancelledCount","failedCount","pendingCount","unverifiedCount","duplicateCount"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"agentName":{"anyOf":[{"type":"string"},{"type":"null"}]},"day":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"source":{"type":"string","description":"Integration recorded in the booking receipt; unknown when absent."},"createdCount":{"type":"integer","minimum":0,"description":"New appointments created by the AI, supported by successful booking receipts on the operation's completion day. Not confirmations of pre-existing appointments or appointment attendance."},"confirmedCount":{"type":"integer","minimum":0,"deprecated":true,"description":"Compatibility alias of createdCount: the same new bookings, not another category. Never add the two fields or label this as confirmations of existing appointments."},"rescheduledCount":{"type":"integer","minimum":0},"cancelledCount":{"type":"integer","minimum":0},"failedCount":{"type":"integer","minimum":0},"pendingCount":{"type":"integer","minimum":0},"unverifiedCount":{"type":"integer","minimum":0},"duplicateCount":{"type":"integer","minimum":0}},"additionalProperties":false},"maxItems":1000}},"additionalProperties":false},{"type":"object","required":["from","hasMore","to","name","snapshotAt","unverifiedCount","rows"],"properties":{"from":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"hasMore":{"type":"boolean","description":"More than 1000 rows matched: narrow the range or the filters."},"to":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"name":{"type":"string","const":"booking_details"},"snapshotAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"unverifiedCount":{"type":"integer","minimum":0},"rows":{"type":"array","items":{"type":"object","required":["conversationId","messageId","createdAt","day","specialty","patientDocument","patientName","appointmentDate","appointmentTime","professionalName","exam","cancelledAt"],"properties":{"conversationId":{"type":"string","description":"Evidence conversation.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"messageId":{"type":"string","description":"Creation receipt message.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"day":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"specialty":{"anyOf":[{"type":"string"},{"type":"null"}]},"patientDocument":{"type":"string"},"patientName":{"anyOf":[{"type":"string"},{"type":"null"}]},"appointmentDate":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"appointmentTime":{"type":"string"},"professionalName":{"anyOf":[{"type":"string"},{"type":"null"}]},"exam":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]}},"additionalProperties":false},"maxItems":1000}},"additionalProperties":false},{"type":"object","required":["from","hasMore","to","name","rows"],"properties":{"from":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"hasMore":{"type":"boolean","description":"More than 1000 rows matched: narrow the range or the filters."},"to":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"name":{"type":"string","const":"assessment_results_daily"},"rows":{"type":"array","items":{"type":"object","required":["day","definitionId","definitionKey","definitionName","noCount","unknownCount","yesCount"],"properties":{"day":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"definitionId":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"definitionKey":{"type":"string"},"definitionName":{"type":"string"},"noCount":{"type":"integer","minimum":0},"unknownCount":{"type":"integer","description":"Conversations assessed as unknown or not applicable.","minimum":0},"yesCount":{"type":"integer","minimum":0}},"additionalProperties":false},"maxItems":1000}},"additionalProperties":false},{"type":"object","required":["hasMore","name","rows"],"properties":{"hasMore":{"type":"boolean","description":"More than 1000 rows matched: narrow the range or the filters."},"name":{"type":"string","const":"campaign_progress"},"rows":{"type":"array","items":{"type":"object","required":["campaignId","campaignName","campaignStatus","completedCount","failedCount","inProgressCount","pendingCount","recipientCount","successCount"],"properties":{"campaignId":{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"campaignName":{"type":"string"},"campaignStatus":{"anyOf":[{"type":"string","const":"queued"},{"type":"string","const":"running"},{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"cancelled"}]},"completedCount":{"type":"integer","minimum":0},"failedCount":{"type":"integer","minimum":0},"inProgressCount":{"type":"integer","minimum":0},"pendingCount":{"type":"integer","minimum":0},"recipientCount":{"type":"integer","minimum":0},"successCount":{"type":"integer","description":"Recipients whose latest attempt succeeded.","minimum":0}},"additionalProperties":false},"maxItems":1000}},"additionalProperties":false},{"type":"object","required":["from","hasMore","to","name","rows"],"properties":{"from":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"hasMore":{"type":"boolean","description":"More than 1000 rows matched: narrow the range or the filters."},"to":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"name":{"type":"string","const":"usage_daily"},"rows":{"type":"array","items":{"type":"object","required":["agentId","agentName","cacheReadTokens","cacheWriteTokens","campaignId","channelType","credits","day","inputTokens","kind","model","outputTokens","pendingCount","units"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"agentName":{"anyOf":[{"type":"string"},{"type":"null"}]},"cacheReadTokens":{"type":"integer","minimum":0},"cacheWriteTokens":{"type":"integer","minimum":0},"campaignId":{"anyOf":[{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"channelType":{"anyOf":[{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}]},{"type":"null"}]},"credits":{"anyOf":[{"type":"number","description":"Credits at the organization's rates when each part was reported; null while none has its value yet.","minimum":0},{"type":"null"}]},"day":{"type":"string","description":"A calendar day in the organization's time zone.","format":"date"},"inputTokens":{"type":"integer","minimum":0},"kind":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"phone_line"},{"type":"string","const":"phone_numbers"},{"type":"string","const":"messages"},{"type":"string","const":"templates"},{"type":"string","const":"conversations"},{"type":"string","const":"tools"},{"type":"string","const":"ai"}],"description":"`voice`: minutes of the voice Agent, rounded up per call. `phone_line`: minutes of the phone line; its credits include what the line was charged when the plan bills it apart. `phone_numbers`: a number's month. `messages`: WhatsApp messages, in and out. `templates`: WhatsApp templates sent. `conversations`: WhatsApp conversations started. `tools`: integration tools the Agent ran; its credits include what an integration charged for a run, once billing hands that over. `ai`: model calls."},"model":{"anyOf":[{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"For `ai`: the tier of the model that answered. Null for every other kind."},{"type":"null"}]},"outputTokens":{"type":"integer","minimum":0},"pendingCount":{"type":"integer","description":"Parts still waiting for their value in credits.","minimum":0},"units":{"type":"number","description":"Minutes, messages, templates, conversations, numbers, tool runs or model calls.","minimum":0}},"additionalProperties":false},"maxItems":1000}},"additionalProperties":false}]},"RaizReportFilterUnsupportedFailure":{"type":"object","description":"A filter does not apply to the selected report.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["REPORT_FILTER_UNSUPPORTED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizReportRangeInvalidFailure":{"type":"object","description":"The report range is invalid: `from` must not be after `to`.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["REPORT_RANGE_INVALID"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizReportResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizReport"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizResourceNotFoundError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizResourceNotFoundFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizResourceNotFoundFailure":{"type":"object","description":"The requested resource does not exist in this organization.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["RESOURCE_NOT_FOUND"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizRetryTaskConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizRetryTaskConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizRetryTaskConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTaskNotRetryableFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"}],"discriminator":{"propertyName":"code","mapping":{"TASK_NOT_RETRYABLE":"#/components/schemas/RaizTaskNotRetryableFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure"}}},"RaizRetryTaskServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizRetryTaskServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizRetryTaskServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizSearchKnowledgeBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizSearchKnowledgeBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSearchKnowledgeBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizSearchKnowledgeBody":{"type":"object","required":[],"properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":20,"description":"Maximum items returned in one page. Defaults to 8; larger reads require another cursor.","default":8},"agentId":{"type":"string","description":"Search only the documents this Agent consults, as the Agent would.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"knowledgeDocumentIds":{"type":"array","items":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"Search only these documents (intersected with the Agent's, when both are given).","maxItems":100,"minItems":1,"uniqueItems":true},"q":{"type":"string","description":"What to look for, in a few words.","maxLength":500,"minLength":2},"query":{"type":"string","maxLength":500,"minLength":2,"deprecated":true,"description":"Deprecated: use `q`. Answered until 2027-01-28."}},"additionalProperties":false},"RaizSearchKnowledgeServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizSearchKnowledgeServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSearchKnowledgeServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizSendDailyReportResult":{"type":"object","required":["endsAt","recipients","requestedAt","until"],"properties":{"endsAt":{"type":"string","format":"date-time","description":"The end of the 24 hours the report covers, in RFC 3339 format, in UTC."},"recipients":{"type":"integer","description":"How many addresses Account resolved when the report was requested. Delivery resolves them again.","minimum":1},"requestedAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"until":{"type":"string","format":"date-time","deprecated":true,"description":"Deprecated: use `endsAt`. Answered until 2027-01-28."}},"additionalProperties":false},"RaizSendDailyReportResultResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizSendDailyReportResult"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSendDailyReportServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizSendDailyReportServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSendDailyReportServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizSendMessageBadGatewayError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizSendMessageBadGatewayFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSendMessageBadGatewayFailure":{"oneOf":[{"$ref":"#/components/schemas/OutcomeUnknownFailure"},{"$ref":"#/components/schemas/RaizWhatsappDeliveryFailedFailure"}],"discriminator":{"propertyName":"code","mapping":{"OUTCOME_UNKNOWN":"#/components/schemas/OutcomeUnknownFailure","WHATSAPP_DELIVERY_FAILED":"#/components/schemas/RaizWhatsappDeliveryFailedFailure"}}},"RaizSendMessageBody":{"type":"object","required":[],"properties":{"parts":{"type":"array","items":{"anyOf":[{"type":"object","required":["text","type"],"properties":{"format":{"anyOf":[{"type":"string","const":"plain"},{"type":"string","const":"markdown"}],"default":"plain"},"text":{"type":"string","maxLength":4096,"minLength":1},"type":{"type":"string","const":"text"}},"additionalProperties":false},{"type":"object","required":["data","mediaType","type"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in base64, at most 5242880 bytes decoded.","maxLength":6990508,"minLength":4},"fileName":{"type":"string","description":"The name the contact sees for a document.","maxLength":240,"minLength":1,"pattern":"^[^/\\\\\\u0000-\\u001f\\u007f]+$"},"mediaType":{"anyOf":[{"type":"string","const":"image/jpeg"},{"type":"string","const":"image/png"},{"type":"string","const":"application/pdf"},{"type":"string","const":"text/plain"},{"type":"string","const":"application/msword"},{"type":"string","const":"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{"type":"string","const":"application/vnd.ms-excel"},{"type":"string","const":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{"type":"string","const":"application/vnd.ms-powerpoint"},{"type":"string","const":"application/vnd.openxmlformats-officedocument.presentationml.presentation"}],"description":"JPEG and PNG are sent as an image; the others as a document."},"type":{"type":"string","const":"file"}},"description":"A private web or WhatsApp attachment. WhatsApp accepts one per message, with the text as its caption; web accepts multiple within the combined 5 MiB budget.","additionalProperties":false}]},"description":"The message's parts: text and, on WhatsApp, at most one file, whose caption is the text. Give `parts` or `template`.","maxItems":10,"minItems":1},"template":{"type":"object","required":["language","name"],"properties":{"header":{"$ref":"#/components/schemas/RaizTemplateHeaderFile","description":"The file shown above the text of a template whose header is a document, image or video, different on every send (an appointment's receipt, a ticket). Required by such a template, refused by any other."},"language":{"type":"string","maxLength":15,"minLength":2},"name":{"type":"string","maxLength":512,"minLength":1},"parameters":{"type":"array","items":{"type":"string","maxLength":1024},"description":"Body parameters, in order.","maxItems":20}},"additionalProperties":false,"description":"WhatsApp only: send an approved template of the conversation's channel instead of `parts`, the one message WhatsApp delivers when the person has not written in the last 24 hours. Like any message of the team, it pauses the Agent for this person; to have the Agent answer their reply, give the conversation back with `continueConversation` and its `template` instead."},"replyToMessageId":{"type":"string","description":"A message of the same conversation to quote.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"RaizSendMessageConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizSendMessageConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSendMessageConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizConversationClosedFailure"},{"$ref":"#/components/schemas/RaizChannelNotReadyFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateNotApprovedFailure"},{"$ref":"#/components/schemas/RaizWhatsappAiPausedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMarketingStoppedFailure"},{"$ref":"#/components/schemas/RaizWhatsappWindowClosedFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"},{"$ref":"#/components/schemas/RaizContactSuppressedFailure"}],"discriminator":{"propertyName":"code","mapping":{"CONVERSATION_CLOSED":"#/components/schemas/RaizConversationClosedFailure","CHANNEL_NOT_READY":"#/components/schemas/RaizChannelNotReadyFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","TEMPLATE_NOT_APPROVED":"#/components/schemas/RaizTemplateNotApprovedFailure","WHATSAPP_AI_PAUSED":"#/components/schemas/RaizWhatsappAiPausedFailure","WHATSAPP_MARKETING_STOPPED":"#/components/schemas/RaizWhatsappMarketingStoppedFailure","WHATSAPP_WINDOW_CLOSED":"#/components/schemas/RaizWhatsappWindowClosedFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure","CONTACT_SUPPRESSED":"#/components/schemas/RaizContactSuppressedFailure"}}},"RaizSendMessageNotFoundError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizSendMessageNotFoundFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSendMessageNotFoundFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTemplateNotFoundFailure"},{"$ref":"#/components/schemas/RaizResourceNotFoundFailure"}],"discriminator":{"propertyName":"code","mapping":{"TEMPLATE_NOT_FOUND":"#/components/schemas/RaizTemplateNotFoundFailure","RESOURCE_NOT_FOUND":"#/components/schemas/RaizResourceNotFoundFailure"}}},"RaizSendMessageTooManyRequestsError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizSendMessageTooManyRequestsFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSendMessageTooManyRequestsFailure":{"oneOf":[{"$ref":"#/components/schemas/RateLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRateLimitedFailure"}],"discriminator":{"propertyName":"code","mapping":{"RATE_LIMITED":"#/components/schemas/RateLimitedFailure","WHATSAPP_RATE_LIMITED":"#/components/schemas/RaizWhatsappRateLimitedFailure"}}},"RaizSendMessageUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizSendMessageUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSendMessageUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTemplateHeaderMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateHeaderRequiredFailure"},{"$ref":"#/components/schemas/RaizTemplateParametersMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateUnsupportedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMediaRejectedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMessageUnsupportedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRecipientUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"TEMPLATE_HEADER_MISMATCH":"#/components/schemas/RaizTemplateHeaderMismatchFailure","TEMPLATE_HEADER_REQUIRED":"#/components/schemas/RaizTemplateHeaderRequiredFailure","TEMPLATE_PARAMETERS_MISMATCH":"#/components/schemas/RaizTemplateParametersMismatchFailure","TEMPLATE_UNSUPPORTED":"#/components/schemas/RaizTemplateUnsupportedFailure","WHATSAPP_MEDIA_REJECTED":"#/components/schemas/RaizWhatsappMediaRejectedFailure","WHATSAPP_MESSAGE_UNSUPPORTED":"#/components/schemas/RaizWhatsappMessageUnsupportedFailure","WHATSAPP_RECIPIENT_UNAVAILABLE":"#/components/schemas/RaizWhatsappRecipientUnavailableFailure"}}},"RaizSourceConversationOpenFailure":{"type":"object","description":"A fact can cite only a closed conversation as its source.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["SOURCE_CONVERSATION_OPEN"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizStartCampaignBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizStartCampaignBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizStartCampaignBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizStartCampaignConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizStartCampaignConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizStartCampaignConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizCampaignAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizCampaignNoRecipientsFailure"},{"$ref":"#/components/schemas/RaizChannelNotReadyFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateNotApprovedFailure"},{"$ref":"#/components/schemas/RaizVoiceAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"CAMPAIGN_AGENT_NOT_READY":"#/components/schemas/RaizCampaignAgentNotReadyFailure","CAMPAIGN_NO_RECIPIENTS":"#/components/schemas/RaizCampaignNoRecipientsFailure","CHANNEL_NOT_READY":"#/components/schemas/RaizChannelNotReadyFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","TEMPLATE_NOT_APPROVED":"#/components/schemas/RaizTemplateNotApprovedFailure","VOICE_AGENT_NOT_READY":"#/components/schemas/RaizVoiceAgentNotReadyFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizStartCampaignNotFoundError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizStartCampaignNotFoundFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizStartCampaignNotFoundFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTemplateNotFoundFailure"},{"$ref":"#/components/schemas/RaizResourceNotFoundFailure"}],"discriminator":{"propertyName":"code","mapping":{"TEMPLATE_NOT_FOUND":"#/components/schemas/RaizTemplateNotFoundFailure","RESOURCE_NOT_FOUND":"#/components/schemas/RaizResourceNotFoundFailure"}}},"RaizStartCampaignUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizStartCampaignUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizStartCampaignUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizCampaignHeaderMissingFailure"},{"$ref":"#/components/schemas/RaizCampaignVariableMissingFailure"},{"$ref":"#/components/schemas/RaizChannelAgentMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateHeaderMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateHeaderRequiredFailure"},{"$ref":"#/components/schemas/RaizTemplateParametersMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateUnsupportedFailure"}],"discriminator":{"propertyName":"code","mapping":{"CAMPAIGN_HEADER_MISSING":"#/components/schemas/RaizCampaignHeaderMissingFailure","CAMPAIGN_VARIABLE_MISSING":"#/components/schemas/RaizCampaignVariableMissingFailure","CHANNEL_AGENT_MISMATCH":"#/components/schemas/RaizChannelAgentMismatchFailure","TEMPLATE_HEADER_MISMATCH":"#/components/schemas/RaizTemplateHeaderMismatchFailure","TEMPLATE_HEADER_REQUIRED":"#/components/schemas/RaizTemplateHeaderRequiredFailure","TEMPLATE_PARAMETERS_MISMATCH":"#/components/schemas/RaizTemplateParametersMismatchFailure","TEMPLATE_UNSUPPORTED":"#/components/schemas/RaizTemplateUnsupportedFailure"}}},"RaizSuppression":{"type":"object","required":["cause","countryCode","createdAt","expiresAt","id","ipNetwork","kind","phone","phonePrefix","reason","scope"],"properties":{"cause":{"anyOf":[{"anyOf":[{"type":"string","const":"VOICE_CALLS"},{"type":"string","const":"VOICE_MINUTES"},{"type":"string","const":"VOICE_SILENT_CALLS"},{"type":"string","const":"WEB_MESSAGES"},{"type":"string","const":"WEB_TOKENS"},{"type":"string","const":"WHATSAPP_REPLIES"},{"type":"string","const":"WHATSAPP_TOKENS"}],"description":"The limit someone passed to fall into spam: `VOICE_CALLS` (`voiceCallsPerHour`), `VOICE_MINUTES` (`voiceMinutesPerDay`), `VOICE_SILENT_CALLS` (`voiceSilentCallsPerHour`), `WEB_MESSAGES` (`webMessagesPerDay`), `WEB_TOKENS` (`webConversationTokens`), `WHATSAPP_REPLIES` (`whatsappRepliesPerHour`) or `WHATSAPP_TOKENS` (`whatsappConversationTokens`)."},{"type":"null"}]},"countryCode":{"anyOf":[{"type":"string","description":"ISO 3166-1 alpha-2 country code.","pattern":"^[A-Z]{2}$"},{"type":"null"}]},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","description":"When a spam rule stops applying. An expired rule is no longer listed. Null: a rule a person wrote, which applies until deleted."},{"type":"null"}]},"id":{"type":"string","description":"Suppression id.","examples":["sup_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^sup_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"ipNetwork":{"anyOf":[{"type":"string","description":"IPv4 or IPv6 network in CIDR notation."},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","const":"phone"},{"type":"string","const":"phone_prefix"},{"type":"string","const":"ip_network"},{"type":"string","const":"country"}]},"phone":{"anyOf":[{"type":"string","description":"Exact E.164 phone number."},{"type":"null"}]},"phonePrefix":{"anyOf":[{"type":"string","description":"E.164 prefix: every number starting with it."},{"type":"null"}]},"reason":{"type":"string"},"scope":{"anyOf":[{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}],"description":"The one channel a spam rule applies to, and only to what arrives on it: calls from the number are not answered (`voice`), the AI does not reply to the contact while their messages are still stored (`whatsapp`), or the visitor cannot open or continue a chat (`web`). Messages and calls the organization sends are never held back by spam."},{"type":"null"}]}},"additionalProperties":false},"RaizSuppressionExistsError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizSuppressionExistsFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSuppressionExistsFailure":{"type":"object","description":"This organization already has this suppression rule.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["SUPPRESSION_EXISTS"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizSuppressionPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizSuppression"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizSuppressionPageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizSuppressionPage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizSuppressionResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizSuppression"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizTask":{"type":"object","required":["attemptCount","cancelRequestedAt","createdAt","createdBy","endedAt","errorCode","id","kind","progress","result","retryable","startedAt","status","subjectId"],"properties":{"attemptCount":{"type":"integer","description":"Attempts the task has made so far, retries included. A task that works in slices counts one attempt for all of them.","minimum":0},"cancelRequestedAt":{"anyOf":[{"type":"string","description":"When someone asked the running task to stop. It ends `cancelled` at its next checkpoint, keeping what it already did.","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},"createdBy":{"anyOf":[{"type":"string","description":"The person or client that started it."},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"errorCode":{"anyOf":[{"type":"string","description":"Why it failed, when it failed."},{"type":"null"}]},"id":{"type":"string","description":"Task id.","examples":["job_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^job_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"kind":{"anyOf":[{"type":"string","const":"contact_import"},{"type":"string","const":"analysis_run"},{"type":"string","const":"knowledge_crawl"}],"description":"What the task does."},"progress":{"type":"object","required":["failedSteps","finishedSteps","totalSteps"],"properties":{"failedSteps":{"type":"integer","minimum":0},"finishedSteps":{"type":"integer","minimum":0},"totalSteps":{"type":"integer","minimum":0}},"description":"Steps of a task that splits its work into child jobs (one per conversation of a re-analysis). Zero steps: the task runs as one unit.","additionalProperties":false},"result":{"anyOf":[{"type":"object","patternProperties":{"^.*$":{}},"description":"What the task produced, by kind (for example the import counts). While an import runs, its progress (`processedRows` of `totalRows`); a cancelled import keeps the counts of what it did."},{"type":"null"}]},"retryable":{"type":"boolean","description":"The task failed and `retryTask` can queue it again: its kind retries and it has attempts left."},"startedAt":{"anyOf":[{"type":"string","description":"An instant in RFC 3339 format, in UTC.","format":"date-time"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","const":"queued"},{"type":"string","const":"running"},{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"cancelled"}]},"subjectId":{"anyOf":[{"type":"string","description":"The resource the task acts on, when it has one."},{"type":"null"}]}},"additionalProperties":false},"RaizTaskNotRetryableFailure":{"type":"object","description":"This task cannot be retried: its kind never retries, or it already used every attempt. Start it again from its resource.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["TASK_NOT_RETRYABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizTaskPage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizTask"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizTaskPageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizTaskPage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizTaskResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizTask"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizTeamUnavailableFailure":{"type":"object","description":"The organization's team cannot be read right now. Try again shortly.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["TEAM_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizTemplate":{"type":"object","required":["body","buttons","category","channelId","footer","header","id","language","name","parameterCount","rejectedReason","sendable","status"],"properties":{"body":{"anyOf":[{"type":"string","description":"The body text, with its `{{n}}` variables."},{"type":"null"}]},"buttons":{"type":"array","items":{"type":"object","required":["text","type"],"properties":{"text":{"type":"string"},"type":{"type":"string","description":"`quick_reply`, `url`, `phone_number`, …"}},"additionalProperties":false},"maxItems":10},"category":{"anyOf":[{"type":"string","description":"`marketing`, `utility` or `authentication`."},{"type":"null"}]},"channelId":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"footer":{"anyOf":[{"type":"string"},{"type":"null"}]},"header":{"anyOf":[{"type":"object","required":["format","text"],"properties":{"format":{"type":"string","description":"`text`, `document`, `image`, `video` or `location`, lower case."},"text":{"anyOf":[{"type":"string","description":"A `text` header's text, with its `{{1}}` variable if any; null for the others."},{"type":"null"}]}},"description":"What is shown above the body. A `document`, `image` or `video` header takes its file on every send (`template.header` of `createConversation`).","additionalProperties":false},{"type":"null"}]},"id":{"type":"string","description":"The template's id at WhatsApp.","examples":["1192339204654487"],"pattern":"^[0-9]{1,32}$"},"language":{"type":"string"},"name":{"type":"string"},"parameterCount":{"type":"integer","description":"How many body values sending it needs (`template.parameters`).","minimum":0},"rejectedReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendable":{"type":"boolean","description":"Raíz can send it: approved, with variables only in the body and, if it has a media header, a document, image or video one (its file goes with each send). Header text variables, location headers and button parameters are not sent yet."},"status":{"type":"string","description":"WhatsApp's review status, lower case: `approved`, `pending`, `rejected`, `paused`, `disabled`…"}},"additionalProperties":false},"RaizTemplateHeaderFile":{"type":"object","required":["data","mediaType"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in base64, at most 5242880 bytes decoded.","maxLength":6990508,"minLength":4},"fileName":{"type":"string","description":"The name the contact sees for a document.","maxLength":240,"minLength":1,"pattern":"^[^/\\\\\\u0000-\\u001f\\u007f]+$"},"mediaType":{"anyOf":[{"type":"string","const":"application/pdf"},{"type":"string","const":"image/jpeg"},{"type":"string","const":"image/png"},{"type":"string","const":"video/mp4"}],"description":"It must fit the template's header: a PDF for `document`, JPEG or PNG for `image`, MP4 for `video`."}},"additionalProperties":false},"RaizTemplateHeaderMismatchFailure":{"type":"object","description":"The header file does not fit the template: a document header takes a PDF, an image header a JPEG or PNG, a video header an MP4, and a template without a media header takes no file.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["TEMPLATE_HEADER_MISMATCH"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizTemplateHeaderRequiredFailure":{"type":"object","description":"The template's header is a document, image or video: send its file with the template.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["TEMPLATE_HEADER_REQUIRED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizTemplateNotApprovedFailure":{"type":"object","description":"The template is not approved for sending: it is pending review, rejected, paused or disabled.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["TEMPLATE_NOT_APPROVED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizTemplateNotFoundFailure":{"type":"object","description":"The template does not exist in this channel's WhatsApp Business Account.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["TEMPLATE_NOT_FOUND"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizTemplatePage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizTemplate"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizTemplatePageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizTemplatePage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizTemplateParametersMismatchFailure":{"type":"object","description":"The number of parameters does not match the variables of the template's body.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["TEMPLATE_PARAMETERS_MISMATCH"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizTemplateResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizTemplate"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizTemplateUnsupportedFailure":{"type":"object","description":"The template needs header text variables, a location header or button parameters, which cannot be sent yet.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["TEMPLATE_UNSUPPORTED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizTimeZoneUnknownError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizTimeZoneUnknownFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizTimeZoneUnknownFailure":{"type":"object","description":"The time zone is not in the IANA time zone database.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["TIME_ZONE_UNKNOWN"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizUpdateAgentBody":{"type":"object","required":[],"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"firstMessage":{"anyOf":[{"type":"string","description":"What a voice Agent says first when a call connects, inbound or outbound. Text Agents do not use it: how they open a WhatsApp conversation is `settings.greeting`, and an outbound WhatsApp conversation opens with an approved template.","maxLength":2000,"minLength":1},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","description":"What the Agent does and how: its role, what it may and may not do, the facts it relies on.","maxLength":100000,"minLength":1},{"type":"null"}]},"integrationProcedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentIntegrationProcedureInput"},"description":"Text Agents. Procedures a connection publishes (`listConnections`, checked live in Account), each saved with its current text and run as a free-form procedure beside `procedures`. In an update, the complete new set.","maxItems":32},"integrationTools":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentIntegrationToolInput"},"description":"The integrations' tools the Agent may call, each on one of the organization's connections (`listConnections`, checked live in Account). The Agent runs each as its connection lists it at every turn. In an update, the complete new set.","maxItems":200},"knowledgeDocumentIds":{"type":"array","items":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Knowledge documents the Agent consults. In an update, the complete new set.","maxItems":100,"uniqueItems":true},"language":{"type":"string","description":"BCP 47 language tag.","examples":["es-CO"],"pattern":"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"procedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentProcedureInput"},"description":"The Agent's procedures, as a complete set: a procedure left out is removed. Keep each existing procedure's `id`; a new one may omit it.","maxItems":64},"settings":{"$ref":"#/components/schemas/RaizAgentSettingsInput","description":"How the Agent behaves. In an update, only the keys you send change: a key left out stays and `null` returns it to its default. A key's own value, such as `policy` or `voice`, is replaced whole. An update that changes `modality` starts from the defaults. Text and voice settings apply only to Agents of that modality."},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused Agent answers nothing and places no calls."},"timeZone":{"anyOf":[{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},{"type":"null"}]},"workflow":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentWorkflow"},{"type":"null"}],"description":"The conversation graph the Agent follows beside its instructions and procedures: conversation steps, tool steps and endings, with no loops and a way forward from every step. A tool step needs one of the Agent's integration tools that only reads and that exactly one connection holds. It runs by itself, with the step's constant arguments and without the model choosing them, and follows its success or failure edge; on a call, a step that cannot run follows its failure edge. Checked against the Agent as it will be once saved (AGENT_WORKFLOW_INVALID says where one is wrong), also when an update changes the Agent's tools. In an update, omit it to keep the current one and send `null` to remove it."},"evalRunId":{"type":"string","description":"With the Agent's `settings.evalGate`: the completed evaluation run (`createEvalRun`) of exactly the content this update leaves the model reading, in which every case passed.","examples":["evr_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evr_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"modality":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"text"}],"description":"`voice`: phone calls. `text`: WhatsApp and web chat."},"name":{"type":"string","maxLength":120,"minLength":1}},"additionalProperties":false},"RaizUpdateAgentConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateAgentConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateAgentConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAgentInUseFailure"},{"$ref":"#/components/schemas/RaizAgentModalityLockedFailure"},{"$ref":"#/components/schemas/RaizEvalGateUnmetFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"AGENT_IN_USE":"#/components/schemas/RaizAgentInUseFailure","AGENT_MODALITY_LOCKED":"#/components/schemas/RaizAgentModalityLockedFailure","EVAL_GATE_UNMET":"#/components/schemas/RaizEvalGateUnmetFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizUpdateAgentServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateAgentServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateAgentServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","VOICE_UNAVAILABLE":"#/components/schemas/RaizVoiceUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizUpdateAgentUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateAgentUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateAgentUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAgentProceduresInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentWorkflowInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentSettingsInvalidFailure"},{"$ref":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationToolUnavailableFailure"},{"$ref":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"AGENT_PROCEDURES_INVALID":"#/components/schemas/RaizAgentProceduresInvalidFailure","AGENT_WORKFLOW_INVALID":"#/components/schemas/RaizAgentWorkflowInvalidFailure","AGENT_SETTINGS_INVALID":"#/components/schemas/RaizAgentSettingsInvalidFailure","INTEGRATION_PROCEDURE_UNAVAILABLE":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure","INTEGRATION_TOOL_UNAVAILABLE":"#/components/schemas/RaizIntegrationToolUnavailableFailure","KNOWLEDGE_DOCUMENT_UNAVAILABLE":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure"}}},"RaizUpdateBulletinBody":{"type":"object","required":[],"properties":{"agentId":{"anyOf":[{"type":"string","description":"The one Agent that applies it; null for every Agent of the organization.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string","format":"date-time","description":"When Agents stop applying it, later than its start. Null keeps it until it is deleted."},{"type":"null"}],"description":"When Agents stop applying it, later than its start; send the current instant to end it now, or null to keep it until it is deleted."},"startsAt":{"type":"string","format":"date-time","description":"When Agents start applying it."},"text":{"type":"string","description":"What is happening and what the Agents should do about it, written as you would tell them. One situation per bulletin; long reference material belongs in Knowledge.","examples":["There is no nutrition service this week. If someone asks for it, offer general medicine."],"maxLength":1000,"minLength":1,"pattern":"\\S"}},"additionalProperties":false},"RaizUpdateCampaignBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateCampaignBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateCampaignBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizUpdateCampaignBody":{"type":"object","required":[],"properties":{"channelId":{"anyOf":[{"type":"string","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"The line calls or messages leave from, of the campaign's kind. Null: the Agent's own."},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.","maxItems":14},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"scheduledEndAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled."},{"type":"null"}]},"scheduledStartAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing starts before this instant, even once the campaign is started."},{"type":"null"}]},"timeZone":{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},"addRecipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaignRecipientInput"},"maxItems":10000,"description":"Adds these recipients, before or after the start, skipping numbers the campaign already has. A list longer than one request arrives in parts this way, and repeating a part reaches nobody twice."},"agentId":{"type":"string","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"Changes only before the campaign starts."},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"firstMessage":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1,"description":"Calls only: what the Agent says first on every call. Null: the Agent's own first message."},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1,"description":"On a call, what it is about, added to the Agent's instructions. On WhatsApp, what the Agent should know when someone replies."},{"type":"null"}]},"maxAttempts":{"type":"integer","description":"Calls or messages per recipient at most, retries included.","maximum":10,"minimum":1},"name":{"type":"string","maxLength":200,"minLength":1},"paused":{"type":"boolean","description":"Pause (`true`) or resume (`false`) a started campaign. A campaign that never started is started with `startCampaign` (INVALID_STATE here)."},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaignRecipientInput"},"maxItems":10000,"description":"Before the campaign starts: the complete set, replacing whoever was there. Once it started: only adds, skipping numbers it already has."},"retryAfterMinutes":{"type":"integer","description":"Wait before a retry or reminder, up to a week.","maximum":10080,"minimum":1},"retryOn":{"type":"array","items":{"anyOf":[{"type":"string","const":"no_answer"},{"type":"string","const":"failure"},{"type":"string","const":"not_delivered"}],"description":"On a call, `no_answer`: nobody answered, the line was busy, or the Agent heard no one; `failure`: it was answered but its analysis judged it unsuccessful. On WhatsApp, `no_answer`: it arrived and the person has not replied once `retryAfterMinutes` pass; `not_delivered`: it did not arrive."},"description":"What earns another attempt: `no_answer` and `failure` on a call, `no_answer` and `not_delivered` on WhatsApp.","maxItems":2,"uniqueItems":true},"template":{"$ref":"#/components/schemas/RaizCampaignTemplateInput","description":"WhatsApp only. On a started campaign it applies to the messages still to go."}},"additionalProperties":false},"RaizUpdateCampaignConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateCampaignConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateCampaignConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizCampaignAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizCampaignNoRecipientsFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizVoiceAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"CAMPAIGN_AGENT_NOT_READY":"#/components/schemas/RaizCampaignAgentNotReadyFailure","CAMPAIGN_NO_RECIPIENTS":"#/components/schemas/RaizCampaignNoRecipientsFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","VOICE_AGENT_NOT_READY":"#/components/schemas/RaizVoiceAgentNotReadyFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizUpdateCampaignServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateCampaignServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateCampaignServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizCampaignHeaderNotStoredFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","CAMPAIGN_HEADER_NOT_STORED":"#/components/schemas/RaizCampaignHeaderNotStoredFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizUpdateCampaignUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateCampaignUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateCampaignUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTimeZoneUnknownFailure"},{"$ref":"#/components/schemas/RaizCampaignVariableMissingFailure"},{"$ref":"#/components/schemas/RaizChannelAgentMismatchFailure"}],"discriminator":{"propertyName":"code","mapping":{"TIME_ZONE_UNKNOWN":"#/components/schemas/RaizTimeZoneUnknownFailure","CAMPAIGN_VARIABLE_MISSING":"#/components/schemas/RaizCampaignVariableMissingFailure","CHANNEL_AGENT_MISMATCH":"#/components/schemas/RaizChannelAgentMismatchFailure"}}},"RaizUpdateChannelBadGatewayError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelBadGatewayFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelBadGatewayFailure":{"oneOf":[{"$ref":"#/components/schemas/OutcomeUnknownFailure"},{"$ref":"#/components/schemas/RaizWhatsappDeliveryFailedFailure"}],"discriminator":{"propertyName":"code","mapping":{"OUTCOME_UNKNOWN":"#/components/schemas/OutcomeUnknownFailure","WHATSAPP_DELIVERY_FAILED":"#/components/schemas/RaizWhatsappDeliveryFailedFailure"}}},"RaizUpdateChannelBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizReportFilterUnsupportedFailure"},{"$ref":"#/components/schemas/RaizReportRangeInvalidFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","REPORT_FILTER_UNSUPPORTED":"#/components/schemas/RaizReportFilterUnsupportedFailure","REPORT_RANGE_INVALID":"#/components/schemas/RaizReportRangeInvalidFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizUpdateChannelBody":{"type":"object","required":[],"properties":{"aiCoveragePercent":{"type":"integer","minimum":0,"maximum":100},"businessHours":{"anyOf":[{"$ref":"#/components/schemas/RaizBusinessHours","description":"WhatsApp channels only: the number's business hours, complete. Omitted, they stay as they are, whatever else the update changes; null removes them (it attends at all hours). Every window must close after it opens."},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string","description":"The Agent to assign; null stops inbound automation. WhatsApp outbound notifications may remain enabled.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"inboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}]},"outboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"profile":{"type":"object","properties":{"about":{"type":"string","maxLength":139,"minLength":1},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","format":"email","maxLength":128},"vertical":{"anyOf":[{"type":"string","const":"ALCOHOL"},{"type":"string","const":"APPAREL"},{"type":"string","const":"AUTO"},{"type":"string","const":"BEAUTY"},{"type":"string","const":"EDU"},{"type":"string","const":"ENTERTAIN"},{"type":"string","const":"EVENT_PLAN"},{"type":"string","const":"FINANCE"},{"type":"string","const":"GOVT"},{"type":"string","const":"GROCERY"},{"type":"string","const":"HEALTH"},{"type":"string","const":"HOTEL"},{"type":"string","const":"NONPROFIT"},{"type":"string","const":"ONLINE_GAMBLING"},{"type":"string","const":"OTC_DRUGS"},{"type":"string","const":"OTHER"},{"type":"string","const":"PHYSICAL_GAMBLING"},{"type":"string","const":"PROF_SERVICES"},{"type":"string","const":"RESTAURANT"},{"type":"string","const":"RETAIL"},{"type":"string","const":"TRAVEL"}],"description":"The business category."},"websites":{"type":"array","items":{"type":"string","maxLength":256,"pattern":"^https?://"},"maxItems":2}},"description":"WhatsApp channels only: changes to the business profile, applied at WhatsApp.","additionalProperties":false},"widget":{"$ref":"#/components/schemas/RaizWidgetSettingsInput","description":"The web chat widget's configuration."},"widgetLogo":{"anyOf":[{"type":"object","required":["data","mediaType"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The image, base64-encoded (at most 256 KiB decoded).","maxLength":349528,"minLength":4},"mediaType":{"anyOf":[{"type":"string","const":"image/png"},{"type":"string","const":"image/jpeg"},{"type":"string","const":"image/webp"}]}},"description":"A new logo for the web widget, stored by Raíz; its key becomes `widget.logoObjectKey`. Null removes the logo.","additionalProperties":false},{"type":"null"}]}},"additionalProperties":false},"RaizUpdateChannelConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAgentNotTextFailure"},{"$ref":"#/components/schemas/RaizCallInProgressFailure"},{"$ref":"#/components/schemas/RaizConversationClosedFailure"},{"$ref":"#/components/schemas/RaizConversationNotHandedOffFailure"},{"$ref":"#/components/schemas/RaizConversationOpenFailure"},{"$ref":"#/components/schemas/RaizDailyReportInProgressFailure"},{"$ref":"#/components/schemas/RaizDefinitionNotActiveFailure"},{"$ref":"#/components/schemas/RaizDefinitionRetiredFailure"},{"$ref":"#/components/schemas/RaizDefinitionTypeLockedFailure"},{"$ref":"#/components/schemas/RaizHandoffAlreadyContinuedFailure"},{"$ref":"#/components/schemas/RaizReplyInProgressFailure"},{"$ref":"#/components/schemas/RaizOutsideContactHoursFailure"},{"$ref":"#/components/schemas/RaizProviderAccountExistsFailure"},{"$ref":"#/components/schemas/RaizProviderAccountInUseFailure"},{"$ref":"#/components/schemas/RaizSourceConversationOpenFailure"},{"$ref":"#/components/schemas/RaizSuppressionExistsFailure"},{"$ref":"#/components/schemas/RaizTaskNotRetryableFailure"},{"$ref":"#/components/schemas/RaizCampaignAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizCampaignNoRecipientsFailure"},{"$ref":"#/components/schemas/RaizChannelAgentRequiredFailure"},{"$ref":"#/components/schemas/RaizChannelEndpointInUseFailure"},{"$ref":"#/components/schemas/RaizChannelNotReadyFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizConversationViewLimitReachedFailure"},{"$ref":"#/components/schemas/RaizConversationViewNameTakenFailure"},{"$ref":"#/components/schemas/RaizTemplateNotApprovedFailure"},{"$ref":"#/components/schemas/RaizWhatsappAccountRestrictedFailure"},{"$ref":"#/components/schemas/RaizWhatsappAiPausedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMarketingStoppedFailure"},{"$ref":"#/components/schemas/RaizWhatsappWindowClosedFailure"},{"$ref":"#/components/schemas/RaizProviderAccountMismatchFailure"},{"$ref":"#/components/schemas/RaizProviderSecretUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceAgentNotReadyFailure"},{"$ref":"#/components/schemas/RaizVoiceLineUnavailableFailure"},{"$ref":"#/components/schemas/RaizVoiceNumberInUseFailure"},{"$ref":"#/components/schemas/RaizAgentInUseFailure"},{"$ref":"#/components/schemas/RaizAgentModalityLockedFailure"},{"$ref":"#/components/schemas/RaizBulletinLimitReachedFailure"},{"$ref":"#/components/schemas/RaizEvalCasesUnavailableFailure"},{"$ref":"#/components/schemas/RaizEvalGateUnmetFailure"},{"$ref":"#/components/schemas/RaizWidgetConflictFailure"},{"$ref":"#/components/schemas/RaizAddressInUseFailure"},{"$ref":"#/components/schemas/RaizIdentifierInUseFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"},{"$ref":"#/components/schemas/RaizKeyInUseFailure"},{"$ref":"#/components/schemas/RaizContactSuppressedFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"AGENT_NOT_TEXT":"#/components/schemas/RaizAgentNotTextFailure","CALL_IN_PROGRESS":"#/components/schemas/RaizCallInProgressFailure","CONVERSATION_CLOSED":"#/components/schemas/RaizConversationClosedFailure","CONVERSATION_NOT_HANDED_OFF":"#/components/schemas/RaizConversationNotHandedOffFailure","CONVERSATION_OPEN":"#/components/schemas/RaizConversationOpenFailure","DAILY_REPORT_IN_PROGRESS":"#/components/schemas/RaizDailyReportInProgressFailure","DEFINITION_NOT_ACTIVE":"#/components/schemas/RaizDefinitionNotActiveFailure","DEFINITION_RETIRED":"#/components/schemas/RaizDefinitionRetiredFailure","DEFINITION_TYPE_LOCKED":"#/components/schemas/RaizDefinitionTypeLockedFailure","HANDOFF_ALREADY_CONTINUED":"#/components/schemas/RaizHandoffAlreadyContinuedFailure","REPLY_IN_PROGRESS":"#/components/schemas/RaizReplyInProgressFailure","OUTSIDE_CONTACT_HOURS":"#/components/schemas/RaizOutsideContactHoursFailure","PROVIDER_ACCOUNT_EXISTS":"#/components/schemas/RaizProviderAccountExistsFailure","PROVIDER_ACCOUNT_IN_USE":"#/components/schemas/RaizProviderAccountInUseFailure","SOURCE_CONVERSATION_OPEN":"#/components/schemas/RaizSourceConversationOpenFailure","SUPPRESSION_EXISTS":"#/components/schemas/RaizSuppressionExistsFailure","TASK_NOT_RETRYABLE":"#/components/schemas/RaizTaskNotRetryableFailure","CAMPAIGN_AGENT_NOT_READY":"#/components/schemas/RaizCampaignAgentNotReadyFailure","CAMPAIGN_NO_RECIPIENTS":"#/components/schemas/RaizCampaignNoRecipientsFailure","CHANNEL_AGENT_REQUIRED":"#/components/schemas/RaizChannelAgentRequiredFailure","CHANNEL_ENDPOINT_IN_USE":"#/components/schemas/RaizChannelEndpointInUseFailure","CHANNEL_NOT_READY":"#/components/schemas/RaizChannelNotReadyFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","CONVERSATION_VIEW_LIMIT_REACHED":"#/components/schemas/RaizConversationViewLimitReachedFailure","CONVERSATION_VIEW_NAME_TAKEN":"#/components/schemas/RaizConversationViewNameTakenFailure","TEMPLATE_NOT_APPROVED":"#/components/schemas/RaizTemplateNotApprovedFailure","WHATSAPP_ACCOUNT_RESTRICTED":"#/components/schemas/RaizWhatsappAccountRestrictedFailure","WHATSAPP_AI_PAUSED":"#/components/schemas/RaizWhatsappAiPausedFailure","WHATSAPP_MARKETING_STOPPED":"#/components/schemas/RaizWhatsappMarketingStoppedFailure","WHATSAPP_WINDOW_CLOSED":"#/components/schemas/RaizWhatsappWindowClosedFailure","PROVIDER_ACCOUNT_MISMATCH":"#/components/schemas/RaizProviderAccountMismatchFailure","PROVIDER_SECRET_UNAVAILABLE":"#/components/schemas/RaizProviderSecretUnavailableFailure","VOICE_AGENT_NOT_READY":"#/components/schemas/RaizVoiceAgentNotReadyFailure","VOICE_LINE_UNAVAILABLE":"#/components/schemas/RaizVoiceLineUnavailableFailure","VOICE_NUMBER_IN_USE":"#/components/schemas/RaizVoiceNumberInUseFailure","AGENT_IN_USE":"#/components/schemas/RaizAgentInUseFailure","AGENT_MODALITY_LOCKED":"#/components/schemas/RaizAgentModalityLockedFailure","BULLETIN_LIMIT_REACHED":"#/components/schemas/RaizBulletinLimitReachedFailure","EVAL_CASES_UNAVAILABLE":"#/components/schemas/RaizEvalCasesUnavailableFailure","EVAL_GATE_UNMET":"#/components/schemas/RaizEvalGateUnmetFailure","WIDGET_CONFLICT":"#/components/schemas/RaizWidgetConflictFailure","ADDRESS_IN_USE":"#/components/schemas/RaizAddressInUseFailure","IDENTIFIER_IN_USE":"#/components/schemas/RaizIdentifierInUseFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure","KEY_IN_USE":"#/components/schemas/RaizKeyInUseFailure","CONTACT_SUPPRESSED":"#/components/schemas/RaizContactSuppressedFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizUpdateChannelContentTooLargeError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelContentTooLargeFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelContentTooLargeFailure":{"oneOf":[{"$ref":"#/components/schemas/RequestTooLargeFailure"},{"$ref":"#/components/schemas/RaizImportFileTooLargeFailure"}],"discriminator":{"propertyName":"code","mapping":{"REQUEST_TOO_LARGE":"#/components/schemas/RequestTooLargeFailure","IMPORT_FILE_TOO_LARGE":"#/components/schemas/RaizImportFileTooLargeFailure"}}},"RaizUpdateChannelForbiddenError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelForbiddenFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelForbiddenFailure":{"oneOf":[{"$ref":"#/components/schemas/ForbiddenFailure"},{"$ref":"#/components/schemas/RaizChannelCreationInAppFailure"},{"$ref":"#/components/schemas/RaizConversationViewAuthorOnlyFailure"},{"$ref":"#/components/schemas/RaizOutboundChannelRefusedFailure"},{"$ref":"#/components/schemas/RaizWhatsappChannelRefusedFailure"},{"$ref":"#/components/schemas/RaizWidgetRefusedFailure"}],"discriminator":{"propertyName":"code","mapping":{"FORBIDDEN":"#/components/schemas/ForbiddenFailure","CHANNEL_CREATION_IN_APP":"#/components/schemas/RaizChannelCreationInAppFailure","CONVERSATION_VIEW_AUTHOR_ONLY":"#/components/schemas/RaizConversationViewAuthorOnlyFailure","OUTBOUND_CHANNEL_REFUSED":"#/components/schemas/RaizOutboundChannelRefusedFailure","WHATSAPP_CHANNEL_REFUSED":"#/components/schemas/RaizWhatsappChannelRefusedFailure","WIDGET_REFUSED":"#/components/schemas/RaizWidgetRefusedFailure"}}},"RaizUpdateChannelGatewayTimeoutError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelGatewayTimeoutFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelGatewayTimeoutFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamTimeoutFailure"},{"$ref":"#/components/schemas/RaizWhatsappDeliveryUnconfirmedFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_TIMEOUT":"#/components/schemas/UpstreamTimeoutFailure","WHATSAPP_DELIVERY_UNCONFIRMED":"#/components/schemas/RaizWhatsappDeliveryUnconfirmedFailure"}}},"RaizUpdateChannelInternalServerErrorError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelInternalServerErrorFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelInternalServerErrorFailure":{"oneOf":[{"$ref":"#/components/schemas/InternalFailure"},{"$ref":"#/components/schemas/RaizOutboundChannelInternalFailure"},{"$ref":"#/components/schemas/RaizWhatsappChannelInternalFailure"},{"$ref":"#/components/schemas/RaizWhatsappNotSentFailure"},{"$ref":"#/components/schemas/RaizWidgetInternalFailure"}],"discriminator":{"propertyName":"code","mapping":{"INTERNAL_ERROR":"#/components/schemas/InternalFailure","OUTBOUND_CHANNEL_INTERNAL":"#/components/schemas/RaizOutboundChannelInternalFailure","WHATSAPP_CHANNEL_INTERNAL":"#/components/schemas/RaizWhatsappChannelInternalFailure","WHATSAPP_NOT_SENT":"#/components/schemas/RaizWhatsappNotSentFailure","WIDGET_INTERNAL":"#/components/schemas/RaizWidgetInternalFailure"}}},"RaizUpdateChannelNotFoundError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelNotFoundFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelNotFoundFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTemplateNotFoundFailure"},{"$ref":"#/components/schemas/RaizResourceNotFoundFailure"}],"discriminator":{"propertyName":"code","mapping":{"TEMPLATE_NOT_FOUND":"#/components/schemas/RaizTemplateNotFoundFailure","RESOURCE_NOT_FOUND":"#/components/schemas/RaizResourceNotFoundFailure"}}},"RaizUpdateChannelServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizTeamUnavailableFailure"},{"$ref":"#/components/schemas/RaizCampaignHeaderNotStoredFailure"},{"$ref":"#/components/schemas/RaizVoiceUnavailableFailure"},{"$ref":"#/components/schemas/RaizFeedbackProposalUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","TEAM_UNAVAILABLE":"#/components/schemas/RaizTeamUnavailableFailure","CAMPAIGN_HEADER_NOT_STORED":"#/components/schemas/RaizCampaignHeaderNotStoredFailure","VOICE_UNAVAILABLE":"#/components/schemas/RaizVoiceUnavailableFailure","FEEDBACK_PROPOSAL_UNAVAILABLE":"#/components/schemas/RaizFeedbackProposalUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizUpdateChannelTooManyRequestsError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelTooManyRequestsFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelTooManyRequestsFailure":{"oneOf":[{"$ref":"#/components/schemas/RateLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappEngagementLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRateLimitedFailure"},{"$ref":"#/components/schemas/RaizWidgetLimitReachedFailure"}],"discriminator":{"propertyName":"code","mapping":{"RATE_LIMITED":"#/components/schemas/RateLimitedFailure","WHATSAPP_ENGAGEMENT_LIMITED":"#/components/schemas/RaizWhatsappEngagementLimitedFailure","WHATSAPP_RATE_LIMITED":"#/components/schemas/RaizWhatsappRateLimitedFailure","WIDGET_LIMIT_REACHED":"#/components/schemas/RaizWidgetLimitReachedFailure"}}},"RaizUpdateChannelUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateChannelUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateChannelUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAssigneeUnavailableFailure"},{"$ref":"#/components/schemas/RaizContactUnreachableFailure"},{"$ref":"#/components/schemas/RaizDailyReportRecipientsMissingFailure"},{"$ref":"#/components/schemas/RaizDefinitionOptionsInvalidFailure"},{"$ref":"#/components/schemas/RaizFactSubjectMismatchFailure"},{"$ref":"#/components/schemas/RaizFactValueInvalidFailure"},{"$ref":"#/components/schemas/RaizImportFileInvalidFailure"},{"$ref":"#/components/schemas/RaizIpNetworkInvalidFailure"},{"$ref":"#/components/schemas/RaizProfileVariableMissingFailure"},{"$ref":"#/components/schemas/RaizTimeZoneUnknownFailure"},{"$ref":"#/components/schemas/RaizCampaignHeaderMissingFailure"},{"$ref":"#/components/schemas/RaizCampaignVariableMissingFailure"},{"$ref":"#/components/schemas/RaizChannelAgentMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateHeaderMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateHeaderRequiredFailure"},{"$ref":"#/components/schemas/RaizTemplateParametersMismatchFailure"},{"$ref":"#/components/schemas/RaizTemplateUnsupportedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMediaRejectedFailure"},{"$ref":"#/components/schemas/RaizWhatsappMessageUnsupportedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRecipientUnavailableFailure"},{"$ref":"#/components/schemas/RaizCallRejectedFailure"},{"$ref":"#/components/schemas/RaizProviderAccountUnsupportedFailure"},{"$ref":"#/components/schemas/RaizProviderCredentialsRejectedFailure"},{"$ref":"#/components/schemas/RaizVoiceNotAvailableFailure"},{"$ref":"#/components/schemas/RaizVoiceNumberNotOwnedFailure"},{"$ref":"#/components/schemas/RaizAgentProceduresInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentWorkflowInvalidFailure"},{"$ref":"#/components/schemas/RaizAgentSettingsInvalidFailure"},{"$ref":"#/components/schemas/RaizBulletinPeriodInvalidFailure"},{"$ref":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationToolUnavailableFailure"},{"$ref":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure"},{"$ref":"#/components/schemas/RaizKnowledgeFileInvalidFailure"},{"$ref":"#/components/schemas/RaizKnowledgeKindMismatchFailure"},{"$ref":"#/components/schemas/RaizWebsiteNotApprovedFailure"},{"$ref":"#/components/schemas/RaizWidgetVoiceUnheardFailure"},{"$ref":"#/components/schemas/RaizProviderRejectedFailure"}],"discriminator":{"propertyName":"code","mapping":{"ASSIGNEE_UNAVAILABLE":"#/components/schemas/RaizAssigneeUnavailableFailure","CONTACT_UNREACHABLE":"#/components/schemas/RaizContactUnreachableFailure","DAILY_REPORT_RECIPIENTS_MISSING":"#/components/schemas/RaizDailyReportRecipientsMissingFailure","DEFINITION_OPTIONS_INVALID":"#/components/schemas/RaizDefinitionOptionsInvalidFailure","FACT_SUBJECT_MISMATCH":"#/components/schemas/RaizFactSubjectMismatchFailure","FACT_VALUE_INVALID":"#/components/schemas/RaizFactValueInvalidFailure","IMPORT_FILE_INVALID":"#/components/schemas/RaizImportFileInvalidFailure","IP_NETWORK_INVALID":"#/components/schemas/RaizIpNetworkInvalidFailure","PROFILE_VARIABLE_MISSING":"#/components/schemas/RaizProfileVariableMissingFailure","TIME_ZONE_UNKNOWN":"#/components/schemas/RaizTimeZoneUnknownFailure","CAMPAIGN_HEADER_MISSING":"#/components/schemas/RaizCampaignHeaderMissingFailure","CAMPAIGN_VARIABLE_MISSING":"#/components/schemas/RaizCampaignVariableMissingFailure","CHANNEL_AGENT_MISMATCH":"#/components/schemas/RaizChannelAgentMismatchFailure","TEMPLATE_HEADER_MISMATCH":"#/components/schemas/RaizTemplateHeaderMismatchFailure","TEMPLATE_HEADER_REQUIRED":"#/components/schemas/RaizTemplateHeaderRequiredFailure","TEMPLATE_PARAMETERS_MISMATCH":"#/components/schemas/RaizTemplateParametersMismatchFailure","TEMPLATE_UNSUPPORTED":"#/components/schemas/RaizTemplateUnsupportedFailure","WHATSAPP_MEDIA_REJECTED":"#/components/schemas/RaizWhatsappMediaRejectedFailure","WHATSAPP_MESSAGE_UNSUPPORTED":"#/components/schemas/RaizWhatsappMessageUnsupportedFailure","WHATSAPP_RECIPIENT_UNAVAILABLE":"#/components/schemas/RaizWhatsappRecipientUnavailableFailure","CALL_REJECTED":"#/components/schemas/RaizCallRejectedFailure","PROVIDER_ACCOUNT_UNSUPPORTED":"#/components/schemas/RaizProviderAccountUnsupportedFailure","PROVIDER_CREDENTIALS_REJECTED":"#/components/schemas/RaizProviderCredentialsRejectedFailure","VOICE_NOT_AVAILABLE":"#/components/schemas/RaizVoiceNotAvailableFailure","VOICE_NUMBER_NOT_OWNED":"#/components/schemas/RaizVoiceNumberNotOwnedFailure","AGENT_PROCEDURES_INVALID":"#/components/schemas/RaizAgentProceduresInvalidFailure","AGENT_WORKFLOW_INVALID":"#/components/schemas/RaizAgentWorkflowInvalidFailure","AGENT_SETTINGS_INVALID":"#/components/schemas/RaizAgentSettingsInvalidFailure","BULLETIN_PERIOD_INVALID":"#/components/schemas/RaizBulletinPeriodInvalidFailure","INTEGRATION_PROCEDURE_UNAVAILABLE":"#/components/schemas/RaizIntegrationProcedureUnavailableFailure","INTEGRATION_TOOL_UNAVAILABLE":"#/components/schemas/RaizIntegrationToolUnavailableFailure","KNOWLEDGE_DOCUMENT_UNAVAILABLE":"#/components/schemas/RaizKnowledgeDocumentUnavailableFailure","KNOWLEDGE_FILE_INVALID":"#/components/schemas/RaizKnowledgeFileInvalidFailure","KNOWLEDGE_KIND_MISMATCH":"#/components/schemas/RaizKnowledgeKindMismatchFailure","WEBSITE_NOT_APPROVED":"#/components/schemas/RaizWebsiteNotApprovedFailure","WIDGET_VOICE_UNHEARD":"#/components/schemas/RaizWidgetVoiceUnheardFailure","PROVIDER_REJECTED":"#/components/schemas/RaizProviderRejectedFailure"}}},"RaizUpdateContactBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateContactBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateContactBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizUpdateContactBody":{"type":"object","required":[],"properties":{"familyName":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}]},"givenName":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}]},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactIdentifierInput"},"description":"Identity documents. In an update, the complete new set: documents not listed are removed.","maxItems":5},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"points":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactPointInput"},"description":"Phones, emails and other addresses. In an update, the complete new set: points not listed are removed; listed ones keep their id and verification.","maxItems":20},"postalAddresses":{"type":"array","items":{"$ref":"#/components/schemas/RaizPostalAddress"},"maxItems":5},"summary":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1}},"additionalProperties":false},"RaizUpdateContactConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateContactConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateContactConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizAddressInUseFailure"},{"$ref":"#/components/schemas/RaizIdentifierInUseFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"ADDRESS_IN_USE":"#/components/schemas/RaizAddressInUseFailure","IDENTIFIER_IN_USE":"#/components/schemas/RaizIdentifierInUseFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizUpdateContactServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateContactServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateContactServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizUpdateConversationBadRequestError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateConversationBadRequestFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateConversationBadRequestFailure":{"oneOf":[{"$ref":"#/components/schemas/InvalidInputFailure"},{"$ref":"#/components/schemas/RaizInvalidCursorFailure"}],"discriminator":{"propertyName":"code","mapping":{"INVALID_INPUT":"#/components/schemas/InvalidInputFailure","INVALID_CURSOR":"#/components/schemas/RaizInvalidCursorFailure"}}},"RaizUpdateConversationBody":{"type":"object","required":[],"properties":{"aiEnabled":{"type":"boolean","description":"WhatsApp only: activate or pause AI for this open conversation alone. Activation answers what the contact wrote after the last real answer, the team's or the Agent's (a wait notice is not one)."},"aiPaused":{"type":"boolean","description":"WhatsApp only: pause or resume automatic replies for this recipient until their open conversation closes. Resuming answers what the contact wrote in this conversation after the last real answer."},"assigneeId":{"anyOf":[{"type":"string","description":"Give the case to a person of the organization, by their member id as Arbol Account lists it (`listAssignees` names the people who can take one); `me` takes it for the person calling; `null` leaves it with nobody. Its new owner is told by email. History keeps who had it and who passed it on.","maxLength":255,"minLength":1},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","description":"Reassign the counterpart. Facts already recorded stay with the previous contact.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"status":{"type":"string","const":"closed","description":"Close the conversation (`closeReason: manual`); its analysis then runs. A closed conversation stays closed. Calls close by themselves when they end."},"subjectContactId":{"anyOf":[{"type":"string","description":"Reassign whom the conversation is about.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string","description":"A summary written by a person; the AI never replaces it. `null` clears it and keeps it clear.","maxLength":8000},{"type":"null"}]},"title":{"anyOf":[{"type":"string","description":"A title written by a person; it wins over the generated one, which never replaces it. `null` clears it and keeps it clear.","maxLength":200},{"type":"null"}]}},"additionalProperties":false},"RaizUpdateConversationConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateConversationConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateConversationConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizCallInProgressFailure"},{"$ref":"#/components/schemas/RaizConversationOpenFailure"},{"$ref":"#/components/schemas/RaizReplyInProgressFailure"},{"$ref":"#/components/schemas/RaizChannelNotReadyFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"CALL_IN_PROGRESS":"#/components/schemas/RaizCallInProgressFailure","CONVERSATION_OPEN":"#/components/schemas/RaizConversationOpenFailure","REPLY_IN_PROGRESS":"#/components/schemas/RaizReplyInProgressFailure","CHANNEL_NOT_READY":"#/components/schemas/RaizChannelNotReadyFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizUpdateConversationServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateConversationServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateConversationServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizTeamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","TEAM_UNAVAILABLE":"#/components/schemas/RaizTeamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizUpdateDefinitionBody":{"type":"object","required":[],"properties":{"agentIds":{"type":"array","items":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Agents that use the definition; empty for every Agent. In an update, the complete new set.","maxItems":100,"uniqueItems":true},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"options":{"type":"array","items":{"$ref":"#/components/schemas/RaizDefinitionOptionInput"},"description":"The options of an `option` definition, in order, with unique keys. In an update, the complete new set: an option is matched by key and keeps its id; one left out is retired, never deleted, because facts reference it.","maxItems":100},"status":{"anyOf":[{"type":"string","const":"draft"},{"type":"string","const":"active"}],"description":"`active` definitions accept facts and Agents use them; `draft` ones are being prepared. Retiring is `deleteDefinition`."},"unit":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}]},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"key":{"type":"string","description":"Stable machine name: lower case letters, digits and `_`, starting with a letter. A CSV column with this header imports into the definition.","examples":["eps"],"pattern":"^[a-z][a-z0-9_]{0,63}$"},"kind":{"anyOf":[{"type":"string","const":"attribute"},{"type":"string","const":"assessment"},{"type":"string","const":"category"},{"type":"string","const":"metric"}],"description":"`attribute`: a property of the subject. `assessment`: a judgement about a conversation (yes/no assessments feed the assessment report). `category`: a classification. `metric`: a measured number, with a `unit`."},"name":{"type":"string","maxLength":120,"minLength":1},"subject":{"anyOf":[{"type":"string","const":"contact"},{"type":"string","const":"conversation"}],"description":"What the facts describe."},"valueType":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"number"},{"type":"string","const":"boolean"},{"type":"string","const":"date"},{"type":"string","const":"option"}],"description":"The JSON type of the facts' values: a string, a number, a boolean, a `YYYY-MM-DD` date, or the key of one of the options."}},"additionalProperties":false},"RaizUpdateDefinitionConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateDefinitionConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateDefinitionConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizDefinitionRetiredFailure"},{"$ref":"#/components/schemas/RaizDefinitionTypeLockedFailure"},{"$ref":"#/components/schemas/RaizKeyInUseFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"DEFINITION_RETIRED":"#/components/schemas/RaizDefinitionRetiredFailure","DEFINITION_TYPE_LOCKED":"#/components/schemas/RaizDefinitionTypeLockedFailure","KEY_IN_USE":"#/components/schemas/RaizKeyInUseFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizUpdateDefinitionServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateDefinitionServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateDefinitionServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizUpdateEvalCaseBody":{"type":"object","required":[],"properties":{"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"preferredResponse":{"anyOf":[{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S","description":"The team's preferred reply or procedure. Private evidence, never automatically instructions."},{"type":"null"}]},"feedbackKind":{"anyOf":[{"type":"string","const":"incorrect"},{"type":"string","const":"simpler"},{"type":"string","const":"incomplete"}]},"expectation":{"anyOf":[{"type":"string","description":"What the Agent should have done instead, for whoever replays the case: a short rubric, never the contact's personal data.","maxLength":4000,"minLength":1,"pattern":"\\S"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"kept"},{"type":"string","const":"dismissed"}],"description":"`open`: not reviewed yet. `kept`: a candidate version must handle it. `dismissed`: not a case (the person only continued after a handoff, for example)."}},"additionalProperties":false},"RaizUpdateFactBody":{"type":"object","required":["reviewStatus"],"properties":{"reviewStatus":{"anyOf":[{"type":"string","const":"confirmed"},{"type":"string","const":"rejected"}],"description":"`confirmed` vouches for the fact; `rejected` withdraws it, and the previous assertion becomes current again."}},"additionalProperties":false},"RaizUpdateFactServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateFactServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateFactServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizUpdateKnowledgeDocumentBody":{"type":"object","required":[],"properties":{"crawl":{"$ref":"#/components/schemas/RaizCrawlSettings","description":"Website documents only. Default: 20 pages, depth 2."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"file":{"$ref":"#/components/schemas/RaizKnowledgeFileInput","description":"File documents only."},"sourceUrl":{"$ref":"#/components/schemas/HttpsUrl","description":"Website documents only: the HTTPS page to start from. Its origin must be approved for this deployment; only same-origin pages under its path are followed, and robots.txt is respected."},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused document is never searched; its index is kept."},"text":{"type":"string","description":"Text documents only: the content, plain text or Markdown.","maxLength":1000000,"minLength":1},"title":{"type":"string","maxLength":200,"minLength":1}},"additionalProperties":false},"RaizUpdateKnowledgeDocumentServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateKnowledgeDocumentServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateKnowledgeDocumentServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizUpdateKnowledgeDocumentUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateKnowledgeDocumentUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateKnowledgeDocumentUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizKnowledgeFileInvalidFailure"},{"$ref":"#/components/schemas/RaizKnowledgeKindMismatchFailure"},{"$ref":"#/components/schemas/RaizWebsiteNotApprovedFailure"}],"discriminator":{"propertyName":"code","mapping":{"KNOWLEDGE_FILE_INVALID":"#/components/schemas/RaizKnowledgeFileInvalidFailure","KNOWLEDGE_KIND_MISMATCH":"#/components/schemas/RaizKnowledgeKindMismatchFailure","WEBSITE_NOT_APPROVED":"#/components/schemas/RaizWebsiteNotApprovedFailure"}}},"RaizUpdateOrganizationBody":{"type":"object","properties":{"language":{"type":"string","description":"BCP 47 language tag.","examples":["es-CO"],"pattern":"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"name":{"type":"string","deprecated":true,"description":"Legacy field for clients that echo the existing name. Edit the organization name in Arbol Account.","maxLength":200,"minLength":1},"settings":{"type":"object","properties":{"channels":{"type":"object","properties":{"managedVoiceOutboundEnabled":{"anyOf":[{"type":"boolean","description":"Whether Agents without a line of their own may call out from the platform's shared number (default true)."},{"type":"null"}]},"maxConcurrentOutboundCalls":{"anyOf":[{"type":"integer","description":"Campaign calls the organization places at once (default 5). The scheduler starts new ones only into free slots.","minimum":1,"maximum":50},{"type":"null"}]}},"additionalProperties":false},"dailyReport":{"type":"object","properties":{"enabled":{"anyOf":[{"type":"boolean","description":"Email the daily report every day at `sendAt`, in the organization's time zone: the calls and conversations registered in the last 24 hours, the conversations waiting for the team and those that need a review (default true). A day without activity sends nothing."},{"type":"null"}]},"recipients":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"description":"Additional recipients for the daily report alongside eligible workspace owners, at most 10 addresses (default none). It lists the contacts of calls and conversations by name and number: choose recipients who may read the organization's conversations.","maxItems":10,"uniqueItems":true},{"type":"null"}]},"sendAt":{"anyOf":[{"type":"string","description":"The local time the daily report goes out, `HH:MM` in 24 hours (default `18:00`). Moving it later the same day sends nothing more that day; turning the report on after the day's time sends that day's report at once.","examples":["18:00"],"pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}]}},"additionalProperties":false},"productNotices":{"type":"object","properties":{"events":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"string","const":"agent-idle"},{"type":"string","const":"agent-live"},{"type":"string","const":"budget-reached"},{"type":"string","const":"budget-warning"},{"type":"string","const":"campaign-finished"},{"type":"string","const":"channel-disconnected"},{"type":"string","const":"channel-limit"},{"type":"string","const":"channel-quality"},{"type":"string","const":"channel-restored"},{"type":"string","const":"credits-exhausted"},{"type":"string","const":"import-finished"},{"type":"string","const":"knowledge-failed"},{"type":"string","const":"milestone"},{"type":"string","const":"monthly-summary"},{"type":"string","const":"outage-resolved"},{"type":"string","const":"spam-blocked"},{"type":"string","const":"template-approved"},{"type":"string","const":"template-rejected"},{"type":"string","const":"weekly-summary"}]},"description":"Product emails enabled for this organization. All are enabled unless the organization saves a selection. An empty selection turns all of them off.","uniqueItems":true,"maxItems":19},{"type":"null"}]},"recipients":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"maxItems":10},{"type":"null"}]},"administrators":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"maxItems":10},{"type":"null"}]}},"additionalProperties":false},"notifications":{"type":"object","properties":{"escalations":{"anyOf":[{"type":"boolean","description":"Email the recipients, and send the phones a WhatsApp message, when the AI hands a conversation to the team: it escalates a request it cannot resolve, the contact asks for a person, or the Agent's monthly budget is spent (default true)."},{"type":"null"}]},"failedOutcomes":{"anyOf":[{"type":"boolean","description":"Email the recipients when the analysis of a closed conversation concludes that the contact's request was not resolved (outcome failure). A conversation closed for inactivity never counts (default true)."},{"type":"null"}]},"failures":{"anyOf":[{"type":"boolean","description":"Email the recipients when the AI could not answer: a WhatsApp reply that ended with the fallback message, or a call that failed or in which one of the Agent's functions failed (default true)."},{"type":"null"}]},"firstReplyMinutes":{"anyOf":[{"type":"integer","description":"Within how many minutes a person of the team should answer a conversation the AI handed over (default 15). Past it, the case's owner (`assigneeId`), or the team's recipients while nobody has it, is reminded once; at four times that, the organization's owners and its `productNotices.administrators` hear that it is overdue. Each wait is announced once: a contact who writes again after the team answered starts another. With a digest `frequency`, the conversation is listed again in the next digest instead. `0`: no reminders.","maximum":1440,"minimum":0},{"type":"null"}]},"frequency":{"anyOf":[{"anyOf":[{"type":"string","const":"immediate"},{"type":"string","const":"hourly"},{"type":"string","const":"every3Hours"},{"type":"string","const":"every6Hours"},{"type":"string","const":"every12Hours"}],"description":"How often the notices reach the team (default `immediate`). `immediate` sends each notice as it happens, one email per conversation; a failure that repeats is notified once when its cause first appears, and the conversations the same cause touches in the next hour go out together an hour later, one follow-up an hour while it lasts. `hourly`, `every3Hours`, `every6Hours` and `every12Hours` send one digest at the end of each window of that length, counted from local midnight in the organization's time zone (every six hours: 00:00, 06:00, 12:00 and 18:00), listing the conversations that still need the team; the escalation's WhatsApp message follows the same schedule. A window without notices sends nothing."},{"type":"null"}]},"phones":{"anyOf":[{"type":"array","items":{"type":"string","description":"A number in E.164, with its country code.","pattern":"^\\+[1-9][0-9]{7,14}$"},"description":"Who also receives the escalation notice by WhatsApp, at most 10 numbers in E.164 (default none). The message names the Agent, the organization and why the conversation was handed over, with a link to it; never the contact, the summary or the transcript. The other notices go by email only.","maxItems":10,"uniqueItems":true},{"type":"null"}]},"recipients":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"description":"Additional recipients for team notices alongside eligible workspace owners, at most 10 addresses (default none). An email carries the conversation's link, channel, times, Agent and state, its title and summary and the analysis' evaluations; never the transcript or the captured data. A summary may name the person: choose recipients who may read the organization's conversations.","maxItems":10,"uniqueItems":true},{"type":"null"}]}},"additionalProperties":false},"protection":{"type":"object","properties":{"spamHours":{"anyOf":[{"type":"integer","description":"Hours someone stays in spam once they pass a limit (default 6). A person can lift the rule earlier by deleting it.","maximum":720,"minimum":1},{"type":"null"}]},"voiceCallsPerHour":{"anyOf":[{"type":"integer","description":"Inbound calls one number may make in an hour, whoever spoke (default 10). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier.","maximum":1000,"minimum":1},{"type":"null"}]},"voiceEnabled":{"anyOf":[{"type":"boolean","description":"Whether callers can fall into spam (default true). False: no call is ever refused for what its number consumed."},{"type":"null"}]},"voiceMinutesPerDay":{"anyOf":[{"type":"integer","description":"Minutes of inbound calls one number may use in 24 hours (default 60). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts, its calls are not answered.","maximum":1440,"minimum":1},{"type":"null"}]},"voiceSilentCallsPerHour":{"anyOf":[{"type":"integer","description":"Inbound calls of one number in an hour in which the caller never spoke (default 5). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier. A call that failed does not count.","maximum":1000,"minimum":1},{"type":"null"}]},"webConversationTokens":{"anyOf":[{"type":"integer","description":"Tokens one web conversation may use (default 10000000). A conversation that reaches it takes no more messages.","maximum":1000000000000,"minimum":10000},{"type":"null"}]},"webEnabled":{"anyOf":[{"type":"boolean","description":"Whether web chat visitors can fall into spam (default true)."},{"type":"null"}]},"webMessagesPerDay":{"anyOf":[{"type":"integer","description":"Messages one web visitor may send in 24 hours, across their chats (default 100). A visitor who reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts they cannot open a chat. Visitors are told apart by network address, so people who share one count together.","maximum":100000,"minimum":1},{"type":"null"}]},"whatsappConversationTokens":{"anyOf":[{"type":"integer","description":"Tokens (input, cached input included, plus output) one WhatsApp conversation may use since the AI last took it (default 10000000). A contact whose conversation reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier.","maximum":1000000000000,"minimum":10000},{"type":"null"}]},"whatsappEnabled":{"anyOf":[{"type":"boolean","description":"Whether WhatsApp contacts can fall into spam (default true)."},{"type":"null"}]},"whatsappRepliesPerHour":{"anyOf":[{"type":"integer","description":"Replies the AI may write in one WhatsApp conversation in an hour (default 60). A contact whose conversation reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts the AI does not answer them, and their messages are still stored for the team.","maximum":10000,"minimum":1},{"type":"null"}]}},"additionalProperties":false},"whatsapp":{"type":"object","properties":{"maxConcurrentReplies":{"anyOf":[{"type":"integer","description":"WhatsApp replies the organization's Agents write at once (default 20). A reply past it waits for the next scheduler tick, so a peak in one organization never slows the others.","minimum":1,"maximum":500},{"type":"null"}]}},"additionalProperties":false}},"description":"Settings to change. An omitted setting stays as it is; `null` returns it to its default.","additionalProperties":false},"timeZone":{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"}},"additionalProperties":false},"RaizUpdateOrganizationServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateOrganizationServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateOrganizationServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizUpdateProfileBody":{"type":"object","required":[],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelId":{"anyOf":[{"type":"string","description":"The line to contact from, of the profile's channel type. Null: the Agent's own channel; for calls, then the platform's shared line.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When a conversation may start, in the profile's time zone. Empty: any time. Outside them `createConversation` fails with OUTSIDE_CONTACT_HOURS and nothing is sent.","maxItems":14},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"firstMessage":{"anyOf":[{"type":"string","description":"What the Agent says first on every call, instead of its own first message. May reference request variables as `{{name}}`.","maxLength":2000,"minLength":1},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","description":"What these calls are about, added to the Agent's instructions on every call. May reference request variables as `{{name}}`.","maxLength":8000,"minLength":1},{"type":"null"}]},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"name":{"type":"string","description":"What the profile is for, as people read it.","maxLength":200,"minLength":1},"template":{"$ref":"#/components/schemas/RaizProfileTemplateInput","description":"The approved template that opens every conversation. WhatsApp allows a business to start a conversation only with one."},"timeZone":{"anyOf":[{"type":"string","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$","description":"IANA time zone of the contact hours. Null: the organization's."},{"type":"null"}]}},"additionalProperties":false},"RaizUpdateProfileConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateProfileConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateProfileConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizUpdateProfileServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateProfileServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateProfileServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizUpdateProfileUnprocessableContentError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizUpdateProfileUnprocessableContentFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizUpdateProfileUnprocessableContentFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizTimeZoneUnknownFailure"},{"$ref":"#/components/schemas/RaizChannelAgentMismatchFailure"}],"discriminator":{"propertyName":"code","mapping":{"TIME_ZONE_UNKNOWN":"#/components/schemas/RaizTimeZoneUnknownFailure","CHANNEL_AGENT_MISMATCH":"#/components/schemas/RaizChannelAgentMismatchFailure"}}},"RaizVerifyChannelBody":{"type":"object","required":[],"properties":{"phone":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"phoneNumber":{"$ref":"#/components/schemas/RaizPhoneNumber","deprecated":true,"description":"Deprecated: use `phone`. Answered until 2027-01-28."}},"additionalProperties":false},"RaizVerifyChannelConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizVerifyChannelConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizVerifyChannelConflictFailure":{"oneOf":[{"$ref":"#/components/schemas/RaizChannelAgentRequiredFailure"},{"$ref":"#/components/schemas/RaizChannelEndpointInUseFailure"},{"$ref":"#/components/schemas/RaizChannelTypeMismatchFailure"},{"$ref":"#/components/schemas/RaizInvalidStateFailure"},{"$ref":"#/components/schemas/RaizVersionConflictFailure"}],"discriminator":{"propertyName":"code","mapping":{"CHANNEL_AGENT_REQUIRED":"#/components/schemas/RaizChannelAgentRequiredFailure","CHANNEL_ENDPOINT_IN_USE":"#/components/schemas/RaizChannelEndpointInUseFailure","CHANNEL_TYPE_MISMATCH":"#/components/schemas/RaizChannelTypeMismatchFailure","INVALID_STATE":"#/components/schemas/RaizInvalidStateFailure","VERSION_CONFLICT":"#/components/schemas/RaizVersionConflictFailure"}}},"RaizVerifyChannelServiceUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizVerifyChannelServiceUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizVerifyChannelServiceUnavailableFailure":{"oneOf":[{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},{"$ref":"#/components/schemas/RaizIntegrationsUnavailableFailure"}],"discriminator":{"propertyName":"code","mapping":{"UPSTREAM_UNAVAILABLE":"#/components/schemas/UpstreamUnavailableFailure","INTEGRATIONS_UNAVAILABLE":"#/components/schemas/RaizIntegrationsUnavailableFailure"}}},"RaizVerifyChannelTooManyRequestsError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizVerifyChannelTooManyRequestsFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizVerifyChannelTooManyRequestsFailure":{"oneOf":[{"$ref":"#/components/schemas/RateLimitedFailure"},{"$ref":"#/components/schemas/RaizWhatsappRateLimitedFailure"}],"discriminator":{"propertyName":"code","mapping":{"RATE_LIMITED":"#/components/schemas/RateLimitedFailure","WHATSAPP_RATE_LIMITED":"#/components/schemas/RaizWhatsappRateLimitedFailure"}}},"RaizVersionConflictError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RaizVersionConflictFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizVersionConflictFailure":{"type":"object","description":"The resource changed after it was read. Read it again and retry with the new version.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["VERSION_CONFLICT"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizVoice":{"type":"object","required":["accent","age","description","gender","id","language","languages","name","previewUrl","useCase"],"properties":{"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"age":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","description":"A voice's id, as `listVoices` lists it. Use it as an Agent's `settings.voice.voiceId`.","pattern":"^vce_[A-Za-z0-9_-]{20,156}$"},"language":{"anyOf":[{"type":"string","description":"The language the voice is labelled with (ISO 639-1), the one the `language` filter matches."},{"type":"null"}]},"languages":{"type":"array","items":{"type":"object","required":["accent","language","locale","previewUrl"],"properties":{"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"type":"string","description":"ISO 639-1 language code."},"locale":{"anyOf":[{"type":"string","description":"For example `es-MX`."},{"type":"null"}]},"previewUrl":{"anyOf":[{"type":"string","description":"A public sample of the voice (MP3), served by Raíz.","format":"uri"},{"type":"null"}]}},"additionalProperties":false},"description":"The languages the voice is verified for, each with its own sample when there is one.","maxItems":100},"name":{"type":"string"},"previewUrl":{"anyOf":[{"type":"string","description":"A public sample of the voice (MP3), served by Raíz.","format":"uri"},{"type":"null"}]},"useCase":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"RaizVoiceAgentNotReadyFailure":{"type":"object","description":"The Agent cannot take calls yet: it must be an active voice Agent with instructions, published for calls.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["VOICE_AGENT_NOT_READY"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizVoiceLineUnavailableFailure":{"type":"object","description":"No voice line can place this call. Name an active outbound line of the organization with `from` or `channelId`, or assign one to the Agent.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["VOICE_LINE_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizVoiceNotAvailableFailure":{"type":"object","description":"This voice is not available. Choose one from `listVoices`.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["VOICE_NOT_AVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizVoiceNumberInUseFailure":{"type":"object","description":"This number is already connected to another voice service. Release it there first.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["VOICE_NUMBER_IN_USE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizVoiceNumberNotOwnedFailure":{"type":"object","description":"The platform's telephony account does not own a voice-capable number with this value.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["VOICE_NUMBER_NOT_OWNED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizVoicePage":{"type":"object","required":["data","object","pageInfo"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RaizVoice"},"description":"Items admitted by this resource contract within the verified organization."},"object":{"type":"string","const":"list","description":"Discriminator for a resource list response."},"pageInfo":{"$ref":"#/components/schemas/PageInfo","description":"Opaque navigation cursors for this page’s stable keyset order."}},"additionalProperties":false},"RaizVoicePageResponse":{"type":"object","description":"A successful answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/RaizVoicePage"},"error":{"const":null},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RaizVoiceUnavailableFailure":{"type":"object","description":"Calls are unavailable right now. Try again in a few minutes.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["VOICE_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWebsiteNotApprovedFailure":{"type":"object","description":"This website's origin is not approved for crawling in this deployment.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WEBSITE_NOT_APPROVED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappAccountRestrictedFailure":{"type":"object","description":"WhatsApp has restricted this number or its business account. Review the account's status before sending again.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_ACCOUNT_RESTRICTED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappAiPausedFailure":{"type":"object","description":"Automatic replies are paused or this conversation can no longer receive them.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_AI_PAUSED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappChannelInternalFailure":{"type":"object","description":"The delivery outcome could not be read back. Asking again never sends the message twice.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_CHANNEL_INTERNAL"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappChannelRefusedFailure":{"type":"object","description":"Only the WhatsApp Agent Worker delivers through this service, and only Agent messages of a WhatsApp conversation.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_CHANNEL_REFUSED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappDeliveryFailedFailure":{"type":"object","description":"WhatsApp did not deliver the message.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_DELIVERY_FAILED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappDeliveryUnconfirmedFailure":{"type":"object","description":"WhatsApp never confirmed whether the message was sent. It was not sent again.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_DELIVERY_UNCONFIRMED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappEngagementLimitedFailure":{"type":"object","description":"WhatsApp limited how many marketing messages this person receives. Wait at least a day before sending again.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_ENGAGEMENT_LIMITED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappMarketingStoppedFailure":{"type":"object","description":"The contact chose to stop receiving marketing messages from this business.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_MARKETING_STOPPED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappMediaRejectedFailure":{"type":"object","description":"WhatsApp could not use the attachment. Check its type and size limits.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_MEDIA_REJECTED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappMessageUnsupportedFailure":{"type":"object","description":"This message cannot be sent on WhatsApp: it allows one attachment per message, up to three buttons or ten list options, and text of up to 4096 characters.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_MESSAGE_UNSUPPORTED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappNotSentFailure":{"type":"object","description":"The message was stored but never handed to WhatsApp. It was not sent.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_NOT_SENT"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappRateLimitedFailure":{"type":"object","description":"WhatsApp is limiting messages from this number. Try again later.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_RATE_LIMITED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappRecipientUnavailableFailure":{"type":"object","description":"The recipient cannot receive WhatsApp messages from this number.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_RECIPIENT_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWhatsappWindowClosedFailure":{"type":"object","description":"More than 24 hours passed since the contact last wrote. Start the conversation with an approved template.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WHATSAPP_WINDOW_CLOSED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWidgetAgentChoice":{"type":"object","required":["agentId","label"],"properties":{"agentId":{"type":"string","description":"A text Agent of the same organization.","pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":{"type":"string","default":"","maxLength":120},"label":{"type":"string","maxLength":60,"minLength":1}},"additionalProperties":false},"RaizWidgetClientTool":{"type":"object","required":["description","name","parameters"],"properties":{"description":{"type":"string","maxLength":400,"minLength":1},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"parameters":{"type":"array","items":{"type":"object","required":["name","required","type"],"properties":{"name":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_]{0,39}$"},"required":{"type":"boolean"},"type":{"anyOf":[{"type":"string","const":"string"},{"type":"string","const":"number"},{"type":"string","const":"boolean"}]}},"additionalProperties":false},"maxItems":8}},"additionalProperties":false},"RaizWidgetConflictFailure":{"type":"object","description":"The request cannot be repeated or another turn is active.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WIDGET_CONFLICT"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWidgetCopy":{"type":"object","properties":{"consentText":{"type":"string","maxLength":500,"minLength":1},"firstMessageLabel":{"type":"string","maxLength":60,"minLength":1},"formTitle":{"type":"string","maxLength":120},"greeting":{"type":"string","maxLength":500},"launcherLabel":{"type":"string","maxLength":60,"minLength":1},"submitLabel":{"type":"string","maxLength":60,"minLength":1},"subtitle":{"type":"string","maxLength":180},"thankYou":{"type":"string","maxLength":500},"title":{"type":"string","maxLength":80,"minLength":1},"welcomeText":{"type":"string","maxLength":300},"welcomeTitle":{"type":"string","maxLength":80}},"additionalProperties":false},"RaizWidgetField":{"type":"object","required":["label","name","required","type"],"properties":{"description":{"type":"string","default":"","description":"Help shown under the label.","maxLength":300},"label":{"type":"string","maxLength":80,"minLength":1},"name":{"type":"string","pattern":"^[a-zA-Z][a-zA-Z0-9_]{0,39}$"},"options":{"type":"array","items":{"type":"string","maxLength":80,"minLength":1},"default":[],"maxItems":30},"placeholder":{"type":"string","default":"","maxLength":120},"required":{"type":"boolean"},"type":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"textarea"},{"type":"string","const":"email"},{"type":"string","const":"tel"},{"type":"string","const":"number"},{"type":"string","const":"date"},{"type":"string","const":"select"},{"type":"string","const":"radio"},{"type":"string","const":"checkbox"},{"type":"string","const":"url"}]},"width":{"anyOf":[{"type":"string","const":"full"},{"type":"string","const":"half"}],"default":"full","description":"`half` sets two consecutive half fields side by side on wide screens."}},"additionalProperties":false},"RaizWidgetInternalFailure":{"type":"object","description":"The request outcome could not be confirmed. Do not repeat it with a new identifier.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WIDGET_INTERNAL"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWidgetLimitReachedFailure":{"type":"object","description":"This widget reached its conversations or messages for today. It takes visitors again after 00:00 UTC.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WIDGET_LIMIT_REACHED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWidgetPublication":{"type":"object","required":["live","problems","url"],"properties":{"live":{"type":"boolean","description":"Visitors can start now: no `problems`. The hosted page answers at `url`, and the widget runs on its `allowedOrigins`."},"problems":{"type":"array","items":{"anyOf":[{"type":"string","const":"CHANNEL_INACTIVE"},{"type":"string","const":"PAUSED"},{"type":"string","const":"AGENT_REQUIRED"},{"type":"string","const":"AGENT_PAUSED"},{"type":"string","const":"NOT_PLACED"}]},"description":"Why it is not live: `CHANNEL_INACTIVE` (the channel is not active), `PAUSED` (`inboundEnabled` is off), `AGENT_REQUIRED` (no Agent assigned), `AGENT_PAUSED` (its Agent is paused), `NOT_PLACED` (no hosted page and no https site may embed it)."},"url":{"anyOf":[{"type":"string","description":"The widget's own hosted page (`publicLink` on), live or not; null when it runs only on the allowed sites."},{"type":"null"}]}},"additionalProperties":false},"RaizWidgetRefusedFailure":{"type":"object","description":"This widget session is unavailable.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WIDGET_REFUSED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RaizWidgetSettings":{"type":"object","required":["allowedOrigins","title","policyRevision"],"properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/RaizWidgetAgentChoice"},"default":[],"description":"Up to 6 more Agents the visitor may pick; each Agent at most once.","maxItems":6},"allowBusinessTools":{"type":"boolean","default":false,"description":"Let the Agent use its business tools (its integration tools) with anonymous visitors."},"allowedOrigins":{"type":"array","items":{"type":"string","description":"An exact origin where the widget may be embedded, for example `https://www.example.com`. `http://localhost` and `http://127.0.0.1` are accepted for development.","maxLength":256,"pattern":"^(https://[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*|http://(localhost|127\\.0\\.0\\.1))(:[0-9]{1,5})?$"},"description":"Exact origins allowed to embed the widget. The Dashboard may always preview it.","maxItems":20,"uniqueItems":true},"animation":{"anyOf":[{"type":"string","const":"slide"},{"type":"string","const":"fade"},{"type":"string","const":"scale"},{"type":"string","const":"none"}],"default":"slide"},"askFirstMessage":{"type":"boolean","default":true,"description":"The pre-chat form asks for the first message, which opens the conversation."},"assistantColor":{"type":"string","default":"#FFFFFF","description":"Background behind the Agent's messages; the background color shows them as plain text. A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"assistantTextColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"Text of the Agent's messages; null: `textColor`. A color in `#RRGGBB` form, or null to derive it."},"attachmentsEnabled":{"type":"boolean","default":false},"attachmentTypes":{"type":"array","items":{"anyOf":[{"type":"string","const":"image/png"},{"type":"string","const":"image/jpeg"},{"type":"string","const":"application/pdf"},{"type":"string","const":"text/plain"}]},"default":["image/png","image/jpeg","application/pdf","text/plain"],"maxItems":4,"minItems":1,"uniqueItems":true},"avatarUrl":{"anyOf":[{"$ref":"#/components/schemas/HttpsUrl","description":"An HTTPS URL."},{"type":"null"}],"default":null},"backgroundColor":{"type":"string","default":"#F6F8F5","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"borderColor":{"type":"string","default":"#CAD4CD","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"borderWidth":{"type":"integer","default":1,"maximum":4,"minimum":0},"clientTools":{"type":"array","items":{"$ref":"#/components/schemas/RaizWidgetClientTool"},"default":[],"description":"Up to 8 browser tools with unique names.","maxItems":8},"controlRadius":{"anyOf":[{"type":"integer","maximum":24,"minimum":0},{"type":"null"}],"default":null,"description":"Corner radius of fields and buttons, in pixels; 24 makes pill-shaped buttons. Null: derived from `radius`."},"consentText":{"type":"string","default":"Acepto compartir estos datos y esta conversación con esta organización.","maxLength":500,"minLength":1},"customCss":{"type":"string","default":"","description":"A stylesheet applied inside the panel only; the launcher uses the style fields.","maxLength":8000},"errorColor":{"type":"string","default":"#B42318","description":"Field errors and failures the visitor must see. A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/RaizWidgetField"},"default":[],"description":"Up to 40 form fields with unique names, asked before the conversation (or alone, in `form` mode).","maxItems":40},"firstMessageLabel":{"type":"string","default":"Mensaje","maxLength":60,"minLength":1},"font":{"anyOf":[{"type":"string","const":"arbol"},{"type":"string","const":"system"},{"type":"string","const":"serif"},{"type":"string","const":"rounded"},{"type":"string","const":"page"},{"type":"string","const":"custom"}],"default":"arbol","description":"The text typeface: `arbol` (bundled), `system` (the device's), `serif`, `rounded`, `page` (the embedding page's) or `custom` (`fontFamily`, with an optional `fontUrl`)."},"fontFamily":{"type":"string","default":"","description":"The CSS font-family of `font: custom`.","maxLength":200,"pattern":"^[a-zA-Z0-9 ,\"'_-]*$"},"fontSize":{"type":"integer","default":15,"maximum":20,"minimum":12},"fontUrl":{"anyOf":[{"$ref":"#/components/schemas/HttpsUrl","description":"An HTTPS URL."},{"type":"null"}],"default":null},"formTitle":{"type":"string","default":"Antes de empezar","maxLength":120},"greeting":{"type":"string","default":"¡Hola! ¿En qué te podemos ayudar?","maxLength":500},"headerColor":{"type":"string","default":"#F6F8F5","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"headerTextColor":{"type":"string","default":"#182D24","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"headingFont":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"arbol"},{"type":"string","const":"system"},{"type":"string","const":"serif"},{"type":"string","const":"rounded"},{"type":"string","const":"page"},{"type":"string","const":"custom"}],"default":"text","description":"The headings' typeface: `text` (the same as `font`) or one of `font`'s choices, with `headingFontFamily` and `headingFontUrl` for `custom`."},"headingFontFamily":{"type":"string","default":"","description":"The CSS font-family of `headingFont: custom`.","maxLength":200,"pattern":"^[a-zA-Z0-9 ,\"'_-]*$"},"headingFontUrl":{"anyOf":[{"$ref":"#/components/schemas/HttpsUrl","description":"An HTTPS URL."},{"type":"null"}],"default":null},"headingWeight":{"type":"integer","default":500,"description":"The headings' weight, from 300 (light) to 800 (heavy).","maximum":800,"minimum":300,"multipleOf":100},"inputBorderColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"The border of form fields and of the message box. A color in `#RRGGBB` form, or null to derive it."},"inputColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"The background of form fields and of the message box. A color in `#RRGGBB` form, or null to derive it."},"language":{"anyOf":[{"type":"string","const":"es"},{"type":"string","const":"en"}],"default":"es","description":"The visitor interface language when the browser asks for none of the translated ones."},"launcherIcon":{"anyOf":[{"type":"string","const":"chat"},{"type":"string","const":"sparkle"},{"type":"string","const":"question"},{"type":"string","const":"logo"}],"default":"chat"},"launcherLabel":{"type":"string","default":"Escríbenos","maxLength":60,"minLength":1},"launcherStyle":{"anyOf":[{"type":"string","const":"icon"},{"type":"string","const":"label"}],"default":"icon","description":"`label` shows the launcher text next to the icon; `icon` keeps it as the accessible name."},"linkColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"Links; null: `primaryColor`. A color in `#RRGGBB` form, or null to derive it."},"logoObjectKey":{"anyOf":[{"type":"string","description":"The stored logo, managed by Raíz: `updateChannel`'s `widgetLogo` sets it. Send back the value you read, or null to remove the logo; any other key is refused.","maxLength":512,"pattern":"^[A-Za-z0-9][A-Za-z0-9/_.-]{0,511}$"},{"type":"null"}],"default":null},"maxTurns":{"type":"integer","default":30,"description":"Visitor messages per session.","maximum":100,"minimum":1},"mutedTextColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"Secondary text: descriptions, hints and times. A color in `#RRGGBB` form, or null to derive it."},"mobileMode":{"anyOf":[{"type":"string","const":"sheet"},{"type":"string","const":"fullscreen"}],"default":"fullscreen"},"mode":{"anyOf":[{"type":"string","const":"chat"},{"type":"string","const":"form"},{"type":"string","const":"form-chat"}],"default":"chat","description":"`chat`: conversation only. `form`: the form only, no conversation. `form-chat`: the form, then the conversation."},"position":{"anyOf":[{"type":"string","const":"left"},{"type":"string","const":"right"}],"default":"right"},"primaryColor":{"type":"string","default":"#24664C","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"privacyUrl":{"anyOf":[{"$ref":"#/components/schemas/HttpsUrl","description":"An HTTPS URL."},{"type":"null"}],"default":null},"publicLink":{"type":"boolean","default":false,"description":"Also serve the widget on its own hosted page, outside any embedding site."},"radius":{"type":"integer","default":20,"maximum":28,"minimum":0},"sessionMinutes":{"type":"integer","default":30,"maximum":60,"minimum":5},"sessionsPerDay":{"type":"integer","default":100,"maximum":10000,"minimum":1},"sharePageContext":{"type":"boolean","default":false,"description":"Send the embedding page's title, URL and visible text with each message."},"showBranding":{"type":"boolean","default":true},"speakReplies":{"type":"boolean","default":false},"speechInput":{"type":"boolean","default":false},"streaming":{"type":"boolean","default":true},"style":{"anyOf":[{"type":"string","const":"soft"},{"type":"string","const":"flat"}],"default":"soft","description":"`flat` removes shadows and tightens corners for minimal sites."},"submitLabel":{"type":"string","default":"Continuar","maxLength":60,"minLength":1},"subtitle":{"type":"string","default":"¿Cómo te podemos ayudar?","maxLength":180},"suggestions":{"type":"array","items":{"type":"string","maxLength":80,"minLength":1},"default":[],"description":"Starter questions offered before the first message.","maxItems":6},"textColor":{"type":"string","default":"#182D24","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"thankYou":{"type":"string","default":"Gracias. Recibimos tu información.","maxLength":500},"title":{"type":"string","maxLength":80,"minLength":1},"translations":{"$ref":"#/components/schemas/RaizWidgetTranslations","default":{},"description":"Copy overrides per language."},"turnsPerDay":{"type":"integer","default":1000,"maximum":100000,"minimum":1},"userTextColor":{"type":"string","default":"#FFFFFF","description":"Text on `primaryColor`: buttons and the launcher. A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"visitorColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"Background of the visitor's own messages; null: a light tint of `textColor`. A color in `#RRGGBB` form, or null to derive it."},"visitorTextColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"Text of the visitor's own messages; null: `textColor`. A color in `#RRGGBB` form, or null to derive it."},"voiceMessages":{"type":"boolean","default":false,"description":"Let visitors record a voice message; Raíz transcribes it and the Agent answers the transcript."},"welcomeText":{"type":"string","default":"Pregúntanos lo que necesites. Solemos responder en minutos.","maxLength":300},"welcomeTitle":{"type":"string","default":"¡Hola! 👋","maxLength":80},"policyRevision":{"type":"integer","description":"Increases when a policy field, the channel's Agent or its inbound switch changes; sessions opened under an older revision end.","minimum":1}},"additionalProperties":false},"RaizWidgetSettingsInput":{"type":"object","required":["allowedOrigins","title"],"properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/RaizWidgetAgentChoice"},"default":[],"description":"Up to 6 more Agents the visitor may pick; each Agent at most once.","maxItems":6},"allowBusinessTools":{"type":"boolean","default":false,"description":"Let the Agent use its business tools (its integration tools) with anonymous visitors."},"allowedOrigins":{"type":"array","items":{"type":"string","description":"An exact origin where the widget may be embedded, for example `https://www.example.com`. `http://localhost` and `http://127.0.0.1` are accepted for development.","maxLength":256,"pattern":"^(https://[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*|http://(localhost|127\\.0\\.0\\.1))(:[0-9]{1,5})?$"},"description":"Exact origins allowed to embed the widget. The Dashboard may always preview it.","maxItems":20,"uniqueItems":true},"animation":{"anyOf":[{"type":"string","const":"slide"},{"type":"string","const":"fade"},{"type":"string","const":"scale"},{"type":"string","const":"none"}],"default":"slide"},"askFirstMessage":{"type":"boolean","default":true,"description":"The pre-chat form asks for the first message, which opens the conversation."},"assistantColor":{"type":"string","default":"#FFFFFF","description":"Background behind the Agent's messages; the background color shows them as plain text. A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"assistantTextColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"Text of the Agent's messages; null: `textColor`. A color in `#RRGGBB` form, or null to derive it."},"attachmentsEnabled":{"type":"boolean","default":false},"attachmentTypes":{"type":"array","items":{"anyOf":[{"type":"string","const":"image/png"},{"type":"string","const":"image/jpeg"},{"type":"string","const":"application/pdf"},{"type":"string","const":"text/plain"}]},"default":["image/png","image/jpeg","application/pdf","text/plain"],"maxItems":4,"minItems":1,"uniqueItems":true},"avatarUrl":{"anyOf":[{"$ref":"#/components/schemas/HttpsUrl","description":"An HTTPS URL."},{"type":"null"}],"default":null},"backgroundColor":{"type":"string","default":"#F6F8F5","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"borderColor":{"type":"string","default":"#CAD4CD","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"borderWidth":{"type":"integer","default":1,"maximum":4,"minimum":0},"clientTools":{"type":"array","items":{"$ref":"#/components/schemas/RaizWidgetClientTool"},"default":[],"description":"Up to 8 browser tools with unique names.","maxItems":8},"controlRadius":{"anyOf":[{"type":"integer","maximum":24,"minimum":0},{"type":"null"}],"default":null,"description":"Corner radius of fields and buttons, in pixels; 24 makes pill-shaped buttons. Null: derived from `radius`."},"consentText":{"type":"string","default":"Acepto compartir estos datos y esta conversación con esta organización.","maxLength":500,"minLength":1},"customCss":{"type":"string","default":"","description":"A stylesheet applied inside the panel only; the launcher uses the style fields.","maxLength":8000},"errorColor":{"type":"string","default":"#B42318","description":"Field errors and failures the visitor must see. A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/RaizWidgetField"},"default":[],"description":"Up to 40 form fields with unique names, asked before the conversation (or alone, in `form` mode).","maxItems":40},"firstMessageLabel":{"type":"string","default":"Mensaje","maxLength":60,"minLength":1},"font":{"anyOf":[{"type":"string","const":"arbol"},{"type":"string","const":"system"},{"type":"string","const":"serif"},{"type":"string","const":"rounded"},{"type":"string","const":"page"},{"type":"string","const":"custom"}],"default":"arbol","description":"The text typeface: `arbol` (bundled), `system` (the device's), `serif`, `rounded`, `page` (the embedding page's) or `custom` (`fontFamily`, with an optional `fontUrl`)."},"fontFamily":{"type":"string","default":"","description":"The CSS font-family of `font: custom`.","maxLength":200,"pattern":"^[a-zA-Z0-9 ,\"'_-]*$"},"fontSize":{"type":"integer","default":15,"maximum":20,"minimum":12},"fontUrl":{"anyOf":[{"$ref":"#/components/schemas/HttpsUrl","description":"An HTTPS URL."},{"type":"null"}],"default":null},"formTitle":{"type":"string","default":"Antes de empezar","maxLength":120},"greeting":{"type":"string","default":"¡Hola! ¿En qué te podemos ayudar?","maxLength":500},"headerColor":{"type":"string","default":"#F6F8F5","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"headerTextColor":{"type":"string","default":"#182D24","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"headingFont":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"arbol"},{"type":"string","const":"system"},{"type":"string","const":"serif"},{"type":"string","const":"rounded"},{"type":"string","const":"page"},{"type":"string","const":"custom"}],"default":"text","description":"The headings' typeface: `text` (the same as `font`) or one of `font`'s choices, with `headingFontFamily` and `headingFontUrl` for `custom`."},"headingFontFamily":{"type":"string","default":"","description":"The CSS font-family of `headingFont: custom`.","maxLength":200,"pattern":"^[a-zA-Z0-9 ,\"'_-]*$"},"headingFontUrl":{"anyOf":[{"$ref":"#/components/schemas/HttpsUrl","description":"An HTTPS URL."},{"type":"null"}],"default":null},"headingWeight":{"type":"integer","default":500,"description":"The headings' weight, from 300 (light) to 800 (heavy).","maximum":800,"minimum":300,"multipleOf":100},"inputBorderColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"The border of form fields and of the message box. A color in `#RRGGBB` form, or null to derive it."},"inputColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"The background of form fields and of the message box. A color in `#RRGGBB` form, or null to derive it."},"language":{"anyOf":[{"type":"string","const":"es"},{"type":"string","const":"en"}],"default":"es","description":"The visitor interface language when the browser asks for none of the translated ones."},"launcherIcon":{"anyOf":[{"type":"string","const":"chat"},{"type":"string","const":"sparkle"},{"type":"string","const":"question"},{"type":"string","const":"logo"}],"default":"chat"},"launcherLabel":{"type":"string","default":"Escríbenos","maxLength":60,"minLength":1},"launcherStyle":{"anyOf":[{"type":"string","const":"icon"},{"type":"string","const":"label"}],"default":"icon","description":"`label` shows the launcher text next to the icon; `icon` keeps it as the accessible name."},"linkColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"Links; null: `primaryColor`. A color in `#RRGGBB` form, or null to derive it."},"logoObjectKey":{"anyOf":[{"type":"string","description":"The stored logo, managed by Raíz: `updateChannel`'s `widgetLogo` sets it. Send back the value you read, or null to remove the logo; any other key is refused.","maxLength":512,"pattern":"^[A-Za-z0-9][A-Za-z0-9/_.-]{0,511}$"},{"type":"null"}],"default":null},"maxTurns":{"type":"integer","default":30,"description":"Visitor messages per session.","maximum":100,"minimum":1},"mutedTextColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"Secondary text: descriptions, hints and times. A color in `#RRGGBB` form, or null to derive it."},"mobileMode":{"anyOf":[{"type":"string","const":"sheet"},{"type":"string","const":"fullscreen"}],"default":"fullscreen"},"mode":{"anyOf":[{"type":"string","const":"chat"},{"type":"string","const":"form"},{"type":"string","const":"form-chat"}],"default":"chat","description":"`chat`: conversation only. `form`: the form only, no conversation. `form-chat`: the form, then the conversation."},"position":{"anyOf":[{"type":"string","const":"left"},{"type":"string","const":"right"}],"default":"right"},"primaryColor":{"type":"string","default":"#24664C","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"privacyUrl":{"anyOf":[{"$ref":"#/components/schemas/HttpsUrl","description":"An HTTPS URL."},{"type":"null"}],"default":null},"publicLink":{"type":"boolean","default":false,"description":"Also serve the widget on its own hosted page, outside any embedding site."},"radius":{"type":"integer","default":20,"maximum":28,"minimum":0},"sessionMinutes":{"type":"integer","default":30,"maximum":60,"minimum":5},"sessionsPerDay":{"type":"integer","default":100,"maximum":10000,"minimum":1},"sharePageContext":{"type":"boolean","default":false,"description":"Send the embedding page's title, URL and visible text with each message."},"showBranding":{"type":"boolean","default":true},"speakReplies":{"type":"boolean","default":false},"speechInput":{"type":"boolean","default":false},"streaming":{"type":"boolean","default":true},"style":{"anyOf":[{"type":"string","const":"soft"},{"type":"string","const":"flat"}],"default":"soft","description":"`flat` removes shadows and tightens corners for minimal sites."},"submitLabel":{"type":"string","default":"Continuar","maxLength":60,"minLength":1},"subtitle":{"type":"string","default":"¿Cómo te podemos ayudar?","maxLength":180},"suggestions":{"type":"array","items":{"type":"string","maxLength":80,"minLength":1},"default":[],"description":"Starter questions offered before the first message.","maxItems":6},"textColor":{"type":"string","default":"#182D24","description":"A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"thankYou":{"type":"string","default":"Gracias. Recibimos tu información.","maxLength":500},"title":{"type":"string","maxLength":80,"minLength":1},"translations":{"$ref":"#/components/schemas/RaizWidgetTranslations","default":{},"description":"Copy overrides per language."},"turnsPerDay":{"type":"integer","default":1000,"maximum":100000,"minimum":1},"userTextColor":{"type":"string","default":"#FFFFFF","description":"Text on `primaryColor`: buttons and the launcher. A color in `#RRGGBB` form.","pattern":"^#[0-9a-fA-F]{6}$"},"visitorColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"Background of the visitor's own messages; null: a light tint of `textColor`. A color in `#RRGGBB` form, or null to derive it."},"visitorTextColor":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"default":null,"description":"Text of the visitor's own messages; null: `textColor`. A color in `#RRGGBB` form, or null to derive it."},"voiceMessages":{"type":"boolean","default":false,"description":"Let visitors record a voice message; Raíz transcribes it and the Agent answers the transcript."},"welcomeText":{"type":"string","default":"Pregúntanos lo que necesites. Solemos responder en minutos.","maxLength":300},"welcomeTitle":{"type":"string","default":"¡Hola! 👋","maxLength":80}},"additionalProperties":false},"RaizWidgetTranslations":{"type":"object","properties":{"en":{"$ref":"#/components/schemas/RaizWidgetCopy"},"es":{"$ref":"#/components/schemas/RaizWidgetCopy"}},"additionalProperties":false},"RaizWidgetVoiceUnheardFailure":{"type":"object","description":"The voice message could not be understood. Record it again or write the message.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["WIDGET_VOICE_UNHEARD"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RateLimitedError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RateLimitedFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RateLimitedFailure":{"type":"object","description":"The request rate limit was exceeded. Try again later.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"RequestTooLargeError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/RequestTooLargeFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"RequestTooLargeFailure":{"type":"object","description":"The request exceeds the allowed size.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["REQUEST_TOO_LARGE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"ResponseMetadata":{"type":"object","description":"What every answer carries besides its data or error.","additionalProperties":false,"required":["requestId"],"properties":{"requestId":{"type":"string","description":"Request correlation identifier, also sent as X-Request-Id."}}},"SignedUrl":{"additionalProperties":false,"type":"object","required":["url","expiresAt"],"properties":{"url":{"$ref":"#/components/schemas/HttpsUrl","description":"The signed URL. Anyone holding it has access until it expires."},"expiresAt":{"format":"date-time","description":"When the URL stops working.","type":"string"}}},"UnauthorizedError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/UnauthorizedFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"UnauthorizedFailure":{"type":"object","description":"A valid access token is required.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"UnsupportedMediaTypeError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/UnsupportedMediaTypeFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"UnsupportedMediaTypeFailure":{"type":"object","description":"The request content type is not supported.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["UNSUPPORTED_MEDIA_TYPE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[false],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"UpstreamTimeoutError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/UpstreamTimeoutFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"UpstreamTimeoutFailure":{"type":"object","description":"The upstream service did not respond before its deadline.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["UPSTREAM_TIMEOUT"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"UpstreamUnavailableError":{"type":"object","description":"A failed answer.","additionalProperties":false,"required":["success","data","error","metadata"],"properties":{"success":{"type":"boolean","enum":[false]},"data":{"const":null},"error":{"$ref":"#/components/schemas/UpstreamUnavailableFailure"},"metadata":{"$ref":"#/components/schemas/ResponseMetadata"}}},"UpstreamUnavailableFailure":{"type":"object","description":"The upstream service could not complete the request.","additionalProperties":false,"required":["code","message","retryable","data"],"properties":{"code":{"type":"string","enum":["UPSTREAM_UNAVAILABLE"],"description":"The failure code, stable across releases."},"message":{"type":"string","description":"What went wrong, for people; it never contains input values."},"retryable":{"type":"boolean","enum":[true],"description":"Whether repeating the same request may succeed."},"data":{"$ref":"#/components/schemas/Empty"}}},"ValidationIssue":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string","maxLength":256,"description":"RFC 6901 JSON Pointer to the refused field; empty for the whole input."},"message":{"type":"string","maxLength":256}},"additionalProperties":false}},"securitySchemes":{"arbolHuman":{"type":"oauth2","description":"A person's Arbol sign-in for audience https://api.getarbol.com with an organization selected. A service acting for the person presents the token it obtained on their behalf. The token's scopes count only as far as the person's roles grant them.","flows":{"authorizationCode":{"authorizationUrl":"https://auth.getarbol.com/authorize","tokenUrl":"https://auth.getarbol.com/oauth/token","scopes":{"account:api-keys:read":"Read api keys","account:api-keys:write":"Write api keys","account:billing:operate":"Arbol staff: read and change an organization's billing terms, credits, transfers and invoices, and what it costs Arbol","account:billing:read":"See the organization's wallet in credits, its usage and its movements","account:billing:write":"Top up the organization's wallet by card and manage its saved card","account:connections:operate":"Arbol staff: add, change and remove an organization's connections, register its custom servers and read their tools","account:connections:read":"Read connections","account:connections:reconcile":"Verify and store credentials for validator connections approved for a service identity","account:connections:write":"Register, rename and remove the organization's own servers, and change whether Arbi uses its connections and their WhatsApp reminders","account:members:read":"Read members","account:members:write":"Write members","account:organizations:read":"Read organizations","account:organizations:write":"Change the organization's name, logo and sign-in colors","agenda:appointments:read":"Read appointments","agenda:appointments:write":"Write appointments","agenda:availability:read":"Read availability","agenda:bookings:read":"Find bookable services, their requirements and slots, and a patient's appointments, to book for them","agenda:bookings:write":"Book, reschedule and cancel appointments through the booking contract","agenda:locations:read":"Read locations","agenda:offerings:read":"Read offerings","agenda:offerings:write":"Create and configure service offerings (administration)","agenda:resources:read":"Read resources","agenda:resources:write":"Create and configure agendas (administration)","agenda:schedule-rules:read":"Read agenda hours","agenda:schedule-rules:write":"Configure agenda hours (administration)","agenda:services:read":"Read services","agenda:services:write":"Create and configure services (administration)","agenda:waitlist:read":"Read waitlist","agenda:waitlist:write":"Put a patient on a service's waiting list for the clinic's team","axxa:authorizations:read":"Read axxa authorizations","axxa:connections:read":"Read axxa connections","axxa:connections:write":"Manage axxa connections","axxa:eligibility:read":"Read axxa eligibility","axxa:provider:read":"Read axxa provider","comfachoco:affiliations:read":"Read Comfachoco affiliations","comfachoco:connections:read":"Read Comfachoco connections","comfachoco:connections:write":"Manage Comfachoco connections","comfachoco:mcp:use":"Use Comfachoco MCP","famisanar:affiliations:read":"Look up an affiliation using an active Famisanar connection.","famisanar:connections:write":"Verify and remove Famisanar IPS connections.","gmedic:agendas:read":"Read gmedic agendas","gmedic:appointments:read":"Read gmedic appointments","gmedic:appointments:write":"Manage gmedic appointments","gmedic:availability:read":"Read gmedic availability","gmedic:catalogs:read":"Read gmedic catalogs","gmedic:connections:read":"Read gmedic connections","gmedic:connections:write":"Manage gmedic connections","gmedic:patient-notes:read":"Read gmedic patient-notes","gmedic:patient-notes:write":"Manage gmedic patient-notes","gmedic:patients:read":"Read gmedic patients","gmedic:patients:write":"Manage gmedic patients","gmedic:sessions:read":"Read gmedic sessions","gmedic:sessions:write":"Manage gmedic sessions","insights:reports:read":"Read insights reports","nueva-eps:affiliations:read":"Read nueva-eps affiliations","nueva-eps:connections:read":"Read nueva-eps connections","nueva-eps:connections:write":"Manage nueva-eps connections","nueva-eps:precursoras:read":"Read Nueva EPS Precursoras reporting summaries and error reports","oficlinic:appointments:read":"Read e-Oficlinic appointments","oficlinic:appointments:write":"Write e-Oficlinic appointments","oficlinic:availability:read":"Read e-Oficlinic appointment availability","oficlinic:connections:read":"Read e-Oficlinic connections","oficlinic:connections:write":"Write e-Oficlinic connections","oficlinic:daily-roster:read":"Read a professional's e-Oficlinic daily patient roster","oficlinic:mcp:use":"Use the e-Oficlinic MCP transport","oficlinic:patients:read":"Read e-Oficlinic patients","oficlinic:patients:write":"Register e-Oficlinic patients","oficlinic:payers:read":"Read e-Oficlinic payers","oficlinic:professionals:read":"Read e-Oficlinic professionals","oficlinic:services:read":"Read e-Oficlinic services","oficlinic:services:write":"Write e-Oficlinic services","pijaos-salud:affiliations:read":"Look up one member's affiliation through an active Pijaos Salud IPS connection.","pijaos-salud:connections:write":"Verify an IPS login as an authorized staff operator.","raiz:agents:read":"Read agents","raiz:agents:write":"Write agents","raiz:campaigns:read":"Read campaigns","raiz:campaigns:write":"Write campaigns","raiz:changes:read":"Read changes","raiz:channels:read":"Read channels","raiz:channels:write":"Write channels","raiz:contacts:read":"Read contacts","raiz:contacts:write":"Write contacts","raiz:conversations:read":"Read conversations","raiz:conversations:write":"Write conversations","raiz:definitions:read":"Read definitions","raiz:definitions:write":"Write definitions","raiz:facts:write":"Write facts","raiz:knowledge:read":"Read knowledge","raiz:knowledge:write":"Write knowledge","raiz:organization:read":"Read organization","raiz:organization:write":"Write organization","raiz:profiles:read":"Read profiles","raiz:profiles:write":"Write profiles","raiz:reports:read":"Read reports","raiz:staff:operate":"Operate staff","raiz:suppressions:read":"Read suppressions","raiz:suppressions:write":"Write suppressions","raiz:tasks:read":"Read tasks","raiz:tasks:write":"Write tasks","raiz:templates:read":"Read templates","raiz:templates:write":"Write templates","raiz:voices:read":"Read voices","salud-total:affiliations:read":"Look up one member affiliation using an active IPS connection.","salud-total:authorizations:read":"Read and store the IPS authorization report, list observed authorizations and obtain their available documents.","salud-total:connections:read":"Read IPS connection verification metadata.","salud-total:connections:write":"Verify or remove a Salud Total IPS connection.","salud-total:filings:read":"Check member filing availability for one institution and day.","salud-total:invoices:read":"Look up one exact reference in the active IPS billing account.","salud-total:notices:read":"Read the institutional objection notification total without opening a notice.","salud-total:portals:read":"Inspect the private IPS portal inventory as an authorized staff operator.","salud-total:references:read":"Read the active IPS connection’s administrative catalogs.","sanitas:affiliations:read":"Read one member's Sanitas coverage from an active Account connection","sanitas:connections:read":"Read safe Sanitas connection status","sanitas:connections:write":"Verify or retire a Sanitas connection as an authorized staff operator","sura:affiliations:read":"Look up SURA affiliations, authorizations and copays in SaludWeb","sura:appointments:read":"Look up SURA patients, services, registered professionals, schedules, availability and appointments","sura:appointments:write":"Book and cancel SURA appointments","sura:connections:read":"See the organization's SURA connections and whether they work","sura:connections:write":"Connect, change and remove the organization's SURA portal accounts","visoft:appointments:read":"Look up Visoft patients and their appointments, contracts, services, professionals and free slots","visoft:appointments:write":"Book and cancel Visoft appointments","visoft:connections:read":"See the organization's Visoft connections and whether they work","visoft:connections:write":"Connect, change and remove the organization's Visoft (SIIPS) accounts","visoft:patients:write":"Register Visoft patients and correct their details"}}}},"arbolMachine":{"type":"oauth2","description":"A machine application of one organization, created in Arbol Account: client credentials for audience https://api.getarbol.com. The token carries the organization and the scopes the application was granted.","flows":{"clientCredentials":{"tokenUrl":"https://auth.getarbol.com/oauth/token","scopes":{"account:api-keys:read":"Read api keys","account:api-keys:write":"Write api keys","account:billing:read":"See the organization's wallet in credits, its usage and its movements","account:billing:write":"Top up the organization's wallet by card and manage its saved card","account:connections:operate":"Arbol staff: add, change and remove an organization's connections, register its custom servers and read their tools","account:connections:read":"Read connections","account:connections:write":"Register, rename and remove the organization's own servers, and change whether Arbi uses its connections and their WhatsApp reminders","account:members:read":"Read members","account:members:write":"Write members","account:organizations:read":"Read organizations","account:organizations:write":"Change the organization's name, logo and sign-in colors","agenda:appointments:read":"Read appointments","agenda:appointments:write":"Write appointments","agenda:availability:read":"Read availability","agenda:bookings:read":"Find bookable services, their requirements and slots, and a patient's appointments, to book for them","agenda:bookings:write":"Book, reschedule and cancel appointments through the booking contract","agenda:locations:read":"Read locations","agenda:offerings:read":"Read offerings","agenda:resources:read":"Read resources","agenda:schedule-rules:read":"Read agenda hours","agenda:services:read":"Read services","agenda:waitlist:read":"Read waitlist","agenda:waitlist:write":"Put a patient on a service's waiting list for the clinic's team","axxa:authorizations:read":"Read axxa authorizations","axxa:connections:read":"Read axxa connections","axxa:connections:write":"Manage axxa connections","axxa:eligibility:read":"Read axxa eligibility","axxa:provider:read":"Read axxa provider","comfachoco:affiliations:read":"Read Comfachoco affiliations","comfachoco:connections:read":"Read Comfachoco connections","comfachoco:connections:write":"Manage Comfachoco connections","famisanar:affiliations:read":"Look up an affiliation using an active Famisanar connection.","famisanar:connections:write":"Verify and remove Famisanar IPS connections.","gmedic:agendas:read":"Read gmedic agendas","gmedic:appointments:read":"Read gmedic appointments","gmedic:appointments:write":"Manage gmedic appointments","gmedic:availability:read":"Read gmedic availability","gmedic:catalogs:read":"Read gmedic catalogs","gmedic:connections:read":"Read gmedic connections","gmedic:connections:write":"Manage gmedic connections","gmedic:patient-notes:read":"Read gmedic patient-notes","gmedic:patient-notes:write":"Manage gmedic patient-notes","gmedic:patients:read":"Read gmedic patients","gmedic:patients:write":"Manage gmedic patients","gmedic:sessions:read":"Read gmedic sessions","gmedic:sessions:write":"Manage gmedic sessions","insights:reports:read":"Read insights reports","nueva-eps:affiliations:read":"Read nueva-eps affiliations","nueva-eps:connections:read":"Read nueva-eps connections","nueva-eps:connections:write":"Manage nueva-eps connections","nueva-eps:precursoras:read":"Read Nueva EPS Precursoras reporting summaries and error reports","oficlinic:appointments:read":"Read e-Oficlinic appointments","oficlinic:appointments:write":"Write e-Oficlinic appointments","oficlinic:availability:read":"Read e-Oficlinic appointment availability","oficlinic:connections:read":"Read e-Oficlinic connections","oficlinic:connections:write":"Write e-Oficlinic connections","oficlinic:daily-roster:read":"Read a professional's e-Oficlinic daily patient roster","oficlinic:patients:read":"Read e-Oficlinic patients","oficlinic:patients:write":"Register e-Oficlinic patients","oficlinic:payers:read":"Read e-Oficlinic payers","oficlinic:professionals:read":"Read e-Oficlinic professionals","oficlinic:services:read":"Read e-Oficlinic services","oficlinic:services:write":"Write e-Oficlinic services","pijaos-salud:affiliations:read":"Look up one member's affiliation through an active Pijaos Salud IPS connection.","raiz:agents:read":"Read agents","raiz:agents:write":"Write agents","raiz:campaigns:read":"Read campaigns","raiz:campaigns:write":"Write campaigns","raiz:changes:read":"Read changes","raiz:channels:read":"Read channels","raiz:channels:write":"Write channels","raiz:contacts:read":"Read contacts","raiz:contacts:write":"Write contacts","raiz:conversations:read":"Read conversations","raiz:conversations:write":"Write conversations","raiz:definitions:read":"Read definitions","raiz:definitions:write":"Write definitions","raiz:facts:write":"Write facts","raiz:knowledge:read":"Read knowledge","raiz:knowledge:write":"Write knowledge","raiz:organization:read":"Read organization","raiz:organization:write":"Write organization","raiz:profiles:read":"Read profiles","raiz:profiles:write":"Write profiles","raiz:reports:read":"Read reports","raiz:suppressions:read":"Read suppressions","raiz:suppressions:write":"Write suppressions","raiz:tasks:read":"Read tasks","raiz:tasks:write":"Write tasks","raiz:templates:read":"Read templates","raiz:templates:write":"Write templates","raiz:voices:read":"Read voices","salud-total:affiliations:read":"Look up one member affiliation using an active IPS connection.","salud-total:authorizations:read":"Read and store the IPS authorization report, list observed authorizations and obtain their available documents.","salud-total:filings:read":"Check member filing availability for one institution and day.","salud-total:invoices:read":"Look up one exact reference in the active IPS billing account.","salud-total:notices:read":"Read the institutional objection notification total without opening a notice.","sanitas:affiliations:read":"Read one member's Sanitas coverage from an active Account connection","sanitas:connections:read":"Read safe Sanitas connection status","sanitas:connections:write":"Verify or retire a Sanitas connection as an authorized staff operator","sura:affiliations:read":"Look up SURA affiliations, authorizations and copays in SaludWeb","sura:appointments:read":"Look up SURA patients, services, registered professionals, schedules, availability and appointments","sura:appointments:write":"Book and cancel SURA appointments","sura:connections:read":"See the organization's SURA connections and whether they work","sura:connections:write":"Connect, change and remove the organization's SURA portal accounts","visoft:appointments:read":"Look up Visoft patients and their appointments, contracts, services, professionals and free slots","visoft:appointments:write":"Book and cancel Visoft appointments","visoft:connections:read":"See the organization's Visoft connections and whether they work","visoft:connections:write":"Connect, change and remove the organization's Visoft (SIIPS) accounts","visoft:patients:write":"Register Visoft patients and correct their details"}}}},"arbolApiKey":{"type":"http","scheme":"bearer","description":"An Arbol API key (arb_live_…), shown once when it is created in Arbol Account: the same machine application as one string. The Gateway exchanges it for the application's token."}}},"paths":{"/v1/raiz/agents":{"get":{"operationId":"raiz.agents.list","summary":"List Agents","description":"Find the organization's Agents (the Dashboard calls them Workers), newest first, to get the `agentId` you need before reading or changing one. Filter by `status` (`active`, `paused`), `modality` (`voice` for calls, `text` for WhatsApp and web chat) or `q` (name). Each item shows whether it is `ready` to hold conversations and, for voice Agents, `synced`. Next: `get_agent` for its full setup, or `list_conversations` with `agentId` for what it talked about.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:read"]},{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:read"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:read","raiz:agents:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"modality","in":"query","required":false,"description":"`voice`: phone calls. `text`: WhatsApp and web chat.","schema":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"text"}],"description":"`voice`: phone calls. `text`: WhatsApp and web chat."}},{"name":"q","in":"query","required":false,"description":"Matches the name, ignoring accents and case.","schema":{"type":"string","description":"Matches the name, ignoring accents and case.","maxLength":200,"minLength":1}},{"name":"status","in":"query","required":false,"description":"A paused Agent answers nothing and places no calls.","schema":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused Agent answers nothing and places no calls."}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizAgentPageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListAgentsBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `VOICE_UNAVAILABLE`: Calls are unavailable right now. Try again in a few minutes.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","VOICE_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListAgentsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"agents","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","modality":"string","q":"string","status":"string"}},"x-fern-sdk-group-name":["raiz","agents"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"modality":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"text"}],"description":"`voice`: phone calls. `text`: WhatsApp and web chat."},"q":{"type":"string","description":"Matches the name, ignoring accents and case.","maxLength":200,"minLength":1},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused Agent answers nothing and places no calls."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listAgents","x-arbol-native-rpc":true},"post":{"operationId":"raiz.agents.create","summary":"Create an Agent","description":"Create an Agent that talks to the organization's contacts. Choose `modality` (`voice`: phone calls; `text`: WhatsApp and web chat) and a `name`; then give it `instructions` (role, goal, limits), and optionally a `firstMessage`, `language`, `timeZone`, `settings`, Knowledge (`knowledgeDocumentIds` of ready documents from `list_knowledge_documents`) and `integrationTools` (connection + tool pairs of the organization's connections in Account, checked live: INTEGRATION_TOOL_UNAVAILABLE), `procedures` (each a trigger plus free-form Markdown or structured steps, with inline references to the Agent's tools, Knowledge and other procedures: AGENT_PROCEDURES_INVALID says where one is wrong), `workflow` (a conversation graph of steps and edges: AGENT_WORKFLOW_INVALID says where one is wrong), and for a text Agent `integrationProcedures` (connection + procedure pairs a connection publishes, checked live: INTEGRATION_PROCEDURE_UNAVAILABLE). Next: assign it to a channel with `update_channel`; a voice Agent is published in the background, so check `synced` with `get_agent`. Read the `create-agent` skill (`get_skill`) first.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":524288,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateAgentBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizAgentResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `AGENT_IN_USE`: The Agent still has channels or active campaigns. Unassign them before deleting it.\n- `AGENT_MODALITY_LOCKED`: The Agent's modality cannot change while it has channels or is published for calls. Create a new Agent instead.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["AGENT_IN_USE","AGENT_MODALITY_LOCKED","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateAgentConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `AGENT_PROCEDURES_INVALID`: A procedure is incomplete, references a tool, document or procedure the Agent does not have, or breaks the structured step rules. `issues` says where.\n- `AGENT_WORKFLOW_INVALID`: The workflow breaks the graph rules, leaves a step without a way forward, or uses a tool this Agent cannot run there. `issues` says where.\n- `AGENT_SETTINGS_INVALID`: The settings do not apply to this Agent's modality, or two settings contradict each other.\n- `INTEGRATION_PROCEDURE_UNAVAILABLE`: A procedure does not exist in this organization's connections, Raíz cannot run its connection, or the Agent is not a text Agent.\n- `INTEGRATION_TOOL_UNAVAILABLE`: An integration tool does not exist in this organization's connections, or Raíz cannot run it.\n- `KNOWLEDGE_DOCUMENT_UNAVAILABLE`: A Knowledge document does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["AGENT_PROCEDURES_INVALID","AGENT_WORKFLOW_INVALID","AGENT_SETTINGS_INVALID","INTEGRATION_PROCEDURE_UNAVAILABLE","INTEGRATION_TOOL_UNAVAILABLE","KNOWLEDGE_DOCUMENT_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateAgentUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `VOICE_UNAVAILABLE`: Calls are unavailable right now. Try again in a few minutes.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","VOICE_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateAgentServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"agents","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","agents"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["modality","name"],"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"firstMessage":{"anyOf":[{"type":"string","description":"What a voice Agent says first when a call connects, inbound or outbound. Text Agents do not use it: how they open a WhatsApp conversation is `settings.greeting`, and an outbound WhatsApp conversation opens with an approved template.","maxLength":2000,"minLength":1},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","description":"What the Agent does and how: its role, what it may and may not do, the facts it relies on.","maxLength":100000,"minLength":1},{"type":"null"}]},"integrationProcedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentIntegrationProcedureInput"},"description":"Text Agents. Procedures a connection publishes (`listConnections`, checked live in Account), each saved with its current text and run as a free-form procedure beside `procedures`. In an update, the complete new set.","maxItems":32},"integrationTools":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentIntegrationToolInput"},"description":"The integrations' tools the Agent may call, each on one of the organization's connections (`listConnections`, checked live in Account). The Agent runs each as its connection lists it at every turn. In an update, the complete new set.","maxItems":200},"knowledgeDocumentIds":{"type":"array","items":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Knowledge documents the Agent consults. In an update, the complete new set.","maxItems":100,"uniqueItems":true},"language":{"type":"string","description":"BCP 47 language tag.","examples":["es-CO"],"pattern":"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"procedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentProcedureInput"},"description":"The Agent's procedures, as a complete set: a procedure left out is removed. Keep each existing procedure's `id`; a new one may omit it.","maxItems":64},"settings":{"$ref":"#/components/schemas/RaizAgentSettingsInput","description":"How the Agent behaves. In an update, only the keys you send change: a key left out stays and `null` returns it to its default. A key's own value, such as `policy` or `voice`, is replaced whole. An update that changes `modality` starts from the defaults. Text and voice settings apply only to Agents of that modality."},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused Agent answers nothing and places no calls."},"timeZone":{"anyOf":[{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},{"type":"null"}]},"workflow":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentWorkflow"},{"type":"null"}],"description":"The conversation graph the Agent follows beside its instructions and procedures: conversation steps, tool steps and endings, with no loops and a way forward from every step. A tool step needs one of the Agent's integration tools that only reads and that exactly one connection holds. It runs by itself, with the step's constant arguments and without the model choosing them, and follows its success or failure edge; on a call, a step that cannot run follows its failure edge. Checked against the Agent as it will be once saved (AGENT_WORKFLOW_INVALID says where one is wrong), also when an update changes the Agent's tools. In an update, omit it to keep the current one and send `null` to remove it."},"modality":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"text"}],"description":"`voice`: phone calls. `text`: WhatsApp and web chat."},"name":{"type":"string","maxLength":120,"minLength":1}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createAgent","x-arbol-native-rpc":true}},"/v1/raiz/agents/{agentId}":{"get":{"operationId":"raiz.agents.get","summary":"Get an Agent","description":"Read one Agent's complete setup: instructions, first message, language, time zone, settings, integration tools (each with its connection and effect), Knowledge document ids, procedures (trigger plus free-form instructions or structured steps) and connection procedures, its workflow (a conversation graph, or null) and channels. `ready` says whether it can hold conversations; for a voice Agent, `synced` says whether its phone line already runs this version, and `syncErrorCode` why not. Read it before `update_agent` and send its `version` as `expectedVersion`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:read"]},{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:read"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:read","raiz:agents:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"agentId","in":"path","required":true,"description":"Agent id.","schema":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizAgentResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `VOICE_UNAVAILABLE`: Calls are unavailable right now. Try again in a few minutes.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","VOICE_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetAgentServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"agents","verb":"get","id":"agentId","query":{}},"x-fern-sdk-group-name":["raiz","agents"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["agentId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getAgent","x-arbol-native-rpc":true},"patch":{"operationId":"raiz.agents.update","summary":"Update an Agent","description":"Change an Agent: instructions, first message, name, language, time zone, settings, integration tools, Knowledge, procedures, connection procedures, workflow or status. Omitted fields stay and `null` clears one, also inside `settings`; `integrationTools`, `integrationProcedures`, `procedures`, `knowledgeDocumentIds` and `workflow` replace the whole value when given (keep each existing procedure's `id`), so read the Agent with `get_agent` first and send its `version` as `expectedVersion` (VERSION_CONFLICT: read it again). A workflow is checked against the tools the Agent will have (AGENT_WORKFLOW_INVALID). `status: paused` stops it from answering and calling. `modality` changes only while it has no channels and no published voice line (AGENT_MODALITY_LOCKED). A voice Agent republishes in the background: check `synced`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":524288,"x-max-output-bytes":1048576,"parameters":[{"name":"agentId","in":"path","required":true,"description":"Agent id.","schema":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateAgentBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizAgentResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `AGENT_IN_USE`: The Agent still has channels or active campaigns. Unassign them before deleting it.\n- `AGENT_MODALITY_LOCKED`: The Agent's modality cannot change while it has channels or is published for calls. Create a new Agent instead.\n- `EVAL_GATE_UNMET`: This Agent requires a completed evaluation run of exactly this content, in which every case passed, before what its model reads changes. Create one with createEvalRun and send its id as evalRunId.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["AGENT_IN_USE","AGENT_MODALITY_LOCKED","EVAL_GATE_UNMET","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateAgentConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `AGENT_PROCEDURES_INVALID`: A procedure is incomplete, references a tool, document or procedure the Agent does not have, or breaks the structured step rules. `issues` says where.\n- `AGENT_WORKFLOW_INVALID`: The workflow breaks the graph rules, leaves a step without a way forward, or uses a tool this Agent cannot run there. `issues` says where.\n- `AGENT_SETTINGS_INVALID`: The settings do not apply to this Agent's modality, or two settings contradict each other.\n- `INTEGRATION_PROCEDURE_UNAVAILABLE`: A procedure does not exist in this organization's connections, Raíz cannot run its connection, or the Agent is not a text Agent.\n- `INTEGRATION_TOOL_UNAVAILABLE`: An integration tool does not exist in this organization's connections, or Raíz cannot run it.\n- `KNOWLEDGE_DOCUMENT_UNAVAILABLE`: A Knowledge document does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["AGENT_PROCEDURES_INVALID","AGENT_WORKFLOW_INVALID","AGENT_SETTINGS_INVALID","INTEGRATION_PROCEDURE_UNAVAILABLE","INTEGRATION_TOOL_UNAVAILABLE","KNOWLEDGE_DOCUMENT_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateAgentUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `VOICE_UNAVAILABLE`: Calls are unavailable right now. Try again in a few minutes.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","VOICE_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateAgentServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"agents","verb":"update","id":"agentId","query":null},"x-fern-sdk-group-name":["raiz","agents"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["agentId"],"properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"firstMessage":{"anyOf":[{"type":"string","description":"What a voice Agent says first when a call connects, inbound or outbound. Text Agents do not use it: how they open a WhatsApp conversation is `settings.greeting`, and an outbound WhatsApp conversation opens with an approved template.","maxLength":2000,"minLength":1},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","description":"What the Agent does and how: its role, what it may and may not do, the facts it relies on.","maxLength":100000,"minLength":1},{"type":"null"}]},"integrationProcedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentIntegrationProcedureInput"},"description":"Text Agents. Procedures a connection publishes (`listConnections`, checked live in Account), each saved with its current text and run as a free-form procedure beside `procedures`. In an update, the complete new set.","maxItems":32},"integrationTools":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentIntegrationToolInput"},"description":"The integrations' tools the Agent may call, each on one of the organization's connections (`listConnections`, checked live in Account). The Agent runs each as its connection lists it at every turn. In an update, the complete new set.","maxItems":200},"knowledgeDocumentIds":{"type":"array","items":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Knowledge documents the Agent consults. In an update, the complete new set.","maxItems":100,"uniqueItems":true},"language":{"type":"string","description":"BCP 47 language tag.","examples":["es-CO"],"pattern":"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"procedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentProcedureInput"},"description":"The Agent's procedures, as a complete set: a procedure left out is removed. Keep each existing procedure's `id`; a new one may omit it.","maxItems":64},"settings":{"$ref":"#/components/schemas/RaizAgentSettingsInput","description":"How the Agent behaves. In an update, only the keys you send change: a key left out stays and `null` returns it to its default. A key's own value, such as `policy` or `voice`, is replaced whole. An update that changes `modality` starts from the defaults. Text and voice settings apply only to Agents of that modality."},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused Agent answers nothing and places no calls."},"timeZone":{"anyOf":[{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},{"type":"null"}]},"workflow":{"anyOf":[{"$ref":"#/components/schemas/RaizAgentWorkflow"},{"type":"null"}],"description":"The conversation graph the Agent follows beside its instructions and procedures: conversation steps, tool steps and endings, with no loops and a way forward from every step. A tool step needs one of the Agent's integration tools that only reads and that exactly one connection holds. It runs by itself, with the step's constant arguments and without the model choosing them, and follows its success or failure edge; on a call, a step that cannot run follows its failure edge. Checked against the Agent as it will be once saved (AGENT_WORKFLOW_INVALID says where one is wrong), also when an update changes the Agent's tools. In an update, omit it to keep the current one and send `null` to remove it."},"evalRunId":{"type":"string","description":"With the Agent's `settings.evalGate`: the completed evaluation run (`createEvalRun`) of exactly the content this update leaves the model reading, in which every case passed.","examples":["evr_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evr_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"modality":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"text"}],"description":"`voice`: phone calls. `text`: WhatsApp and web chat."},"name":{"type":"string","maxLength":120,"minLength":1},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateAgent","x-arbol-native-rpc":true},"delete":{"operationId":"raiz.agents.delete","summary":"Delete an Agent","description":"Delete an Agent for good; its conversations remain. Refused with AGENT_IN_USE while a channel or an active campaign uses it: unassign its channels (`update_channel` with `agentId: null`) or finish the campaign first. Not an AI tool; to stop an Agent without deleting it, pause it with `update_agent` (`status: paused`).","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:write"],"x-effect":"delete","x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"agentId","in":"path","required":true,"description":"Agent id.","schema":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedObjectResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `AGENT_IN_USE`: The Agent still has channels or active campaigns. Unassign them before deleting it.\n- `AGENT_MODALITY_LOCKED`: The Agent's modality cannot change while it has channels or is published for calls. Create a new Agent instead.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["AGENT_IN_USE","AGENT_MODALITY_LOCKED","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteAgentConflictError"}}}},"422":{"description":"`KNOWLEDGE_DOCUMENT_UNAVAILABLE`: A Knowledge document does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["KNOWLEDGE_DOCUMENT_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizKnowledgeDocumentUnavailableError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"agents","verb":"delete","id":"agentId","query":null},"x-fern-sdk-group-name":["raiz","agents"],"x-fern-sdk-method-name":"delete","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["agentId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"deleteAgent","x-arbol-native-rpc":false}},"/v1/raiz/bulletins":{"get":{"operationId":"raiz.bulletins.list","summary":"List bulletins","description":"List the organization's bulletins (Settings → Bulletins in the Dashboard; people may call them novedades, avisos or eventos): what is happening now that its Agents apply while it lasts, such as a service that is not available, days without appointments at a site, a closed day or a promotion. Default: those in force (`active`) and those not started yet (`scheduled`); `status=ended` lists ended ones. `agentId` lists what one Agent applies (its own and those for every Agent); `q` searches the text. Use it to find the bulletin a person means before changing or deleting it.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:read"]},{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:read"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:read","raiz:agents:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"agentId","in":"query","required":false,"description":"Only the bulletins this Agent applies: its own and those for every Agent.","schema":{"type":"string","description":"Only the bulletins this Agent applies: its own and those for every Agent.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"q","in":"query","required":false,"description":"Text in the bulletin, ignoring case.","schema":{"type":"string","description":"Text in the bulletin, ignoring case.","maxLength":100,"minLength":1}},{"name":"status","in":"query","required":false,"description":"Comma-separated statuses to list. Default `scheduled,active`; ended bulletins appear only when asked for.","schema":{"type":"string","default":"scheduled,active","description":"Comma-separated statuses to list. Default `scheduled,active`; ended bulletins appear only when asked for.","pattern":"^(scheduled|active|ended)(,(scheduled|active|ended))*$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizBulletinPageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListBulletinsBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"bulletins","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","agentId":"string","q":"string","status":"string"}},"x-fern-sdk-group-name":["raiz","bulletins"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"agentId":{"type":"string","description":"Only the bulletins this Agent applies: its own and those for every Agent.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"q":{"type":"string","description":"Text in the bulletin, ignoring case.","maxLength":100,"minLength":1},"status":{"type":"string","default":"scheduled,active","description":"Comma-separated statuses to list. Default `scheduled,active`; ended bulletins appear only when asked for.","pattern":"^(scheduled|active|ended)(,(scheduled|active|ended))*$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listBulletins","x-arbol-native-rpc":false},"post":{"operationId":"raiz.bulletins.create","summary":"Post a bulletin","description":"Post a bulletin: something happening now that the organization's Agents must apply on calls, WhatsApp and web chat while it lasts (for example: there is no nutrition service; no appointments at the North site for four days; closed on Monday the 26th; a promotion). Write `text` as you would tell the Agents, including what they should offer instead. Omit `agentId` for every Agent, or name one Agent. Agents apply it from their next reply or call once `startsAt` (default now) is reached, until `endsAt` (omit it for no end). Resolve phrases such as 'for four days' or 'until Friday' in the organization's time zone (`get_organization`), ending whole days at local midnight. No Agent reads a bulletin before it starts: for Agents to know ahead (so they book nothing on a closed day), start it now and write the dates in the text. Fails with BULLETIN_PERIOD_INVALID when it would end before it starts or is already over, and BULLETIN_LIMIT_REACHED at 30 bulletins in force or scheduled.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateBulletinBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizBulletinResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"`BULLETIN_LIMIT_REACHED`: The organization already has 30 bulletins in force or scheduled. End or delete one before adding another.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["BULLETIN_LIMIT_REACHED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizBulletinLimitReachedError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`BULLETIN_PERIOD_INVALID`: A bulletin must end after it starts, and a new one must end in the future.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["BULLETIN_PERIOD_INVALID"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizBulletinPeriodInvalidError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"bulletins","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","bulletins"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["text"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"The one Agent that applies it; null for every Agent of the organization.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string","format":"date-time","description":"When Agents stop applying it, later than its start. Null keeps it until it is deleted."},{"type":"null"}],"description":"When Agents stop applying it, later than its start and than now. Omit it or send null to keep it until it is deleted."},"startsAt":{"type":"string","format":"date-time","description":"When Agents start applying it; default now. No Agent reads it before. For Agents to know ahead (so they book no appointment on a closed day), start it now and write the dates in the text."},"text":{"type":"string","description":"What is happening and what the Agents should do about it, written as you would tell them. One situation per bulletin; long reference material belongs in Knowledge.","examples":["There is no nutrition service this week. If someone asks for it, offer general medicine."],"maxLength":1000,"minLength":1,"pattern":"\\S"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createBulletin","x-arbol-native-rpc":false}},"/v1/raiz/bulletins/{bulletinId}":{"get":{"operationId":"raiz.bulletins.get","summary":"Get a bulletin","description":"Read one bulletin: its text, the Agent that applies it (null for every Agent), its period and its status.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:read"]},{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:read"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:read","raiz:agents:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"bulletinId","in":"path","required":true,"description":"Bulletin id.","schema":{"type":"string","description":"Bulletin id.","examples":["bul_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^bul_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizBulletinResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"bulletins","verb":"get","id":"bulletinId","query":{}},"x-fern-sdk-group-name":["raiz","bulletins"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"bulletinId":{"type":"string","description":"Bulletin id.","examples":["bul_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^bul_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["bulletinId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getBulletin","x-arbol-native-rpc":false},"patch":{"operationId":"raiz.bulletins.update","summary":"Update a bulletin","description":"Change a bulletin: its text, its Agent (null for every Agent), its start or its end. Omitted fields stay. To end one now, set `endsAt` to the current instant; a scheduled one is deleted instead. Agents apply the change from their next reply or call.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"bulletinId","in":"path","required":true,"description":"Bulletin id.","schema":{"type":"string","description":"Bulletin id.","examples":["bul_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^bul_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateBulletinBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizBulletinResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"`BULLETIN_LIMIT_REACHED`: The organization already has 30 bulletins in force or scheduled. End or delete one before adding another.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["BULLETIN_LIMIT_REACHED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizBulletinLimitReachedError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`BULLETIN_PERIOD_INVALID`: A bulletin must end after it starts, and a new one must end in the future.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["BULLETIN_PERIOD_INVALID"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizBulletinPeriodInvalidError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"bulletins","verb":"update","id":"bulletinId","query":null},"x-fern-sdk-group-name":["raiz","bulletins"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["bulletinId"],"properties":{"agentId":{"anyOf":[{"type":"string","description":"The one Agent that applies it; null for every Agent of the organization.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string","format":"date-time","description":"When Agents stop applying it, later than its start. Null keeps it until it is deleted."},{"type":"null"}],"description":"When Agents stop applying it, later than its start; send the current instant to end it now, or null to keep it until it is deleted."},"startsAt":{"type":"string","format":"date-time","description":"When Agents start applying it."},"text":{"type":"string","description":"What is happening and what the Agents should do about it, written as you would tell them. One situation per bulletin; long reference material belongs in Knowledge.","examples":["There is no nutrition service this week. If someone asks for it, offer general medicine."],"maxLength":1000,"minLength":1,"pattern":"\\S"},"bulletinId":{"type":"string","description":"Bulletin id.","examples":["bul_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^bul_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateBulletin","x-arbol-native-rpc":false},"delete":{"operationId":"raiz.bulletins.delete","summary":"Delete a bulletin","description":"Delete a bulletin that was a mistake or is no longer wanted: Agents stop applying it from their next reply or call. The history keeps who deleted it and when. To keep it listed as ended instead, set its `endsAt` to now with `update_bulletin`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:write"],"x-effect":"delete","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"bulletinId","in":"path","required":true,"description":"Bulletin id.","schema":{"type":"string","description":"Bulletin id.","examples":["bul_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^bul_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedObjectResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"bulletins","verb":"delete","id":"bulletinId","query":null},"x-fern-sdk-group-name":["raiz","bulletins"],"x-fern-sdk-method-name":"delete","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"bulletinId":{"type":"string","description":"Bulletin id.","examples":["bul_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^bul_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["bulletinId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"deleteBulletin","x-arbol-native-rpc":false}},"/v1/raiz/campaigns":{"get":{"operationId":"raiz.campaigns.list","summary":"List campaigns","description":"List the organization's campaigns, newest first, each with its progress (recipients pending, in progress, completed, failed and succeeded; on WhatsApp also delivered, read and replied). Filter by `channelType`, `status` or `agentId`. A campaign's calls and messages: `list_conversations` with `campaignId`; its numbers by day: `get_report` with `name: campaign_progress`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:campaigns:read"]},{"arbolHuman":["raiz:campaigns:write"]},{"arbolMachine":["raiz:campaigns:read"]},{"arbolMachine":["raiz:campaigns:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:campaigns:read","raiz:campaigns:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"agentId","in":"query","required":false,"description":"Agent id.","schema":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"channelType","in":"query","required":false,"description":"How the campaign reaches people: by call or by WhatsApp.","schema":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"}],"description":"How the campaign reaches people: by call or by WhatsApp."}},{"name":"status","in":"query","required":false,"description":"`queued`: not started yet (or its start is scheduled). `running`: reaching due recipients. `paused`: started, then paused; what is in progress finishes. `completed`: no recipient is left to reach.","schema":{"anyOf":[{"type":"string","const":"queued"},{"type":"string","const":"running"},{"type":"string","const":"paused"},{"type":"string","const":"completed"},{"type":"string","const":"cancelled"},{"type":"string","const":"failed"}],"description":"`queued`: not started yet (or its start is scheduled). `running`: reaching due recipients. `paused`: started, then paused; what is in progress finishes. `completed`: no recipient is left to reach."}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCampaignPageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListCampaignsBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListCampaignsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"campaigns","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","agentId":"string","channelType":"string","status":"string"}},"x-fern-sdk-group-name":["raiz","campaigns"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"}],"description":"How the campaign reaches people: by call or by WhatsApp."},"status":{"anyOf":[{"type":"string","const":"queued"},{"type":"string","const":"running"},{"type":"string","const":"paused"},{"type":"string","const":"completed"},{"type":"string","const":"cancelled"},{"type":"string","const":"failed"}],"description":"`queued`: not started yet (or its start is scheduled). `running`: reaching due recipients. `paused`: started, then paused; what is in progress finishes. `completed`: no recipient is left to reach."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listCampaigns","x-arbol-native-rpc":true},"post":{"operationId":"raiz.campaigns.create","summary":"Create a campaign","description":"Prepare a campaign with up to 10000 recipients, each a phone `address` with an optional `contactId` and `variables`. A call campaign (the default) has a voice Agent call each one. With `channelType: whatsapp` and an approved `template`, each one is sent the template, its `parameters` filled from their `variables` (`{{name}}`) and, when its header is a document, image or video, their own `header` file; its text Agent answers whoever replies. Nobody is reached until it is started. A list adds nobody to the organization's contacts: a recipient becomes the contact it names, or the owner of its number (created when none exists), when the campaign first reaches them. A longer list continues with `updateCampaign` and `addRecipients`. Nothing happens outside `contactHours` (in `timeZone`, the organization's by default) or outside `scheduledStartAt` and `scheduledEndAt`; each recipient gets up to `maxAttempts` attempts, `retryAfterMinutes` apart, after the results in `retryOn`. Read it with `expand=readiness` to see whether it can start. Starting it (REST `POST /v1/campaigns/{campaignId}/start`) is not an AI tool. Read the `run-a-campaign` skill.","tags":["raiz"],"security":[{"arbolHuman":["raiz:campaigns:write"]},{"arbolMachine":["raiz:campaigns:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:campaigns:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":2097152,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateCampaignBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCampaignResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateCampaignBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `CAMPAIGN_AGENT_NOT_READY`: The campaign's Agent must be an active text Agent: it answers whoever replies to the message.\n- `CAMPAIGN_NO_RECIPIENTS`: The campaign has nobody left to reach. Add recipients first.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `VOICE_AGENT_NOT_READY`: The Agent cannot take calls yet: it must be an active voice Agent with instructions, published for calls.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CAMPAIGN_AGENT_NOT_READY","CAMPAIGN_NO_RECIPIENTS","CHANNEL_TYPE_MISMATCH","VOICE_AGENT_NOT_READY","INVALID_STATE","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateCampaignConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `TIME_ZONE_UNKNOWN`: The time zone is not in the IANA time zone database.\n- `CAMPAIGN_VARIABLE_MISSING`: A recipient has no value for a variable the template's parameters use. An empty value cannot be sent on WhatsApp.\n- `CHANNEL_AGENT_MISMATCH`: This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TIME_ZONE_UNKNOWN","CAMPAIGN_VARIABLE_MISSING","CHANNEL_AGENT_MISMATCH"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateCampaignUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `CAMPAIGN_HEADER_NOT_STORED`: The campaign and its recipients were saved, but some recipients' files were not. Send those recipients again with `addRecipients` on this campaign: their numbers are kept and their files stored. Do not create the campaign again.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","CAMPAIGN_HEADER_NOT_STORED","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateCampaignServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"campaigns","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","campaigns"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"anyOf":[{"type":"object","required":["agentId","name"],"properties":{"channelId":{"anyOf":[{"type":"string","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"The line calls or messages leave from, of the campaign's kind. Null: the Agent's own."},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.","maxItems":14},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"scheduledEndAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled."},{"type":"null"}]},"scheduledStartAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing starts before this instant, even once the campaign is started."},{"type":"null"}]},"timeZone":{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"name":{"type":"string","maxLength":200,"minLength":1},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaignRecipientInput"},"maxItems":10000,"description":"Who to reach, unique by `address`. Each becomes `contactId`, or else the contact that owns their number (created when the organization has none), when the campaign first reaches them. Send a longer list in parts with `updateCampaign` and `addRecipients`."},"maxAttempts":{"type":"integer","description":"Calls per recipient at most, retries included. Default 1.","maximum":10,"minimum":1},"retryAfterMinutes":{"type":"integer","description":"Wait before a retry, up to a week. Default 60. For several tries in a day use a few hours; for several in a month, a week, with `scheduledEndAt` as the last day.","maximum":10080,"minimum":1},"retryOn":{"type":"array","items":{"anyOf":[{"type":"string","const":"no_answer"},{"type":"string","const":"failure"}]},"description":"Which results earn another call. Default `[\"no_answer\"]`: nobody answered, busy or silence; `failure`: answered but judged unsuccessful.","maxItems":2,"uniqueItems":true},"channelType":{"type":"string","const":"voice"},"firstMessage":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1,"description":"What the Agent says first on every call. Null: the Agent's own first message."},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1,"description":"What these calls are about, added to the Agent's instructions on every call."},{"type":"null"}]}},"description":"A campaign that calls each recipient with a voice Agent. The default.","additionalProperties":false},{"type":"object","required":["agentId","name","channelType","template"],"properties":{"channelId":{"anyOf":[{"type":"string","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"The line calls or messages leave from, of the campaign's kind. Null: the Agent's own."},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.","maxItems":14},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"scheduledEndAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled."},{"type":"null"}]},"scheduledStartAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing starts before this instant, even once the campaign is started."},{"type":"null"}]},"timeZone":{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"name":{"type":"string","maxLength":200,"minLength":1},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaignRecipientInput"},"maxItems":10000,"description":"Who to reach, unique by `address`. Each becomes `contactId`, or else the contact that owns their number (created when the organization has none), when the campaign first reaches them. Send a longer list in parts with `updateCampaign` and `addRecipients`."},"maxAttempts":{"type":"integer","description":"Messages per recipient at most, reminders included. Default 2. WhatsApp penalizes a number people block or report, so keep it low.","maximum":10,"minimum":1},"retryAfterMinutes":{"type":"integer","description":"Wait from one message to the next, up to a week. Default 1440, a day. A person WhatsApp limited waits at least a day whatever this says.","maximum":10080,"minimum":1},"retryOn":{"type":"array","items":{"anyOf":[{"type":"string","const":"no_answer"},{"type":"string","const":"not_delivered"}]},"description":"What earns another message. Default `[\"not_delivered\"]`: only when it did not arrive. Add `no_answer` to remind whoever received it and has not replied. A person who replies, or who cannot receive it, is never sent another.","maxItems":2,"uniqueItems":true},"channelType":{"type":"string","const":"whatsapp"},"instructions":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1,"description":"What the Agent should know when someone replies: what the message is about and what to do next."},{"type":"null"}]},"template":{"$ref":"#/components/schemas/RaizCampaignTemplateInput","description":"The approved template sent to each recipient. WhatsApp only allows a business to start a conversation with one."}},"description":"A campaign that sends each recipient an approved WhatsApp template; its text Agent answers whoever replies.","additionalProperties":false}]},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createCampaign","x-arbol-native-rpc":true}},"/v1/raiz/campaigns/{campaignId}":{"get":{"operationId":"raiz.campaigns.get","summary":"Get a campaign","description":"Read one campaign: Agent, schedule, contact hours, retries, progress and, in `errorCode`, why it cannot reach anyone now. `expand=recipients` adds its recipients in the order they were added, each with attempts, next attempt, error and latest call or message; continue with `recipientsCursor` (`recipientsDirection` reads the other way). `expand=readiness` says whether it can start, lists what has to be fixed first and estimates what reaching each pending recipient once would cost in credits against the organization's balance (`estimate`), without reaching anyone. `expand=results` counts what people answered, by the Agent's data definitions with options; each recipient also says their own. Read it before `update_campaign` and send `expectedVersion`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:campaigns:read"]},{"arbolHuman":["raiz:campaigns:write"]},{"arbolMachine":["raiz:campaigns:read"]},{"arbolMachine":["raiz:campaigns:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:campaigns:read","raiz:campaigns:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"campaignId","in":"path","required":true,"description":"Campaign id.","schema":{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"expand","in":"query","required":false,"description":"Related data to include, comma-separated: `recipients`, `readiness`, `results`.","schema":{"type":"string","description":"Related data to include, comma-separated: `recipients`, `readiness`, `results`.","examples":["recipients,readiness,results"],"pattern":"^(recipients|readiness|results)(,(recipients|readiness|results))*$"}},{"name":"recipientsCursor","in":"query","required":false,"description":"Opaque cursor the `recipients` expansion's pageInfo returned; omit it for its first page.","schema":{"type":"string","description":"Opaque cursor the `recipients` expansion's pageInfo returned; omit it for its first page.","maxLength":4096}},{"name":"recipientsDirection","in":"query","required":false,"description":"Direction to traverse the `recipients` expansion from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the `recipients` expansion from the supplied cursor.","default":"forward"}},{"name":"recipientsLimit","in":"query","required":false,"description":"Maximum `recipients` items in one page. Defaults to 100.","schema":{"type":"integer","description":"Maximum `recipients` items in one page. Defaults to 100.","maximum":1000,"minimum":1,"default":100}},{"name":"recipientsQ","in":"query","required":false,"description":"With `expand=recipients`: only those whose number contains these digits or whose name contains this text.","schema":{"type":"string","description":"With `expand=recipients`: only those whose number contains these digits or whose name contains this text.","maxLength":200,"minLength":1}},{"name":"recipientsResult","in":"query","required":false,"description":"With `expand=recipients`: `definitionKey=optionKey`, only those whose latest answer is that option; `definitionKey=`, only those with no answer yet.","schema":{"type":"string","description":"With `expand=recipients`: `definitionKey=optionKey`, only those whose latest answer is that option; `definitionKey=`, only those with no answer yet.","pattern":"^[a-z][a-z0-9_]{0,63}=([a-z][a-z0-9_]{0,63})?$"}},{"name":"recipientsButton","in":"query","required":false,"description":"With `expand=recipients`: only those whose last pressed button is this one, by its exact text.","schema":{"type":"string","maxLength":256,"minLength":1,"description":"With `expand=recipients`: only those whose last pressed button is this one, by its exact text."}},{"name":"recipientsReply","in":"query","required":false,"description":"With `expand=recipients`, WhatsApp: how the people a message reached answered it. `button`: they pressed one of its buttons. `written`: they wrote and pressed none. `none`: they did neither (`progress.noReply`).","schema":{"anyOf":[{"type":"string","const":"button"},{"type":"string","const":"written"},{"type":"string","const":"none"}],"description":"With `expand=recipients`, WhatsApp: how the people a message reached answered it. `button`: they pressed one of its buttons. `written`: they wrote and pressed none. `none`: they did neither (`progress.noReply`)."}},{"name":"recipientsStatus","in":"query","required":false,"description":"`pending`: waiting for its (next) call or message. `in_progress`: being called, or on WhatsApp waiting for a reply until a reminder is due. `completed`: a call succeeded or ended normally with an inconclusive analysis; on WhatsApp, the message arrived. `failed`: its attempts ran out, or it cannot be reached.","schema":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"in_progress"},{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"cancelled"}],"description":"`pending`: waiting for its (next) call or message. `in_progress`: being called, or on WhatsApp waiting for a reply until a reminder is due. `completed`: a call succeeded or ended normally with an inconclusive analysis; on WhatsApp, the message arrived. `failed`: its attempts ran out, or it cannot be reached."}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCampaignResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetCampaignBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetCampaignServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"campaigns","verb":"get","id":"campaignId","query":{"expand":"string","recipientsCursor":"string","recipientsDirection":"string","recipientsLimit":"integer","recipientsQ":"string","recipientsResult":"string","recipientsButton":"string","recipientsReply":"string","recipientsStatus":"string"}},"x-fern-sdk-group-name":["raiz","campaigns"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"campaignId":{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"expand":{"type":"string","description":"Related data to include, comma-separated: `recipients`, `readiness`, `results`.","examples":["recipients,readiness,results"],"pattern":"^(recipients|readiness|results)(,(recipients|readiness|results))*$"},"recipientsCursor":{"type":"string","description":"Opaque cursor the `recipients` expansion's pageInfo returned; omit it for its first page.","maxLength":4096},"recipientsDirection":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the `recipients` expansion from the supplied cursor.","default":"forward"},"recipientsLimit":{"type":"integer","description":"Maximum `recipients` items in one page. Defaults to 100.","maximum":1000,"minimum":1,"default":100},"recipientsQ":{"type":"string","description":"With `expand=recipients`: only those whose number contains these digits or whose name contains this text.","maxLength":200,"minLength":1},"recipientsResult":{"type":"string","description":"With `expand=recipients`: `definitionKey=optionKey`, only those whose latest answer is that option; `definitionKey=`, only those with no answer yet.","pattern":"^[a-z][a-z0-9_]{0,63}=([a-z][a-z0-9_]{0,63})?$"},"recipientsButton":{"type":"string","maxLength":256,"minLength":1,"description":"With `expand=recipients`: only those whose last pressed button is this one, by its exact text."},"recipientsReply":{"anyOf":[{"type":"string","const":"button"},{"type":"string","const":"written"},{"type":"string","const":"none"}],"description":"With `expand=recipients`, WhatsApp: how the people a message reached answered it. `button`: they pressed one of its buttons. `written`: they wrote and pressed none. `none`: they did neither (`progress.noReply`)."},"recipientsStatus":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"in_progress"},{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"cancelled"}],"description":"`pending`: waiting for its (next) call or message. `in_progress`: being called, or on WhatsApp waiting for a reply until a reminder is due. `completed`: a call succeeded or ended normally with an inconclusive analysis; on WhatsApp, the message arrived. `failed`: its attempts ran out, or it cannot be reached."}},"required":["campaignId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getCampaign","x-arbol-native-rpc":true},"patch":{"operationId":"raiz.campaigns.update","summary":"Update a campaign","description":"Change a campaign. Omitted fields stay. `paused: true` pauses a started campaign (no new call or message starts; those in progress finish) and `paused: false` resumes it, with the same checks as starting. Before the start, `recipients` is the complete set, replacing whoever was there; once started it only adds. `addRecipients` adds at any moment, which is how a list longer than one request arrives: a number the campaign already has is skipped, so repeating a part reaches nobody twice, and a recipient's `header` file is stored only when its row has none (CAMPAIGN_HEADER_NOT_STORED says some were not: send those recipients again). The Agent changes only before the start, and a completed campaign accepts only its name and metadata. A change lifts the wait of a campaign held by `errorCode`: fixing a template and sending it here tries again at once.","tags":["raiz"],"security":[{"arbolHuman":["raiz:campaigns:write"]},{"arbolMachine":["raiz:campaigns:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:campaigns:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":2097152,"x-max-output-bytes":1048576,"parameters":[{"name":"campaignId","in":"path","required":true,"description":"Campaign id.","schema":{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateCampaignBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCampaignResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateCampaignBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `CAMPAIGN_AGENT_NOT_READY`: The campaign's Agent must be an active text Agent: it answers whoever replies to the message.\n- `CAMPAIGN_NO_RECIPIENTS`: The campaign has nobody left to reach. Add recipients first.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `VOICE_AGENT_NOT_READY`: The Agent cannot take calls yet: it must be an active voice Agent with instructions, published for calls.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CAMPAIGN_AGENT_NOT_READY","CAMPAIGN_NO_RECIPIENTS","CHANNEL_TYPE_MISMATCH","VOICE_AGENT_NOT_READY","INVALID_STATE","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateCampaignConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `TIME_ZONE_UNKNOWN`: The time zone is not in the IANA time zone database.\n- `CAMPAIGN_VARIABLE_MISSING`: A recipient has no value for a variable the template's parameters use. An empty value cannot be sent on WhatsApp.\n- `CHANNEL_AGENT_MISMATCH`: This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TIME_ZONE_UNKNOWN","CAMPAIGN_VARIABLE_MISSING","CHANNEL_AGENT_MISMATCH"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateCampaignUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `CAMPAIGN_HEADER_NOT_STORED`: The campaign and its recipients were saved, but some recipients' files were not. Send those recipients again with `addRecipients` on this campaign: their numbers are kept and their files stored. Do not create the campaign again.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","CAMPAIGN_HEADER_NOT_STORED","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateCampaignServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"campaigns","verb":"update","id":"campaignId","query":null},"x-fern-sdk-group-name":["raiz","campaigns"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["campaignId"],"properties":{"channelId":{"anyOf":[{"type":"string","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"The line calls or messages leave from, of the campaign's kind. Null: the Agent's own."},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.","maxItems":14},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"scheduledEndAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled."},{"type":"null"}]},"scheduledStartAt":{"anyOf":[{"type":"string","format":"date-time","description":"Nothing starts before this instant, even once the campaign is started."},{"type":"null"}]},"timeZone":{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"},"addRecipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaignRecipientInput"},"maxItems":10000,"description":"Adds these recipients, before or after the start, skipping numbers the campaign already has. A list longer than one request arrives in parts this way, and repeating a part reaches nobody twice."},"agentId":{"type":"string","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"Changes only before the campaign starts."},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"firstMessage":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1,"description":"Calls only: what the Agent says first on every call. Null: the Agent's own first message."},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1,"description":"On a call, what it is about, added to the Agent's instructions. On WhatsApp, what the Agent should know when someone replies."},{"type":"null"}]},"maxAttempts":{"type":"integer","description":"Calls or messages per recipient at most, retries included.","maximum":10,"minimum":1},"name":{"type":"string","maxLength":200,"minLength":1},"paused":{"type":"boolean","description":"Pause (`true`) or resume (`false`) a started campaign. A campaign that never started is started with `startCampaign` (INVALID_STATE here)."},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/RaizCampaignRecipientInput"},"maxItems":10000,"description":"Before the campaign starts: the complete set, replacing whoever was there. Once it started: only adds, skipping numbers it already has."},"retryAfterMinutes":{"type":"integer","description":"Wait before a retry or reminder, up to a week.","maximum":10080,"minimum":1},"retryOn":{"type":"array","items":{"anyOf":[{"type":"string","const":"no_answer"},{"type":"string","const":"failure"},{"type":"string","const":"not_delivered"}],"description":"On a call, `no_answer`: nobody answered, the line was busy, or the Agent heard no one; `failure`: it was answered but its analysis judged it unsuccessful. On WhatsApp, `no_answer`: it arrived and the person has not replied once `retryAfterMinutes` pass; `not_delivered`: it did not arrive."},"description":"What earns another attempt: `no_answer` and `failure` on a call, `no_answer` and `not_delivered` on WhatsApp.","maxItems":2,"uniqueItems":true},"template":{"$ref":"#/components/schemas/RaizCampaignTemplateInput","description":"WhatsApp only. On a started campaign it applies to the messages still to go."},"campaignId":{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateCampaign","x-arbol-native-rpc":true}},"/v1/raiz/campaigns/{campaignId}/start":{"post":{"operationId":"raiz.campaigns.start","summary":"Start a campaign","description":"Start reaching people: from now on the campaign's due recipients are called, at most `settings.channels.maxConcurrentOutboundCalls` (five by default) at once across the organization, or sent their message, a few a second. A call campaign needs an active, published voice Agent (VOICE_AGENT_NOT_READY). A WhatsApp campaign needs an active text Agent (CAMPAIGN_AGENT_NOT_READY), a line that can send (CHANNEL_NOT_READY), an approved template whose parameters fit (a `TEMPLATE_*` code), a value for every variable (CAMPAIGN_VARIABLE_MISSING) and, when the template's header is a document, image or video, the first pending recipient's own `header` file (CAMPAIGN_HEADER_MISSING). A recipient must be pending (CAMPAIGN_NO_RECIPIENTS). What reaching each pending recipient once would cost is checked against the organization's balance: when the balance does not cover it and billing stops the organization's work for that, it does not start (CREDITS_EXHAUSTED). `get_campaign` with `expand=readiness` lists all of this beforehand, with the estimate. A campaign starts once: starting a running one changes nothing, and a paused one resumes with `update_campaign` and `paused: false`. Not an AI tool: it reaches real people.","tags":["raiz"],"security":[{"arbolHuman":["raiz:campaigns:write"]},{"arbolMachine":["raiz:campaigns:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:campaigns:write"],"x-effect":"write","x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"campaignId","in":"path","required":true,"description":"Campaign id.","schema":{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCampaignResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizStartCampaignBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"`CREDITS_EXHAUSTED`: The organization's credits do not cover this, so nothing was started. Try again once the organization adds credits.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CREDITS_EXHAUSTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreditsExhaustedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"- `TEMPLATE_NOT_FOUND`: The template does not exist in this channel's WhatsApp Business Account.\n- `RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TEMPLATE_NOT_FOUND","RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizStartCampaignNotFoundError"}}}},"409":{"description":"- `CAMPAIGN_AGENT_NOT_READY`: The campaign's Agent must be an active text Agent: it answers whoever replies to the message.\n- `CAMPAIGN_NO_RECIPIENTS`: The campaign has nobody left to reach. Add recipients first.\n- `CHANNEL_NOT_READY`: The channel is not connected yet, or this kind of traffic is not enabled on it.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `TEMPLATE_NOT_APPROVED`: The template is not approved for sending: it is pending review, rejected, paused or disabled.\n- `VOICE_AGENT_NOT_READY`: The Agent cannot take calls yet: it must be an active voice Agent with instructions, published for calls.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CAMPAIGN_AGENT_NOT_READY","CAMPAIGN_NO_RECIPIENTS","CHANNEL_NOT_READY","CHANNEL_TYPE_MISMATCH","TEMPLATE_NOT_APPROVED","VOICE_AGENT_NOT_READY","INVALID_STATE","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizStartCampaignConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `CAMPAIGN_HEADER_MISSING`: A recipient has no file that fits the template's header (a PDF for a document, JPEG or PNG for an image, MP4 for a video). Each recipient brings its own as `header`.\n- `CAMPAIGN_VARIABLE_MISSING`: A recipient has no value for a variable the template's parameters use. An empty value cannot be sent on WhatsApp.\n- `CHANNEL_AGENT_MISMATCH`: This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.\n- `TEMPLATE_HEADER_MISMATCH`: The header file does not fit the template: a document header takes a PDF, an image header a JPEG or PNG, a video header an MP4, and a template without a media header takes no file.\n- `TEMPLATE_HEADER_REQUIRED`: The template's header is a document, image or video: send its file with the template.\n- `TEMPLATE_PARAMETERS_MISMATCH`: The number of parameters does not match the variables of the template's body.\n- `TEMPLATE_UNSUPPORTED`: The template needs header text variables, a location header or button parameters, which cannot be sent yet.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CAMPAIGN_HEADER_MISSING","CAMPAIGN_VARIABLE_MISSING","CHANNEL_AGENT_MISMATCH","TEMPLATE_HEADER_MISMATCH","TEMPLATE_HEADER_REQUIRED","TEMPLATE_PARAMETERS_MISMATCH","TEMPLATE_UNSUPPORTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizStartCampaignUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"campaigns","verb":"start","id":"campaignId","query":null},"x-fern-sdk-group-name":["raiz","campaigns"],"x-fern-sdk-method-name":"start","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","description":"No fields.","additionalProperties":false,"properties":{"campaignId":{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["campaignId"]},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"startCampaign","x-arbol-native-rpc":false}},"/v1/raiz/changes":{"get":{"operationId":"raiz.changes.list","summary":"List changes (audit log)","description":"See who created, changed or deleted what, when and why, newest first, with each changed field's value before and after. Filter by resource, kind of resource, contact (including the duplicates it absorbed), author and time. Use it to answer questions such as who changed an Agent's instructions and when. Values can include contacts' personal data.","tags":["raiz"],"security":[{"arbolHuman":["raiz:changes:read"]},{"arbolMachine":["raiz:changes:read"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:changes:read"],"x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"authorId","in":"query","required":false,"description":"Changes made by this person or client.","schema":{"type":"string","description":"Changes made by this person or client.","maxLength":255,"minLength":1}},{"name":"contactId","in":"query","required":false,"description":"Changes about this contact, including those of the duplicates it absorbed. A deleted contact's history stays readable.","schema":{"type":"string","description":"Changes about this contact, including those of the duplicates it absorbed. A deleted contact's history stays readable.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"createdAfter","in":"query","required":false,"description":"Changes at or after this instant (RFC 3339).","schema":{"type":"string","description":"Changes at or after this instant (RFC 3339).","format":"date-time"}},{"name":"createdBefore","in":"query","required":false,"description":"Changes before this instant (RFC 3339).","schema":{"type":"string","description":"Changes before this instant (RFC 3339).","format":"date-time"}},{"name":"resourceId","in":"query","required":false,"description":"Changes of this resource (any TypeID).","schema":{"type":"string","description":"Changes of this resource (any TypeID).","pattern":"^[a-z]{3}_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"resourceType","in":"query","required":false,"description":"Changes of this kind of resource (see `resourceType`).","schema":{"type":"string","description":"Changes of this kind of resource (see `resourceType`).","pattern":"^[a-z_]{1,40}$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizChangePageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListChangesBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListChangesServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"changes","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","authorId":"string","contactId":"string","createdAfter":"string","createdBefore":"string","resourceId":"string","resourceType":"string"}},"x-fern-sdk-group-name":["raiz","changes"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"authorId":{"type":"string","description":"Changes made by this person or client.","maxLength":255,"minLength":1},"contactId":{"type":"string","description":"Changes about this contact, including those of the duplicates it absorbed. A deleted contact's history stays readable.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"createdAfter":{"type":"string","description":"Changes at or after this instant (RFC 3339).","format":"date-time"},"createdBefore":{"type":"string","description":"Changes before this instant (RFC 3339).","format":"date-time"},"resourceId":{"type":"string","description":"Changes of this resource (any TypeID).","pattern":"^[a-z]{3}_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"resourceType":{"type":"string","description":"Changes of this kind of resource (see `resourceType`).","pattern":"^[a-z_]{1,40}$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listChanges","x-arbol-native-rpc":true}},"/v1/raiz/channels":{"get":{"operationId":"raiz.channels.list","summary":"List channels","description":"List the organization's WhatsApp numbers, phone numbers and web chat widgets, newest first. Filter by `agentId` (an Agent's channels), `channelType` (`whatsapp`, `voice`, `web`) or `status` (`pending`, `active`, `degraded`). Each shows its optional Agent, traffic switches and whether it is `ready`. WhatsApp notifications can send without an Agent. Next: `get_channel` for details, or `update_channel` to configure traffic and assignment.","tags":["raiz"],"security":[{"arbolHuman":["raiz:channels:read"]},{"arbolHuman":["raiz:channels:write"]},{"arbolMachine":["raiz:channels:read"]},{"arbolMachine":["raiz:channels:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:channels:read","raiz:channels:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"agentId","in":"query","required":false,"description":"Agent id.","schema":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"channelType","in":"query","required":false,"description":"`voice`: a phone number or the organization's own carrier, for calls. `whatsapp`: a WhatsApp number. `web`: the chat widget on the organization's sites.","schema":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}],"description":"`voice`: a phone number or the organization's own carrier, for calls. `whatsapp`: a WhatsApp number. `web`: the chat widget on the organization's sites."}},{"name":"status","in":"query","required":false,"description":"`pending`: a WhatsApp number whose setup the customer has not finished. `active`: connected. `degraded`: connected, but the last provider check failed; `verifyChannel` checks again.","schema":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"active"},{"type":"string","const":"degraded"}],"description":"`pending`: a WhatsApp number whose setup the customer has not finished. `active`: connected. `degraded`: connected, but the last provider check failed; `verifyChannel` checks again."}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizChannelPageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListChannelsBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListChannelsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"channels","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","agentId":"string","channelType":"string","status":"string"}},"x-fern-sdk-group-name":["raiz","channels"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}],"description":"`voice`: a phone number or the organization's own carrier, for calls. `whatsapp`: a WhatsApp number. `web`: the chat widget on the organization's sites."},"status":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"active"},{"type":"string","const":"degraded"}],"description":"`pending`: a WhatsApp number whose setup the customer has not finished. `active`: connected. `degraded`: connected, but the last provider check failed; `verifyChannel` checks again."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listChannels","x-arbol-native-rpc":true},"post":{"operationId":"raiz.channels.create","summary":"Add a channel","description":"Add a channel. `web` creates a website chat or form (the widget) from its complete configuration (`widget`: mode, texts, fields, colors and fonts, allowed origins, `publicLink` for its own hosted page); it is the one kind an AI tool creates. Create it with `inboundEnabled: false` to review it before publishing, then publish or pause it with `update_channel`; `publication` says whether visitors can reach it and where. `whatsapp` creates a pending channel and a setup link (`setup.url`) where the business connects its WhatsApp number; call `verify_channel` once that is done. `voice` connects a platform phone number (`platform_number`) or the organization's own carrier over SIP (`sip_trunk`) at once (SIP credentials are passed on once and never stored). A person adds WhatsApp and voice channels in Settings → Channels or with the REST API: over MCP they fail with CHANNEL_CREATION_IN_APP. With an Agent, traffic is on by default. Not idempotent: after an unknown outcome, `list_channels` before trying again.","tags":["raiz"],"security":[{"arbolHuman":["raiz:channels:write"]},{"arbolMachine":["raiz:channels:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:channels:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizChannelResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `REPORT_FILTER_UNSUPPORTED`: A filter does not apply to the selected report.\n- `REPORT_RANGE_INVALID`: The report range is invalid: `from` must not be after `to`.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","REPORT_FILTER_UNSUPPORTED","REPORT_RANGE_INVALID","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"`CREDITS_EXHAUSTED`: The organization's credits do not cover this, so nothing was started. Try again once the organization adds credits.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CREDITS_EXHAUSTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreditsExhaustedError"}}}},"403":{"description":"- `FORBIDDEN`: The token does not authorize this operation.\n- `CHANNEL_CREATION_IN_APP`: An AI tool creates website chats and forms only. A person adds WhatsApp numbers and phone numbers in Settings → Channels, or through the REST API.\n- `CONVERSATION_VIEW_AUTHOR_ONLY`: Only the person who saved this view can make it private; it would disappear for the rest of the team.\n- `OUTBOUND_CHANNEL_REFUSED`: Only the Campaigns Worker sends through this service, and only for a recipient of a campaign of that organization.\n- `WHATSAPP_CHANNEL_REFUSED`: Only the WhatsApp Agent Worker delivers through this service, and only Agent messages of a WhatsApp conversation.\n- `WIDGET_REFUSED`: This widget session is unavailable.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN","CHANNEL_CREATION_IN_APP","CONVERSATION_VIEW_AUTHOR_ONLY","OUTBOUND_CHANNEL_REFUSED","WHATSAPP_CHANNEL_REFUSED","WIDGET_REFUSED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelForbiddenError"}}}},"404":{"description":"- `TEMPLATE_NOT_FOUND`: The template does not exist in this channel's WhatsApp Business Account.\n- `RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TEMPLATE_NOT_FOUND","RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelNotFoundError"}}}},"409":{"description":"- `AGENT_NOT_TEXT`: Only a text Agent can hold a web conversation; a voice Agent only with `origin: test`, to try it by text.\n- `CALL_IN_PROGRESS`: A voice conversation closes by itself when its call ends; it cannot be closed by hand.\n- `CONVERSATION_CLOSED`: The conversation is closed. Start a new conversation to write again.\n- `CONVERSATION_NOT_HANDED_OFF`: The AI has not handed this conversation to the team, so there is nothing to give back to it.\n- `CONVERSATION_OPEN`: The conversation is still open. Close it first.\n- `DAILY_REPORT_IN_PROGRESS`: The daily report you asked for is still on its way; it arrives within a minute.\n- `DEFINITION_NOT_ACTIVE`: Facts can be asserted only under an active definition.\n- `DEFINITION_RETIRED`: The definition is retired and can no longer change.\n- `DEFINITION_TYPE_LOCKED`: The value type and subject of a definition cannot change once it has facts. Retire it and create a new one instead.\n- `HANDOFF_ALREADY_CONTINUED`: This handoff was already given back to the AI to continue. It continues once per handoff; a new escalation can be given back again.\n- `REPLY_IN_PROGRESS`: The Agent is still replying in this conversation. Try again once the reply is delivered.\n- `OUTSIDE_CONTACT_HOURS`: The profile's contact hours do not allow starting a conversation now. Try again within them.\n- `PROVIDER_ACCOUNT_EXISTS`: This provider account is already registered.\n- `PROVIDER_ACCOUNT_IN_USE`: Channels or Agents still use this provider account. Move them to another account first.\n- `SOURCE_CONVERSATION_OPEN`: A fact can cite only a closed conversation as its source.\n- `SUPPRESSION_EXISTS`: This organization already has this suppression rule.\n- `TASK_NOT_RETRYABLE`: This task cannot be retried: its kind never retries, or it already used every attempt. Start it again from its resource.\n- `CAMPAIGN_AGENT_NOT_READY`: The campaign's Agent must be an active text Agent: it answers whoever replies to the message.\n- `CAMPAIGN_NO_RECIPIENTS`: The campaign has nobody left to reach. Add recipients first.\n- `CHANNEL_AGENT_REQUIRED`: Inbound traffic requires an assigned Agent. Outbound traffic requires one except on WhatsApp notification channels.\n- `CHANNEL_ENDPOINT_IN_USE`: Another channel already uses this number or endpoint.\n- `CHANNEL_NOT_READY`: The channel is not connected yet, or this kind of traffic is not enabled on it.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `CONVERSATION_VIEW_LIMIT_REACHED`: The organization already has 200 saved views. Delete one before saving another.\n- `CONVERSATION_VIEW_NAME_TAKEN`: Another saved view already has this name. Choose a different name.\n- `TEMPLATE_NOT_APPROVED`: The template is not approved for sending: it is pending review, rejected, paused or disabled.\n- `WHATSAPP_ACCOUNT_RESTRICTED`: WhatsApp has restricted this number or its business account. Review the account's status before sending again.\n- `WHATSAPP_AI_PAUSED`: Automatic replies are paused or this conversation can no longer receive them.\n- `WHATSAPP_MARKETING_STOPPED`: The contact chose to stop receiving marketing messages from this business.\n- `WHATSAPP_WINDOW_CLOSED`: More than 24 hours passed since the contact last wrote. Start the conversation with an approved template.\n- `PROVIDER_ACCOUNT_MISMATCH`: The number and the Agent belong to different voice accounts. A voice Agent answers and dials only numbers of its own account.\n- `PROVIDER_SECRET_UNAVAILABLE`: A secret the provider account needs is not available to this deployment. Name a TENANT_ Secrets Store entry that this deployment has a binding for.\n- `VOICE_AGENT_NOT_READY`: The Agent cannot take calls yet: it must be an active voice Agent with instructions, published for calls.\n- `VOICE_LINE_UNAVAILABLE`: No voice line can place this call. Name an active outbound line of the organization with `from` or `channelId`, or assign one to the Agent.\n- `VOICE_NUMBER_IN_USE`: This number is already connected to another voice service. Release it there first.\n- `AGENT_IN_USE`: The Agent still has channels or active campaigns. Unassign them before deleting it.\n- `AGENT_MODALITY_LOCKED`: The Agent's modality cannot change while it has channels or is published for calls. Create a new Agent instead.\n- `BULLETIN_LIMIT_REACHED`: The organization already has 30 bulletins in force or scheduled. End or delete one before adding another.\n- `EVAL_CASES_UNAVAILABLE`: The Agent has no kept evaluation case to replay, or a named case is not one of its kept cases.\n- `EVAL_GATE_UNMET`: This Agent requires a completed evaluation run of exactly this content, in which every case passed, before what its model reads changes. Create one with createEvalRun and send its id as evalRunId.\n- `WIDGET_CONFLICT`: The request cannot be repeated or another turn is active.\n- `ADDRESS_IN_USE`: Another contact in this organization already uses this address.\n- `IDENTIFIER_IN_USE`: Another contact in this organization already has this identity document.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.\n- `KEY_IN_USE`: Another active resource in this organization already uses this key.\n- `CONTACT_SUPPRESSED`: A suppression rule of this organization forbids contacting this address.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["AGENT_NOT_TEXT","CALL_IN_PROGRESS","CONVERSATION_CLOSED","CONVERSATION_NOT_HANDED_OFF","CONVERSATION_OPEN","DAILY_REPORT_IN_PROGRESS","DEFINITION_NOT_ACTIVE","DEFINITION_RETIRED","DEFINITION_TYPE_LOCKED","HANDOFF_ALREADY_CONTINUED","REPLY_IN_PROGRESS","OUTSIDE_CONTACT_HOURS","PROVIDER_ACCOUNT_EXISTS","PROVIDER_ACCOUNT_IN_USE","SOURCE_CONVERSATION_OPEN","SUPPRESSION_EXISTS","TASK_NOT_RETRYABLE","CAMPAIGN_AGENT_NOT_READY","CAMPAIGN_NO_RECIPIENTS","CHANNEL_AGENT_REQUIRED","CHANNEL_ENDPOINT_IN_USE","CHANNEL_NOT_READY","CHANNEL_TYPE_MISMATCH","CONVERSATION_VIEW_LIMIT_REACHED","CONVERSATION_VIEW_NAME_TAKEN","TEMPLATE_NOT_APPROVED","WHATSAPP_ACCOUNT_RESTRICTED","WHATSAPP_AI_PAUSED","WHATSAPP_MARKETING_STOPPED","WHATSAPP_WINDOW_CLOSED","PROVIDER_ACCOUNT_MISMATCH","PROVIDER_SECRET_UNAVAILABLE","VOICE_AGENT_NOT_READY","VOICE_LINE_UNAVAILABLE","VOICE_NUMBER_IN_USE","AGENT_IN_USE","AGENT_MODALITY_LOCKED","BULLETIN_LIMIT_REACHED","EVAL_CASES_UNAVAILABLE","EVAL_GATE_UNMET","WIDGET_CONFLICT","ADDRESS_IN_USE","IDENTIFIER_IN_USE","INVALID_STATE","KEY_IN_USE","CONTACT_SUPPRESSED","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelConflictError"}}}},"413":{"description":"- `REQUEST_TOO_LARGE`: The request exceeds the allowed size.\n- `IMPORT_FILE_TOO_LARGE`: The import file is larger than 12 MB. Split it into several files.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE","IMPORT_FILE_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelContentTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `ASSIGNEE_UNAVAILABLE`: That person cannot take conversations in this organization. `listAssignees` names who can.\n- `CONTACT_UNREACHABLE`: The contact has no phone number. Give the destination number in `to`.\n- `DAILY_REPORT_RECIPIENTS_MISSING`: The daily report has no recipients. Add them in `settings.dailyReport.recipients` first.\n- `DEFINITION_OPTIONS_INVALID`: Only a definition whose value type is `option` has options; it needs at least one, and option keys must be unique.\n- `FACT_SUBJECT_MISMATCH`: The fact's subject (a contact or a conversation) does not match what its definition describes.\n- `FACT_VALUE_INVALID`: The value does not match the definition's value type, or names no active option.\n- `IMPORT_FILE_INVALID`: The import file is not valid base64 of UTF-8 text. Save the spreadsheet as CSV UTF-8 and try again.\n- `IP_NETWORK_INVALID`: The IP network is not a valid IPv4 or IPv6 address or CIDR block.\n- `PROFILE_VARIABLE_MISSING`: The profile's template parameters reference a variable that `variables` does not give.\n- `TIME_ZONE_UNKNOWN`: The time zone is not in the IANA time zone database.\n- `CAMPAIGN_HEADER_MISSING`: A recipient has no file that fits the template's header (a PDF for a document, JPEG or PNG for an image, MP4 for a video). Each recipient brings its own as `header`.\n- `CAMPAIGN_VARIABLE_MISSING`: A recipient has no value for a variable the template's parameters use. An empty value cannot be sent on WhatsApp.\n- `CHANNEL_AGENT_MISMATCH`: This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.\n- `TEMPLATE_HEADER_MISMATCH`: The header file does not fit the template: a document header takes a PDF, an image header a JPEG or PNG, a video header an MP4, and a template without a media header takes no file.\n- `TEMPLATE_HEADER_REQUIRED`: The template's header is a document, image or video: send its file with the template.\n- `TEMPLATE_PARAMETERS_MISMATCH`: The number of parameters does not match the variables of the template's body.\n- `TEMPLATE_UNSUPPORTED`: The template needs header text variables, a location header or button parameters, which cannot be sent yet.\n- `WHATSAPP_MEDIA_REJECTED`: WhatsApp could not use the attachment. Check its type and size limits.\n- `WHATSAPP_MESSAGE_UNSUPPORTED`: This message cannot be sent on WhatsApp: it allows one attachment per message, up to three buttons or ten list options, and text of up to 4096 characters.\n- `WHATSAPP_RECIPIENT_UNAVAILABLE`: The recipient cannot receive WhatsApp messages from this number.\n- `CALL_REJECTED`: The call could not be placed. Check the destination number and the line.\n- `PROVIDER_ACCOUNT_UNSUPPORTED`: This deployment cannot use provider accounts of this provider yet; the platform's own account is used instead.\n- `PROVIDER_CREDENTIALS_REJECTED`: The provider refused the provider account's credentials, or the account is not active there.\n- `VOICE_NOT_AVAILABLE`: This voice is not available. Choose one from `listVoices`.\n- `VOICE_NUMBER_NOT_OWNED`: The platform's telephony account does not own a voice-capable number with this value.\n- `AGENT_PROCEDURES_INVALID`: A procedure is incomplete, references a tool, document or procedure the Agent does not have, or breaks the structured step rules. `issues` says where.\n- `AGENT_WORKFLOW_INVALID`: The workflow breaks the graph rules, leaves a step without a way forward, or uses a tool this Agent cannot run there. `issues` says where.\n- `AGENT_SETTINGS_INVALID`: The settings do not apply to this Agent's modality, or two settings contradict each other.\n- `BULLETIN_PERIOD_INVALID`: A bulletin must end after it starts, and a new one must end in the future.\n- `INTEGRATION_PROCEDURE_UNAVAILABLE`: A procedure does not exist in this organization's connections, Raíz cannot run its connection, or the Agent is not a text Agent.\n- `INTEGRATION_TOOL_UNAVAILABLE`: An integration tool does not exist in this organization's connections, or Raíz cannot run it.\n- `KNOWLEDGE_DOCUMENT_UNAVAILABLE`: A Knowledge document does not exist in this organization.\n- `KNOWLEDGE_FILE_INVALID`: The file is not valid base64, exceeds the size limit or does not match its declared type.\n- `KNOWLEDGE_KIND_MISMATCH`: The change does not apply to this kind of Knowledge document.\n- `WEBSITE_NOT_APPROVED`: This website's origin is not approved for crawling in this deployment.\n- `WIDGET_VOICE_UNHEARD`: The voice message could not be understood. Record it again or write the message.\n- `PROVIDER_REJECTED`: The provider refused the request. Check the configuration and try again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["ASSIGNEE_UNAVAILABLE","CONTACT_UNREACHABLE","DAILY_REPORT_RECIPIENTS_MISSING","DEFINITION_OPTIONS_INVALID","FACT_SUBJECT_MISMATCH","FACT_VALUE_INVALID","IMPORT_FILE_INVALID","IP_NETWORK_INVALID","PROFILE_VARIABLE_MISSING","TIME_ZONE_UNKNOWN","CAMPAIGN_HEADER_MISSING","CAMPAIGN_VARIABLE_MISSING","CHANNEL_AGENT_MISMATCH","TEMPLATE_HEADER_MISMATCH","TEMPLATE_HEADER_REQUIRED","TEMPLATE_PARAMETERS_MISMATCH","TEMPLATE_UNSUPPORTED","WHATSAPP_MEDIA_REJECTED","WHATSAPP_MESSAGE_UNSUPPORTED","WHATSAPP_RECIPIENT_UNAVAILABLE","CALL_REJECTED","PROVIDER_ACCOUNT_UNSUPPORTED","PROVIDER_CREDENTIALS_REJECTED","VOICE_NOT_AVAILABLE","VOICE_NUMBER_NOT_OWNED","AGENT_PROCEDURES_INVALID","AGENT_WORKFLOW_INVALID","AGENT_SETTINGS_INVALID","BULLETIN_PERIOD_INVALID","INTEGRATION_PROCEDURE_UNAVAILABLE","INTEGRATION_TOOL_UNAVAILABLE","KNOWLEDGE_DOCUMENT_UNAVAILABLE","KNOWLEDGE_FILE_INVALID","KNOWLEDGE_KIND_MISMATCH","WEBSITE_NOT_APPROVED","WIDGET_VOICE_UNHEARD","PROVIDER_REJECTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelUnprocessableContentError"}}}},"429":{"description":"- `RATE_LIMITED`: The request rate limit was exceeded. Try again later.\n- `WHATSAPP_ENGAGEMENT_LIMITED`: WhatsApp limited how many marketing messages this person receives. Wait at least a day before sending again.\n- `WHATSAPP_RATE_LIMITED`: WhatsApp is limiting messages from this number. Try again later.\n- `WIDGET_LIMIT_REACHED`: This widget reached its conversations or messages for today. It takes visitors again after 00:00 UTC.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED","WHATSAPP_ENGAGEMENT_LIMITED","WHATSAPP_RATE_LIMITED","WIDGET_LIMIT_REACHED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelTooManyRequestsError"}}}},"500":{"description":"- `INTERNAL_ERROR`: The service could not complete the operation.\n- `OUTBOUND_CHANNEL_INTERNAL`: What became of the send could not be read back. Asking again never reaches the person twice.\n- `WHATSAPP_CHANNEL_INTERNAL`: The delivery outcome could not be read back. Asking again never sends the message twice.\n- `WHATSAPP_NOT_SENT`: The message was stored but never handed to WhatsApp. It was not sent.\n- `WIDGET_INTERNAL`: The request outcome could not be confirmed. Do not repeat it with a new identifier.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR","OUTBOUND_CHANNEL_INTERNAL","WHATSAPP_CHANNEL_INTERNAL","WHATSAPP_NOT_SENT","WIDGET_INTERNAL"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelInternalServerErrorError"}}}},"502":{"description":"- `OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.\n- `WHATSAPP_DELIVERY_FAILED`: WhatsApp did not deliver the message.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN","WHATSAPP_DELIVERY_FAILED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelBadGatewayError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `TEAM_UNAVAILABLE`: The organization's team cannot be read right now. Try again shortly.\n- `CAMPAIGN_HEADER_NOT_STORED`: The campaign and its recipients were saved, but some recipients' files were not. Send those recipients again with `addRecipients` on this campaign: their numbers are kept and their files stored. Do not create the campaign again.\n- `VOICE_UNAVAILABLE`: Calls are unavailable right now. Try again in a few minutes.\n- `FEEDBACK_PROPOSAL_UNAVAILABLE`: A usable improvement could not be prepared. The Agent has not changed. Try again later.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","TEAM_UNAVAILABLE","CAMPAIGN_HEADER_NOT_STORED","VOICE_UNAVAILABLE","FEEDBACK_PROPOSAL_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelServiceUnavailableError"}}}},"504":{"description":"- `UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.\n- `WHATSAPP_DELIVERY_UNCONFIRMED`: WhatsApp never confirmed whether the message was sent. It was not sent again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT","WHATSAPP_DELIVERY_UNCONFIRMED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateChannelGatewayTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"channels","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","channels"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"anyOf":[{"type":"object","required":["channelType"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"inboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"name":{"type":"string","maxLength":120,"minLength":1},"outboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"channelType":{"type":"string","const":"whatsapp"}},"description":"A pending WhatsApp channel and the setup link where the customer connects their number. Call `verifyChannel` once they finish.","additionalProperties":false},{"type":"object","required":["channelType","endpoint"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"inboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"name":{"type":"string","maxLength":120,"minLength":1},"outboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"channelType":{"type":"string","const":"voice"},"endpoint":{"anyOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","const":"platform_number","description":"A phone number the platform already owns."},"label":{"type":"string","maxLength":120},"phone":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"phoneNumber":{"$ref":"#/components/schemas/RaizPhoneNumber","deprecated":true,"description":"Deprecated: use `phone`. Answered until 2027-01-28."}},"additionalProperties":false},{"type":"object","required":["address","kind"],"properties":{"address":{"type":"string","description":"The SIP host or IP the carrier receives calls at, with an optional port.","maxLength":253,"pattern":"^[A-Za-z0-9]([A-Za-z0-9.-]*[A-Za-z0-9])?(:[0-9]{1,5})?$"},"kind":{"type":"string","const":"sip_trunk","description":"The organization's own carrier, reached over SIP."},"label":{"type":"string","maxLength":120},"mediaEncryption":{"anyOf":[{"type":"string","const":"disabled"},{"type":"string","const":"allowed"},{"type":"string","const":"required"}]},"password":{"type":"string","description":"Digest credentials, used once to connect the carrier and never stored.","maxLength":256,"writeOnly":true},"phone":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"transport":{"anyOf":[{"type":"string","const":"auto"},{"type":"string","const":"udp"},{"type":"string","const":"tcp"},{"type":"string","const":"tls"}]},"username":{"type":"string","maxLength":256},"phoneNumber":{"$ref":"#/components/schemas/RaizPhoneNumber","deprecated":true,"description":"Deprecated: use `phone`. Answered until 2027-01-28."}},"additionalProperties":false}]}},"description":"A voice number, connected at once.","additionalProperties":false},{"type":"object","required":["channelType","widget"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"inboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"name":{"type":"string","maxLength":120,"minLength":1},"outboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"channelType":{"type":"string","const":"web"},"widget":{"$ref":"#/components/schemas/RaizWidgetSettingsInput","description":"The web chat widget's configuration."}},"description":"The chat widget, with its configuration.","additionalProperties":false}]},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createChannel","x-arbol-native-rpc":false}},"/v1/raiz/channels/{channelId}":{"get":{"operationId":"raiz.channels.get","summary":"Get a channel","description":"Read one channel: its optional Agent, `inboundEnabled` and `outboundEnabled`, status and setup state; a web channel includes its widget configuration, and `expand=profile` adds the WhatsApp business profile, read live from WhatsApp. Inbound automation requires an Agent; WhatsApp outbound notifications do not. Traffic must be enabled and the channel active. `aiCoveragePercent` assigns 0–100% of new inbound WhatsApp conversations to AI; zero records human-managed conversations. Existing episodes keep their assignment.","tags":["raiz"],"security":[{"arbolHuman":["raiz:channels:read"]},{"arbolHuman":["raiz:channels:write"]},{"arbolMachine":["raiz:channels:read"]},{"arbolMachine":["raiz:channels:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:channels:read","raiz:channels:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"channelId","in":"path","required":true,"description":"Channel id.","schema":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"expand","in":"query","required":false,"description":"Related data to include, comma-separated: `profile`.","schema":{"type":"string","description":"Related data to include, comma-separated: `profile`.","examples":["profile"],"pattern":"^(profile)(,(profile))*$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizChannelResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"422":{"description":"`PROVIDER_REJECTED`: The provider refused the request. Check the configuration and try again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["PROVIDER_REJECTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizProviderRejectedError"}}}},"429":{"description":"- `RATE_LIMITED`: The request rate limit was exceeded. Try again later.\n- `WHATSAPP_RATE_LIMITED`: WhatsApp is limiting messages from this number. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED","WHATSAPP_RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetChannelTooManyRequestsError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetChannelServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"channels","verb":"get","id":"channelId","query":{"expand":"string"}},"x-fern-sdk-group-name":["raiz","channels"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"channelId":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"expand":{"type":"string","description":"Related data to include, comma-separated: `profile`.","examples":["profile"],"pattern":"^(profile)(,(profile))*$"}},"required":["channelId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getChannel","x-arbol-native-rpc":true},"patch":{"operationId":"raiz.channels.update","summary":"Update a channel","description":"Assign the Agent that answers on a channel, switch its traffic, or change what people see. `agentId` assigns an Agent whose modality fits the channel (`null` stops inbound automation and preserves WhatsApp outbound traffic). Inbound traffic and outbound traffic on voice or web channels require an Agent; WhatsApp outbound notifications do not. WhatsApp channels accept `profile` (the business profile people see in WhatsApp); web channels accept `widget` (the complete new widget configuration) and `widgetLogo` (PNG, JPEG or WebP up to 256 KiB; `null` removes it). Omitted fields stay.","tags":["raiz"],"security":[{"arbolHuman":["raiz:channels:write"]},{"arbolMachine":["raiz:channels:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:channels:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":524288,"x-max-output-bytes":1048576,"parameters":[{"name":"channelId","in":"path","required":true,"description":"Channel id.","schema":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizChannelResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `REPORT_FILTER_UNSUPPORTED`: A filter does not apply to the selected report.\n- `REPORT_RANGE_INVALID`: The report range is invalid: `from` must not be after `to`.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","REPORT_FILTER_UNSUPPORTED","REPORT_RANGE_INVALID","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"`CREDITS_EXHAUSTED`: The organization's credits do not cover this, so nothing was started. Try again once the organization adds credits.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CREDITS_EXHAUSTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreditsExhaustedError"}}}},"403":{"description":"- `FORBIDDEN`: The token does not authorize this operation.\n- `CHANNEL_CREATION_IN_APP`: An AI tool creates website chats and forms only. A person adds WhatsApp numbers and phone numbers in Settings → Channels, or through the REST API.\n- `CONVERSATION_VIEW_AUTHOR_ONLY`: Only the person who saved this view can make it private; it would disappear for the rest of the team.\n- `OUTBOUND_CHANNEL_REFUSED`: Only the Campaigns Worker sends through this service, and only for a recipient of a campaign of that organization.\n- `WHATSAPP_CHANNEL_REFUSED`: Only the WhatsApp Agent Worker delivers through this service, and only Agent messages of a WhatsApp conversation.\n- `WIDGET_REFUSED`: This widget session is unavailable.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN","CHANNEL_CREATION_IN_APP","CONVERSATION_VIEW_AUTHOR_ONLY","OUTBOUND_CHANNEL_REFUSED","WHATSAPP_CHANNEL_REFUSED","WIDGET_REFUSED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelForbiddenError"}}}},"404":{"description":"- `TEMPLATE_NOT_FOUND`: The template does not exist in this channel's WhatsApp Business Account.\n- `RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TEMPLATE_NOT_FOUND","RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelNotFoundError"}}}},"409":{"description":"- `AGENT_NOT_TEXT`: Only a text Agent can hold a web conversation; a voice Agent only with `origin: test`, to try it by text.\n- `CALL_IN_PROGRESS`: A voice conversation closes by itself when its call ends; it cannot be closed by hand.\n- `CONVERSATION_CLOSED`: The conversation is closed. Start a new conversation to write again.\n- `CONVERSATION_NOT_HANDED_OFF`: The AI has not handed this conversation to the team, so there is nothing to give back to it.\n- `CONVERSATION_OPEN`: The conversation is still open. Close it first.\n- `DAILY_REPORT_IN_PROGRESS`: The daily report you asked for is still on its way; it arrives within a minute.\n- `DEFINITION_NOT_ACTIVE`: Facts can be asserted only under an active definition.\n- `DEFINITION_RETIRED`: The definition is retired and can no longer change.\n- `DEFINITION_TYPE_LOCKED`: The value type and subject of a definition cannot change once it has facts. Retire it and create a new one instead.\n- `HANDOFF_ALREADY_CONTINUED`: This handoff was already given back to the AI to continue. It continues once per handoff; a new escalation can be given back again.\n- `REPLY_IN_PROGRESS`: The Agent is still replying in this conversation. Try again once the reply is delivered.\n- `OUTSIDE_CONTACT_HOURS`: The profile's contact hours do not allow starting a conversation now. Try again within them.\n- `PROVIDER_ACCOUNT_EXISTS`: This provider account is already registered.\n- `PROVIDER_ACCOUNT_IN_USE`: Channels or Agents still use this provider account. Move them to another account first.\n- `SOURCE_CONVERSATION_OPEN`: A fact can cite only a closed conversation as its source.\n- `SUPPRESSION_EXISTS`: This organization already has this suppression rule.\n- `TASK_NOT_RETRYABLE`: This task cannot be retried: its kind never retries, or it already used every attempt. Start it again from its resource.\n- `CAMPAIGN_AGENT_NOT_READY`: The campaign's Agent must be an active text Agent: it answers whoever replies to the message.\n- `CAMPAIGN_NO_RECIPIENTS`: The campaign has nobody left to reach. Add recipients first.\n- `CHANNEL_AGENT_REQUIRED`: Inbound traffic requires an assigned Agent. Outbound traffic requires one except on WhatsApp notification channels.\n- `CHANNEL_ENDPOINT_IN_USE`: Another channel already uses this number or endpoint.\n- `CHANNEL_NOT_READY`: The channel is not connected yet, or this kind of traffic is not enabled on it.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `CONVERSATION_VIEW_LIMIT_REACHED`: The organization already has 200 saved views. Delete one before saving another.\n- `CONVERSATION_VIEW_NAME_TAKEN`: Another saved view already has this name. Choose a different name.\n- `TEMPLATE_NOT_APPROVED`: The template is not approved for sending: it is pending review, rejected, paused or disabled.\n- `WHATSAPP_ACCOUNT_RESTRICTED`: WhatsApp has restricted this number or its business account. Review the account's status before sending again.\n- `WHATSAPP_AI_PAUSED`: Automatic replies are paused or this conversation can no longer receive them.\n- `WHATSAPP_MARKETING_STOPPED`: The contact chose to stop receiving marketing messages from this business.\n- `WHATSAPP_WINDOW_CLOSED`: More than 24 hours passed since the contact last wrote. Start the conversation with an approved template.\n- `PROVIDER_ACCOUNT_MISMATCH`: The number and the Agent belong to different voice accounts. A voice Agent answers and dials only numbers of its own account.\n- `PROVIDER_SECRET_UNAVAILABLE`: A secret the provider account needs is not available to this deployment. Name a TENANT_ Secrets Store entry that this deployment has a binding for.\n- `VOICE_AGENT_NOT_READY`: The Agent cannot take calls yet: it must be an active voice Agent with instructions, published for calls.\n- `VOICE_LINE_UNAVAILABLE`: No voice line can place this call. Name an active outbound line of the organization with `from` or `channelId`, or assign one to the Agent.\n- `VOICE_NUMBER_IN_USE`: This number is already connected to another voice service. Release it there first.\n- `AGENT_IN_USE`: The Agent still has channels or active campaigns. Unassign them before deleting it.\n- `AGENT_MODALITY_LOCKED`: The Agent's modality cannot change while it has channels or is published for calls. Create a new Agent instead.\n- `BULLETIN_LIMIT_REACHED`: The organization already has 30 bulletins in force or scheduled. End or delete one before adding another.\n- `EVAL_CASES_UNAVAILABLE`: The Agent has no kept evaluation case to replay, or a named case is not one of its kept cases.\n- `EVAL_GATE_UNMET`: This Agent requires a completed evaluation run of exactly this content, in which every case passed, before what its model reads changes. Create one with createEvalRun and send its id as evalRunId.\n- `WIDGET_CONFLICT`: The request cannot be repeated or another turn is active.\n- `ADDRESS_IN_USE`: Another contact in this organization already uses this address.\n- `IDENTIFIER_IN_USE`: Another contact in this organization already has this identity document.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.\n- `KEY_IN_USE`: Another active resource in this organization already uses this key.\n- `CONTACT_SUPPRESSED`: A suppression rule of this organization forbids contacting this address.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["AGENT_NOT_TEXT","CALL_IN_PROGRESS","CONVERSATION_CLOSED","CONVERSATION_NOT_HANDED_OFF","CONVERSATION_OPEN","DAILY_REPORT_IN_PROGRESS","DEFINITION_NOT_ACTIVE","DEFINITION_RETIRED","DEFINITION_TYPE_LOCKED","HANDOFF_ALREADY_CONTINUED","REPLY_IN_PROGRESS","OUTSIDE_CONTACT_HOURS","PROVIDER_ACCOUNT_EXISTS","PROVIDER_ACCOUNT_IN_USE","SOURCE_CONVERSATION_OPEN","SUPPRESSION_EXISTS","TASK_NOT_RETRYABLE","CAMPAIGN_AGENT_NOT_READY","CAMPAIGN_NO_RECIPIENTS","CHANNEL_AGENT_REQUIRED","CHANNEL_ENDPOINT_IN_USE","CHANNEL_NOT_READY","CHANNEL_TYPE_MISMATCH","CONVERSATION_VIEW_LIMIT_REACHED","CONVERSATION_VIEW_NAME_TAKEN","TEMPLATE_NOT_APPROVED","WHATSAPP_ACCOUNT_RESTRICTED","WHATSAPP_AI_PAUSED","WHATSAPP_MARKETING_STOPPED","WHATSAPP_WINDOW_CLOSED","PROVIDER_ACCOUNT_MISMATCH","PROVIDER_SECRET_UNAVAILABLE","VOICE_AGENT_NOT_READY","VOICE_LINE_UNAVAILABLE","VOICE_NUMBER_IN_USE","AGENT_IN_USE","AGENT_MODALITY_LOCKED","BULLETIN_LIMIT_REACHED","EVAL_CASES_UNAVAILABLE","EVAL_GATE_UNMET","WIDGET_CONFLICT","ADDRESS_IN_USE","IDENTIFIER_IN_USE","INVALID_STATE","KEY_IN_USE","CONTACT_SUPPRESSED","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelConflictError"}}}},"413":{"description":"- `REQUEST_TOO_LARGE`: The request exceeds the allowed size.\n- `IMPORT_FILE_TOO_LARGE`: The import file is larger than 12 MB. Split it into several files.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE","IMPORT_FILE_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelContentTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `ASSIGNEE_UNAVAILABLE`: That person cannot take conversations in this organization. `listAssignees` names who can.\n- `CONTACT_UNREACHABLE`: The contact has no phone number. Give the destination number in `to`.\n- `DAILY_REPORT_RECIPIENTS_MISSING`: The daily report has no recipients. Add them in `settings.dailyReport.recipients` first.\n- `DEFINITION_OPTIONS_INVALID`: Only a definition whose value type is `option` has options; it needs at least one, and option keys must be unique.\n- `FACT_SUBJECT_MISMATCH`: The fact's subject (a contact or a conversation) does not match what its definition describes.\n- `FACT_VALUE_INVALID`: The value does not match the definition's value type, or names no active option.\n- `IMPORT_FILE_INVALID`: The import file is not valid base64 of UTF-8 text. Save the spreadsheet as CSV UTF-8 and try again.\n- `IP_NETWORK_INVALID`: The IP network is not a valid IPv4 or IPv6 address or CIDR block.\n- `PROFILE_VARIABLE_MISSING`: The profile's template parameters reference a variable that `variables` does not give.\n- `TIME_ZONE_UNKNOWN`: The time zone is not in the IANA time zone database.\n- `CAMPAIGN_HEADER_MISSING`: A recipient has no file that fits the template's header (a PDF for a document, JPEG or PNG for an image, MP4 for a video). Each recipient brings its own as `header`.\n- `CAMPAIGN_VARIABLE_MISSING`: A recipient has no value for a variable the template's parameters use. An empty value cannot be sent on WhatsApp.\n- `CHANNEL_AGENT_MISMATCH`: This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.\n- `TEMPLATE_HEADER_MISMATCH`: The header file does not fit the template: a document header takes a PDF, an image header a JPEG or PNG, a video header an MP4, and a template without a media header takes no file.\n- `TEMPLATE_HEADER_REQUIRED`: The template's header is a document, image or video: send its file with the template.\n- `TEMPLATE_PARAMETERS_MISMATCH`: The number of parameters does not match the variables of the template's body.\n- `TEMPLATE_UNSUPPORTED`: The template needs header text variables, a location header or button parameters, which cannot be sent yet.\n- `WHATSAPP_MEDIA_REJECTED`: WhatsApp could not use the attachment. Check its type and size limits.\n- `WHATSAPP_MESSAGE_UNSUPPORTED`: This message cannot be sent on WhatsApp: it allows one attachment per message, up to three buttons or ten list options, and text of up to 4096 characters.\n- `WHATSAPP_RECIPIENT_UNAVAILABLE`: The recipient cannot receive WhatsApp messages from this number.\n- `CALL_REJECTED`: The call could not be placed. Check the destination number and the line.\n- `PROVIDER_ACCOUNT_UNSUPPORTED`: This deployment cannot use provider accounts of this provider yet; the platform's own account is used instead.\n- `PROVIDER_CREDENTIALS_REJECTED`: The provider refused the provider account's credentials, or the account is not active there.\n- `VOICE_NOT_AVAILABLE`: This voice is not available. Choose one from `listVoices`.\n- `VOICE_NUMBER_NOT_OWNED`: The platform's telephony account does not own a voice-capable number with this value.\n- `AGENT_PROCEDURES_INVALID`: A procedure is incomplete, references a tool, document or procedure the Agent does not have, or breaks the structured step rules. `issues` says where.\n- `AGENT_WORKFLOW_INVALID`: The workflow breaks the graph rules, leaves a step without a way forward, or uses a tool this Agent cannot run there. `issues` says where.\n- `AGENT_SETTINGS_INVALID`: The settings do not apply to this Agent's modality, or two settings contradict each other.\n- `BULLETIN_PERIOD_INVALID`: A bulletin must end after it starts, and a new one must end in the future.\n- `INTEGRATION_PROCEDURE_UNAVAILABLE`: A procedure does not exist in this organization's connections, Raíz cannot run its connection, or the Agent is not a text Agent.\n- `INTEGRATION_TOOL_UNAVAILABLE`: An integration tool does not exist in this organization's connections, or Raíz cannot run it.\n- `KNOWLEDGE_DOCUMENT_UNAVAILABLE`: A Knowledge document does not exist in this organization.\n- `KNOWLEDGE_FILE_INVALID`: The file is not valid base64, exceeds the size limit or does not match its declared type.\n- `KNOWLEDGE_KIND_MISMATCH`: The change does not apply to this kind of Knowledge document.\n- `WEBSITE_NOT_APPROVED`: This website's origin is not approved for crawling in this deployment.\n- `WIDGET_VOICE_UNHEARD`: The voice message could not be understood. Record it again or write the message.\n- `PROVIDER_REJECTED`: The provider refused the request. Check the configuration and try again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["ASSIGNEE_UNAVAILABLE","CONTACT_UNREACHABLE","DAILY_REPORT_RECIPIENTS_MISSING","DEFINITION_OPTIONS_INVALID","FACT_SUBJECT_MISMATCH","FACT_VALUE_INVALID","IMPORT_FILE_INVALID","IP_NETWORK_INVALID","PROFILE_VARIABLE_MISSING","TIME_ZONE_UNKNOWN","CAMPAIGN_HEADER_MISSING","CAMPAIGN_VARIABLE_MISSING","CHANNEL_AGENT_MISMATCH","TEMPLATE_HEADER_MISMATCH","TEMPLATE_HEADER_REQUIRED","TEMPLATE_PARAMETERS_MISMATCH","TEMPLATE_UNSUPPORTED","WHATSAPP_MEDIA_REJECTED","WHATSAPP_MESSAGE_UNSUPPORTED","WHATSAPP_RECIPIENT_UNAVAILABLE","CALL_REJECTED","PROVIDER_ACCOUNT_UNSUPPORTED","PROVIDER_CREDENTIALS_REJECTED","VOICE_NOT_AVAILABLE","VOICE_NUMBER_NOT_OWNED","AGENT_PROCEDURES_INVALID","AGENT_WORKFLOW_INVALID","AGENT_SETTINGS_INVALID","BULLETIN_PERIOD_INVALID","INTEGRATION_PROCEDURE_UNAVAILABLE","INTEGRATION_TOOL_UNAVAILABLE","KNOWLEDGE_DOCUMENT_UNAVAILABLE","KNOWLEDGE_FILE_INVALID","KNOWLEDGE_KIND_MISMATCH","WEBSITE_NOT_APPROVED","WIDGET_VOICE_UNHEARD","PROVIDER_REJECTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelUnprocessableContentError"}}}},"429":{"description":"- `RATE_LIMITED`: The request rate limit was exceeded. Try again later.\n- `WHATSAPP_ENGAGEMENT_LIMITED`: WhatsApp limited how many marketing messages this person receives. Wait at least a day before sending again.\n- `WHATSAPP_RATE_LIMITED`: WhatsApp is limiting messages from this number. Try again later.\n- `WIDGET_LIMIT_REACHED`: This widget reached its conversations or messages for today. It takes visitors again after 00:00 UTC.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED","WHATSAPP_ENGAGEMENT_LIMITED","WHATSAPP_RATE_LIMITED","WIDGET_LIMIT_REACHED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelTooManyRequestsError"}}}},"500":{"description":"- `INTERNAL_ERROR`: The service could not complete the operation.\n- `OUTBOUND_CHANNEL_INTERNAL`: What became of the send could not be read back. Asking again never reaches the person twice.\n- `WHATSAPP_CHANNEL_INTERNAL`: The delivery outcome could not be read back. Asking again never sends the message twice.\n- `WHATSAPP_NOT_SENT`: The message was stored but never handed to WhatsApp. It was not sent.\n- `WIDGET_INTERNAL`: The request outcome could not be confirmed. Do not repeat it with a new identifier.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR","OUTBOUND_CHANNEL_INTERNAL","WHATSAPP_CHANNEL_INTERNAL","WHATSAPP_NOT_SENT","WIDGET_INTERNAL"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelInternalServerErrorError"}}}},"502":{"description":"- `OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.\n- `WHATSAPP_DELIVERY_FAILED`: WhatsApp did not deliver the message.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN","WHATSAPP_DELIVERY_FAILED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelBadGatewayError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `TEAM_UNAVAILABLE`: The organization's team cannot be read right now. Try again shortly.\n- `CAMPAIGN_HEADER_NOT_STORED`: The campaign and its recipients were saved, but some recipients' files were not. Send those recipients again with `addRecipients` on this campaign: their numbers are kept and their files stored. Do not create the campaign again.\n- `VOICE_UNAVAILABLE`: Calls are unavailable right now. Try again in a few minutes.\n- `FEEDBACK_PROPOSAL_UNAVAILABLE`: A usable improvement could not be prepared. The Agent has not changed. Try again later.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","TEAM_UNAVAILABLE","CAMPAIGN_HEADER_NOT_STORED","VOICE_UNAVAILABLE","FEEDBACK_PROPOSAL_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelServiceUnavailableError"}}}},"504":{"description":"- `UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.\n- `WHATSAPP_DELIVERY_UNCONFIRMED`: WhatsApp never confirmed whether the message was sent. It was not sent again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT","WHATSAPP_DELIVERY_UNCONFIRMED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateChannelGatewayTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"channels","verb":"update","id":"channelId","query":null},"x-fern-sdk-group-name":["raiz","channels"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["channelId"],"properties":{"aiCoveragePercent":{"type":"integer","minimum":0,"maximum":100},"businessHours":{"anyOf":[{"$ref":"#/components/schemas/RaizBusinessHours","description":"WhatsApp channels only: the number's business hours, complete. Omitted, they stay as they are, whatever else the update changes; null removes them (it attends at all hours). Every window must close after it opens."},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string","description":"The Agent to assign; null stops inbound automation. WhatsApp outbound notifications may remain enabled.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"inboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}]},"outboundEnabled":{"type":"boolean","description":"Inbound traffic needs an assigned Agent. WhatsApp outbound traffic can send notifications without one; other channel types require an Agent. Defaults to on when created with an Agent."},"profile":{"type":"object","properties":{"about":{"type":"string","maxLength":139,"minLength":1},"address":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":512},"email":{"type":"string","format":"email","maxLength":128},"vertical":{"anyOf":[{"type":"string","const":"ALCOHOL"},{"type":"string","const":"APPAREL"},{"type":"string","const":"AUTO"},{"type":"string","const":"BEAUTY"},{"type":"string","const":"EDU"},{"type":"string","const":"ENTERTAIN"},{"type":"string","const":"EVENT_PLAN"},{"type":"string","const":"FINANCE"},{"type":"string","const":"GOVT"},{"type":"string","const":"GROCERY"},{"type":"string","const":"HEALTH"},{"type":"string","const":"HOTEL"},{"type":"string","const":"NONPROFIT"},{"type":"string","const":"ONLINE_GAMBLING"},{"type":"string","const":"OTC_DRUGS"},{"type":"string","const":"OTHER"},{"type":"string","const":"PHYSICAL_GAMBLING"},{"type":"string","const":"PROF_SERVICES"},{"type":"string","const":"RESTAURANT"},{"type":"string","const":"RETAIL"},{"type":"string","const":"TRAVEL"}],"description":"The business category."},"websites":{"type":"array","items":{"type":"string","maxLength":256,"pattern":"^https?://"},"maxItems":2}},"description":"WhatsApp channels only: changes to the business profile, applied at WhatsApp.","additionalProperties":false},"widget":{"$ref":"#/components/schemas/RaizWidgetSettingsInput","description":"The web chat widget's configuration."},"widgetLogo":{"anyOf":[{"type":"object","required":["data","mediaType"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The image, base64-encoded (at most 256 KiB decoded).","maxLength":349528,"minLength":4},"mediaType":{"anyOf":[{"type":"string","const":"image/png"},{"type":"string","const":"image/jpeg"},{"type":"string","const":"image/webp"}]}},"description":"A new logo for the web widget, stored by Raíz; its key becomes `widget.logoObjectKey`. Null removes the logo.","additionalProperties":false},{"type":"null"}]},"channelId":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateChannel","x-arbol-native-rpc":true},"delete":{"operationId":"raiz.channels.delete","summary":"Delete a channel","description":"Remove a channel; its conversations remain. A phone number stops receiving and placing calls (the number stays in the platform account, where Arbol staff can release it); a WhatsApp number stops sending messages to Raíz. To pause traffic instead, switch it off with `update_channel`. Not an AI tool.","tags":["raiz"],"security":[{"arbolHuman":["raiz:channels:write"]},{"arbolMachine":["raiz:channels:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:channels:write"],"x-effect":"delete","x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"channelId","in":"path","required":true,"description":"Channel id.","schema":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedObjectResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `REPORT_FILTER_UNSUPPORTED`: A filter does not apply to the selected report.\n- `REPORT_RANGE_INVALID`: The report range is invalid: `from` must not be after `to`.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","REPORT_FILTER_UNSUPPORTED","REPORT_RANGE_INVALID","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteChannelBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"`CREDITS_EXHAUSTED`: The organization's credits do not cover this, so nothing was started. Try again once the organization adds credits.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CREDITS_EXHAUSTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreditsExhaustedError"}}}},"403":{"description":"- `FORBIDDEN`: The token does not authorize this operation.\n- `CHANNEL_CREATION_IN_APP`: An AI tool creates website chats and forms only. A person adds WhatsApp numbers and phone numbers in Settings → Channels, or through the REST API.\n- `CONVERSATION_VIEW_AUTHOR_ONLY`: Only the person who saved this view can make it private; it would disappear for the rest of the team.\n- `OUTBOUND_CHANNEL_REFUSED`: Only the Campaigns Worker sends through this service, and only for a recipient of a campaign of that organization.\n- `WHATSAPP_CHANNEL_REFUSED`: Only the WhatsApp Agent Worker delivers through this service, and only Agent messages of a WhatsApp conversation.\n- `WIDGET_REFUSED`: This widget session is unavailable.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN","CHANNEL_CREATION_IN_APP","CONVERSATION_VIEW_AUTHOR_ONLY","OUTBOUND_CHANNEL_REFUSED","WHATSAPP_CHANNEL_REFUSED","WIDGET_REFUSED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteChannelForbiddenError"}}}},"404":{"description":"- `TEMPLATE_NOT_FOUND`: The template does not exist in this channel's WhatsApp Business Account.\n- `RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TEMPLATE_NOT_FOUND","RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteChannelNotFoundError"}}}},"409":{"description":"- `AGENT_NOT_TEXT`: Only a text Agent can hold a web conversation; a voice Agent only with `origin: test`, to try it by text.\n- `CALL_IN_PROGRESS`: A voice conversation closes by itself when its call ends; it cannot be closed by hand.\n- `CONVERSATION_CLOSED`: The conversation is closed. Start a new conversation to write again.\n- `CONVERSATION_NOT_HANDED_OFF`: The AI has not handed this conversation to the team, so there is nothing to give back to it.\n- `CONVERSATION_OPEN`: The conversation is still open. Close it first.\n- `DAILY_REPORT_IN_PROGRESS`: The daily report you asked for is still on its way; it arrives within a minute.\n- `DEFINITION_NOT_ACTIVE`: Facts can be asserted only under an active definition.\n- `DEFINITION_RETIRED`: The definition is retired and can no longer change.\n- `DEFINITION_TYPE_LOCKED`: The value type and subject of a definition cannot change once it has facts. Retire it and create a new one instead.\n- `HANDOFF_ALREADY_CONTINUED`: This handoff was already given back to the AI to continue. It continues once per handoff; a new escalation can be given back again.\n- `REPLY_IN_PROGRESS`: The Agent is still replying in this conversation. Try again once the reply is delivered.\n- `OUTSIDE_CONTACT_HOURS`: The profile's contact hours do not allow starting a conversation now. Try again within them.\n- `PROVIDER_ACCOUNT_EXISTS`: This provider account is already registered.\n- `PROVIDER_ACCOUNT_IN_USE`: Channels or Agents still use this provider account. Move them to another account first.\n- `SOURCE_CONVERSATION_OPEN`: A fact can cite only a closed conversation as its source.\n- `SUPPRESSION_EXISTS`: This organization already has this suppression rule.\n- `TASK_NOT_RETRYABLE`: This task cannot be retried: its kind never retries, or it already used every attempt. Start it again from its resource.\n- `CAMPAIGN_AGENT_NOT_READY`: The campaign's Agent must be an active text Agent: it answers whoever replies to the message.\n- `CAMPAIGN_NO_RECIPIENTS`: The campaign has nobody left to reach. Add recipients first.\n- `CHANNEL_AGENT_REQUIRED`: Inbound traffic requires an assigned Agent. Outbound traffic requires one except on WhatsApp notification channels.\n- `CHANNEL_ENDPOINT_IN_USE`: Another channel already uses this number or endpoint.\n- `CHANNEL_NOT_READY`: The channel is not connected yet, or this kind of traffic is not enabled on it.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `CONVERSATION_VIEW_LIMIT_REACHED`: The organization already has 200 saved views. Delete one before saving another.\n- `CONVERSATION_VIEW_NAME_TAKEN`: Another saved view already has this name. Choose a different name.\n- `TEMPLATE_NOT_APPROVED`: The template is not approved for sending: it is pending review, rejected, paused or disabled.\n- `WHATSAPP_ACCOUNT_RESTRICTED`: WhatsApp has restricted this number or its business account. Review the account's status before sending again.\n- `WHATSAPP_AI_PAUSED`: Automatic replies are paused or this conversation can no longer receive them.\n- `WHATSAPP_MARKETING_STOPPED`: The contact chose to stop receiving marketing messages from this business.\n- `WHATSAPP_WINDOW_CLOSED`: More than 24 hours passed since the contact last wrote. Start the conversation with an approved template.\n- `PROVIDER_ACCOUNT_MISMATCH`: The number and the Agent belong to different voice accounts. A voice Agent answers and dials only numbers of its own account.\n- `PROVIDER_SECRET_UNAVAILABLE`: A secret the provider account needs is not available to this deployment. Name a TENANT_ Secrets Store entry that this deployment has a binding for.\n- `VOICE_AGENT_NOT_READY`: The Agent cannot take calls yet: it must be an active voice Agent with instructions, published for calls.\n- `VOICE_LINE_UNAVAILABLE`: No voice line can place this call. Name an active outbound line of the organization with `from` or `channelId`, or assign one to the Agent.\n- `VOICE_NUMBER_IN_USE`: This number is already connected to another voice service. Release it there first.\n- `AGENT_IN_USE`: The Agent still has channels or active campaigns. Unassign them before deleting it.\n- `AGENT_MODALITY_LOCKED`: The Agent's modality cannot change while it has channels or is published for calls. Create a new Agent instead.\n- `BULLETIN_LIMIT_REACHED`: The organization already has 30 bulletins in force or scheduled. End or delete one before adding another.\n- `EVAL_CASES_UNAVAILABLE`: The Agent has no kept evaluation case to replay, or a named case is not one of its kept cases.\n- `EVAL_GATE_UNMET`: This Agent requires a completed evaluation run of exactly this content, in which every case passed, before what its model reads changes. Create one with createEvalRun and send its id as evalRunId.\n- `WIDGET_CONFLICT`: The request cannot be repeated or another turn is active.\n- `ADDRESS_IN_USE`: Another contact in this organization already uses this address.\n- `IDENTIFIER_IN_USE`: Another contact in this organization already has this identity document.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.\n- `KEY_IN_USE`: Another active resource in this organization already uses this key.\n- `CONTACT_SUPPRESSED`: A suppression rule of this organization forbids contacting this address.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["AGENT_NOT_TEXT","CALL_IN_PROGRESS","CONVERSATION_CLOSED","CONVERSATION_NOT_HANDED_OFF","CONVERSATION_OPEN","DAILY_REPORT_IN_PROGRESS","DEFINITION_NOT_ACTIVE","DEFINITION_RETIRED","DEFINITION_TYPE_LOCKED","HANDOFF_ALREADY_CONTINUED","REPLY_IN_PROGRESS","OUTSIDE_CONTACT_HOURS","PROVIDER_ACCOUNT_EXISTS","PROVIDER_ACCOUNT_IN_USE","SOURCE_CONVERSATION_OPEN","SUPPRESSION_EXISTS","TASK_NOT_RETRYABLE","CAMPAIGN_AGENT_NOT_READY","CAMPAIGN_NO_RECIPIENTS","CHANNEL_AGENT_REQUIRED","CHANNEL_ENDPOINT_IN_USE","CHANNEL_NOT_READY","CHANNEL_TYPE_MISMATCH","CONVERSATION_VIEW_LIMIT_REACHED","CONVERSATION_VIEW_NAME_TAKEN","TEMPLATE_NOT_APPROVED","WHATSAPP_ACCOUNT_RESTRICTED","WHATSAPP_AI_PAUSED","WHATSAPP_MARKETING_STOPPED","WHATSAPP_WINDOW_CLOSED","PROVIDER_ACCOUNT_MISMATCH","PROVIDER_SECRET_UNAVAILABLE","VOICE_AGENT_NOT_READY","VOICE_LINE_UNAVAILABLE","VOICE_NUMBER_IN_USE","AGENT_IN_USE","AGENT_MODALITY_LOCKED","BULLETIN_LIMIT_REACHED","EVAL_CASES_UNAVAILABLE","EVAL_GATE_UNMET","WIDGET_CONFLICT","ADDRESS_IN_USE","IDENTIFIER_IN_USE","INVALID_STATE","KEY_IN_USE","CONTACT_SUPPRESSED","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteChannelConflictError"}}}},"413":{"description":"`IMPORT_FILE_TOO_LARGE`: The import file is larger than 12 MB. Split it into several files.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["IMPORT_FILE_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizImportFileTooLargeError"}}}},"422":{"description":"- `ASSIGNEE_UNAVAILABLE`: That person cannot take conversations in this organization. `listAssignees` names who can.\n- `CONTACT_UNREACHABLE`: The contact has no phone number. Give the destination number in `to`.\n- `DAILY_REPORT_RECIPIENTS_MISSING`: The daily report has no recipients. Add them in `settings.dailyReport.recipients` first.\n- `DEFINITION_OPTIONS_INVALID`: Only a definition whose value type is `option` has options; it needs at least one, and option keys must be unique.\n- `FACT_SUBJECT_MISMATCH`: The fact's subject (a contact or a conversation) does not match what its definition describes.\n- `FACT_VALUE_INVALID`: The value does not match the definition's value type, or names no active option.\n- `IMPORT_FILE_INVALID`: The import file is not valid base64 of UTF-8 text. Save the spreadsheet as CSV UTF-8 and try again.\n- `IP_NETWORK_INVALID`: The IP network is not a valid IPv4 or IPv6 address or CIDR block.\n- `PROFILE_VARIABLE_MISSING`: The profile's template parameters reference a variable that `variables` does not give.\n- `TIME_ZONE_UNKNOWN`: The time zone is not in the IANA time zone database.\n- `CAMPAIGN_HEADER_MISSING`: A recipient has no file that fits the template's header (a PDF for a document, JPEG or PNG for an image, MP4 for a video). Each recipient brings its own as `header`.\n- `CAMPAIGN_VARIABLE_MISSING`: A recipient has no value for a variable the template's parameters use. An empty value cannot be sent on WhatsApp.\n- `CHANNEL_AGENT_MISMATCH`: This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.\n- `TEMPLATE_HEADER_MISMATCH`: The header file does not fit the template: a document header takes a PDF, an image header a JPEG or PNG, a video header an MP4, and a template without a media header takes no file.\n- `TEMPLATE_HEADER_REQUIRED`: The template's header is a document, image or video: send its file with the template.\n- `TEMPLATE_PARAMETERS_MISMATCH`: The number of parameters does not match the variables of the template's body.\n- `TEMPLATE_UNSUPPORTED`: The template needs header text variables, a location header or button parameters, which cannot be sent yet.\n- `WHATSAPP_MEDIA_REJECTED`: WhatsApp could not use the attachment. Check its type and size limits.\n- `WHATSAPP_MESSAGE_UNSUPPORTED`: This message cannot be sent on WhatsApp: it allows one attachment per message, up to three buttons or ten list options, and text of up to 4096 characters.\n- `WHATSAPP_RECIPIENT_UNAVAILABLE`: The recipient cannot receive WhatsApp messages from this number.\n- `CALL_REJECTED`: The call could not be placed. Check the destination number and the line.\n- `PROVIDER_ACCOUNT_UNSUPPORTED`: This deployment cannot use provider accounts of this provider yet; the platform's own account is used instead.\n- `PROVIDER_CREDENTIALS_REJECTED`: The provider refused the provider account's credentials, or the account is not active there.\n- `VOICE_NOT_AVAILABLE`: This voice is not available. Choose one from `listVoices`.\n- `VOICE_NUMBER_NOT_OWNED`: The platform's telephony account does not own a voice-capable number with this value.\n- `AGENT_PROCEDURES_INVALID`: A procedure is incomplete, references a tool, document or procedure the Agent does not have, or breaks the structured step rules. `issues` says where.\n- `AGENT_WORKFLOW_INVALID`: The workflow breaks the graph rules, leaves a step without a way forward, or uses a tool this Agent cannot run there. `issues` says where.\n- `AGENT_SETTINGS_INVALID`: The settings do not apply to this Agent's modality, or two settings contradict each other.\n- `BULLETIN_PERIOD_INVALID`: A bulletin must end after it starts, and a new one must end in the future.\n- `INTEGRATION_PROCEDURE_UNAVAILABLE`: A procedure does not exist in this organization's connections, Raíz cannot run its connection, or the Agent is not a text Agent.\n- `INTEGRATION_TOOL_UNAVAILABLE`: An integration tool does not exist in this organization's connections, or Raíz cannot run it.\n- `KNOWLEDGE_DOCUMENT_UNAVAILABLE`: A Knowledge document does not exist in this organization.\n- `KNOWLEDGE_FILE_INVALID`: The file is not valid base64, exceeds the size limit or does not match its declared type.\n- `KNOWLEDGE_KIND_MISMATCH`: The change does not apply to this kind of Knowledge document.\n- `WEBSITE_NOT_APPROVED`: This website's origin is not approved for crawling in this deployment.\n- `WIDGET_VOICE_UNHEARD`: The voice message could not be understood. Record it again or write the message.\n- `PROVIDER_REJECTED`: The provider refused the request. Check the configuration and try again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["ASSIGNEE_UNAVAILABLE","CONTACT_UNREACHABLE","DAILY_REPORT_RECIPIENTS_MISSING","DEFINITION_OPTIONS_INVALID","FACT_SUBJECT_MISMATCH","FACT_VALUE_INVALID","IMPORT_FILE_INVALID","IP_NETWORK_INVALID","PROFILE_VARIABLE_MISSING","TIME_ZONE_UNKNOWN","CAMPAIGN_HEADER_MISSING","CAMPAIGN_VARIABLE_MISSING","CHANNEL_AGENT_MISMATCH","TEMPLATE_HEADER_MISMATCH","TEMPLATE_HEADER_REQUIRED","TEMPLATE_PARAMETERS_MISMATCH","TEMPLATE_UNSUPPORTED","WHATSAPP_MEDIA_REJECTED","WHATSAPP_MESSAGE_UNSUPPORTED","WHATSAPP_RECIPIENT_UNAVAILABLE","CALL_REJECTED","PROVIDER_ACCOUNT_UNSUPPORTED","PROVIDER_CREDENTIALS_REJECTED","VOICE_NOT_AVAILABLE","VOICE_NUMBER_NOT_OWNED","AGENT_PROCEDURES_INVALID","AGENT_WORKFLOW_INVALID","AGENT_SETTINGS_INVALID","BULLETIN_PERIOD_INVALID","INTEGRATION_PROCEDURE_UNAVAILABLE","INTEGRATION_TOOL_UNAVAILABLE","KNOWLEDGE_DOCUMENT_UNAVAILABLE","KNOWLEDGE_FILE_INVALID","KNOWLEDGE_KIND_MISMATCH","WEBSITE_NOT_APPROVED","WIDGET_VOICE_UNHEARD","PROVIDER_REJECTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteChannelUnprocessableContentError"}}}},"429":{"description":"- `RATE_LIMITED`: The request rate limit was exceeded. Try again later.\n- `WHATSAPP_ENGAGEMENT_LIMITED`: WhatsApp limited how many marketing messages this person receives. Wait at least a day before sending again.\n- `WHATSAPP_RATE_LIMITED`: WhatsApp is limiting messages from this number. Try again later.\n- `WIDGET_LIMIT_REACHED`: This widget reached its conversations or messages for today. It takes visitors again after 00:00 UTC.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED","WHATSAPP_ENGAGEMENT_LIMITED","WHATSAPP_RATE_LIMITED","WIDGET_LIMIT_REACHED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteChannelTooManyRequestsError"}}}},"500":{"description":"- `INTERNAL_ERROR`: The service could not complete the operation.\n- `OUTBOUND_CHANNEL_INTERNAL`: What became of the send could not be read back. Asking again never reaches the person twice.\n- `WHATSAPP_CHANNEL_INTERNAL`: The delivery outcome could not be read back. Asking again never sends the message twice.\n- `WHATSAPP_NOT_SENT`: The message was stored but never handed to WhatsApp. It was not sent.\n- `WIDGET_INTERNAL`: The request outcome could not be confirmed. Do not repeat it with a new identifier.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR","OUTBOUND_CHANNEL_INTERNAL","WHATSAPP_CHANNEL_INTERNAL","WHATSAPP_NOT_SENT","WIDGET_INTERNAL"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteChannelInternalServerErrorError"}}}},"502":{"description":"- `OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.\n- `WHATSAPP_DELIVERY_FAILED`: WhatsApp did not deliver the message.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN","WHATSAPP_DELIVERY_FAILED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteChannelBadGatewayError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `TEAM_UNAVAILABLE`: The organization's team cannot be read right now. Try again shortly.\n- `CAMPAIGN_HEADER_NOT_STORED`: The campaign and its recipients were saved, but some recipients' files were not. Send those recipients again with `addRecipients` on this campaign: their numbers are kept and their files stored. Do not create the campaign again.\n- `VOICE_UNAVAILABLE`: Calls are unavailable right now. Try again in a few minutes.\n- `FEEDBACK_PROPOSAL_UNAVAILABLE`: A usable improvement could not be prepared. The Agent has not changed. Try again later.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","TEAM_UNAVAILABLE","CAMPAIGN_HEADER_NOT_STORED","VOICE_UNAVAILABLE","FEEDBACK_PROPOSAL_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteChannelServiceUnavailableError"}}}},"504":{"description":"- `UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.\n- `WHATSAPP_DELIVERY_UNCONFIRMED`: WhatsApp never confirmed whether the message was sent. It was not sent again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT","WHATSAPP_DELIVERY_UNCONFIRMED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteChannelGatewayTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"channels","verb":"delete","id":"channelId","query":null},"x-fern-sdk-group-name":["raiz","channels"],"x-fern-sdk-method-name":"delete","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","properties":{"channelId":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["channelId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"deleteChannel","x-arbol-native-rpc":false}},"/v1/raiz/channels/{channelId}/renew-setup":{"post":{"operationId":"raiz.channels.renewSetup","summary":"Renew a WhatsApp setup link","description":"Issue a new setup link for a pending WhatsApp channel, returned in `setup`, when the previous one was lost or must go to someone else; the previous link stops working. The setup is checked first: if the business already connected its number, the channel is completed as `verify_channel` does and no link is returned. A channel that is not a pending WhatsApp number fails with INVALID_STATE or CHANNEL_TYPE_MISMATCH. Not an AI tool.","tags":["raiz"],"security":[{"arbolHuman":["raiz:channels:write"]},{"arbolMachine":["raiz:channels:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:channels:write"],"x-effect":"write","x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"channelId","in":"path","required":true,"description":"Channel id.","schema":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizChannelResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `CHANNEL_AGENT_REQUIRED`: Inbound traffic requires an assigned Agent. Outbound traffic requires one except on WhatsApp notification channels.\n- `CHANNEL_ENDPOINT_IN_USE`: Another channel already uses this number or endpoint.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CHANNEL_AGENT_REQUIRED","CHANNEL_ENDPOINT_IN_USE","CHANNEL_TYPE_MISMATCH","INVALID_STATE","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizRenewChannelSetupConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`PROVIDER_REJECTED`: The provider refused the request. Check the configuration and try again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["PROVIDER_REJECTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizProviderRejectedError"}}}},"429":{"description":"- `RATE_LIMITED`: The request rate limit was exceeded. Try again later.\n- `WHATSAPP_RATE_LIMITED`: WhatsApp is limiting messages from this number. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED","WHATSAPP_RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizRenewChannelSetupTooManyRequestsError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"channels","verb":"renewSetup","id":"channelId","query":null},"x-fern-sdk-group-name":["raiz","channels"],"x-fern-sdk-method-name":"renewSetup","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","description":"No fields.","additionalProperties":false,"properties":{"channelId":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["channelId"]},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"renewChannelSetup","x-arbol-native-rpc":false}},"/v1/raiz/channels/{channelId}/verify":{"post":{"operationId":"raiz.channels.verify","summary":"Verify a channel","description":"Check a channel with its provider and record the result. Call it after the business finishes the WhatsApp setup link: the pending channel becomes `active`. An expired setup link is replaced and returned in `setup`, ready to send to the person again. Fails with CHANNEL_ENDPOINT_IN_USE when another channel already holds that number; a failed check marks the channel `degraded`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:channels:write"]},{"arbolMachine":["raiz:channels:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:channels:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"channelId","in":"path","required":true,"description":"Channel id.","schema":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizVerifyChannelBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizChannelResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `CHANNEL_AGENT_REQUIRED`: Inbound traffic requires an assigned Agent. Outbound traffic requires one except on WhatsApp notification channels.\n- `CHANNEL_ENDPOINT_IN_USE`: Another channel already uses this number or endpoint.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CHANNEL_AGENT_REQUIRED","CHANNEL_ENDPOINT_IN_USE","CHANNEL_TYPE_MISMATCH","INVALID_STATE","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizVerifyChannelConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`PROVIDER_REJECTED`: The provider refused the request. Check the configuration and try again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["PROVIDER_REJECTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizProviderRejectedError"}}}},"429":{"description":"- `RATE_LIMITED`: The request rate limit was exceeded. Try again later.\n- `WHATSAPP_RATE_LIMITED`: WhatsApp is limiting messages from this number. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED","WHATSAPP_RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizVerifyChannelTooManyRequestsError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizVerifyChannelServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"channels","verb":"verify","id":"channelId","query":null},"x-fern-sdk-group-name":["raiz","channels"],"x-fern-sdk-method-name":"verify","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["channelId"],"properties":{"phone":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"phoneNumber":{"$ref":"#/components/schemas/RaizPhoneNumber","deprecated":true,"description":"Deprecated: use `phone`. Answered until 2027-01-28."},"channelId":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"verifyChannel","x-arbol-native-rpc":true}},"/v1/raiz/contacts":{"get":{"operationId":"raiz.contacts.list","summary":"List contacts","description":"Find people in the organization's contacts (People in the Dashboard), newest first by default. `q` matches names, channel profile names, usernames, phones, emails, identity documents and contact ids (ignoring accents, case and number formatting); `channelType`, `agentId`, `handling` (`ai`: the AI took part in one of their conversations; `team`: only people answered) and `lastContactedAfter` narrow it; `sort` is `created`, `name` or `last_contacted`. Each person carries their latest conversation; `count_contacts` counts every match. Start here to get a `contactId`; with several matches, ask which person is meant. Next: `get_contact`, or `list_conversations` with `contactId` for their conversations.","tags":["raiz"],"security":[{"arbolHuman":["raiz:contacts:read"]},{"arbolHuman":["raiz:contacts:write"]},{"arbolMachine":["raiz:contacts:read"]},{"arbolMachine":["raiz:contacts:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:contacts:read","raiz:contacts:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"agentId","in":"query","required":false,"description":"People with a conversation with this Agent.","schema":{"type":"string","description":"People with a conversation with this Agent.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"channelType","in":"query","required":false,"description":"Comma-separated channel types: people with a conversation on one of them.","schema":{"type":"string","description":"Comma-separated channel types: people with a conversation on one of them.","pattern":"^(voice|whatsapp|web)(,(voice|whatsapp|web))*$"}},{"name":"handling","in":"query","required":false,"description":"`ai`: people with a conversation the AI took part in. `team`: people whose conversations only the organization's people answered.","schema":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"}],"description":"`ai`: people with a conversation the AI took part in. `team`: people whose conversations only the organization's people answered."}},{"name":"lastContactedAfter","in":"query","required":false,"description":"Last in touch at or after this instant (RFC 3339).","schema":{"type":"string","description":"Last in touch at or after this instant (RFC 3339).","format":"date-time"}},{"name":"q","in":"query","required":false,"description":"Search by name (words in any order, ignoring accents and case), channel profile name, username, phone, email, identity document or contact id. Phone and document formatting is ignored; partial numbers match, including a phone without its country prefix. Searches saved identities, not people merely mentioned in messages.","schema":{"type":"string","description":"Search by name (words in any order, ignoring accents and case), channel profile name, username, phone, email, identity document or contact id. Phone and document formatting is ignored; partial numbers match, including a phone without its country prefix. Searches saved identities, not people merely mentioned in messages.","maxLength":200,"minLength":1}},{"name":"sort","in":"query","required":false,"description":"`created` (newest first), `name` (A–Z) or `last_contacted` (most recent first).","schema":{"anyOf":[{"type":"string","const":"created"},{"type":"string","const":"name"},{"type":"string","const":"last_contacted"}],"default":"created","description":"`created` (newest first), `name` (A–Z) or `last_contacted` (most recent first)."}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizContactPageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListContactsBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListContactsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"contacts","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","agentId":"string","channelType":"string","handling":"string","lastContactedAfter":"string","q":"string","sort":"string"}},"x-fern-sdk-group-name":["raiz","contacts"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"agentId":{"type":"string","description":"People with a conversation with this Agent.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelType":{"type":"string","description":"Comma-separated channel types: people with a conversation on one of them.","pattern":"^(voice|whatsapp|web)(,(voice|whatsapp|web))*$"},"handling":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"}],"description":"`ai`: people with a conversation the AI took part in. `team`: people whose conversations only the organization's people answered."},"lastContactedAfter":{"type":"string","description":"Last in touch at or after this instant (RFC 3339).","format":"date-time"},"q":{"type":"string","description":"Search by name (words in any order, ignoring accents and case), channel profile name, username, phone, email, identity document or contact id. Phone and document formatting is ignored; partial numbers match, including a phone without its country prefix. Searches saved identities, not people merely mentioned in messages.","maxLength":200,"minLength":1},"sort":{"anyOf":[{"type":"string","const":"created"},{"type":"string","const":"name"},{"type":"string","const":"last_contacted"}],"default":"created","description":"`created` (newest first), `name` (A–Z) or `last_contacted` (most recent first)."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listContacts","x-arbol-native-rpc":true},"post":{"operationId":"raiz.contacts.create","summary":"Create a contact","description":"Add a person with their contact points (phones, WhatsApp, emails) and identity documents. Search with `list_contacts` first to avoid duplicates: it fails with ADDRESS_IN_USE or IDENTIFIER_IN_USE when another contact already has one of them, and nothing is created. For many people at once, use `import_contacts`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:contacts:write"]},{"arbolMachine":["raiz:contacts:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:contacts:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateContactBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizContactResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateContactBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `ADDRESS_IN_USE`: Another contact in this organization already uses this address.\n- `IDENTIFIER_IN_USE`: Another contact in this organization already has this identity document.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["ADDRESS_IN_USE","IDENTIFIER_IN_USE","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateContactConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateContactServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"contacts","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","contacts"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"familyName":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}]},"givenName":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}]},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactIdentifierInput"},"description":"Identity documents. In an update, the complete new set: documents not listed are removed.","maxItems":5},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"points":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactPointInput"},"description":"Phones, emails and other addresses. In an update, the complete new set: points not listed are removed; listed ones keep their id and verification.","maxItems":20},"postalAddresses":{"type":"array","items":{"$ref":"#/components/schemas/RaizPostalAddress"},"maxItems":5},"summary":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createContact","x-arbol-native-rpc":true}},"/v1/raiz/contacts/{contactId}":{"get":{"operationId":"raiz.contacts.get","summary":"Get a contact","description":"Read one person: names, contact points (phones, WhatsApp, emails), identity documents, summary and current facts. Add `expand=timeline` for what happened to them (conversations, facts, changes, merges), newest first; continue with `timelineCursor` (and `timelineDirection`, `timelineLimit`). The id of a merged duplicate returns the contact that absorbed it. Read it before `update_contact` and send its `version` as `expectedVersion`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:contacts:read"]},{"arbolHuman":["raiz:contacts:write"]},{"arbolMachine":["raiz:contacts:read"]},{"arbolMachine":["raiz:contacts:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:contacts:read","raiz:contacts:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact id.","schema":{"type":"string","description":"Contact id.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"expand","in":"query","required":false,"description":"Related data to include, comma-separated: `timeline`.","schema":{"type":"string","description":"Related data to include, comma-separated: `timeline`.","examples":["timeline"],"pattern":"^(timeline)(,(timeline))*$"}},{"name":"timelineCursor","in":"query","required":false,"description":"Opaque cursor the `timeline` expansion's pageInfo returned; omit it for its first page.","schema":{"type":"string","description":"Opaque cursor the `timeline` expansion's pageInfo returned; omit it for its first page.","maxLength":4096}},{"name":"timelineDirection","in":"query","required":false,"description":"Direction to traverse the `timeline` expansion from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the `timeline` expansion from the supplied cursor.","default":"forward"}},{"name":"timelineLimit","in":"query","required":false,"description":"Maximum `timeline` items in one page. Defaults to 50.","schema":{"type":"integer","description":"Maximum `timeline` items in one page. Defaults to 50.","maximum":100,"minimum":1,"default":50}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizContactResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetContactBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetContactServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"contacts","verb":"get","id":"contactId","query":{"expand":"string","timelineCursor":"string","timelineDirection":"string","timelineLimit":"integer"}},"x-fern-sdk-group-name":["raiz","contacts"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"contactId":{"type":"string","description":"Contact id.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"expand":{"type":"string","description":"Related data to include, comma-separated: `timeline`.","examples":["timeline"],"pattern":"^(timeline)(,(timeline))*$"},"timelineCursor":{"type":"string","description":"Opaque cursor the `timeline` expansion's pageInfo returned; omit it for its first page.","maxLength":4096},"timelineDirection":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the `timeline` expansion from the supplied cursor.","default":"forward"},"timelineLimit":{"type":"integer","description":"Maximum `timeline` items in one page. Defaults to 50.","maximum":100,"minimum":1,"default":50}},"required":["contactId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getContact","x-arbol-native-rpc":true},"patch":{"operationId":"raiz.contacts.update","summary":"Update a contact","description":"Change a person's details. Omitted fields stay and `null` clears one. `points` and `identifiers`, when given, are the complete new sets: listed items keep their id and verification, missing ones are removed, so read the contact with `get_contact` first and send `expectedVersion`. Names and summaries written here are never overwritten by the AI.","tags":["raiz"],"security":[{"arbolHuman":["raiz:contacts:write"]},{"arbolMachine":["raiz:contacts:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:contacts:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"contactId","in":"path","required":true,"description":"Contact id.","schema":{"type":"string","description":"Contact id.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateContactBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizContactResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateContactBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `ADDRESS_IN_USE`: Another contact in this organization already uses this address.\n- `IDENTIFIER_IN_USE`: Another contact in this organization already has this identity document.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["ADDRESS_IN_USE","IDENTIFIER_IN_USE","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateContactConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateContactServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"contacts","verb":"update","id":"contactId","query":null},"x-fern-sdk-group-name":["raiz","contacts"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["contactId"],"properties":{"familyName":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}]},"givenName":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}]},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactIdentifierInput"},"description":"Identity documents. In an update, the complete new set: documents not listed are removed.","maxItems":5},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"points":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactPointInput"},"description":"Phones, emails and other addresses. In an update, the complete new set: points not listed are removed; listed ones keep their id and verification.","maxItems":20},"postalAddresses":{"type":"array","items":{"$ref":"#/components/schemas/RaizPostalAddress"},"maxItems":5},"summary":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"contactId":{"type":"string","description":"Contact id.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateContact","x-arbol-native-rpc":true}},"/v1/raiz/contacts/count":{"get":{"operationId":"raiz.contacts.count","summary":"Count contacts","description":"Count the people `list_contacts` returns for the same filters (`q`, `channelType`, `agentId`, `handling`, `lastContactedAfter`), up to 10,000: `capped` then says at least that many match. Use it to answer how many people match instead of paging through the list.","tags":["raiz"],"security":[{"arbolHuman":["raiz:contacts:read"]},{"arbolHuman":["raiz:contacts:write"]},{"arbolMachine":["raiz:contacts:read"]},{"arbolMachine":["raiz:contacts:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:contacts:read","raiz:contacts:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"agentId","in":"query","required":false,"description":"People with a conversation with this Agent.","schema":{"type":"string","description":"People with a conversation with this Agent.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"channelType","in":"query","required":false,"description":"Comma-separated channel types: people with a conversation on one of them.","schema":{"type":"string","description":"Comma-separated channel types: people with a conversation on one of them.","pattern":"^(voice|whatsapp|web)(,(voice|whatsapp|web))*$"}},{"name":"handling","in":"query","required":false,"description":"`ai`: people with a conversation the AI took part in. `team`: people whose conversations only the organization's people answered.","schema":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"}],"description":"`ai`: people with a conversation the AI took part in. `team`: people whose conversations only the organization's people answered."}},{"name":"lastContactedAfter","in":"query","required":false,"description":"Last in touch at or after this instant (RFC 3339).","schema":{"type":"string","description":"Last in touch at or after this instant (RFC 3339).","format":"date-time"}},{"name":"q","in":"query","required":false,"description":"Search by name (words in any order, ignoring accents and case), channel profile name, username, phone, email, identity document or contact id. Phone and document formatting is ignored; partial numbers match, including a phone without its country prefix. Searches saved identities, not people merely mentioned in messages.","schema":{"type":"string","description":"Search by name (words in any order, ignoring accents and case), channel profile name, username, phone, email, identity document or contact id. Phone and document formatting is ignored; partial numbers match, including a phone without its country prefix. Searches saved identities, not people merely mentioned in messages.","maxLength":200,"minLength":1}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCountResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCountContactsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"contacts","verb":"count","id":null,"query":{"agentId":"string","channelType":"string","handling":"string","lastContactedAfter":"string","q":"string"}},"x-fern-sdk-group-name":["raiz","contacts"],"x-fern-sdk-method-name":"count","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"agentId":{"type":"string","description":"People with a conversation with this Agent.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelType":{"type":"string","description":"Comma-separated channel types: people with a conversation on one of them.","pattern":"^(voice|whatsapp|web)(,(voice|whatsapp|web))*$"},"handling":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"}],"description":"`ai`: people with a conversation the AI took part in. `team`: people whose conversations only the organization's people answered."},"lastContactedAfter":{"type":"string","description":"Last in touch at or after this instant (RFC 3339).","format":"date-time"},"q":{"type":"string","description":"Search by name (words in any order, ignoring accents and case), channel profile name, username, phone, email, identity document or contact id. Phone and document formatting is ignored; partial numbers match, including a phone without its country prefix. Searches saved identities, not people merely mentioned in messages.","maxLength":200,"minLength":1}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"countContacts","x-arbol-native-rpc":true}},"/v1/raiz/contacts/import":{"post":{"operationId":"raiz.contacts.import","summary":"Import contacts from a CSV","description":"Add or update many people at once from a CSV, given as text (`csv`) or as a base64 file (`file`, up to 12 MB, about 100,000 rows). Rows matching an existing contact's phone, WhatsApp, email or document update that contact; the rest create new ones. Returns a task at once: follow it with `get_task` (`processedRows` of `totalRows`, then created, updated and rejected counts with the first 100 row errors). `cancel_task` stops it after the current batch; a failed import resumes with `retry_task` within 7 days. Fails with IMPORT_FILE_INVALID when the file is not UTF-8 and IMPORT_FILE_TOO_LARGE above 12 MB. Read the `import-contacts` skill for the columns.","tags":["raiz"],"security":[{"arbolHuman":["raiz:contacts:write"]},{"arbolMachine":["raiz:contacts:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:contacts:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":16777216,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizImportContactsBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizTaskResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"413":{"description":"- `REQUEST_TOO_LARGE`: The request exceeds the allowed size.\n- `IMPORT_FILE_TOO_LARGE`: The import file is larger than 12 MB. Split it into several files.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE","IMPORT_FILE_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizImportContactsContentTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`IMPORT_FILE_INVALID`: The import file is not valid base64 of UTF-8 text. Save the spreadsheet as CSV UTF-8 and try again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["IMPORT_FILE_INVALID"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizImportFileInvalidError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizImportContactsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"contacts","verb":"import","id":null,"query":null},"x-fern-sdk-group-name":["raiz","contacts"],"x-fern-sdk-method-name":"import","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"countryCode":{"type":"string","default":"CO","description":"Country assumed for phone numbers written without `+` and country code (ISO 3166-1 alpha-2).","pattern":"^[A-Z]{2}$"},"csv":{"type":"string","description":"The CSV as text. UTF-8 CSV with a header row (`,`, `;` or tab). Recognized columns: `given_name`, `family_name`, `phone`, `whatsapp`, `email`, `document_type`, `document_number`, `summary`; any other column is stored as metadata, or as a fact when its header is an active contact definition's key. Rows whose phone, WhatsApp, email or document matches an existing contact update that contact. Give `csv` or `file`, not both.","maxLength":12000000,"minLength":1},"file":{"type":"object","required":["data"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in standard base64, at most 12 MB decoded.","maxLength":16000000,"minLength":4}},"description":"The CSV file as read from disk, in base64, as Knowledge files are sent. UTF-8 CSV with a header row (`,`, `;` or tab). Recognized columns: `given_name`, `family_name`, `phone`, `whatsapp`, `email`, `document_type`, `document_number`, `summary`; any other column is stored as metadata, or as a fact when its header is an active contact definition's key. Rows whose phone, WhatsApp, email or document matches an existing contact update that contact.","additionalProperties":false}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"importContacts","x-arbol-native-rpc":true}},"/v1/raiz/conversations":{"get":{"operationId":"raiz.conversations.list","summary":"List conversations","description":"Find calls, WhatsApp chats and web chats. Filter by `contactId` (as counterpart or subject), `agentId`, `channelId`, `channelType`, `status`, `conversationDirection`, `origin`, `outcome`, `sentiment`, `handling` (`ai` or `team`: whether the AI takes part; `escalated`: handed to the team by the AI), `worker` (`ai` or `team`: who answers it now), `waitingOn` (`ai`, `team` or `contact`: who an open conversation waits for; `team` lists the cases a person has to answer), `assignee` (a member id, `me` or `none`: whose case it is), `unattended` (closed with a handoff nobody of the team answered), the Agent's tools (`toolName`, `toolStatus`: which tool it called and how the call ended), a captured fact (`factDefinition`, `factValue`), `assessment` (`failed` or `passed`), `toReview` (evaluated failures or unresolved handoffs; explicitly resolved successes leave this queue), length (`messagesMin`, `messagesMax`, `durationMin`, `durationMax`), `campaignId`, `profileId`, `requestedBy` and start time (`startedAfter`, `startedBefore`); `q` searches participant identities (names, profile names, usernames, phones, emails and documents), visible messages, titles, summaries and exact conversation references; `count_conversations` counts every match. Each item already carries its title, summary, outcome, sentiment, workers and tool calls (how many, how many failed, the latest failure), often enough to answer. `sort`: `started` (newest first), `last_message` (latest activity first) or `changed`, the feed of status, outcome and analysis changes, oldest first, that systems poll from a saved `pageInfo.nextCursor` (a deleted conversation appears once with `deletedAt`). Next: `get_conversation` for a transcript.","tags":["raiz"],"security":[{"arbolHuman":["raiz:conversations:read"]},{"arbolHuman":["raiz:conversations:write"]},{"arbolMachine":["raiz:conversations:read"]},{"arbolMachine":["raiz:conversations:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:conversations:read","raiz:conversations:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"agentId","in":"query","required":false,"description":"Agent id.","schema":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"campaignId","in":"query","required":false,"description":"Attempts of this campaign.","schema":{"type":"string","description":"Attempts of this campaign.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"channelId","in":"query","required":false,"description":"Channel id.","schema":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"channelType","in":"query","required":false,"description":"Comma-separated channel types.","schema":{"type":"string","description":"Comma-separated channel types.","pattern":"^(voice|whatsapp|web)(,(voice|whatsapp|web))*$"}},{"name":"contactId","in":"query","required":false,"description":"Conversations with this contact as counterpart or subject. A merged duplicate's id lists the survivor's.","schema":{"type":"string","description":"Conversations with this contact as counterpart or subject. A merged duplicate's id lists the survivor's.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"conversationDirection","in":"query","required":false,"description":"`inbound`: the contact started it; `outbound`: the organization did. It matches each conversation's `direction` (the query field `direction` pages the list).","schema":{"anyOf":[{"type":"string","const":"inbound"},{"type":"string","const":"outbound"}],"description":"`inbound`: the contact started it; `outbound`: the organization did. It matches each conversation's `direction` (the query field `direction` pages the list)."}},{"name":"handling","in":"query","required":false,"description":"`ai`: conversations the AI takes part in (calls and web chats, and WhatsApp conversations the AI handles or answered). `team`: WhatsApp conversations the organization's people handle on their own. `escalated`: conversations the AI handed to the team (a request it could not resolve, a contact who asked for a person, or a spent budget), also once the team gave them back to the AI; the ones `conversations_daily` counts in `escalatedCount`. A trial is not one, nor a conversation that opens while the AI is still paused for the number after an earlier handoff.","schema":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"},{"type":"string","const":"escalated"}],"description":"`ai`: conversations the AI takes part in (calls and web chats, and WhatsApp conversations the AI handles or answered). `team`: WhatsApp conversations the organization's people handle on their own. `escalated`: conversations the AI handed to the team (a request it could not resolve, a contact who asked for a person, or a spent budget), also once the team gave them back to the AI; the ones `conversations_daily` counts in `escalatedCount`. A trial is not one, nor a conversation that opens while the AI is still paused for the number after an earlier handoff."}},{"name":"worker","in":"query","required":false,"description":"Who works the conversation now. `ai`: calls and web chats, open WhatsApp conversations the AI answers (assigned to it and not paused), and closed ones the AI answered. `team`: open WhatsApp conversations the organization's people answer (not assigned to the AI, or paused) and closed ones they answered. Unlike `handling`, a conversation the AI answered and then handed to people is `team` while open.","schema":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"}],"description":"Who works the conversation now. `ai`: calls and web chats, open WhatsApp conversations the AI answers (assigned to it and not paused), and closed ones the AI answered. `team`: open WhatsApp conversations the organization's people answer (not assigned to the AI, or paused) and closed ones they answered. Unlike `handling`, a conversation the AI answered and then handed to people is `team` while open."}},{"name":"waitingOn","in":"query","required":false,"description":"Open conversations by who they wait for, as each conversation's `waitingOn` says: `ai`, `team` (the team's cases to answer) or `contact`. Closed conversations never match.","schema":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"},{"type":"string","const":"contact"}],"description":"Open conversations by who they wait for, as each conversation's `waitingOn` says: `ai`, `team` (the team's cases to answer) or `contact`. Closed conversations never match."}},{"name":"assignee","in":"query","required":false,"description":"Conversations by the case's owner: a member id, `me` (the person calling) or `none` (nobody has it). With `waitingOn=team`: one person's cases to answer, or the ones nobody took.","schema":{"type":"string","description":"Conversations by the case's owner: a member id, `me` (the person calling) or `none` (nobody has it). With `waitingOn=team`: one person's cases to answer, or the ones nobody took.","maxLength":255,"minLength":1}},{"name":"unattended","in":"query","required":false,"description":"`true`: conversations that closed for inactivity with a handoff nobody of the team answered.","schema":{"type":"boolean","description":"`true`: conversations that closed for inactivity with a handoff nobody of the team answered."}},{"name":"origin","in":"query","required":false,"description":"Comma-separated origins.","schema":{"type":"string","description":"Comma-separated origins.","pattern":"^(inbound|manual|api|campaign|import|test)(,(inbound|manual|api|campaign|import|test))*$"}},{"name":"outcome","in":"query","required":false,"description":"Comma-separated outcomes of the analysis.","schema":{"type":"string","description":"Comma-separated outcomes of the analysis.","pattern":"^(success|failure|unknown)(,(success|failure|unknown))*$"}},{"name":"metadataReference","in":"query","required":false,"description":"Conversations whose `metadata.reference` is exactly this value: the reference a caller gave `createConversation`, to find a conversation whose answer it did not receive.","schema":{"type":"string","description":"Conversations whose `metadata.reference` is exactly this value: the reference a caller gave `createConversation`, to find a conversation whose answer it did not receive.","maxLength":500,"minLength":1}},{"name":"profileId","in":"query","required":false,"description":"Conversations started from this communication profile.","schema":{"type":"string","description":"Conversations started from this communication profile.","examples":["prf_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^prf_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"q","in":"query","required":false,"description":"Search participant names, channel profile names, usernames, phones, emails, identity documents, visible message text, conversation ids and exact external references. Ignores accents/case and phone/document formatting. Also searches titles and summaries with Spanish stemming (quoted phrases, `or` and `-word` apply there). Attachments without stored transcription and tool payloads are not searched.","schema":{"type":"string","description":"Search participant names, channel profile names, usernames, phones, emails, identity documents, visible message text, conversation ids and exact external references. Ignores accents/case and phone/document formatting. Also searches titles and summaries with Spanish stemming (quoted phrases, `or` and `-word` apply there). Attachments without stored transcription and tool payloads are not searched.","maxLength":200,"minLength":1}},{"name":"requestedBy","in":"query","required":false,"description":"Conversations started with `createConversation` by this token subject (exact match): a machine client reads its own requests with `<client id>@clients`.","schema":{"type":"string","description":"Conversations started with `createConversation` by this token subject (exact match): a machine client reads its own requests with `<client id>@clients`.","maxLength":255,"minLength":1}},{"name":"startedAfter","in":"query","required":false,"description":"Started at or after this instant (RFC 3339).","schema":{"type":"string","description":"Started at or after this instant (RFC 3339).","format":"date-time"}},{"name":"startedBefore","in":"query","required":false,"description":"Started before this instant (RFC 3339).","schema":{"type":"string","description":"Started before this instant (RFC 3339).","format":"date-time"}},{"name":"status","in":"query","required":false,"description":"The status.","schema":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"closed"}]}},{"name":"period","in":"query","required":false,"description":"Started today or in the last 7, 30, 90 or 365 days including today, counting days in the organization's time zone as `get_report` does. A saved view keeps its period this way, so it moves with the calendar.","schema":{"anyOf":[{"type":"string","const":"today"},{"type":"string","const":"7d"},{"type":"string","const":"30d"},{"type":"string","const":"90d"},{"type":"string","const":"365d"}],"description":"Started today or in the last 7, 30, 90 or 365 days including today, counting days in the organization's time zone as `get_report` does. A saved view keeps its period this way, so it moves with the calendar."}},{"name":"sentiment","in":"query","required":false,"description":"Comma-separated sentiments of the analysis.","schema":{"type":"string","description":"Comma-separated sentiments of the analysis.","pattern":"^(positive|neutral|negative)(,(positive|neutral|negative))*$"}},{"name":"toolName","in":"query","required":false,"description":"Conversations where the Agent called this tool: its exact name, as the transcript's tool parts show it (`toolName`). `count_conversations` with `groupBy=tool` lists the names with how many conversations used each.","schema":{"type":"string","description":"Conversations where the Agent called this tool: its exact name, as the transcript's tool parts show it (`toolName`). `count_conversations` with `groupBy=tool` lists the names with how many conversations used each.","maxLength":128,"minLength":1}},{"name":"toolStatus","in":"query","required":false,"description":"With `toolName`, a call of that tool ended this way; alone, a call of any tool did (`failed`: conversations where a tool failed).","schema":{"anyOf":[{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"denied"}],"description":"With `toolName`, a call of that tool ended this way; alone, a call of any tool did (`failed`: conversations where a tool failed)."}},{"name":"factDefinition","in":"query","required":false,"description":"Conversations whose current fact of this definition (its `key`) is known: about the conversation, or about its contact for a contact definition. With `factValue`, equal to that value.","schema":{"type":"string","description":"Conversations whose current fact of this definition (its `key`) is known: about the conversation, or about its contact for a contact definition. With `factValue`, equal to that value.","pattern":"^[a-z][a-z0-9_]{0,63}$"}},{"name":"factValue","in":"query","required":false,"description":"With `factDefinition`: an option's key or label, a text (ignoring case), a number, a date (YYYY-MM-DD) or `true`/`false`.","schema":{"type":"string","description":"With `factDefinition`: an option's key or label, a text (ignoring case), a number, a date (YYYY-MM-DD) or `true`/`false`.","maxLength":500,"minLength":1}},{"name":"assessment","in":"query","required":false,"description":"The conversation's yes/no assessments: `failed`, at least one answered no; `passed`, at least one answered and every answered one yes.","schema":{"anyOf":[{"type":"string","const":"failed"},{"type":"string","const":"passed"}],"description":"The conversation's yes/no assessments: `failed`, at least one answered no; `passed`, at least one answered and every answered one yes."}},{"name":"toReview","in":"query","required":false,"description":"`true`: conversations to review, as `get_report` counts them in `toReviewCount`: evaluated failures or unresolved escalations. A success explicitly resolved by the team leaves this queue without erasing its escalation history. `false`: the others.","schema":{"type":"boolean","description":"`true`: conversations to review, as `get_report` counts them in `toReviewCount`: evaluated failures or unresolved escalations. A success explicitly resolved by the team leaves this queue without erasing its escalation history. `false`: the others."}},{"name":"messagesMin","in":"query","required":false,"description":"At least this many messages.","schema":{"type":"integer","description":"At least this many messages.","minimum":0}},{"name":"messagesMax","in":"query","required":false,"description":"At most this many messages.","schema":{"type":"integer","description":"At most this many messages.","minimum":0}},{"name":"durationMin","in":"query","required":false,"description":"Calls of at least this many seconds.","schema":{"type":"integer","description":"Calls of at least this many seconds.","minimum":0}},{"name":"durationMax","in":"query","required":false,"description":"Calls of at most this many seconds.","schema":{"type":"integer","description":"Calls of at most this many seconds.","minimum":0}},{"name":"sort","in":"query","required":false,"description":"`started` (newest first), `last_message` (most recent activity first) or `changed`: the changed feed, oldest change first, with deleted conversations as tombstones; a forward page's `pageInfo.nextCursor` is always a position to save and poll from.","schema":{"anyOf":[{"type":"string","const":"started"},{"type":"string","const":"last_message"},{"type":"string","const":"changed"}],"default":"started","description":"`started` (newest first), `last_message` (most recent activity first) or `changed`: the changed feed, oldest change first, with deleted conversations as tombstones; a forward page's `pageInfo.nextCursor` is always a position to save and poll from."}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizConversationPageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListConversationsBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListConversationsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"conversations","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","agentId":"string","campaignId":"string","channelId":"string","channelType":"string","contactId":"string","conversationDirection":"string","handling":"string","worker":"string","waitingOn":"string","assignee":"string","unattended":"boolean","origin":"string","outcome":"string","metadataReference":"string","profileId":"string","q":"string","requestedBy":"string","startedAfter":"string","startedBefore":"string","status":"string","period":"string","sentiment":"string","toolName":"string","toolStatus":"string","factDefinition":"string","factValue":"string","assessment":"string","toReview":"boolean","messagesMin":"integer","messagesMax":"integer","durationMin":"integer","durationMax":"integer","sort":"string"}},"x-fern-sdk-group-name":["raiz","conversations"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"campaignId":{"type":"string","description":"Attempts of this campaign.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelId":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelType":{"type":"string","description":"Comma-separated channel types.","pattern":"^(voice|whatsapp|web)(,(voice|whatsapp|web))*$"},"contactId":{"type":"string","description":"Conversations with this contact as counterpart or subject. A merged duplicate's id lists the survivor's.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"conversationDirection":{"anyOf":[{"type":"string","const":"inbound"},{"type":"string","const":"outbound"}],"description":"`inbound`: the contact started it; `outbound`: the organization did. It matches each conversation's `direction` (the query field `direction` pages the list)."},"handling":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"},{"type":"string","const":"escalated"}],"description":"`ai`: conversations the AI takes part in (calls and web chats, and WhatsApp conversations the AI handles or answered). `team`: WhatsApp conversations the organization's people handle on their own. `escalated`: conversations the AI handed to the team (a request it could not resolve, a contact who asked for a person, or a spent budget), also once the team gave them back to the AI; the ones `conversations_daily` counts in `escalatedCount`. A trial is not one, nor a conversation that opens while the AI is still paused for the number after an earlier handoff."},"worker":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"}],"description":"Who works the conversation now. `ai`: calls and web chats, open WhatsApp conversations the AI answers (assigned to it and not paused), and closed ones the AI answered. `team`: open WhatsApp conversations the organization's people answer (not assigned to the AI, or paused) and closed ones they answered. Unlike `handling`, a conversation the AI answered and then handed to people is `team` while open."},"waitingOn":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"},{"type":"string","const":"contact"}],"description":"Open conversations by who they wait for, as each conversation's `waitingOn` says: `ai`, `team` (the team's cases to answer) or `contact`. Closed conversations never match."},"assignee":{"type":"string","description":"Conversations by the case's owner: a member id, `me` (the person calling) or `none` (nobody has it). With `waitingOn=team`: one person's cases to answer, or the ones nobody took.","maxLength":255,"minLength":1},"unattended":{"type":"boolean","description":"`true`: conversations that closed for inactivity with a handoff nobody of the team answered."},"origin":{"type":"string","description":"Comma-separated origins.","pattern":"^(inbound|manual|api|campaign|import|test)(,(inbound|manual|api|campaign|import|test))*$"},"outcome":{"type":"string","description":"Comma-separated outcomes of the analysis.","pattern":"^(success|failure|unknown)(,(success|failure|unknown))*$"},"metadataReference":{"type":"string","description":"Conversations whose `metadata.reference` is exactly this value: the reference a caller gave `createConversation`, to find a conversation whose answer it did not receive.","maxLength":500,"minLength":1},"profileId":{"type":"string","description":"Conversations started from this communication profile.","examples":["prf_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^prf_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"q":{"type":"string","description":"Search participant names, channel profile names, usernames, phones, emails, identity documents, visible message text, conversation ids and exact external references. Ignores accents/case and phone/document formatting. Also searches titles and summaries with Spanish stemming (quoted phrases, `or` and `-word` apply there). Attachments without stored transcription and tool payloads are not searched.","maxLength":200,"minLength":1},"requestedBy":{"type":"string","description":"Conversations started with `createConversation` by this token subject (exact match): a machine client reads its own requests with `<client id>@clients`.","maxLength":255,"minLength":1},"startedAfter":{"type":"string","description":"Started at or after this instant (RFC 3339).","format":"date-time"},"startedBefore":{"type":"string","description":"Started before this instant (RFC 3339).","format":"date-time"},"status":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"closed"}],"description":"The status."},"period":{"anyOf":[{"type":"string","const":"today"},{"type":"string","const":"7d"},{"type":"string","const":"30d"},{"type":"string","const":"90d"},{"type":"string","const":"365d"}],"description":"Started today or in the last 7, 30, 90 or 365 days including today, counting days in the organization's time zone as `get_report` does. A saved view keeps its period this way, so it moves with the calendar."},"sentiment":{"type":"string","description":"Comma-separated sentiments of the analysis.","pattern":"^(positive|neutral|negative)(,(positive|neutral|negative))*$"},"toolName":{"type":"string","description":"Conversations where the Agent called this tool: its exact name, as the transcript's tool parts show it (`toolName`). `count_conversations` with `groupBy=tool` lists the names with how many conversations used each.","maxLength":128,"minLength":1},"toolStatus":{"anyOf":[{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"denied"}],"description":"With `toolName`, a call of that tool ended this way; alone, a call of any tool did (`failed`: conversations where a tool failed)."},"factDefinition":{"type":"string","description":"Conversations whose current fact of this definition (its `key`) is known: about the conversation, or about its contact for a contact definition. With `factValue`, equal to that value.","pattern":"^[a-z][a-z0-9_]{0,63}$"},"factValue":{"type":"string","description":"With `factDefinition`: an option's key or label, a text (ignoring case), a number, a date (YYYY-MM-DD) or `true`/`false`.","maxLength":500,"minLength":1},"assessment":{"anyOf":[{"type":"string","const":"failed"},{"type":"string","const":"passed"}],"description":"The conversation's yes/no assessments: `failed`, at least one answered no; `passed`, at least one answered and every answered one yes."},"toReview":{"type":"boolean","description":"`true`: conversations to review, as `get_report` counts them in `toReviewCount`: evaluated failures or unresolved escalations. A success explicitly resolved by the team leaves this queue without erasing its escalation history. `false`: the others."},"messagesMin":{"type":"integer","description":"At least this many messages.","minimum":0},"messagesMax":{"type":"integer","description":"At most this many messages.","minimum":0},"durationMin":{"type":"integer","description":"Calls of at least this many seconds.","minimum":0},"durationMax":{"type":"integer","description":"Calls of at most this many seconds.","minimum":0},"sort":{"anyOf":[{"type":"string","const":"started"},{"type":"string","const":"last_message"},{"type":"string","const":"changed"}],"default":"started","description":"`started` (newest first), `last_message` (most recent activity first) or `changed`: the changed feed, oldest change first, with deleted conversations as tombstones; a forward page's `pageInfo.nextCursor` is always a position to save and poll from."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listConversations","x-arbol-native-rpc":true}},"/v1/raiz/conversations/{conversationId}":{"get":{"operationId":"raiz.conversations.get","summary":"Get a conversation","description":"Read one conversation with its contact, Agent and channel, who works it (`workers`: each Agent and the team, and who answers now), title, summary, outcome, sentiment and current facts. Add `expand=messages` for the transcript, oldest first, each message with its author, the Agent's tool calls and quoted replies (continue with `messagesCursor`), `expand=recording` for a short-lived link to the call recording, and `expand=history` for the case's history: the handoff to the team, who took it or was given it, the return to the AI and the closing. `waitingOn` says who an open conversation waits for (the AI, the team or the contact) and `assigneeId` who has its case. Staff may also request `expand=diagnostics` for bounded live call-termination evidence; this additionally requires raiz:staff:operate and never changes the conversation. The `review-conversation` skill explains how to read and summarize one.","tags":["raiz"],"security":[{"arbolHuman":["raiz:conversations:read"]},{"arbolHuman":["raiz:conversations:write"]},{"arbolMachine":["raiz:conversations:read"]},{"arbolMachine":["raiz:conversations:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:conversations:read","raiz:conversations:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"conversationId","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"expand","in":"query","required":false,"description":"Related data to include, comma-separated: `messages`, `recording`, `diagnostics`, `history`.","schema":{"type":"string","description":"Related data to include, comma-separated: `messages`, `recording`, `diagnostics`, `history`.","examples":["messages,recording,diagnostics,history"],"pattern":"^(messages|recording|diagnostics|history)(,(messages|recording|diagnostics|history))*$"}},{"name":"messagesCursor","in":"query","required":false,"description":"Opaque cursor the `messages` expansion's pageInfo returned; omit it for its first page.","schema":{"type":"string","description":"Opaque cursor the `messages` expansion's pageInfo returned; omit it for its first page.","maxLength":4096}},{"name":"messagesDirection","in":"query","required":false,"description":"Direction to traverse the `messages` expansion from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the `messages` expansion from the supplied cursor.","default":"forward"}},{"name":"messagesLimit","in":"query","required":false,"description":"Maximum `messages` items in one page. Defaults to 100.","schema":{"type":"integer","description":"Maximum `messages` items in one page. Defaults to 100.","maximum":100,"minimum":1,"default":100}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizConversationResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetConversationBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetConversationServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"conversations","verb":"get","id":"conversationId","query":{"expand":"string","messagesCursor":"string","messagesDirection":"string","messagesLimit":"integer"}},"x-fern-sdk-group-name":["raiz","conversations"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"conversationId":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"expand":{"type":"string","description":"Related data to include, comma-separated: `messages`, `recording`, `diagnostics`, `history`.","examples":["messages,recording,diagnostics,history"],"pattern":"^(messages|recording|diagnostics|history)(,(messages|recording|diagnostics|history))*$"},"messagesCursor":{"type":"string","description":"Opaque cursor the `messages` expansion's pageInfo returned; omit it for its first page.","maxLength":4096},"messagesDirection":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the `messages` expansion from the supplied cursor.","default":"forward"},"messagesLimit":{"type":"integer","description":"Maximum `messages` items in one page. Defaults to 100.","maximum":100,"minimum":1,"default":100}},"required":["conversationId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getConversation","x-arbol-native-rpc":true},"patch":{"operationId":"raiz.conversations.update","summary":"Update a conversation","description":"Change a conversation's title, summary, metadata, contact or subject, give its case to a person of the organization (`assigneeId`: a member id from `listAssignees`, `me`, or `null` for nobody; its new owner is told by email), or close it (`status: closed`), which starts its analysis. A title or summary written here always wins over the generated one. A call closes by itself (CALL_IN_PROGRESS); a web chat cannot close while the Agent is replying (REPLY_IN_PROGRESS, retry shortly). On WhatsApp, `aiEnabled` activates or pauses AI only for this open conversation and leaves future episodes unchanged; `aiPaused` pauses or resumes the Agent for this person until their open conversation closes (one a person handles closes by itself after the Agent's `teamCloseAfterMinutes` without messages). Activating or resuming answers what the contact wrote after the last real answer, the team's or the Agent's (a wait notice is not one).","tags":["raiz"],"security":[{"arbolHuman":["raiz:conversations:write"]},{"arbolMachine":["raiz:conversations:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:conversations:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"conversationId","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateConversationBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizConversationResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateConversationBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `CALL_IN_PROGRESS`: A voice conversation closes by itself when its call ends; it cannot be closed by hand.\n- `CONVERSATION_OPEN`: The conversation is still open. Close it first.\n- `REPLY_IN_PROGRESS`: The Agent is still replying in this conversation. Try again once the reply is delivered.\n- `CHANNEL_NOT_READY`: The channel is not connected yet, or this kind of traffic is not enabled on it.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CALL_IN_PROGRESS","CONVERSATION_OPEN","REPLY_IN_PROGRESS","CHANNEL_NOT_READY","CHANNEL_TYPE_MISMATCH","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateConversationConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`ASSIGNEE_UNAVAILABLE`: That person cannot take conversations in this organization. `listAssignees` names who can.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["ASSIGNEE_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizAssigneeUnavailableError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `TEAM_UNAVAILABLE`: The organization's team cannot be read right now. Try again shortly.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","TEAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateConversationServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"conversations","verb":"update","id":"conversationId","query":null},"x-fern-sdk-group-name":["raiz","conversations"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["conversationId"],"properties":{"aiEnabled":{"type":"boolean","description":"WhatsApp only: activate or pause AI for this open conversation alone. Activation answers what the contact wrote after the last real answer, the team's or the Agent's (a wait notice is not one)."},"aiPaused":{"type":"boolean","description":"WhatsApp only: pause or resume automatic replies for this recipient until their open conversation closes. Resuming answers what the contact wrote in this conversation after the last real answer."},"assigneeId":{"anyOf":[{"type":"string","description":"Give the case to a person of the organization, by their member id as Arbol Account lists it (`listAssignees` names the people who can take one); `me` takes it for the person calling; `null` leaves it with nobody. Its new owner is told by email. History keeps who had it and who passed it on.","maxLength":255,"minLength":1},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","description":"Reassign the counterpart. Facts already recorded stay with the previous contact.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"status":{"type":"string","const":"closed","description":"Close the conversation (`closeReason: manual`); its analysis then runs. A closed conversation stays closed. Calls close by themselves when they end."},"subjectContactId":{"anyOf":[{"type":"string","description":"Reassign whom the conversation is about.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string","description":"A summary written by a person; the AI never replaces it. `null` clears it and keeps it clear.","maxLength":8000},{"type":"null"}]},"title":{"anyOf":[{"type":"string","description":"A title written by a person; it wins over the generated one, which never replaces it. `null` clears it and keeps it clear.","maxLength":200},{"type":"null"}]},"conversationId":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateConversation","x-arbol-native-rpc":true},"delete":{"operationId":"raiz.conversations.delete","summary":"Delete a conversation","description":"Delete a closed conversation: it leaves every list and report, its transcript and facts are kept, and the history records who deleted it. Not an AI tool.","tags":["raiz"],"security":[{"arbolHuman":["raiz:conversations:write"]},{"arbolMachine":["raiz:conversations:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:conversations:write"],"x-effect":"delete","x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"conversationId","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedObjectResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `CALL_IN_PROGRESS`: A voice conversation closes by itself when its call ends; it cannot be closed by hand.\n- `CONVERSATION_OPEN`: The conversation is still open. Close it first.\n- `REPLY_IN_PROGRESS`: The Agent is still replying in this conversation. Try again once the reply is delivered.\n- `CHANNEL_NOT_READY`: The channel is not connected yet, or this kind of traffic is not enabled on it.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CALL_IN_PROGRESS","CONVERSATION_OPEN","REPLY_IN_PROGRESS","CHANNEL_NOT_READY","CHANNEL_TYPE_MISMATCH","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDeleteConversationConflictError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"conversations","verb":"delete","id":"conversationId","query":null},"x-fern-sdk-group-name":["raiz","conversations"],"x-fern-sdk-method-name":"delete","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","properties":{"conversationId":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["conversationId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"deleteConversation","x-arbol-native-rpc":false}},"/v1/raiz/conversations/{conversationId}/continue":{"post":{"operationId":"raiz.conversations.continue","summary":"Give a conversation back to the AI to continue","description":"Give a WhatsApp conversation the AI handed to the team back to the AI, which continues the contact's pending request now, though the contact has not written. Review the resolved blocker first; use expectedVersion and expectedHandoffMessageId to refuse a stale decision with VERSION_CONFLICT. `note` preserves the evidence and remaining request for the Agent. Inside WhatsApp's 24-hour window the Agent writes at once; outside it, give `template`: Raíz sends that approved template in the conversation and the Agent answers when the person replies (WHATSAPP_WINDOW_CLOSED without one). Once per handoff, and for an AI handoff. Preserve explicit human requests, unresolved clinical/administrative decisions, identity conflicts and uncertain writes with the team. Not an AI tool: it makes the Agent write to a real person.","tags":["raiz"],"security":[{"arbolHuman":["raiz:conversations:write"]},{"arbolMachine":["raiz:conversations:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:conversations:write"],"x-effect":"write","x-max-body-bytes":8388608,"x-max-output-bytes":1048576,"parameters":[{"name":"conversationId","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizContinueConversationBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizConversationResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizContinueConversationBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"- `TEMPLATE_NOT_FOUND`: The template does not exist in this channel's WhatsApp Business Account.\n- `RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TEMPLATE_NOT_FOUND","RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizContinueConversationNotFoundError"}}}},"409":{"description":"- `CONVERSATION_CLOSED`: The conversation is closed. Start a new conversation to write again.\n- `CONVERSATION_NOT_HANDED_OFF`: The AI has not handed this conversation to the team, so there is nothing to give back to it.\n- `HANDOFF_ALREADY_CONTINUED`: This handoff was already given back to the AI to continue. It continues once per handoff; a new escalation can be given back again.\n- `CHANNEL_NOT_READY`: The channel is not connected yet, or this kind of traffic is not enabled on it.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `TEMPLATE_NOT_APPROVED`: The template is not approved for sending: it is pending review, rejected, paused or disabled.\n- `WHATSAPP_WINDOW_CLOSED`: More than 24 hours passed since the contact last wrote. Start the conversation with an approved template.\n- `CONTACT_SUPPRESSED`: A suppression rule of this organization forbids contacting this address.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CONVERSATION_CLOSED","CONVERSATION_NOT_HANDED_OFF","HANDOFF_ALREADY_CONTINUED","CHANNEL_NOT_READY","CHANNEL_TYPE_MISMATCH","TEMPLATE_NOT_APPROVED","WHATSAPP_WINDOW_CLOSED","CONTACT_SUPPRESSED","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizContinueConversationConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `TEMPLATE_HEADER_MISMATCH`: The header file does not fit the template: a document header takes a PDF, an image header a JPEG or PNG, a video header an MP4, and a template without a media header takes no file.\n- `TEMPLATE_HEADER_REQUIRED`: The template's header is a document, image or video: send its file with the template.\n- `TEMPLATE_PARAMETERS_MISMATCH`: The number of parameters does not match the variables of the template's body.\n- `TEMPLATE_UNSUPPORTED`: The template needs header text variables, a location header or button parameters, which cannot be sent yet.\n- `WHATSAPP_MESSAGE_UNSUPPORTED`: This message cannot be sent on WhatsApp: it allows one attachment per message, up to three buttons or ten list options, and text of up to 4096 characters.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TEMPLATE_HEADER_MISMATCH","TEMPLATE_HEADER_REQUIRED","TEMPLATE_PARAMETERS_MISMATCH","TEMPLATE_UNSUPPORTED","WHATSAPP_MESSAGE_UNSUPPORTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizContinueConversationUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizContinueConversationServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"conversations","verb":"continue","id":"conversationId","query":null},"x-fern-sdk-group-name":["raiz","conversations"],"x-fern-sdk-method-name":"continue","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","required":["conversationId"],"properties":{"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"expectedHandoffMessageId":{"type":"string","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$","description":"The humanReviewMessageId just reviewed by the operator. A different current handoff refuses the continuation with VERSION_CONFLICT, without resuming or sending anything. Use with expectedVersion after checking that the original blocker is resolved."},"note":{"type":"string","description":"A short internal note about the resolved blocker, authoritative evidence, confirmed appointments and any remaining request. A note does not establish coverage, clinical equivalence, consent or a booking. Preserve explicit human requests and unresolved clinical decisions, identity conflicts or uncertain writes with the team.","maxLength":500},"template":{"type":"object","required":["language","name"],"properties":{"header":{"$ref":"#/components/schemas/RaizTemplateHeaderFile","description":"The file shown above the text of a template whose header is a document, image or video, different on every send (an appointment's receipt, a ticket). Required by such a template, refused by any other."},"language":{"type":"string","maxLength":15,"minLength":2},"name":{"type":"string","maxLength":512,"minLength":1},"parameters":{"type":"array","items":{"type":"string","maxLength":1024},"description":"Body parameters, in order.","maxItems":20}},"additionalProperties":false,"description":"An approved template of the conversation's channel that Raíz sends in this conversation now, from the team. With it the Agent does not write now: it answers when the person replies, reading `note`, so the conversation can be given back outside WhatsApp's 24-hour window. Without it the Agent continues at once, and the person must have written in the last 24 hours (WHATSAPP_WINDOW_CLOSED). Follow the template's `deliveryStatus` in the transcript."},"conversationId":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"continueConversation","x-arbol-native-rpc":true}},"/v1/raiz/conversations/{conversationId}/send":{"post":{"operationId":"raiz.conversations.send","summary":"Send a message","description":"Write in an open conversation. In a web conversation you write as the visitor (`role: contact`) and the Agent answers in the background; read the transcript to see the reply. On WhatsApp and in a call you write as a person of the organization (`role: operator`): the message is delivered on the channel and `deliveryStatus` follows it, and on WhatsApp it pauses the Agent for this person until resumed. On WhatsApp a message may carry one image or document (base64, up to 5 MiB) with the text as its caption; elsewhere a file fails with CHANNEL_TYPE_MISMATCH. On WhatsApp `template` sends an approved template of the channel instead, the only message WhatsApp delivers when the person has not written in the last 24 hours; a refused template sends nothing (the TEMPLATE_* codes). Not an AI tool.","tags":["raiz"],"security":[{"arbolHuman":["raiz:conversations:write"]},{"arbolMachine":["raiz:conversations:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:conversations:write"],"x-effect":"write","x-max-body-bytes":8388608,"x-max-output-bytes":1048576,"parameters":[{"name":"conversationId","in":"path","required":true,"description":"Conversation id.","schema":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSendMessageBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizMessageResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"- `TEMPLATE_NOT_FOUND`: The template does not exist in this channel's WhatsApp Business Account.\n- `RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TEMPLATE_NOT_FOUND","RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSendMessageNotFoundError"}}}},"409":{"description":"- `CONVERSATION_CLOSED`: The conversation is closed. Start a new conversation to write again.\n- `CHANNEL_NOT_READY`: The channel is not connected yet, or this kind of traffic is not enabled on it.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `TEMPLATE_NOT_APPROVED`: The template is not approved for sending: it is pending review, rejected, paused or disabled.\n- `WHATSAPP_AI_PAUSED`: Automatic replies are paused or this conversation can no longer receive them.\n- `WHATSAPP_MARKETING_STOPPED`: The contact chose to stop receiving marketing messages from this business.\n- `WHATSAPP_WINDOW_CLOSED`: More than 24 hours passed since the contact last wrote. Start the conversation with an approved template.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.\n- `CONTACT_SUPPRESSED`: A suppression rule of this organization forbids contacting this address.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CONVERSATION_CLOSED","CHANNEL_NOT_READY","CHANNEL_TYPE_MISMATCH","TEMPLATE_NOT_APPROVED","WHATSAPP_AI_PAUSED","WHATSAPP_MARKETING_STOPPED","WHATSAPP_WINDOW_CLOSED","INVALID_STATE","CONTACT_SUPPRESSED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSendMessageConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `TEMPLATE_HEADER_MISMATCH`: The header file does not fit the template: a document header takes a PDF, an image header a JPEG or PNG, a video header an MP4, and a template without a media header takes no file.\n- `TEMPLATE_HEADER_REQUIRED`: The template's header is a document, image or video: send its file with the template.\n- `TEMPLATE_PARAMETERS_MISMATCH`: The number of parameters does not match the variables of the template's body.\n- `TEMPLATE_UNSUPPORTED`: The template needs header text variables, a location header or button parameters, which cannot be sent yet.\n- `WHATSAPP_MEDIA_REJECTED`: WhatsApp could not use the attachment. Check its type and size limits.\n- `WHATSAPP_MESSAGE_UNSUPPORTED`: This message cannot be sent on WhatsApp: it allows one attachment per message, up to three buttons or ten list options, and text of up to 4096 characters.\n- `WHATSAPP_RECIPIENT_UNAVAILABLE`: The recipient cannot receive WhatsApp messages from this number.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TEMPLATE_HEADER_MISMATCH","TEMPLATE_HEADER_REQUIRED","TEMPLATE_PARAMETERS_MISMATCH","TEMPLATE_UNSUPPORTED","WHATSAPP_MEDIA_REJECTED","WHATSAPP_MESSAGE_UNSUPPORTED","WHATSAPP_RECIPIENT_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSendMessageUnprocessableContentError"}}}},"429":{"description":"- `RATE_LIMITED`: The request rate limit was exceeded. Try again later.\n- `WHATSAPP_RATE_LIMITED`: WhatsApp is limiting messages from this number. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED","WHATSAPP_RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSendMessageTooManyRequestsError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"- `OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.\n- `WHATSAPP_DELIVERY_FAILED`: WhatsApp did not deliver the message.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN","WHATSAPP_DELIVERY_FAILED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSendMessageBadGatewayError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"conversations","verb":"send","id":"conversationId","query":null},"x-fern-sdk-group-name":["raiz","conversations"],"x-fern-sdk-method-name":"send","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","required":["conversationId"],"properties":{"parts":{"type":"array","items":{"anyOf":[{"type":"object","required":["text","type"],"properties":{"format":{"anyOf":[{"type":"string","const":"plain"},{"type":"string","const":"markdown"}],"default":"plain"},"text":{"type":"string","maxLength":4096,"minLength":1},"type":{"type":"string","const":"text"}},"additionalProperties":false},{"type":"object","required":["data","mediaType","type"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in base64, at most 5242880 bytes decoded.","maxLength":6990508,"minLength":4},"fileName":{"type":"string","description":"The name the contact sees for a document.","maxLength":240,"minLength":1,"pattern":"^[^/\\\\\\u0000-\\u001f\\u007f]+$"},"mediaType":{"anyOf":[{"type":"string","const":"image/jpeg"},{"type":"string","const":"image/png"},{"type":"string","const":"application/pdf"},{"type":"string","const":"text/plain"},{"type":"string","const":"application/msword"},{"type":"string","const":"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{"type":"string","const":"application/vnd.ms-excel"},{"type":"string","const":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{"type":"string","const":"application/vnd.ms-powerpoint"},{"type":"string","const":"application/vnd.openxmlformats-officedocument.presentationml.presentation"}],"description":"JPEG and PNG are sent as an image; the others as a document."},"type":{"type":"string","const":"file"}},"description":"A private web or WhatsApp attachment. WhatsApp accepts one per message, with the text as its caption; web accepts multiple within the combined 5 MiB budget.","additionalProperties":false}]},"description":"The message's parts: text and, on WhatsApp, at most one file, whose caption is the text. Give `parts` or `template`.","maxItems":10,"minItems":1},"template":{"type":"object","required":["language","name"],"properties":{"header":{"$ref":"#/components/schemas/RaizTemplateHeaderFile","description":"The file shown above the text of a template whose header is a document, image or video, different on every send (an appointment's receipt, a ticket). Required by such a template, refused by any other."},"language":{"type":"string","maxLength":15,"minLength":2},"name":{"type":"string","maxLength":512,"minLength":1},"parameters":{"type":"array","items":{"type":"string","maxLength":1024},"description":"Body parameters, in order.","maxItems":20}},"additionalProperties":false,"description":"WhatsApp only: send an approved template of the conversation's channel instead of `parts`, the one message WhatsApp delivers when the person has not written in the last 24 hours. Like any message of the team, it pauses the Agent for this person; to have the Agent answer their reply, give the conversation back with `continueConversation` and its `template` instead."},"replyToMessageId":{"type":"string","description":"A message of the same conversation to quote.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"conversationId":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"sendMessage","x-arbol-native-rpc":false}},"/v1/raiz/conversations/count":{"get":{"operationId":"raiz.conversations.count","summary":"Count conversations","description":"Count the conversations `list_conversations` returns for the same filters (every filter it takes, without `sort`), up to 10,000: `capped` then says at least that many match. `averageMessageCount` and `averageDurationSeconds` are their average length. `groupBy` also divides them, largest group first, each with its outcomes: by `outcome`, `status`, `channel`, `agent`, `sentiment`, `waitingOn` (who each open conversation waits for: the AI, the team or the contact), `tool` (which Agent tools they used, and in how many a tool failed), `toolError` (why calls of `toolName` failed) or `fact:<definition key>` (such as the reason for contact). Use it to answer how many conversations match, or how they divide, instead of paging through the list; for volumes per day use `get_report`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:conversations:read"]},{"arbolHuman":["raiz:conversations:write"]},{"arbolMachine":["raiz:conversations:read"]},{"arbolMachine":["raiz:conversations:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:conversations:read","raiz:conversations:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"agentId","in":"query","required":false,"description":"Agent id.","schema":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"campaignId","in":"query","required":false,"description":"Attempts of this campaign.","schema":{"type":"string","description":"Attempts of this campaign.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"channelId","in":"query","required":false,"description":"Channel id.","schema":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"channelType","in":"query","required":false,"description":"Comma-separated channel types.","schema":{"type":"string","description":"Comma-separated channel types.","pattern":"^(voice|whatsapp|web)(,(voice|whatsapp|web))*$"}},{"name":"contactId","in":"query","required":false,"description":"Conversations with this contact as counterpart or subject. A merged duplicate's id lists the survivor's.","schema":{"type":"string","description":"Conversations with this contact as counterpart or subject. A merged duplicate's id lists the survivor's.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"conversationDirection","in":"query","required":false,"description":"`inbound`: the contact started it; `outbound`: the organization did. It matches each conversation's `direction` (the query field `direction` pages the list).","schema":{"anyOf":[{"type":"string","const":"inbound"},{"type":"string","const":"outbound"}],"description":"`inbound`: the contact started it; `outbound`: the organization did. It matches each conversation's `direction` (the query field `direction` pages the list)."}},{"name":"handling","in":"query","required":false,"description":"`ai`: conversations the AI takes part in (calls and web chats, and WhatsApp conversations the AI handles or answered). `team`: WhatsApp conversations the organization's people handle on their own. `escalated`: conversations the AI handed to the team (a request it could not resolve, a contact who asked for a person, or a spent budget), also once the team gave them back to the AI; the ones `conversations_daily` counts in `escalatedCount`. A trial is not one, nor a conversation that opens while the AI is still paused for the number after an earlier handoff.","schema":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"},{"type":"string","const":"escalated"}],"description":"`ai`: conversations the AI takes part in (calls and web chats, and WhatsApp conversations the AI handles or answered). `team`: WhatsApp conversations the organization's people handle on their own. `escalated`: conversations the AI handed to the team (a request it could not resolve, a contact who asked for a person, or a spent budget), also once the team gave them back to the AI; the ones `conversations_daily` counts in `escalatedCount`. A trial is not one, nor a conversation that opens while the AI is still paused for the number after an earlier handoff."}},{"name":"worker","in":"query","required":false,"description":"Who works the conversation now. `ai`: calls and web chats, open WhatsApp conversations the AI answers (assigned to it and not paused), and closed ones the AI answered. `team`: open WhatsApp conversations the organization's people answer (not assigned to the AI, or paused) and closed ones they answered. Unlike `handling`, a conversation the AI answered and then handed to people is `team` while open.","schema":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"}],"description":"Who works the conversation now. `ai`: calls and web chats, open WhatsApp conversations the AI answers (assigned to it and not paused), and closed ones the AI answered. `team`: open WhatsApp conversations the organization's people answer (not assigned to the AI, or paused) and closed ones they answered. Unlike `handling`, a conversation the AI answered and then handed to people is `team` while open."}},{"name":"waitingOn","in":"query","required":false,"description":"Open conversations by who they wait for, as each conversation's `waitingOn` says: `ai`, `team` (the team's cases to answer) or `contact`. Closed conversations never match.","schema":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"},{"type":"string","const":"contact"}],"description":"Open conversations by who they wait for, as each conversation's `waitingOn` says: `ai`, `team` (the team's cases to answer) or `contact`. Closed conversations never match."}},{"name":"assignee","in":"query","required":false,"description":"Conversations by the case's owner: a member id, `me` (the person calling) or `none` (nobody has it). With `waitingOn=team`: one person's cases to answer, or the ones nobody took.","schema":{"type":"string","description":"Conversations by the case's owner: a member id, `me` (the person calling) or `none` (nobody has it). With `waitingOn=team`: one person's cases to answer, or the ones nobody took.","maxLength":255,"minLength":1}},{"name":"unattended","in":"query","required":false,"description":"`true`: conversations that closed for inactivity with a handoff nobody of the team answered.","schema":{"type":"boolean","description":"`true`: conversations that closed for inactivity with a handoff nobody of the team answered."}},{"name":"origin","in":"query","required":false,"description":"Comma-separated origins.","schema":{"type":"string","description":"Comma-separated origins.","pattern":"^(inbound|manual|api|campaign|import|test)(,(inbound|manual|api|campaign|import|test))*$"}},{"name":"outcome","in":"query","required":false,"description":"Comma-separated outcomes of the analysis.","schema":{"type":"string","description":"Comma-separated outcomes of the analysis.","pattern":"^(success|failure|unknown)(,(success|failure|unknown))*$"}},{"name":"metadataReference","in":"query","required":false,"description":"Conversations whose `metadata.reference` is exactly this value: the reference a caller gave `createConversation`, to find a conversation whose answer it did not receive.","schema":{"type":"string","description":"Conversations whose `metadata.reference` is exactly this value: the reference a caller gave `createConversation`, to find a conversation whose answer it did not receive.","maxLength":500,"minLength":1}},{"name":"profileId","in":"query","required":false,"description":"Conversations started from this communication profile.","schema":{"type":"string","description":"Conversations started from this communication profile.","examples":["prf_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^prf_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"q","in":"query","required":false,"description":"Search participant names, channel profile names, usernames, phones, emails, identity documents, visible message text, conversation ids and exact external references. Ignores accents/case and phone/document formatting. Also searches titles and summaries with Spanish stemming (quoted phrases, `or` and `-word` apply there). Attachments without stored transcription and tool payloads are not searched.","schema":{"type":"string","description":"Search participant names, channel profile names, usernames, phones, emails, identity documents, visible message text, conversation ids and exact external references. Ignores accents/case and phone/document formatting. Also searches titles and summaries with Spanish stemming (quoted phrases, `or` and `-word` apply there). Attachments without stored transcription and tool payloads are not searched.","maxLength":200,"minLength":1}},{"name":"requestedBy","in":"query","required":false,"description":"Conversations started with `createConversation` by this token subject (exact match): a machine client reads its own requests with `<client id>@clients`.","schema":{"type":"string","description":"Conversations started with `createConversation` by this token subject (exact match): a machine client reads its own requests with `<client id>@clients`.","maxLength":255,"minLength":1}},{"name":"startedAfter","in":"query","required":false,"description":"Started at or after this instant (RFC 3339).","schema":{"type":"string","description":"Started at or after this instant (RFC 3339).","format":"date-time"}},{"name":"startedBefore","in":"query","required":false,"description":"Started before this instant (RFC 3339).","schema":{"type":"string","description":"Started before this instant (RFC 3339).","format":"date-time"}},{"name":"status","in":"query","required":false,"description":"The status.","schema":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"closed"}]}},{"name":"period","in":"query","required":false,"description":"Started today or in the last 7, 30, 90 or 365 days including today, counting days in the organization's time zone as `get_report` does. A saved view keeps its period this way, so it moves with the calendar.","schema":{"anyOf":[{"type":"string","const":"today"},{"type":"string","const":"7d"},{"type":"string","const":"30d"},{"type":"string","const":"90d"},{"type":"string","const":"365d"}],"description":"Started today or in the last 7, 30, 90 or 365 days including today, counting days in the organization's time zone as `get_report` does. A saved view keeps its period this way, so it moves with the calendar."}},{"name":"sentiment","in":"query","required":false,"description":"Comma-separated sentiments of the analysis.","schema":{"type":"string","description":"Comma-separated sentiments of the analysis.","pattern":"^(positive|neutral|negative)(,(positive|neutral|negative))*$"}},{"name":"toolName","in":"query","required":false,"description":"Conversations where the Agent called this tool: its exact name, as the transcript's tool parts show it (`toolName`). `count_conversations` with `groupBy=tool` lists the names with how many conversations used each.","schema":{"type":"string","description":"Conversations where the Agent called this tool: its exact name, as the transcript's tool parts show it (`toolName`). `count_conversations` with `groupBy=tool` lists the names with how many conversations used each.","maxLength":128,"minLength":1}},{"name":"toolStatus","in":"query","required":false,"description":"With `toolName`, a call of that tool ended this way; alone, a call of any tool did (`failed`: conversations where a tool failed).","schema":{"anyOf":[{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"denied"}],"description":"With `toolName`, a call of that tool ended this way; alone, a call of any tool did (`failed`: conversations where a tool failed)."}},{"name":"factDefinition","in":"query","required":false,"description":"Conversations whose current fact of this definition (its `key`) is known: about the conversation, or about its contact for a contact definition. With `factValue`, equal to that value.","schema":{"type":"string","description":"Conversations whose current fact of this definition (its `key`) is known: about the conversation, or about its contact for a contact definition. With `factValue`, equal to that value.","pattern":"^[a-z][a-z0-9_]{0,63}$"}},{"name":"factValue","in":"query","required":false,"description":"With `factDefinition`: an option's key or label, a text (ignoring case), a number, a date (YYYY-MM-DD) or `true`/`false`.","schema":{"type":"string","description":"With `factDefinition`: an option's key or label, a text (ignoring case), a number, a date (YYYY-MM-DD) or `true`/`false`.","maxLength":500,"minLength":1}},{"name":"assessment","in":"query","required":false,"description":"The conversation's yes/no assessments: `failed`, at least one answered no; `passed`, at least one answered and every answered one yes.","schema":{"anyOf":[{"type":"string","const":"failed"},{"type":"string","const":"passed"}],"description":"The conversation's yes/no assessments: `failed`, at least one answered no; `passed`, at least one answered and every answered one yes."}},{"name":"toReview","in":"query","required":false,"description":"`true`: conversations to review, as `get_report` counts them in `toReviewCount`: evaluated failures or unresolved escalations. A success explicitly resolved by the team leaves this queue without erasing its escalation history. `false`: the others.","schema":{"type":"boolean","description":"`true`: conversations to review, as `get_report` counts them in `toReviewCount`: evaluated failures or unresolved escalations. A success explicitly resolved by the team leaves this queue without erasing its escalation history. `false`: the others."}},{"name":"messagesMin","in":"query","required":false,"description":"At least this many messages.","schema":{"type":"integer","description":"At least this many messages.","minimum":0}},{"name":"messagesMax","in":"query","required":false,"description":"At most this many messages.","schema":{"type":"integer","description":"At most this many messages.","minimum":0}},{"name":"durationMin","in":"query","required":false,"description":"Calls of at least this many seconds.","schema":{"type":"integer","description":"Calls of at least this many seconds.","minimum":0}},{"name":"durationMax","in":"query","required":false,"description":"Calls of at most this many seconds.","schema":{"type":"integer","description":"Calls of at most this many seconds.","minimum":0}},{"name":"groupBy","in":"query","required":false,"description":"`outcome`, `status`, `channel` (type), `agent`, `sentiment`, `waitingOn` (who each open conversation waits for: `ai`, `team` or `contact`; null for the closed ones), `tool` (each Agent tool and the conversations that used it; null for those that used none), `toolError` (failed calls, of `toolName` when given, by error) or `fact:<definition key>` (the current value of that definition, such as the reason for contact).","schema":{"type":"string","description":"`outcome`, `status`, `channel` (type), `agent`, `sentiment`, `waitingOn` (who each open conversation waits for: `ai`, `team` or `contact`; null for the closed ones), `tool` (each Agent tool and the conversations that used it; null for those that used none), `toolError` (failed calls, of `toolName` when given, by error) or `fact:<definition key>` (the current value of that definition, such as the reason for contact).","pattern":"^(outcome|status|channel|agent|sentiment|waitingOn|tool|toolError|fact:[a-z][a-z0-9_]{0,63})$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizConversationCountResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCountConversationsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"conversations","verb":"count","id":null,"query":{"agentId":"string","campaignId":"string","channelId":"string","channelType":"string","contactId":"string","conversationDirection":"string","handling":"string","worker":"string","waitingOn":"string","assignee":"string","unattended":"boolean","origin":"string","outcome":"string","metadataReference":"string","profileId":"string","q":"string","requestedBy":"string","startedAfter":"string","startedBefore":"string","status":"string","period":"string","sentiment":"string","toolName":"string","toolStatus":"string","factDefinition":"string","factValue":"string","assessment":"string","toReview":"boolean","messagesMin":"integer","messagesMax":"integer","durationMin":"integer","durationMax":"integer","groupBy":"string"}},"x-fern-sdk-group-name":["raiz","conversations"],"x-fern-sdk-method-name":"count","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"campaignId":{"type":"string","description":"Attempts of this campaign.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelId":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelType":{"type":"string","description":"Comma-separated channel types.","pattern":"^(voice|whatsapp|web)(,(voice|whatsapp|web))*$"},"contactId":{"type":"string","description":"Conversations with this contact as counterpart or subject. A merged duplicate's id lists the survivor's.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"conversationDirection":{"anyOf":[{"type":"string","const":"inbound"},{"type":"string","const":"outbound"}],"description":"`inbound`: the contact started it; `outbound`: the organization did. It matches each conversation's `direction` (the query field `direction` pages the list)."},"handling":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"},{"type":"string","const":"escalated"}],"description":"`ai`: conversations the AI takes part in (calls and web chats, and WhatsApp conversations the AI handles or answered). `team`: WhatsApp conversations the organization's people handle on their own. `escalated`: conversations the AI handed to the team (a request it could not resolve, a contact who asked for a person, or a spent budget), also once the team gave them back to the AI; the ones `conversations_daily` counts in `escalatedCount`. A trial is not one, nor a conversation that opens while the AI is still paused for the number after an earlier handoff."},"worker":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"}],"description":"Who works the conversation now. `ai`: calls and web chats, open WhatsApp conversations the AI answers (assigned to it and not paused), and closed ones the AI answered. `team`: open WhatsApp conversations the organization's people answer (not assigned to the AI, or paused) and closed ones they answered. Unlike `handling`, a conversation the AI answered and then handed to people is `team` while open."},"waitingOn":{"anyOf":[{"type":"string","const":"ai"},{"type":"string","const":"team"},{"type":"string","const":"contact"}],"description":"Open conversations by who they wait for, as each conversation's `waitingOn` says: `ai`, `team` (the team's cases to answer) or `contact`. Closed conversations never match."},"assignee":{"type":"string","description":"Conversations by the case's owner: a member id, `me` (the person calling) or `none` (nobody has it). With `waitingOn=team`: one person's cases to answer, or the ones nobody took.","maxLength":255,"minLength":1},"unattended":{"type":"boolean","description":"`true`: conversations that closed for inactivity with a handoff nobody of the team answered."},"origin":{"type":"string","description":"Comma-separated origins.","pattern":"^(inbound|manual|api|campaign|import|test)(,(inbound|manual|api|campaign|import|test))*$"},"outcome":{"type":"string","description":"Comma-separated outcomes of the analysis.","pattern":"^(success|failure|unknown)(,(success|failure|unknown))*$"},"metadataReference":{"type":"string","description":"Conversations whose `metadata.reference` is exactly this value: the reference a caller gave `createConversation`, to find a conversation whose answer it did not receive.","maxLength":500,"minLength":1},"profileId":{"type":"string","description":"Conversations started from this communication profile.","examples":["prf_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^prf_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"q":{"type":"string","description":"Search participant names, channel profile names, usernames, phones, emails, identity documents, visible message text, conversation ids and exact external references. Ignores accents/case and phone/document formatting. Also searches titles and summaries with Spanish stemming (quoted phrases, `or` and `-word` apply there). Attachments without stored transcription and tool payloads are not searched.","maxLength":200,"minLength":1},"requestedBy":{"type":"string","description":"Conversations started with `createConversation` by this token subject (exact match): a machine client reads its own requests with `<client id>@clients`.","maxLength":255,"minLength":1},"startedAfter":{"type":"string","description":"Started at or after this instant (RFC 3339).","format":"date-time"},"startedBefore":{"type":"string","description":"Started before this instant (RFC 3339).","format":"date-time"},"status":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"closed"}],"description":"The status."},"period":{"anyOf":[{"type":"string","const":"today"},{"type":"string","const":"7d"},{"type":"string","const":"30d"},{"type":"string","const":"90d"},{"type":"string","const":"365d"}],"description":"Started today or in the last 7, 30, 90 or 365 days including today, counting days in the organization's time zone as `get_report` does. A saved view keeps its period this way, so it moves with the calendar."},"sentiment":{"type":"string","description":"Comma-separated sentiments of the analysis.","pattern":"^(positive|neutral|negative)(,(positive|neutral|negative))*$"},"toolName":{"type":"string","description":"Conversations where the Agent called this tool: its exact name, as the transcript's tool parts show it (`toolName`). `count_conversations` with `groupBy=tool` lists the names with how many conversations used each.","maxLength":128,"minLength":1},"toolStatus":{"anyOf":[{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"denied"}],"description":"With `toolName`, a call of that tool ended this way; alone, a call of any tool did (`failed`: conversations where a tool failed)."},"factDefinition":{"type":"string","description":"Conversations whose current fact of this definition (its `key`) is known: about the conversation, or about its contact for a contact definition. With `factValue`, equal to that value.","pattern":"^[a-z][a-z0-9_]{0,63}$"},"factValue":{"type":"string","description":"With `factDefinition`: an option's key or label, a text (ignoring case), a number, a date (YYYY-MM-DD) or `true`/`false`.","maxLength":500,"minLength":1},"assessment":{"anyOf":[{"type":"string","const":"failed"},{"type":"string","const":"passed"}],"description":"The conversation's yes/no assessments: `failed`, at least one answered no; `passed`, at least one answered and every answered one yes."},"toReview":{"type":"boolean","description":"`true`: conversations to review, as `get_report` counts them in `toReviewCount`: evaluated failures or unresolved escalations. A success explicitly resolved by the team leaves this queue without erasing its escalation history. `false`: the others."},"messagesMin":{"type":"integer","description":"At least this many messages.","minimum":0},"messagesMax":{"type":"integer","description":"At most this many messages.","minimum":0},"durationMin":{"type":"integer","description":"Calls of at least this many seconds.","minimum":0},"durationMax":{"type":"integer","description":"Calls of at most this many seconds.","minimum":0},"groupBy":{"type":"string","description":"`outcome`, `status`, `channel` (type), `agent`, `sentiment`, `waitingOn` (who each open conversation waits for: `ai`, `team` or `contact`; null for the closed ones), `tool` (each Agent tool and the conversations that used it; null for those that used none), `toolError` (failed calls, of `toolName` when given, by error) or `fact:<definition key>` (the current value of that definition, such as the reason for contact).","pattern":"^(outcome|status|channel|agent|sentiment|waitingOn|tool|toolError|fact:[a-z][a-z0-9_]{0,63})$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"countConversations","x-arbol-native-rpc":true}},"/v1/raiz/definitions":{"get":{"operationId":"raiz.definitions.list","summary":"List data definitions","description":"List what the organization's Agents capture: each definition is one data point (an `attribute`, `category` or `metric` of a contact or conversation, or an `assessment` of a conversation) with its key, value type, options and the Agents that use it. Draft and active ones by default; `status=retired` lists retired ones; filter by `kind` and `subject`. In the Dashboard these are an Agent's Data it collects and Conversation reports, and Settings → Definitions.","tags":["raiz"],"security":[{"arbolHuman":["raiz:definitions:read"]},{"arbolHuman":["raiz:definitions:write"]},{"arbolMachine":["raiz:definitions:read"]},{"arbolMachine":["raiz:definitions:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:definitions:read","raiz:definitions:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"kind","in":"query","required":false,"description":"`attribute`: a property of the subject. `assessment`: a judgement about a conversation (yes/no assessments feed the assessment report). `category`: a classification. `metric`: a measured number, with a `unit`.","schema":{"anyOf":[{"type":"string","const":"attribute"},{"type":"string","const":"assessment"},{"type":"string","const":"category"},{"type":"string","const":"metric"}],"description":"`attribute`: a property of the subject. `assessment`: a judgement about a conversation (yes/no assessments feed the assessment report). `category`: a classification. `metric`: a measured number, with a `unit`."}},{"name":"status","in":"query","required":false,"description":"Comma-separated statuses to list. Default `draft,active`; retired definitions appear only when asked for.","schema":{"type":"string","default":"draft,active","description":"Comma-separated statuses to list. Default `draft,active`; retired definitions appear only when asked for.","pattern":"^(draft|active|retired)(,(draft|active|retired))*$"}},{"name":"subject","in":"query","required":false,"description":"What the facts describe.","schema":{"anyOf":[{"type":"string","const":"contact"},{"type":"string","const":"conversation"}],"description":"What the facts describe."}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDefinitionPageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListDefinitionsBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListDefinitionsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"definitions","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","kind":"string","status":"string","subject":"string"}},"x-fern-sdk-group-name":["raiz","definitions"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"kind":{"anyOf":[{"type":"string","const":"attribute"},{"type":"string","const":"assessment"},{"type":"string","const":"category"},{"type":"string","const":"metric"}],"description":"`attribute`: a property of the subject. `assessment`: a judgement about a conversation (yes/no assessments feed the assessment report). `category`: a classification. `metric`: a measured number, with a `unit`."},"status":{"type":"string","default":"draft,active","description":"Comma-separated statuses to list. Default `draft,active`; retired definitions appear only when asked for.","pattern":"^(draft|active|retired)(,(draft|active|retired))*$"},"subject":{"anyOf":[{"type":"string","const":"contact"},{"type":"string","const":"conversation"}],"description":"What the facts describe."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listDefinitions","x-arbol-native-rpc":true},"post":{"operationId":"raiz.definitions.create","summary":"Create a data definition","description":"Define one thing Agents should capture. `kind`: `attribute` (a property of the subject), `assessment` (a judgement about a conversation; yes/no ones feed the `assessment_results_daily` report), `category` (a classification) or `metric` (a measured number with a `unit`). `subject`: `contact` or `conversation`. `valueType`: `text`, `number`, `boolean`, `date` or `option` (with its `options`). Give a unique `key`, a `name`, optional `instructions` telling the Agent how to decide, and the `agentIds` that collect it. Fails with KEY_IN_USE when a draft or active definition already has the key.","tags":["raiz"],"security":[{"arbolHuman":["raiz:definitions:write"]},{"arbolMachine":["raiz:definitions:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:definitions:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateDefinitionBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDefinitionResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `DEFINITION_RETIRED`: The definition is retired and can no longer change.\n- `DEFINITION_TYPE_LOCKED`: The value type and subject of a definition cannot change once it has facts. Retire it and create a new one instead.\n- `KEY_IN_USE`: Another active resource in this organization already uses this key.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["DEFINITION_RETIRED","DEFINITION_TYPE_LOCKED","KEY_IN_USE","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateDefinitionConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`DEFINITION_OPTIONS_INVALID`: Only a definition whose value type is `option` has options; it needs at least one, and option keys must be unique.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["DEFINITION_OPTIONS_INVALID"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDefinitionOptionsInvalidError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateDefinitionServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"definitions","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","definitions"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["key","kind","name","subject","valueType"],"properties":{"agentIds":{"type":"array","items":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Agents that use the definition; empty for every Agent. In an update, the complete new set.","maxItems":100,"uniqueItems":true},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"options":{"type":"array","items":{"$ref":"#/components/schemas/RaizDefinitionOptionInput"},"description":"The options of an `option` definition, in order, with unique keys. In an update, the complete new set: an option is matched by key and keeps its id; one left out is retired, never deleted, because facts reference it.","maxItems":100},"status":{"anyOf":[{"type":"string","const":"draft"},{"type":"string","const":"active"}],"description":"`active` definitions accept facts and Agents use them; `draft` ones are being prepared. Retiring is `deleteDefinition`."},"unit":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}]},"key":{"type":"string","description":"Stable machine name: lower case letters, digits and `_`, starting with a letter. A CSV column with this header imports into the definition.","examples":["eps"],"pattern":"^[a-z][a-z0-9_]{0,63}$"},"kind":{"anyOf":[{"type":"string","const":"attribute"},{"type":"string","const":"assessment"},{"type":"string","const":"category"},{"type":"string","const":"metric"}],"description":"`attribute`: a property of the subject. `assessment`: a judgement about a conversation (yes/no assessments feed the assessment report). `category`: a classification. `metric`: a measured number, with a `unit`."},"name":{"type":"string","maxLength":120,"minLength":1},"subject":{"anyOf":[{"type":"string","const":"contact"},{"type":"string","const":"conversation"}],"description":"What the facts describe."},"valueType":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"number"},{"type":"string","const":"boolean"},{"type":"string","const":"date"},{"type":"string","const":"option"}],"description":"The JSON type of the facts' values: a string, a number, a boolean, a `YYYY-MM-DD` date, or the key of one of the options."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createDefinition","x-arbol-native-rpc":true}},"/v1/raiz/definitions/{definitionId}":{"get":{"operationId":"raiz.definitions.get","summary":"Get a data definition","description":"Read one definition in any status: kind, subject, value type, options, instructions for the Agent and the Agents that use it. Read it before `update_definition` and send its `version` as `expectedVersion`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:definitions:read"]},{"arbolHuman":["raiz:definitions:write"]},{"arbolMachine":["raiz:definitions:read"]},{"arbolMachine":["raiz:definitions:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:definitions:read","raiz:definitions:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"definitionId","in":"path","required":true,"description":"Definition id.","schema":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDefinitionResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetDefinitionServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"definitions","verb":"get","id":"definitionId","query":{}},"x-fern-sdk-group-name":["raiz","definitions"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"definitionId":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["definitionId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getDefinition","x-arbol-native-rpc":true},"patch":{"operationId":"raiz.definitions.update","summary":"Update a data definition","description":"Change a definition: name, instructions, options, Agents, unit or status. Omitted fields stay and `null` clears one; `options` and `agentIds`, when given, are the complete new sets (an option left out is retired, never deleted). Value type and subject cannot change once facts exist (DEFINITION_TYPE_LOCKED), and a retired definition no longer changes. Read it with `get_definition` and send `expectedVersion`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:definitions:write"]},{"arbolMachine":["raiz:definitions:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:definitions:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"definitionId","in":"path","required":true,"description":"Definition id.","schema":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateDefinitionBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDefinitionResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `DEFINITION_RETIRED`: The definition is retired and can no longer change.\n- `DEFINITION_TYPE_LOCKED`: The value type and subject of a definition cannot change once it has facts. Retire it and create a new one instead.\n- `KEY_IN_USE`: Another active resource in this organization already uses this key.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["DEFINITION_RETIRED","DEFINITION_TYPE_LOCKED","KEY_IN_USE","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateDefinitionConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`DEFINITION_OPTIONS_INVALID`: Only a definition whose value type is `option` has options; it needs at least one, and option keys must be unique.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["DEFINITION_OPTIONS_INVALID"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDefinitionOptionsInvalidError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateDefinitionServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"definitions","verb":"update","id":"definitionId","query":null},"x-fern-sdk-group-name":["raiz","definitions"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["definitionId"],"properties":{"agentIds":{"type":"array","items":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Agents that use the definition; empty for every Agent. In an update, the complete new set.","maxItems":100,"uniqueItems":true},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"options":{"type":"array","items":{"$ref":"#/components/schemas/RaizDefinitionOptionInput"},"description":"The options of an `option` definition, in order, with unique keys. In an update, the complete new set: an option is matched by key and keeps its id; one left out is retired, never deleted, because facts reference it.","maxItems":100},"status":{"anyOf":[{"type":"string","const":"draft"},{"type":"string","const":"active"}],"description":"`active` definitions accept facts and Agents use them; `draft` ones are being prepared. Retiring is `deleteDefinition`."},"unit":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}]},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"key":{"type":"string","description":"Stable machine name: lower case letters, digits and `_`, starting with a letter. A CSV column with this header imports into the definition.","examples":["eps"],"pattern":"^[a-z][a-z0-9_]{0,63}$"},"kind":{"anyOf":[{"type":"string","const":"attribute"},{"type":"string","const":"assessment"},{"type":"string","const":"category"},{"type":"string","const":"metric"}],"description":"`attribute`: a property of the subject. `assessment`: a judgement about a conversation (yes/no assessments feed the assessment report). `category`: a classification. `metric`: a measured number, with a `unit`."},"name":{"type":"string","maxLength":120,"minLength":1},"subject":{"anyOf":[{"type":"string","const":"contact"},{"type":"string","const":"conversation"}],"description":"What the facts describe."},"valueType":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"number"},{"type":"string","const":"boolean"},{"type":"string","const":"date"},{"type":"string","const":"option"}],"description":"The JSON type of the facts' values: a string, a number, a boolean, a `YYYY-MM-DD` date, or the key of one of the options."},"definitionId":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateDefinition","x-arbol-native-rpc":true}},"/v1/raiz/eval-cases":{"post":{"operationId":"raiz.evalCases.create","summary":"Record Agent feedback","description":"Record internal feedback on one completed WhatsApp Agent reply or an Agent response from a completed voice call: what should be preserved or changed, a preferred response, and whether it was incorrect, incomplete or could be simpler. Requires conversation write and Agent read access. Does not contact anyone or change live instructions. Repeating creation returns the existing authored case; edit it with updateEvalCase and expectedVersion.","tags":["raiz"],"security":[{"arbolHuman":["raiz:conversations:write"]},{"arbolMachine":["raiz:conversations:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:conversations:write"],"x-conditional-scopes":["raiz:agents:read","raiz:agents:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateEvalCaseBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizEvalCaseResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"evalCases","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","evalCases"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["conversationId","replyMessageId","expectation","preferredResponse","feedbackKind"],"properties":{"conversationId":{"type":"string","description":"Conversation id.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"replyMessageId":{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"expectation":{"type":"string","description":"What the Agent should have done instead, for whoever replays the case: a short rubric, never the contact's personal data.","maxLength":4000,"minLength":1,"pattern":"\\S"},"preferredResponse":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S","description":"The team's preferred reply or procedure. Private evidence, never automatically instructions."},"feedbackKind":{"anyOf":[{"type":"string","const":"incorrect"},{"type":"string","const":"simpler"},{"type":"string","const":"incomplete"}]}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createEvalCase","x-arbol-native-rpc":false},"get":{"operationId":"raiz.evalCases.list","summary":"List evaluation cases","description":"The Agents' evaluation cases, newest first: WhatsApp replies or completed voice-call responses with explicit internal team feedback (`authored`) or a following team message (`correction`), and the originating Agent version when recorded (unknown for historical voice calls). Filter by agentId, replyMessageId, source or status (`open`, `kept`, `dismissed`). Requires conversation read authority as well as Agent read authority. Read the conversation with its own operations to judge a case. Not an AI tool.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:read"]},{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:read"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:read","raiz:agents:write"],"x-scope-match":"any","x-conditional-scopes":["raiz:conversations:read","raiz:conversations:write"],"x-effect":"read","x-max-body-bytes":32768,"x-max-output-bytes":2097152,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"agentId","in":"query","required":false,"description":"Agent id.","schema":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"status","in":"query","required":false,"description":"`open`: not reviewed yet. `kept`: a candidate version must handle it. `dismissed`: not a case (the person only continued after a handoff, for example).","schema":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"kept"},{"type":"string","const":"dismissed"}],"description":"`open`: not reviewed yet. `kept`: a candidate version must handle it. `dismissed`: not a case (the person only continued after a handoff, for example)."}},{"name":"replyMessageId","in":"query","required":false,"description":"Message id.","schema":{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"source","in":"query","required":false,"description":"The source.","schema":{"anyOf":[{"type":"string","const":"correction"},{"type":"string","const":"sample"},{"type":"string","const":"authored"}]}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizEvalCasePageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListEvalCasesBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"evalCases","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","agentId":"string","status":"string","replyMessageId":"string","source":"string"}},"x-fern-sdk-group-name":["raiz","evalCases"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"status":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"kept"},{"type":"string","const":"dismissed"}],"description":"`open`: not reviewed yet. `kept`: a candidate version must handle it. `dismissed`: not a case (the person only continued after a handoff, for example)."},"replyMessageId":{"type":"string","description":"Message id.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"source":{"anyOf":[{"type":"string","const":"correction"},{"type":"string","const":"sample"},{"type":"string","const":"authored"}],"description":"The source."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listEvalCases","x-arbol-native-rpc":false}},"/v1/raiz/eval-cases/{evalCaseId}":{"patch":{"operationId":"raiz.evalCases.update","summary":"Review an evaluation case","description":"Review an evaluation case: keep it (`status: kept`) so candidate versions are measured on it, dismiss it, and write in `expectation` what the Agent should have done (a short rubric, no personal data; `null` clears it). Not an AI tool.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:write"],"x-conditional-scopes":["raiz:conversations:read","raiz:conversations:write"],"x-effect":"write","x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"evalCaseId","in":"path","required":true,"description":"Evaluation case id.","schema":{"type":"string","description":"Evaluation case id.","examples":["evc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateEvalCaseBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizEvalCaseResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"`VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizVersionConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"evalCases","verb":"update","id":"evalCaseId","query":null},"x-fern-sdk-group-name":["raiz","evalCases"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","required":["evalCaseId"],"properties":{"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"preferredResponse":{"anyOf":[{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S","description":"The team's preferred reply or procedure. Private evidence, never automatically instructions."},{"type":"null"}]},"feedbackKind":{"anyOf":[{"type":"string","const":"incorrect"},{"type":"string","const":"simpler"},{"type":"string","const":"incomplete"}]},"expectation":{"anyOf":[{"type":"string","description":"What the Agent should have done instead, for whoever replays the case: a short rubric, never the contact's personal data.","maxLength":4000,"minLength":1,"pattern":"\\S"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","const":"open"},{"type":"string","const":"kept"},{"type":"string","const":"dismissed"}],"description":"`open`: not reviewed yet. `kept`: a candidate version must handle it. `dismissed`: not a case (the person only continued after a handoff, for example)."},"evalCaseId":{"type":"string","description":"Evaluation case id.","examples":["evc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateEvalCase","x-arbol-native-rpc":false}},"/v1/raiz/eval-runs":{"post":{"operationId":"raiz.evalRuns.create","summary":"Replay evaluation cases on a candidate","description":"With feedbackCaseId, prepare conditional guidance from that kept correction and test it with the Agent’s newest kept cases, always including the source. Do not combine feedbackCaseId with candidate or caseIds. This does not publish. Requires conversation read access. Voice Agents use a spoken-content rehearsal with an independent model (evaluationMode voice_text), not the live voice model, audio, interruptions or telephony. A person must review its applicability to calls before approval. Otherwise measure a candidate version on its kept evaluation cases before publishing it: the WhatsApp Agent rewrites each case's reply with the candidate's `instructions`, `procedures`, `integrationProcedures`, `model` and `reasoningEffort` (omitted ones stay as the live Agent has them), without running any integration tool (each answers with what it answered in the original conversation) and without sending anything; then a judge model compares each new reply with what the team expects. Replays every kept case, or `caseIds`, at most 50. It calls paid models, so it needs `confirmCost: true`. Follow it with `getEvalRun`; with the Agent's `settings.evalGate`, `updateAgent` publishes exactly this content with `evalRunId`. EVAL_CASES_UNAVAILABLE: no kept case to replay. Not an AI tool.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:write"],"x-conditional-scopes":["raiz:conversations:read","raiz:conversations:write"],"x-effect":"write","x-max-body-bytes":524288,"x-max-output-bytes":2097152,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateEvalRunBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizEvalRunResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `EVAL_CASES_UNAVAILABLE`: The Agent has no kept evaluation case to replay, or a named case is not one of its kept cases.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["EVAL_CASES_UNAVAILABLE","INVALID_STATE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateEvalRunConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `AGENT_PROCEDURES_INVALID`: A procedure is incomplete, references a tool, document or procedure the Agent does not have, or breaks the structured step rules. `issues` says where.\n- `AGENT_SETTINGS_INVALID`: The settings do not apply to this Agent's modality, or two settings contradict each other.\n- `INTEGRATION_PROCEDURE_UNAVAILABLE`: A procedure does not exist in this organization's connections, Raíz cannot run its connection, or the Agent is not a text Agent.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["AGENT_PROCEDURES_INVALID","AGENT_SETTINGS_INVALID","INTEGRATION_PROCEDURE_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateEvalRunUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `FEEDBACK_PROPOSAL_UNAVAILABLE`: A usable improvement could not be prepared. The Agent has not changed. Try again later.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","FEEDBACK_PROPOSAL_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateEvalRunServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"evalRuns","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","evalRuns"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","required":["agentId","confirmCost"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"candidate":{"type":"object","properties":{"instructions":{"anyOf":[{"type":"string","description":"What the Agent does and how: its role, what it may and may not do, the facts it relies on.","maxLength":100000,"minLength":1},{"type":"null"}]},"integrationProcedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentIntegrationProcedureInput"},"description":"Text Agents. Procedures a connection publishes (`listConnections`, checked live in Account), each saved with its current text and run as a free-form procedure beside `procedures`. In an update, the complete new set.","maxItems":32},"model":{"anyOf":[{"anyOf":[{"type":"string","const":"arbolito/agile"},{"type":"string","const":"arbolito/balanced"},{"type":"string","const":"arbolito/advanced"},{"type":"string","const":"arbolito/top"}],"description":"Text Agents. The tier that writes replies. `arbolito/agile`: quickest and least expensive, for direct conversations. `arbolito/balanced`: more deliberate answers at moderate cost. `arbolito/advanced`: strong reasoning for complex instructions and many tools, with an adjustable `reasoningEffort`. `arbolito/top`: the most capable, for the hardest cases, with an adjustable `reasoningEffort` up to `xhigh`. Every tier reads images and PDF documents. Null: the default, as `arbolito/agile`."},{"type":"null"}]},"procedures":{"type":"array","items":{"$ref":"#/components/schemas/RaizAgentProcedureInput"},"description":"The Agent's procedures, as a complete set: a procedure left out is removed. Keep each existing procedure's `id`; a new one may omit it.","maxItems":64},"reasoningEffort":{"anyOf":[{"anyOf":[{"type":"string","const":"none"},{"type":"string","const":"low"},{"type":"string","const":"medium"},{"type":"string","const":"high"},{"type":"string","const":"xhigh"}],"description":"Text Agents whose tier reasons (`arbolito/advanced`, `arbolito/top`, or an Agent already running a model that reasons): `none` answers fastest, `high` deliberates most, and `xhigh`, on `arbolito/advanced` and `arbolito/top`, deliberates past it. Null: the tier's default. A tier that does not reason refuses it (AGENT_SETTINGS_INVALID)."},{"type":"null"}]}},"description":"The candidate version: what changes in what the model reads. Omitted fields keep the live Agent's; `integrationProcedures` and `procedures` are complete sets, as in `updateAgent`.","additionalProperties":false},"feedbackCaseId":{"type":"string","description":"Evaluation case id.","examples":["evc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"caseIds":{"type":"array","items":{"type":"string","description":"Evaluation case id.","examples":["evc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"The Agent's kept cases to replay. Omitted: its 50 newest kept cases.","maxItems":50,"minItems":1,"uniqueItems":true},"confirmCost":{"type":"boolean","const":true,"description":"A run calls paid models: the candidate's model on every step of each case's reply, then a small judge model per case. Send `true` to accept that cost."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createEvalRun","x-arbol-native-rpc":false}},"/v1/raiz/eval-runs/{evalRunId}":{"get":{"operationId":"raiz.evalRuns.get","summary":"Get an evaluation run","description":"Read an evaluation run: its `status`, how many cases `passed`, `failed` or could not be replayed (`errors`), and each case's result as it is judged: the candidate's reply as the contact would have read it, whether it escalated or handed off, the tools it called and the judge's reasons. Not an AI tool.","tags":["raiz"],"security":[{"arbolHuman":["raiz:agents:read"]},{"arbolHuman":["raiz:agents:write"]},{"arbolMachine":["raiz:agents:read"]},{"arbolMachine":["raiz:agents:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:agents:read","raiz:agents:write"],"x-scope-match":"any","x-conditional-scopes":["raiz:conversations:read","raiz:conversations:write"],"x-effect":"read","x-max-body-bytes":32768,"x-max-output-bytes":2097152,"parameters":[{"name":"evalRunId","in":"path","required":true,"description":"Evaluation run id.","schema":{"type":"string","description":"Evaluation run id.","examples":["evr_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evr_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizEvalRunResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"`UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"evalRuns","verb":"get","id":"evalRunId","query":{}},"x-fern-sdk-group-name":["raiz","evalRuns"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","properties":{"evalRunId":{"type":"string","description":"Evaluation run id.","examples":["evr_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^evr_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["evalRunId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getEvalRun","x-arbol-native-rpc":false}},"/v1/raiz/facts":{"post":{"operationId":"raiz.facts.create","summary":"Record a fact","description":"Record the value of a definition for a contact or a conversation, or that it has none (`valueStatus: unknown` or `not_applicable`). Only record something actually observed, and say where it came from (`sourceConversationId`, `sourceMessageId`, `reason`). The value follows the definition's type: text, number, boolean, a `YYYY-MM-DD` date or an option key. The newest assertion that was not rejected becomes the current fact; older ones stay as history. Get `definitionId` from `list_definitions`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:facts:write"]},{"arbolMachine":["raiz:facts:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:facts:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateFactBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizFactResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `DEFINITION_NOT_ACTIVE`: Facts can be asserted only under an active definition.\n- `SOURCE_CONVERSATION_OPEN`: A fact can cite only a closed conversation as its source.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["DEFINITION_NOT_ACTIVE","SOURCE_CONVERSATION_OPEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateFactConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `FACT_SUBJECT_MISMATCH`: The fact's subject (a contact or a conversation) does not match what its definition describes.\n- `FACT_VALUE_INVALID`: The value does not match the definition's value type, or names no active option.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FACT_SUBJECT_MISMATCH","FACT_VALUE_INVALID"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateFactUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateFactServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"facts","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","facts"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["definitionId"],"properties":{"contactId":{"type":"string","description":"The contact the fact is about, for a definition whose subject is `contact`. Give it or `conversationId`, not both. The id of a merged duplicate asserts on the contact that absorbed it.","examples":["cnt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"conversationId":{"type":"string","description":"The conversation the fact is about, for a definition whose subject is `conversation`.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"definitionId":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"observedAt":{"type":"string","description":"When the value was true or observed (RFC 3339). Defaults to now. The current fact is the newest observation that was not rejected.","format":"date-time"},"reason":{"type":"string","description":"Why it holds: the evidence, in a sentence.","maxLength":2000,"minLength":1},"sourceConversationId":{"type":"string","description":"A closed conversation where the value was learned, cited as evidence.","examples":["cnv_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cnv_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"sourceMessageId":{"type":"string","description":"The message of `sourceConversationId` that says it. Requires `sourceConversationId`.","examples":["msg_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^msg_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"value":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}],"description":"A string (text), number, boolean, ISO date `YYYY-MM-DD` (date) or option key (option), per the definition's value type."},"valueStatus":{"anyOf":[{"type":"string","const":"known"},{"type":"string","const":"unknown"},{"type":"string","const":"not_applicable"}],"default":"known","description":"`known` asserts `value`; `unknown` and `not_applicable` assert that there is no value (FHIR data-absent reasons) and take no `value`."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createFact","x-arbol-native-rpc":true}},"/v1/raiz/facts/{factId}":{"patch":{"operationId":"raiz.facts.update","summary":"Review a fact","description":"Confirm or reject a recorded fact: `confirmed` vouches for it; `rejected` withdraws it, and the previous assertion becomes current again. The history records who reviewed it.","tags":["raiz"],"security":[{"arbolHuman":["raiz:facts:write"]},{"arbolMachine":["raiz:facts:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:facts:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"factId","in":"path","required":true,"description":"Fact id.","schema":{"type":"string","description":"Fact id.","examples":["fct_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^fct_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateFactBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizFactResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateFactServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"facts","verb":"update","id":"factId","query":null},"x-fern-sdk-group-name":["raiz","facts"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["reviewStatus","factId"],"properties":{"reviewStatus":{"anyOf":[{"type":"string","const":"confirmed"},{"type":"string","const":"rejected"}],"description":"`confirmed` vouches for the fact; `rejected` withdraws it, and the previous assertion becomes current again."},"factId":{"type":"string","description":"Fact id.","examples":["fct_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^fct_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateFact","x-arbol-native-rpc":true}},"/v1/raiz/knowledge":{"get":{"operationId":"raiz.knowledge.list","summary":"List Knowledge documents","description":"List the documents in the organization's knowledge base (Settings → Knowledge Base), newest first. Filter by `kind` (`text`, `file`, `website`), `status` and `indexStatus`; `q` matches titles and file names. Only documents with `indexStatus: ready` are searchable. Which Agents use a document is each Agent's `knowledgeDocumentIds` (`get_agent`).","tags":["raiz"],"security":[{"arbolHuman":["raiz:knowledge:read"]},{"arbolHuman":["raiz:knowledge:write"]},{"arbolMachine":["raiz:knowledge:read"]},{"arbolMachine":["raiz:knowledge:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:knowledge:read","raiz:knowledge:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"indexStatus","in":"query","required":false,"description":"`pending`: waiting to be crawled or indexed. `indexing`: in progress. `ready`: searchable. `failed`: see `indexErrorCode`; failed documents are retried automatically.","schema":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"indexing"},{"type":"string","const":"ready"},{"type":"string","const":"failed"}],"description":"`pending`: waiting to be crawled or indexed. `indexing`: in progress. `ready`: searchable. `failed`: see `indexErrorCode`; failed documents are retried automatically."}},{"name":"kind","in":"query","required":false,"description":"`text`: written inline. `file`: an uploaded document (PDF, Word, Excel, HTML, CSV, plain text or Markdown). `website`: a snapshot of approved web pages.","schema":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"file"},{"type":"string","const":"website"}],"description":"`text`: written inline. `file`: an uploaded document (PDF, Word, Excel, HTML, CSV, plain text or Markdown). `website`: a snapshot of approved web pages."}},{"name":"q","in":"query","required":false,"description":"Matches the title or file name, ignoring accents and case.","schema":{"type":"string","description":"Matches the title or file name, ignoring accents and case.","maxLength":200,"minLength":1}},{"name":"status","in":"query","required":false,"description":"A paused document is never searched; its index is kept.","schema":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused document is never searched; its index is kept."}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizKnowledgeDocumentPageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListKnowledgeDocumentsBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListKnowledgeDocumentsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"knowledge","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","indexStatus":"string","kind":"string","q":"string","status":"string"}},"x-fern-sdk-group-name":["raiz","knowledge"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"indexStatus":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"indexing"},{"type":"string","const":"ready"},{"type":"string","const":"failed"}],"description":"`pending`: waiting to be crawled or indexed. `indexing`: in progress. `ready`: searchable. `failed`: see `indexErrorCode`; failed documents are retried automatically."},"kind":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"file"},{"type":"string","const":"website"}],"description":"`text`: written inline. `file`: an uploaded document (PDF, Word, Excel, HTML, CSV, plain text or Markdown). `website`: a snapshot of approved web pages."},"q":{"type":"string","description":"Matches the title or file name, ignoring accents and case.","maxLength":200,"minLength":1},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused document is never searched; its index is kept."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listKnowledgeDocuments","x-arbol-native-rpc":true},"post":{"operationId":"raiz.knowledge.create","summary":"Add a Knowledge document","description":"Add a document Agents can consult. `kind: text` takes `text` (plain text or Markdown); `kind: file` takes `file` (base64, up to 8 MiB: PDF, Word, Excel, HTML, CSV, plain text or Markdown); `kind: website` takes an approved HTTPS `sourceUrl` and optional `crawl` bounds and starts a crawl task (`list_tasks` with `kind=knowledge_crawl`). Indexing follows on its own: the document is searchable once `indexStatus` is `ready` (check with `get_knowledge_document`). Then give it to Agents with `update_agent` (`knowledgeDocumentIds`). Read the `manage-knowledge` skill.","tags":["raiz"],"security":[{"arbolHuman":["raiz:knowledge:write"]},{"arbolMachine":["raiz:knowledge:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:knowledge:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":12582912,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateKnowledgeDocumentBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizKnowledgeDocumentResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `KNOWLEDGE_FILE_INVALID`: The file is not valid base64, exceeds the size limit or does not match its declared type.\n- `KNOWLEDGE_KIND_MISMATCH`: The change does not apply to this kind of Knowledge document.\n- `WEBSITE_NOT_APPROVED`: This website's origin is not approved for crawling in this deployment.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["KNOWLEDGE_FILE_INVALID","KNOWLEDGE_KIND_MISMATCH","WEBSITE_NOT_APPROVED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateKnowledgeDocumentUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateKnowledgeDocumentServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"knowledge","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","knowledge"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["kind","title"],"properties":{"crawl":{"$ref":"#/components/schemas/RaizCrawlSettings","description":"Website documents only. Default: 20 pages, depth 2."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"file":{"$ref":"#/components/schemas/RaizKnowledgeFileInput","description":"File documents only."},"kind":{"anyOf":[{"type":"string","const":"text"},{"type":"string","const":"file"},{"type":"string","const":"website"}],"description":"`text`: written inline. `file`: an uploaded document (PDF, Word, Excel, HTML, CSV, plain text or Markdown). `website`: a snapshot of approved web pages."},"sourceUrl":{"$ref":"#/components/schemas/HttpsUrl","description":"Website documents only: the HTTPS page to start from. Its origin must be approved for this deployment; only same-origin pages under its path are followed, and robots.txt is respected."},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused document is never searched; its index is kept."},"text":{"type":"string","description":"Text documents only: the content, plain text or Markdown.","maxLength":1000000,"minLength":1},"title":{"type":"string","maxLength":200,"minLength":1}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createKnowledgeDocument","x-arbol-native-rpc":true}},"/v1/raiz/knowledge/{knowledgeDocumentId}":{"get":{"operationId":"raiz.knowledge.get","summary":"Get a Knowledge document","description":"Read one document and its indexing state. Add `expand=content` to read its text as indexed, in Markdown, up to 200,000 characters: use it to show or quote what a document actually says.","tags":["raiz"],"security":[{"arbolHuman":["raiz:knowledge:read"]},{"arbolHuman":["raiz:knowledge:write"]},{"arbolMachine":["raiz:knowledge:read"]},{"arbolMachine":["raiz:knowledge:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:knowledge:read","raiz:knowledge:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"knowledgeDocumentId","in":"path","required":true,"description":"Knowledge document id.","schema":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"expand","in":"query","required":false,"description":"Related data to include, comma-separated: `content`.","schema":{"type":"string","description":"Related data to include, comma-separated: `content`.","examples":["content"],"pattern":"^(content)(,(content))*$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizKnowledgeDocumentResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetKnowledgeDocumentServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"knowledge","verb":"get","id":"knowledgeDocumentId","query":{"expand":"string"}},"x-fern-sdk-group-name":["raiz","knowledge"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"knowledgeDocumentId":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"expand":{"type":"string","description":"Related data to include, comma-separated: `content`.","examples":["content"],"pattern":"^(content)(,(content))*$"}},"required":["knowledgeDocumentId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getKnowledgeDocument","x-arbol-native-rpc":true},"patch":{"operationId":"raiz.knowledge.update","summary":"Update a Knowledge document","description":"Change a document. Omitted fields stay and `null` clears one. New `text` (text documents) or `file` (file documents) replaces the content and indexes it again; a new `sourceUrl` or `crawl` (website documents) takes a new snapshot. `status: paused` hides it from every Agent without deleting it.","tags":["raiz"],"security":[{"arbolHuman":["raiz:knowledge:write"]},{"arbolMachine":["raiz:knowledge:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:knowledge:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":12582912,"x-max-output-bytes":1048576,"parameters":[{"name":"knowledgeDocumentId","in":"path","required":true,"description":"Knowledge document id.","schema":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateKnowledgeDocumentBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizKnowledgeDocumentResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"`VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizVersionConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `KNOWLEDGE_FILE_INVALID`: The file is not valid base64, exceeds the size limit or does not match its declared type.\n- `KNOWLEDGE_KIND_MISMATCH`: The change does not apply to this kind of Knowledge document.\n- `WEBSITE_NOT_APPROVED`: This website's origin is not approved for crawling in this deployment.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["KNOWLEDGE_FILE_INVALID","KNOWLEDGE_KIND_MISMATCH","WEBSITE_NOT_APPROVED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateKnowledgeDocumentUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateKnowledgeDocumentServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"knowledge","verb":"update","id":"knowledgeDocumentId","query":null},"x-fern-sdk-group-name":["raiz","knowledge"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["knowledgeDocumentId"],"properties":{"crawl":{"$ref":"#/components/schemas/RaizCrawlSettings","description":"Website documents only. Default: 20 pages, depth 2."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"file":{"$ref":"#/components/schemas/RaizKnowledgeFileInput","description":"File documents only."},"sourceUrl":{"$ref":"#/components/schemas/HttpsUrl","description":"Website documents only: the HTTPS page to start from. Its origin must be approved for this deployment; only same-origin pages under its path are followed, and robots.txt is respected."},"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"paused"}],"description":"A paused document is never searched; its index is kept."},"text":{"type":"string","description":"Text documents only: the content, plain text or Markdown.","maxLength":1000000,"minLength":1},"title":{"type":"string","maxLength":200,"minLength":1},"knowledgeDocumentId":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateKnowledgeDocument","x-arbol-native-rpc":true}},"/v1/raiz/knowledge/search":{"post":{"operationId":"raiz.knowledge.search","summary":"Search Knowledge","description":"Find the passages that best answer `q` in the organization's searchable documents, best first. `agentId` searches exactly what that Agent can find; `knowledgeDocumentIds` limits the search to those documents. Paused, deleted and not-yet-indexed documents are never searched. Read a whole document with `get_knowledge_document` and `expand=content`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:knowledge:read"]},{"arbolHuman":["raiz:knowledge:write"]},{"arbolMachine":["raiz:knowledge:read"]},{"arbolMachine":["raiz:knowledge:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:knowledge:read","raiz:knowledge:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSearchKnowledgeBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizKnowledgePassagePageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSearchKnowledgeBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSearchKnowledgeServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"knowledge","verb":"search","id":null,"query":null},"x-fern-sdk-group-name":["raiz","knowledge"],"x-fern-sdk-method-name":"search","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":[],"properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":20,"description":"Maximum items returned in one page. Defaults to 8; larger reads require another cursor.","default":8},"agentId":{"type":"string","description":"Search only the documents this Agent consults, as the Agent would.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"knowledgeDocumentIds":{"type":"array","items":{"type":"string","description":"Knowledge document id.","examples":["kdc_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:kdc_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:con)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"description":"Search only these documents (intersected with the Agent's, when both are given).","maxItems":100,"minItems":1,"uniqueItems":true},"q":{"type":"string","description":"What to look for, in a few words.","maxLength":500,"minLength":2},"query":{"type":"string","maxLength":500,"minLength":2,"deprecated":true,"description":"Deprecated: use `q`. Answered until 2027-01-28."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"searchKnowledge","x-arbol-native-rpc":true}},"/v1/raiz/organization":{"get":{"operationId":"raiz.organization.get","summary":"Get the organization","description":"Read your organization: name, default language and time zone, deployment capabilities, and the settings in effect (defaults included), such as how many outbound calls may run at once, who is emailed when the AI escalates a conversation or fails in it and how often (each notice at once, or a digest every few hours), and the daily report. capabilities.managedVoiceOutbound reports whether the shared outbound line is configured; settings.channels.managedVoiceOutboundEnabled is the organization's separate permission to use it.","tags":["raiz"],"security":[{"arbolHuman":["raiz:organization:read"]},{"arbolHuman":["raiz:organization:write"]},{"arbolMachine":["raiz:organization:read"]},{"arbolMachine":["raiz:organization:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:organization:read","raiz:organization:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizOrganizationResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetOrganizationServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"organization","verb":"get","id":null,"query":{}},"x-fern-sdk-group-name":["raiz","organization"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getOrganization","x-arbol-native-rpc":true},"patch":{"operationId":"raiz.organization.update","summary":"Update the organization","description":"Change the organization's default language, time zone or settings. Edit the organization's name in Arbol Account. Settings merge: an omitted setting stays and `null` returns it to its default; `notifications.recipients` is replaced as a whole. Fails with TIME_ZONE_UNKNOWN when the time zone is not a valid IANA zone (for example `America/Bogota`).","tags":["raiz"],"security":[{"arbolHuman":["raiz:organization:write"]},{"arbolMachine":["raiz:organization:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:organization:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateOrganizationBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizOrganizationResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`TIME_ZONE_UNKNOWN`: The time zone is not in the IANA time zone database.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TIME_ZONE_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizTimeZoneUnknownError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateOrganizationServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"organization","verb":"update","id":null,"query":null},"x-fern-sdk-group-name":["raiz","organization"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"language":{"type":"string","description":"BCP 47 language tag.","examples":["es-CO"],"pattern":"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"name":{"type":"string","deprecated":true,"description":"Legacy field for clients that echo the existing name. Edit the organization name in Arbol Account.","maxLength":200,"minLength":1},"settings":{"type":"object","properties":{"channels":{"type":"object","properties":{"managedVoiceOutboundEnabled":{"anyOf":[{"type":"boolean","description":"Whether Agents without a line of their own may call out from the platform's shared number (default true)."},{"type":"null"}]},"maxConcurrentOutboundCalls":{"anyOf":[{"type":"integer","description":"Campaign calls the organization places at once (default 5). The scheduler starts new ones only into free slots.","minimum":1,"maximum":50},{"type":"null"}]}},"additionalProperties":false},"dailyReport":{"type":"object","properties":{"enabled":{"anyOf":[{"type":"boolean","description":"Email the daily report every day at `sendAt`, in the organization's time zone: the calls and conversations registered in the last 24 hours, the conversations waiting for the team and those that need a review (default true). A day without activity sends nothing."},{"type":"null"}]},"recipients":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"description":"Additional recipients for the daily report alongside eligible workspace owners, at most 10 addresses (default none). It lists the contacts of calls and conversations by name and number: choose recipients who may read the organization's conversations.","maxItems":10,"uniqueItems":true},{"type":"null"}]},"sendAt":{"anyOf":[{"type":"string","description":"The local time the daily report goes out, `HH:MM` in 24 hours (default `18:00`). Moving it later the same day sends nothing more that day; turning the report on after the day's time sends that day's report at once.","examples":["18:00"],"pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}]}},"additionalProperties":false},"productNotices":{"type":"object","properties":{"events":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"string","const":"agent-idle"},{"type":"string","const":"agent-live"},{"type":"string","const":"budget-reached"},{"type":"string","const":"budget-warning"},{"type":"string","const":"campaign-finished"},{"type":"string","const":"channel-disconnected"},{"type":"string","const":"channel-limit"},{"type":"string","const":"channel-quality"},{"type":"string","const":"channel-restored"},{"type":"string","const":"credits-exhausted"},{"type":"string","const":"import-finished"},{"type":"string","const":"knowledge-failed"},{"type":"string","const":"milestone"},{"type":"string","const":"monthly-summary"},{"type":"string","const":"outage-resolved"},{"type":"string","const":"spam-blocked"},{"type":"string","const":"template-approved"},{"type":"string","const":"template-rejected"},{"type":"string","const":"weekly-summary"}]},"description":"Product emails enabled for this organization. All are enabled unless the organization saves a selection. An empty selection turns all of them off.","uniqueItems":true,"maxItems":19},{"type":"null"}]},"recipients":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"maxItems":10},{"type":"null"}]},"administrators":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"maxItems":10},{"type":"null"}]}},"additionalProperties":false},"notifications":{"type":"object","properties":{"escalations":{"anyOf":[{"type":"boolean","description":"Email the recipients, and send the phones a WhatsApp message, when the AI hands a conversation to the team: it escalates a request it cannot resolve, the contact asks for a person, or the Agent's monthly budget is spent (default true)."},{"type":"null"}]},"failedOutcomes":{"anyOf":[{"type":"boolean","description":"Email the recipients when the analysis of a closed conversation concludes that the contact's request was not resolved (outcome failure). A conversation closed for inactivity never counts (default true)."},{"type":"null"}]},"failures":{"anyOf":[{"type":"boolean","description":"Email the recipients when the AI could not answer: a WhatsApp reply that ended with the fallback message, or a call that failed or in which one of the Agent's functions failed (default true)."},{"type":"null"}]},"firstReplyMinutes":{"anyOf":[{"type":"integer","description":"Within how many minutes a person of the team should answer a conversation the AI handed over (default 15). Past it, the case's owner (`assigneeId`), or the team's recipients while nobody has it, is reminded once; at four times that, the organization's owners and its `productNotices.administrators` hear that it is overdue. Each wait is announced once: a contact who writes again after the team answered starts another. With a digest `frequency`, the conversation is listed again in the next digest instead. `0`: no reminders.","maximum":1440,"minimum":0},{"type":"null"}]},"frequency":{"anyOf":[{"anyOf":[{"type":"string","const":"immediate"},{"type":"string","const":"hourly"},{"type":"string","const":"every3Hours"},{"type":"string","const":"every6Hours"},{"type":"string","const":"every12Hours"}],"description":"How often the notices reach the team (default `immediate`). `immediate` sends each notice as it happens, one email per conversation; a failure that repeats is notified once when its cause first appears, and the conversations the same cause touches in the next hour go out together an hour later, one follow-up an hour while it lasts. `hourly`, `every3Hours`, `every6Hours` and `every12Hours` send one digest at the end of each window of that length, counted from local midnight in the organization's time zone (every six hours: 00:00, 06:00, 12:00 and 18:00), listing the conversations that still need the team; the escalation's WhatsApp message follows the same schedule. A window without notices sends nothing."},{"type":"null"}]},"phones":{"anyOf":[{"type":"array","items":{"type":"string","description":"A number in E.164, with its country code.","pattern":"^\\+[1-9][0-9]{7,14}$"},"description":"Who also receives the escalation notice by WhatsApp, at most 10 numbers in E.164 (default none). The message names the Agent, the organization and why the conversation was handed over, with a link to it; never the contact, the summary or the transcript. The other notices go by email only.","maxItems":10,"uniqueItems":true},{"type":"null"}]},"recipients":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RaizEmailAddress","description":"Email address."},"description":"Additional recipients for team notices alongside eligible workspace owners, at most 10 addresses (default none). An email carries the conversation's link, channel, times, Agent and state, its title and summary and the analysis' evaluations; never the transcript or the captured data. A summary may name the person: choose recipients who may read the organization's conversations.","maxItems":10,"uniqueItems":true},{"type":"null"}]}},"additionalProperties":false},"protection":{"type":"object","properties":{"spamHours":{"anyOf":[{"type":"integer","description":"Hours someone stays in spam once they pass a limit (default 6). A person can lift the rule earlier by deleting it.","maximum":720,"minimum":1},{"type":"null"}]},"voiceCallsPerHour":{"anyOf":[{"type":"integer","description":"Inbound calls one number may make in an hour, whoever spoke (default 10). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier.","maximum":1000,"minimum":1},{"type":"null"}]},"voiceEnabled":{"anyOf":[{"type":"boolean","description":"Whether callers can fall into spam (default true). False: no call is ever refused for what its number consumed."},{"type":"null"}]},"voiceMinutesPerDay":{"anyOf":[{"type":"integer","description":"Minutes of inbound calls one number may use in 24 hours (default 60). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts, its calls are not answered.","maximum":1440,"minimum":1},{"type":"null"}]},"voiceSilentCallsPerHour":{"anyOf":[{"type":"integer","description":"Inbound calls of one number in an hour in which the caller never spoke (default 5). A number that reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier. A call that failed does not count.","maximum":1000,"minimum":1},{"type":"null"}]},"webConversationTokens":{"anyOf":[{"type":"integer","description":"Tokens one web conversation may use (default 10000000). A conversation that reaches it takes no more messages.","maximum":1000000000000,"minimum":10000},{"type":"null"}]},"webEnabled":{"anyOf":[{"type":"boolean","description":"Whether web chat visitors can fall into spam (default true)."},{"type":"null"}]},"webMessagesPerDay":{"anyOf":[{"type":"integer","description":"Messages one web visitor may send in 24 hours, across their chats (default 100). A visitor who reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts they cannot open a chat. Visitors are told apart by network address, so people who share one count together.","maximum":100000,"minimum":1},{"type":"null"}]},"whatsappConversationTokens":{"anyOf":[{"type":"integer","description":"Tokens (input, cached input included, plus output) one WhatsApp conversation may use since the AI last took it (default 10000000). A contact whose conversation reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier.","maximum":1000000000000,"minimum":10000},{"type":"null"}]},"whatsappEnabled":{"anyOf":[{"type":"boolean","description":"Whether WhatsApp contacts can fall into spam (default true)."},{"type":"null"}]},"whatsappRepliesPerHour":{"anyOf":[{"type":"integer","description":"Replies the AI may write in one WhatsApp conversation in an hour (default 60). A contact whose conversation reaches it falls into spam: an automatic suppression of that channel, inbound only, that expires after `spamHours` and that a person can lift earlier; while it lasts the AI does not answer them, and their messages are still stored for the team.","maximum":10000,"minimum":1},{"type":"null"}]}},"additionalProperties":false},"whatsapp":{"type":"object","properties":{"maxConcurrentReplies":{"anyOf":[{"type":"integer","description":"WhatsApp replies the organization's Agents write at once (default 20). A reply past it waits for the next scheduler tick, so a peak in one organization never slows the others.","minimum":1,"maximum":500},{"type":"null"}]}},"additionalProperties":false}},"description":"Settings to change. An omitted setting stays as it is; `null` returns it to its default.","additionalProperties":false},"timeZone":{"type":"string","description":"IANA time zone name.","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateOrganization","x-arbol-native-rpc":true}},"/v1/raiz/organization/send-daily-report":{"post":{"operationId":"raiz.organization.sendDailyReport","summary":"Send the daily report now","description":"Email the daily report now to the workspace owners with product access and the additional recipients in `settings.dailyReport`, whether or not it goes out by itself each day: the calls and conversations registered in the last 24 hours, the conversations waiting for the team and those that need a review. It arrives within a minute. Fails with DAILY_REPORT_RECIPIENTS_MISSING when the report has no recipients, and DAILY_REPORT_IN_PROGRESS while a report asked for earlier is still on its way.","tags":["raiz"],"security":[{"arbolHuman":["raiz:organization:write"]},{"arbolMachine":["raiz:organization:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:organization:write"],"x-effect":"write","x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSendDailyReportResultResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"`DAILY_REPORT_IN_PROGRESS`: The daily report you asked for is still on its way; it arrives within a minute.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["DAILY_REPORT_IN_PROGRESS"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDailyReportInProgressError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`DAILY_REPORT_RECIPIENTS_MISSING`: The daily report has no recipients. Add them in `settings.dailyReport.recipients` first.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["DAILY_REPORT_RECIPIENTS_MISSING"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizDailyReportRecipientsMissingError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSendDailyReportServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"organization","verb":"sendDailyReport","id":null,"query":null},"x-fern-sdk-group-name":["raiz","organization"],"x-fern-sdk-method-name":"sendDailyReport","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":false},"x-arbol-input-schema":{"type":"object","description":"No fields.","additionalProperties":false,"properties":{}},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"sendDailyReport","x-arbol-native-rpc":true}},"/v1/raiz/profiles":{"get":{"operationId":"raiz.profiles.list","summary":"List contact profiles","description":"List the organization's contact profiles (Settings → Contact profiles), newest first: saved ways to reach someone, either a voice Agent that calls or a WhatsApp template whose text Agent answers, that other systems start conversations from by id. Filter by `agentId` or `channelType`. Conversations started from one: `list_conversations` with `profileId`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:profiles:read"]},{"arbolHuman":["raiz:profiles:write"]},{"arbolMachine":["raiz:profiles:read"]},{"arbolMachine":["raiz:profiles:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:profiles:read","raiz:profiles:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"agentId","in":"query","required":false,"description":"Agent id.","schema":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"channelType","in":"query","required":false,"description":"How the profile contacts: a call with a voice Agent (`voice`), or a WhatsApp conversation opened with an approved template and held by a text Agent (`whatsapp`). Fixed at creation.","schema":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"}],"description":"How the profile contacts: a call with a voice Agent (`voice`), or a WhatsApp conversation opened with an approved template and held by a text Agent (`whatsapp`). Fixed at creation."}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizProfilePageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListProfilesBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListProfilesServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"profiles","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","agentId":"string","channelType":"string"}},"x-fern-sdk-group-name":["raiz","profiles"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"}],"description":"How the profile contacts: a call with a voice Agent (`voice`), or a WhatsApp conversation opened with an approved template and held by a text Agent (`whatsapp`). Fixed at creation."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listProfiles","x-arbol-native-rpc":true},"post":{"operationId":"raiz.profiles.create","summary":"Create a contact profile","description":"Save a named way to contact people that other systems can use by id. A `voice` profile places calls with a voice Agent, optionally with its own first message and instructions; a `whatsapp` profile opens conversations with an approved template (its parameters can use the request's variables) and its text Agent answers. Both can limit when contact starts (`contactHours`, `timeZone`). Fails with CHANNEL_AGENT_MISMATCH when the Agent's modality does not fit the channel type, and CHANNEL_TYPE_MISMATCH when the line is of another type; the template is checked when a conversation starts (find templates with `list_templates`).","tags":["raiz"],"security":[{"arbolHuman":["raiz:profiles:write"]},{"arbolMachine":["raiz:profiles:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:profiles:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateProfileBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizProfileResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CHANNEL_TYPE_MISMATCH","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateProfileConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `TIME_ZONE_UNKNOWN`: The time zone is not in the IANA time zone database.\n- `CHANNEL_AGENT_MISMATCH`: This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TIME_ZONE_UNKNOWN","CHANNEL_AGENT_MISMATCH"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateProfileUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateProfileServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"profiles","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","profiles"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"anyOf":[{"type":"object","required":["agentId","name","channelType"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelId":{"anyOf":[{"type":"string","description":"The line to contact from, of the profile's channel type. Null: the Agent's own channel; for calls, then the platform's shared line.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When a conversation may start, in the profile's time zone. Empty: any time. Outside them `createConversation` fails with OUTSIDE_CONTACT_HOURS and nothing is sent.","maxItems":14},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"name":{"type":"string","description":"What the profile is for, as people read it.","maxLength":200,"minLength":1},"timeZone":{"anyOf":[{"type":"string","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$","description":"IANA time zone of the contact hours. Null: the organization's."},{"type":"null"}]},"channelType":{"type":"string","const":"voice"},"firstMessage":{"anyOf":[{"type":"string","description":"What the Agent says first on every call, instead of its own first message. May reference request variables as `{{name}}`.","maxLength":2000,"minLength":1},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","description":"What these calls are about, added to the Agent's instructions on every call. May reference request variables as `{{name}}`.","maxLength":8000,"minLength":1},{"type":"null"}]}},"description":"A profile that places calls with a voice Agent.","additionalProperties":false},{"type":"object","required":["agentId","name","channelType","template"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelId":{"anyOf":[{"type":"string","description":"The line to contact from, of the profile's channel type. Null: the Agent's own channel; for calls, then the platform's shared line.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When a conversation may start, in the profile's time zone. Empty: any time. Outside them `createConversation` fails with OUTSIDE_CONTACT_HOURS and nothing is sent.","maxItems":14},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"name":{"type":"string","description":"What the profile is for, as people read it.","maxLength":200,"minLength":1},"timeZone":{"anyOf":[{"type":"string","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$","description":"IANA time zone of the contact hours. Null: the organization's."},{"type":"null"}]},"channelType":{"type":"string","const":"whatsapp"},"template":{"$ref":"#/components/schemas/RaizProfileTemplateInput","description":"The approved template that opens every conversation. WhatsApp allows a business to start a conversation only with one."}},"description":"A profile that opens WhatsApp conversations with an approved template; its text Agent answers the contact's replies.","additionalProperties":false}]},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createProfile","x-arbol-native-rpc":true}},"/v1/raiz/profiles/{profileId}":{"get":{"operationId":"raiz.profiles.get","summary":"Get a contact profile","description":"Read one contact profile: its Agent and line, texts, WhatsApp template, contact hours and time zone.","tags":["raiz"],"security":[{"arbolHuman":["raiz:profiles:read"]},{"arbolHuman":["raiz:profiles:write"]},{"arbolMachine":["raiz:profiles:read"]},{"arbolMachine":["raiz:profiles:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:profiles:read","raiz:profiles:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"profileId","in":"path","required":true,"description":"Communication profile id.","schema":{"type":"string","description":"Communication profile id.","examples":["prf_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^prf_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizProfileResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetProfileServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"profiles","verb":"get","id":"profileId","query":{}},"x-fern-sdk-group-name":["raiz","profiles"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"profileId":{"type":"string","description":"Communication profile id.","examples":["prf_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^prf_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["profileId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getProfile","x-arbol-native-rpc":true},"patch":{"operationId":"raiz.profiles.update","summary":"Update a contact profile","description":"Change a contact profile's Agent, line, template, texts, contact hours, name or metadata. Omitted fields stay and `null` clears one. The channel type never changes: a field of the other type fails with CHANNEL_TYPE_MISMATCH. Conversations already started keep what they started with.","tags":["raiz"],"security":[{"arbolHuman":["raiz:profiles:write"]},{"arbolMachine":["raiz:profiles:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:profiles:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"profileId","in":"path","required":true,"description":"Communication profile id.","schema":{"type":"string","description":"Communication profile id.","examples":["prf_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^prf_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateProfileBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizProfileResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.\n- `VERSION_CONFLICT`: The resource changed after it was read. Read it again and retry with the new version.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CHANNEL_TYPE_MISMATCH","VERSION_CONFLICT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateProfileConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"- `TIME_ZONE_UNKNOWN`: The time zone is not in the IANA time zone database.\n- `CHANNEL_AGENT_MISMATCH`: This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TIME_ZONE_UNKNOWN","CHANNEL_AGENT_MISMATCH"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateProfileUnprocessableContentError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizUpdateProfileServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"profiles","verb":"update","id":"profileId","query":null},"x-fern-sdk-group-name":["raiz","profiles"],"x-fern-sdk-method-name":"update","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["profileId"],"properties":{"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelId":{"anyOf":[{"type":"string","description":"The line to contact from, of the profile's channel type. Null: the Agent's own channel; for calls, then the platform's shared line.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},{"type":"null"}]},"contactHours":{"type":"array","items":{"$ref":"#/components/schemas/RaizContactHoursWindow","description":"On these days, calls start and messages leave between `from` and `to`."},"description":"When a conversation may start, in the profile's time zone. Empty: any time. Outside them `createConversation` fails with OUTSIDE_CONTACT_HOURS and nothing is sent.","maxItems":14},"expectedVersion":{"type":"integer","description":"The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.","minimum":1},"firstMessage":{"anyOf":[{"type":"string","description":"What the Agent says first on every call, instead of its own first message. May reference request variables as `{{name}}`.","maxLength":2000,"minLength":1},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string","description":"What these calls are about, added to the Agent's instructions on every call. May reference request variables as `{{name}}`.","maxLength":8000,"minLength":1},{"type":"null"}]},"metadata":{"type":"object","patternProperties":{"^[A-Za-z0-9_.-]{1,40}$":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.","maxProperties":50},"name":{"type":"string","description":"What the profile is for, as people read it.","maxLength":200,"minLength":1},"template":{"$ref":"#/components/schemas/RaizProfileTemplateInput","description":"The approved template that opens every conversation. WhatsApp allows a business to start a conversation only with one."},"timeZone":{"anyOf":[{"type":"string","examples":["America/Bogota"],"maxLength":64,"pattern":"^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$","description":"IANA time zone of the contact hours. Null: the organization's."},{"type":"null"}]},"profileId":{"type":"string","description":"Communication profile id.","examples":["prf_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^prf_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"updateProfile","x-arbol-native-rpc":true}},"/v1/raiz/reports":{"get":{"operationId":"raiz.reports.get","summary":"Get a report","description":"Get the numbers behind a question. `name`: `conversations_daily` (conversations the AI took part in, per day), `handoffs_daily` (the conversations the AI handed to the team per day, Agent and person: how many a person answered, how many within the organization's first-reply time and how soon on average, how many still wait, how many closed with nobody answering and how many went back to the AI; filter `agentId`), `booking_details` (verified individual creation receipts with patient, specialty, appointments and later recorded cancellations; also requires conversation read/write permission; filter specialty by its recorded code), `booking_outcomes` (verified saved booking receipts by completion day and integration, excluding tests, imports and deleted conversations; createdCount counts new appointments created by the AI, not confirmations of existing appointments; confirmedCount is its compatibility alias and must not be added again; reschedules, cancellations, failures, pending and unverified results separately), `tool_calls_daily` (Agent tool calls per day), `tool_calls` (each call, newest first), `assessment_results_daily` (assessment results per day), `pqrsf_daily` (PQRSF classification, confirmed informational resolution and correct referrals from current pqrsf_* facts; unknown and pending analysis remain visible; excludes tests/imports/deleted records), each over days in the organization's time zone (`from`, `to`; the last 30 days by default), or `campaign_progress`. Narrow with `agentId`, `channelType`, `campaignId` or `definitionId`; unsupported filters fail. At most 1000 rows: `hasMore` means split the range or filter. Booking outcomes return no partial totals when their evidence scan exceeds its bound. Conversation success and completed tool calls never establish a booking; these are historical receipts, not the provider's current appointment status.","tags":["raiz"],"security":[{"arbolHuman":["raiz:reports:read"]},{"arbolMachine":["raiz:reports:read"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:reports:read"],"x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"specialty","in":"query","required":false,"description":"Only booking_details: exact specialty code recorded in the booking (case-insensitive). Omit to read all specialties.","schema":{"type":"string","maxLength":100,"description":"Only booking_details: exact specialty code recorded in the booking (case-insensitive). Omit to read all specialties."}},{"name":"agentId","in":"query","required":false,"description":"Agent id.","schema":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"campaignId","in":"query","required":false,"description":"Campaign id.","schema":{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"channelType","in":"query","required":false,"description":"The channel type.","schema":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}]}},{"name":"definitionId","in":"query","required":false,"description":"Definition id.","schema":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"from","in":"query","required":false,"description":"First day (`YYYY-MM-DD`) of a daily report. Default: 30 days ending on `to`.","schema":{"type":"string","description":"First day (`YYYY-MM-DD`) of a daily report. Default: 30 days ending on `to`.","format":"date"}},{"name":"name","in":"query","required":true,"description":"`conversations_daily`: conversations the AI took part in per day, Agent, channel type and direction, with outcomes and escalations (filters `agentId`, `channelType`). `handoffs_daily`: the conversations the AI handed to the team, per day of the handoff, Agent and person (who answered first, else the case's owner), with how many were answered, answered in time, still waiting, closed unattended or returned to the AI, and the average seconds to the first answer (filter `agentId`). `booking_details`: individual patients and appointments from explicit successful creation receipts, including specialty, paired exams, deduplication, matched patient names and later recorded cancellations; filters agentId and specialty; requires conversation read/write permission too. Historical receipts with created=true, not current provider status or all provider protocols. unverifiedCount covers explicit creations missing a stable patient/slot. `booking_outcomes`: verified saved booking receipts per completion day, Agent and integration, excluding test/import/deleted conversations; confirmed new bookings, reschedules, cancellations, failed, pending, unverified and duplicate receipts separately (filter `agentId`). Historical evidence, not current appointment status; hasMore requires splitting the range and returns no partial totals. `tool_calls_daily`: tool calls per day, Agent and tool with failures/durations (filter `agentId`). `tool_calls`: individual calls, never inputs/outputs (filter `agentId`). `assessment_results_daily`: assessments per day/definition (filter `definitionId`). `pqrsf_daily`: classification, confirmed resolution and referral-link counts from the pqrsf_* definitions, including pending/unclassified conversations, excluding tests/imports/deleted records (filters `agentId`, `channelType`); no measured filing reduction is inferred. `campaign_progress`: recipients by status (filter `campaignId`; no dates). `usage_daily`: what was used per day, Agent, channel type, campaign and kind, with its credits at the organization's rates and, for AI, the model tier and its tokens (filters `agentId`, `channelType`, `campaignId`); test conversations count like any other.","schema":{"anyOf":[{"type":"string","const":"conversations_daily"},{"type":"string","const":"handoffs_daily"},{"type":"string","const":"pqrsf_daily"},{"type":"string","const":"tool_calls_daily"},{"type":"string","const":"tool_calls"},{"type":"string","const":"booking_outcomes"},{"type":"string","const":"booking_details"},{"type":"string","const":"assessment_results_daily"},{"type":"string","const":"campaign_progress"},{"type":"string","const":"usage_daily"}],"description":"`conversations_daily`: conversations the AI took part in per day, Agent, channel type and direction, with outcomes and escalations (filters `agentId`, `channelType`). `handoffs_daily`: the conversations the AI handed to the team, per day of the handoff, Agent and person (who answered first, else the case's owner), with how many were answered, answered in time, still waiting, closed unattended or returned to the AI, and the average seconds to the first answer (filter `agentId`). `booking_details`: individual patients and appointments from explicit successful creation receipts, including specialty, paired exams, deduplication, matched patient names and later recorded cancellations; filters agentId and specialty; requires conversation read/write permission too. Historical receipts with created=true, not current provider status or all provider protocols. unverifiedCount covers explicit creations missing a stable patient/slot. `booking_outcomes`: verified saved booking receipts per completion day, Agent and integration, excluding test/import/deleted conversations; confirmed new bookings, reschedules, cancellations, failed, pending, unverified and duplicate receipts separately (filter `agentId`). Historical evidence, not current appointment status; hasMore requires splitting the range and returns no partial totals. `tool_calls_daily`: tool calls per day, Agent and tool with failures/durations (filter `agentId`). `tool_calls`: individual calls, never inputs/outputs (filter `agentId`). `assessment_results_daily`: assessments per day/definition (filter `definitionId`). `pqrsf_daily`: classification, confirmed resolution and referral-link counts from the pqrsf_* definitions, including pending/unclassified conversations, excluding tests/imports/deleted records (filters `agentId`, `channelType`); no measured filing reduction is inferred. `campaign_progress`: recipients by status (filter `campaignId`; no dates). `usage_daily`: what was used per day, Agent, channel type, campaign and kind, with its credits at the organization's rates and, for AI, the model tier and its tokens (filters `agentId`, `channelType`, `campaignId`); test conversations count like any other."}},{"name":"to","in":"query","required":false,"description":"Last day (`YYYY-MM-DD`), inclusive, of a daily report. Default: today in the organization's time zone.","schema":{"type":"string","description":"Last day (`YYYY-MM-DD`), inclusive, of a daily report. Default: today in the organization's time zone.","format":"date"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizReportResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `REPORT_FILTER_UNSUPPORTED`: A filter does not apply to the selected report.\n- `REPORT_RANGE_INVALID`: The report range is invalid: `from` must not be after `to`.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","REPORT_FILTER_UNSUPPORTED","REPORT_RANGE_INVALID"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetReportBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetReportServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"reports","verb":"get","id":null,"query":{"specialty":"string","agentId":"string","campaignId":"string","channelType":"string","definitionId":"string","from":"string","name":"string","to":"string"}},"x-fern-sdk-group-name":["raiz","reports"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"specialty":{"type":"string","maxLength":100,"description":"Only booking_details: exact specialty code recorded in the booking (case-insensitive). Omit to read all specialties."},"agentId":{"type":"string","description":"Agent id.","examples":["agt_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^agt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"campaignId":{"type":"string","description":"Campaign id.","examples":["cmp_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^cmp_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"channelType":{"anyOf":[{"type":"string","const":"voice"},{"type":"string","const":"whatsapp"},{"type":"string","const":"web"}],"description":"The channel type."},"definitionId":{"type":"string","description":"Definition id.","examples":["def_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^def_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"from":{"type":"string","description":"First day (`YYYY-MM-DD`) of a daily report. Default: 30 days ending on `to`.","format":"date"},"name":{"anyOf":[{"type":"string","const":"conversations_daily"},{"type":"string","const":"handoffs_daily"},{"type":"string","const":"pqrsf_daily"},{"type":"string","const":"tool_calls_daily"},{"type":"string","const":"tool_calls"},{"type":"string","const":"booking_outcomes"},{"type":"string","const":"booking_details"},{"type":"string","const":"assessment_results_daily"},{"type":"string","const":"campaign_progress"},{"type":"string","const":"usage_daily"}],"description":"`conversations_daily`: conversations the AI took part in per day, Agent, channel type and direction, with outcomes and escalations (filters `agentId`, `channelType`). `handoffs_daily`: the conversations the AI handed to the team, per day of the handoff, Agent and person (who answered first, else the case's owner), with how many were answered, answered in time, still waiting, closed unattended or returned to the AI, and the average seconds to the first answer (filter `agentId`). `booking_details`: individual patients and appointments from explicit successful creation receipts, including specialty, paired exams, deduplication, matched patient names and later recorded cancellations; filters agentId and specialty; requires conversation read/write permission too. Historical receipts with created=true, not current provider status or all provider protocols. unverifiedCount covers explicit creations missing a stable patient/slot. `booking_outcomes`: verified saved booking receipts per completion day, Agent and integration, excluding test/import/deleted conversations; confirmed new bookings, reschedules, cancellations, failed, pending, unverified and duplicate receipts separately (filter `agentId`). Historical evidence, not current appointment status; hasMore requires splitting the range and returns no partial totals. `tool_calls_daily`: tool calls per day, Agent and tool with failures/durations (filter `agentId`). `tool_calls`: individual calls, never inputs/outputs (filter `agentId`). `assessment_results_daily`: assessments per day/definition (filter `definitionId`). `pqrsf_daily`: classification, confirmed resolution and referral-link counts from the pqrsf_* definitions, including pending/unclassified conversations, excluding tests/imports/deleted records (filters `agentId`, `channelType`); no measured filing reduction is inferred. `campaign_progress`: recipients by status (filter `campaignId`; no dates). `usage_daily`: what was used per day, Agent, channel type, campaign and kind, with its credits at the organization's rates and, for AI, the model tier and its tokens (filters `agentId`, `channelType`, `campaignId`); test conversations count like any other."},"to":{"type":"string","description":"Last day (`YYYY-MM-DD`), inclusive, of a daily report. Default: today in the organization's time zone.","format":"date"}},"required":["name"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getReport","x-arbol-native-rpc":true}},"/v1/raiz/suppressions":{"get":{"operationId":"raiz.suppressions.list","summary":"List blocked contacts","description":"List the organization's do-not-contact rules (Settings → Block list), newest first: blocked phone numbers, number prefixes, IP networks and countries. Filter by `kind`, `phone` or `q`. Use it to explain why a call or message was not sent (CONTACT_SUPPRESSED).","tags":["raiz"],"security":[{"arbolHuman":["raiz:suppressions:read"]},{"arbolHuman":["raiz:suppressions:write"]},{"arbolMachine":["raiz:suppressions:read"]},{"arbolMachine":["raiz:suppressions:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:suppressions:read","raiz:suppressions:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"kind","in":"query","required":false,"description":"Comma-separated kinds to list. Default: every kind.","schema":{"type":"string","description":"Comma-separated kinds to list. Default: every kind.","pattern":"^(phone|phone_prefix|ip_network|country)(,(phone|phone_prefix|ip_network|country))*$"}},{"name":"phone","in":"query","required":false,"description":"Only the rules that forbid this E.164 number by number: the number itself or a prefix it starts with.","schema":{"type":"string","description":"Only the rules that forbid this E.164 number by number: the number itself or a prefix it starts with.","examples":["+573001234567"],"pattern":"^\\+[1-9][0-9]{1,14}$"}},{"name":"q","in":"query","required":false,"description":"Text in a rule's number, prefix, network, country code or reason, ignoring case. Spaces, dashes and parentheses typed in a number are ignored.","schema":{"type":"string","description":"Text in a rule's number, prefix, network, country code or reason, ignoring case. Spaces, dashes and parentheses typed in a number are ignored.","maxLength":100,"minLength":1}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSuppressionPageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListSuppressionsBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListSuppressionsServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"suppressions","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","kind":"string","phone":"string","q":"string"}},"x-fern-sdk-group-name":["raiz","suppressions"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"kind":{"type":"string","description":"Comma-separated kinds to list. Default: every kind.","pattern":"^(phone|phone_prefix|ip_network|country)(,(phone|phone_prefix|ip_network|country))*$"},"phone":{"type":"string","description":"Only the rules that forbid this E.164 number by number: the number itself or a prefix it starts with.","examples":["+573001234567"],"pattern":"^\\+[1-9][0-9]{1,14}$"},"q":{"type":"string","description":"Text in a rule's number, prefix, network, country code or reason, ignoring case. Spaces, dashes and parentheses typed in a number are ignored.","maxLength":100,"minLength":1}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listSuppressions","x-arbol-native-rpc":true},"post":{"operationId":"raiz.suppressions.create","summary":"Block contact","description":"Forbid contacting a phone number, every number with a prefix, an IP network (web chat) or a country. Calls, WhatsApp messages and the web widget check these rules before contacting anyone. Give a `reason` people will understand later. Fails with SUPPRESSION_EXISTS when the same rule already exists.","tags":["raiz"],"security":[{"arbolHuman":["raiz:suppressions:write"]},{"arbolMachine":["raiz:suppressions:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:suppressions:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateSuppressionBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSuppressionResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"409":{"description":"`SUPPRESSION_EXISTS`: This organization already has this suppression rule.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["SUPPRESSION_EXISTS"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizSuppressionExistsError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`IP_NETWORK_INVALID`: The IP network is not a valid IPv4 or IPv6 address or CIDR block.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["IP_NETWORK_INVALID"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizIpNetworkInvalidError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateSuppressionServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"suppressions","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","suppressions"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"anyOf":[{"type":"object","required":["kind","phone","reason"],"properties":{"kind":{"type":"string","const":"phone"},"phone":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"reason":{"type":"string","description":"Why contacting is forbidden, for the people who review rules.","maxLength":500,"minLength":1}},"description":"Forbid one phone number.","additionalProperties":false},{"type":"object","required":["kind","phonePrefix","reason"],"properties":{"kind":{"type":"string","const":"phone_prefix"},"phonePrefix":{"type":"string","description":"`+` and the leading digits of the numbers to forbid: a country code (`+57`) or a range (`+57300`).","examples":["+57300"],"pattern":"^\\+[1-9][0-9]{0,13}$"},"reason":{"type":"string","description":"Why contacting is forbidden, for the people who review rules.","maxLength":500,"minLength":1}},"description":"Forbid every number that starts with a prefix.","additionalProperties":false},{"type":"object","required":["ipNetwork","kind","reason"],"properties":{"ipNetwork":{"type":"string","description":"An IPv4 or IPv6 address or CIDR network (`203.0.113.0/24`). Host bits are cleared: `203.0.113.7/24` stores `203.0.113.0/24`.","examples":["203.0.113.0/24"],"maxLength":64,"minLength":2},"kind":{"type":"string","const":"ip_network"},"reason":{"type":"string","description":"Why contacting is forbidden, for the people who review rules.","maxLength":500,"minLength":1}},"description":"Forbid web visitors from an IP network (the Widget).","additionalProperties":false},{"type":"object","required":["countryCode","kind","reason"],"properties":{"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code.","pattern":"^[A-Z]{2}$"},"kind":{"type":"string","const":"country"},"reason":{"type":"string","description":"Why contacting is forbidden, for the people who review rules.","maxLength":500,"minLength":1}},"description":"Forbid a country. Each channel matches it against what it knows: a phone number's country, a web visitor's location.","additionalProperties":false}]},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createSuppression","x-arbol-native-rpc":true}},"/v1/raiz/tasks":{"get":{"operationId":"raiz.tasks.list","summary":"List background tasks","description":"List the organization's background tasks, newest first: contact imports (`contact_import`), conversation re-analyses (`analysis_run`) and website crawls (`knowledge_crawl`). Filter by `kind` or `status` (`queued`, `running`, `completed`, `failed`, `cancelled`). Next: `get_task` for one task's progress or error.","tags":["raiz"],"security":[{"arbolHuman":["raiz:tasks:read"]},{"arbolHuman":["raiz:tasks:write"]},{"arbolMachine":["raiz:tasks:read"]},{"arbolMachine":["raiz:tasks:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:tasks:read","raiz:tasks:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"kind","in":"query","required":false,"description":"What the task does.","schema":{"anyOf":[{"type":"string","const":"contact_import"},{"type":"string","const":"analysis_run"},{"type":"string","const":"knowledge_crawl"}],"description":"What the task does."}},{"name":"status","in":"query","required":false,"description":"The status.","schema":{"anyOf":[{"type":"string","const":"queued"},{"type":"string","const":"running"},{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"cancelled"}]}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizTaskPageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListTasksBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListTasksServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"tasks","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","kind":"string","status":"string"}},"x-fern-sdk-group-name":["raiz","tasks"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"kind":{"anyOf":[{"type":"string","const":"contact_import"},{"type":"string","const":"analysis_run"},{"type":"string","const":"knowledge_crawl"}],"description":"What the task does."},"status":{"anyOf":[{"type":"string","const":"queued"},{"type":"string","const":"running"},{"type":"string","const":"completed"},{"type":"string","const":"failed"},{"type":"string","const":"cancelled"}],"description":"The status."}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listTasks","x-arbol-native-rpc":true}},"/v1/raiz/tasks/{taskId}":{"get":{"operationId":"raiz.tasks.get","summary":"Get a task","description":"Read one background task: status, step progress and, once it ends, its result or `errorCode`. Check it again every few seconds after an action returns a task, such as `import_contacts`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:tasks:read"]},{"arbolHuman":["raiz:tasks:write"]},{"arbolMachine":["raiz:tasks:read"]},{"arbolMachine":["raiz:tasks:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:tasks:read","raiz:tasks:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"taskId","in":"path","required":true,"description":"Task id.","schema":{"type":"string","description":"Task id.","examples":["job_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^job_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizTaskResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizGetTaskServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"tasks","verb":"get","id":"taskId","query":{}},"x-fern-sdk-group-name":["raiz","tasks"],"x-fern-sdk-method-name":"get","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"taskId":{"type":"string","description":"Task id.","examples":["job_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^job_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["taskId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"getTask","x-arbol-native-rpc":true}},"/v1/raiz/tasks/{taskId}/cancel":{"post":{"operationId":"raiz.tasks.cancel","summary":"Cancel a task","description":"Cancel a background task. A queued task is cancelled at once. A running one is asked to stop: it stays `running` with `cancelRequestedAt` until its next checkpoint (an import stops after its current batch of rows), then ends `cancelled`; what it already did stays done. Asking again changes nothing; a finished task fails with INVALID_STATE.","tags":["raiz"],"security":[{"arbolHuman":["raiz:tasks:write"]},{"arbolMachine":["raiz:tasks:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:tasks:write"],"x-effect":"write","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"taskId","in":"path","required":true,"description":"Task id.","schema":{"type":"string","description":"Task id.","examples":["job_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^job_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizTaskResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"`INVALID_STATE`: The resource is not in a state that allows this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_STATE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizInvalidStateError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCancelTaskServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"tasks","verb":"cancel","id":"taskId","query":null},"x-fern-sdk-group-name":["raiz","tasks"],"x-fern-sdk-method-name":"cancel","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","description":"No fields.","additionalProperties":false,"properties":{"taskId":{"type":"string","description":"Task id.","examples":["job_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^job_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["taskId"]},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"cancelTask","x-arbol-native-rpc":true}},"/v1/raiz/tasks/{taskId}/retry":{"post":{"operationId":"raiz.tasks.retry","summary":"Retry a task","description":"Retry a failed task whose kind allows it (`retryable: true`): contact imports, re-analyses and website crawls. It is queued again and resumes from where it stopped (an import after its last imported row), keeping its attempt count; the history records who retried it. Fails with INVALID_STATE when the task did not fail or newer work for the same resource is pending, and TASK_NOT_RETRYABLE when its kind never retries or it used every attempt.","tags":["raiz"],"security":[{"arbolHuman":["raiz:tasks:write"]},{"arbolMachine":["raiz:tasks:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:tasks:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"taskId","in":"path","required":true,"description":"Task id.","schema":{"type":"string","description":"Task id.","examples":["job_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^job_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizTaskResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"`RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizResourceNotFoundError"}}}},"409":{"description":"- `TASK_NOT_RETRYABLE`: This task cannot be retried: its kind never retries, or it already used every attempt. Start it again from its resource.\n- `INVALID_STATE`: The resource is not in a state that allows this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TASK_NOT_RETRYABLE","INVALID_STATE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizRetryTaskConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizRetryTaskServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"tasks","verb":"retry","id":"taskId","query":null},"x-fern-sdk-group-name":["raiz","tasks"],"x-fern-sdk-method-name":"retry","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","description":"No fields.","additionalProperties":false,"properties":{"taskId":{"type":"string","description":"Task id.","examples":["job_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^job_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},"required":["taskId"]},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"retryTask","x-arbol-native-rpc":true}},"/v1/raiz/templates":{"get":{"operationId":"raiz.templates.list","summary":"List WhatsApp templates","description":"List a WhatsApp channel's message templates, read live from WhatsApp, newest first (`channelId` from `list_channels`; filter by `status`). `sendable` says whether Raíz can send one (approved, with variables only in the body), `parameterCount` how many body values it needs, and a `document`, `image` or `video` `header` that each send also carries its file. A template is required to start a WhatsApp conversation with someone who has not written in the last 24 hours.","tags":["raiz"],"security":[{"arbolHuman":["raiz:templates:read"]},{"arbolHuman":["raiz:templates:write"]},{"arbolMachine":["raiz:templates:read"]},{"arbolMachine":["raiz:templates:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:templates:read","raiz:templates:write"],"x-scope-match":"any","x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"channelId","in":"query","required":true,"description":"The WhatsApp channel whose business account's templates to list. Required: templates live in WhatsApp, per business account.","schema":{"type":"string","description":"The WhatsApp channel whose business account's templates to list. Required: templates live in WhatsApp, per business account.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"}},{"name":"status","in":"query","required":false,"description":"The status.","schema":{"anyOf":[{"type":"string","const":"approved"},{"type":"string","const":"pending"},{"type":"string","const":"rejected"}]}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizTemplatePageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListTemplatesBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"- `TEMPLATE_NOT_FOUND`: The template does not exist in this channel's WhatsApp Business Account.\n- `RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TEMPLATE_NOT_FOUND","RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListTemplatesNotFoundError"}}}},"409":{"description":"- `CHANNEL_NOT_READY`: The channel is not connected yet, or this kind of traffic is not enabled on it.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CHANNEL_NOT_READY","CHANNEL_TYPE_MISMATCH"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListTemplatesConflictError"}}}},"422":{"description":"`PROVIDER_REJECTED`: The provider refused the request. Check the configuration and try again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["PROVIDER_REJECTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizProviderRejectedError"}}}},"429":{"description":"- `RATE_LIMITED`: The request rate limit was exceeded. Try again later.\n- `WHATSAPP_RATE_LIMITED`: WhatsApp is limiting messages from this number. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED","WHATSAPP_RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListTemplatesTooManyRequestsError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListTemplatesServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-arbol-api":{"namespace":"raiz","resource":"templates","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","channelId":"string","status":"string"}},"x-fern-sdk-group-name":["raiz","templates"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"channelId":{"type":"string","description":"The WhatsApp channel whose business account's templates to list. Required: templates live in WhatsApp, per business account.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"status":{"anyOf":[{"type":"string","const":"approved"},{"type":"string","const":"pending"},{"type":"string","const":"rejected"}],"description":"The status."}},"required":["channelId"],"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listTemplates","x-arbol-native-rpc":true},"post":{"operationId":"raiz.templates.create","summary":"Create a WhatsApp template","description":"Submit a new message template for WhatsApp's review in a channel's business account: `name`, `language`, `category` (`marketing` or `utility`), `body`, and optional `header`, `footer` and `buttons`. The `header` is a fixed text, or a document (PDF), image or video with a sample file in base64 (up to 5 MiB) for the review; each send then carries its own file. It stays `pending` until WhatsApp approves or rejects it, usually within minutes, and WhatsApp may change its category. Check the result with `list_templates`; a rejected template explains why in `rejectedReason`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:templates:write"]},{"arbolMachine":["raiz:templates:write"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:templates:write"],"x-effect":"write","x-mcp-idempotent":false,"x-mcp-open-world":true,"x-max-body-bytes":8388608,"x-max-output-bytes":1048576,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateTemplateBody"}}}},"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizTemplateResponse"}}}},"400":{"description":"`INVALID_INPUT`: The request does not match the published schema.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidInputError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"404":{"description":"- `TEMPLATE_NOT_FOUND`: The template does not exist in this channel's WhatsApp Business Account.\n- `RESOURCE_NOT_FOUND`: The requested resource does not exist in this organization.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["TEMPLATE_NOT_FOUND","RESOURCE_NOT_FOUND"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateTemplateNotFoundError"}}}},"409":{"description":"- `CHANNEL_NOT_READY`: The channel is not connected yet, or this kind of traffic is not enabled on it.\n- `CHANNEL_TYPE_MISMATCH`: This operation or field does not apply to this channel's type.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["CHANNEL_NOT_READY","CHANNEL_TYPE_MISMATCH"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateTemplateConflictError"}}}},"413":{"description":"`REQUEST_TOO_LARGE`: The request exceeds the allowed size.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["REQUEST_TOO_LARGE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestTooLargeError"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`: The request content type is not supported.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNSUPPORTED_MEDIA_TYPE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"422":{"description":"`PROVIDER_REJECTED`: The provider refused the request. Check the configuration and try again.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["PROVIDER_REJECTED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizProviderRejectedError"}}}},"429":{"description":"- `RATE_LIMITED`: The request rate limit was exceeded. Try again later.\n- `WHATSAPP_RATE_LIMITED`: WhatsApp is limiting messages from this number. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED","WHATSAPP_RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateTemplateTooManyRequestsError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizCreateTemplateServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"templates","verb":"create","id":null,"query":null},"x-fern-sdk-group-name":["raiz","templates"],"x-fern-sdk-method-name":"create","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","required":["body","category","channelId","language","name"],"properties":{"body":{"type":"object","required":["text"],"properties":{"examples":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1},"description":"One sample value per variable, in order. Required when the text has variables: WhatsApp reviews them.","maxItems":20},"text":{"type":"string","description":"Up to 1024 characters. Variables are `{{1}}`, `{{2}}`, … in order; sending fills them from `template.parameters`.","maxLength":1024,"minLength":1}},"additionalProperties":false},"buttons":{"type":"array","items":{"anyOf":[{"type":"object","required":["text","type"],"properties":{"text":{"type":"string","maxLength":25,"minLength":1},"type":{"type":"string","const":"quick_reply"}},"additionalProperties":false},{"type":"object","required":["text","type","url"],"properties":{"text":{"type":"string","maxLength":25,"minLength":1},"type":{"type":"string","const":"url"},"url":{"type":"string","description":"A fixed https link (no variables).","maxLength":2000,"pattern":"^https://[^{}\\s]+$"}},"additionalProperties":false},{"type":"object","required":["text","type"],"properties":{"phone":{"$ref":"#/components/schemas/RaizPhoneNumber","description":"Phone number in E.164 format."},"text":{"type":"string","maxLength":25,"minLength":1},"type":{"type":"string","const":"phone_number"},"phoneNumber":{"$ref":"#/components/schemas/RaizPhoneNumber","deprecated":true,"description":"Deprecated: use `phone`. Answered until 2027-01-28."}},"additionalProperties":false}]},"description":"Up to 10 buttons: at most 2 links and 1 phone number; quick replies stay together, before or after the others.","maxItems":10},"category":{"anyOf":[{"type":"string","const":"marketing"},{"type":"string","const":"utility"}],"description":"`utility` for messages about something the person asked for (appointments, orders); `marketing` for promotions. WhatsApp may recategorize."},"channelId":{"type":"string","description":"Channel id.","examples":["chn_01m45h8q2rf3t9w6y7z0b1c2d3"],"pattern":"^(?:chn_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$"},"footer":{"type":"string","maxLength":60,"minLength":1},"header":{"anyOf":[{"type":"object","required":["format","text"],"properties":{"format":{"type":"string","const":"text"},"text":{"type":"string","description":"Without variables.","maxLength":60,"minLength":1,"pattern":"^[^{}]*$"}},"additionalProperties":false},{"type":"object","required":["example","format"],"properties":{"example":{"type":"object","required":["data","mediaType"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in base64, at most 5242880 bytes decoded.","maxLength":6990508,"minLength":4},"fileName":{"type":"string","description":"The name the contact sees for a document.","maxLength":240,"minLength":1,"pattern":"^[^/\\\\\\u0000-\\u001f\\u007f]+$"},"mediaType":{"type":"string","const":"application/pdf"}},"additionalProperties":false},"format":{"type":"string","const":"document"}},"additionalProperties":false},{"type":"object","required":["example","format"],"properties":{"example":{"type":"object","required":["data","mediaType"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in base64, at most 5242880 bytes decoded.","maxLength":6990508,"minLength":4},"mediaType":{"anyOf":[{"type":"string","const":"image/jpeg"},{"type":"string","const":"image/png"}]}},"additionalProperties":false},"format":{"type":"string","const":"image"}},"additionalProperties":false},{"type":"object","required":["example","format"],"properties":{"example":{"type":"object","required":["data","mediaType"],"properties":{"data":{"type":"string","contentEncoding":"base64","description":"The file's bytes in base64, at most 5242880 bytes decoded.","maxLength":6990508,"minLength":4},"mediaType":{"type":"string","const":"video/mp4"}},"additionalProperties":false},"format":{"type":"string","const":"video"}},"additionalProperties":false}],"description":"Shown above the body: a fixed `text`, or a `document` (PDF), `image` (JPEG or PNG) or `video` (MP4) whose file each send provides. A media header needs a sample `example` for WhatsApp's review; it is used only for that review."},"language":{"type":"string","description":"WhatsApp's language code, for example `es`, `es_MX` or `en_US`.","examples":["es"],"pattern":"^[a-z]{2,3}(_[A-Z]{2})?$"},"name":{"type":"string","description":"Lower case letters, digits and underscores.","examples":["appointment_reminder"],"pattern":"^[a-z0-9_]{1,512}$"}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"createTemplate","x-arbol-native-rpc":true}},"/v1/raiz/voices":{"get":{"operationId":"raiz.voices.list","summary":"List voices","description":"Find a voice for a voice Agent. Each voice shows the languages it is verified for and a sample to listen to (`previewUrl`), sorted by name. Search with `q` (name or label) and keep the voices of one language with `language`. Next: set the chosen id as the Agent's `settings.voice.voiceId` with `update_agent`.","tags":["raiz"],"security":[{"arbolHuman":["raiz:voices:read"]},{"arbolMachine":["raiz:voices:read"]},{"arbolApiKey":[]}],"x-required-scopes":["raiz:voices:read"],"x-effect":"read","x-mcp-idempotent":true,"x-mcp-open-world":true,"x-max-body-bytes":32768,"x-max-output-bytes":1048576,"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor returned by pageInfo; omit it to request the first page.","schema":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."}},{"name":"direction","in":"query","required":false,"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","schema":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"}},{"name":"limit","in":"query","required":false,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25}},{"name":"language","in":"query","required":false,"description":"Only voices labelled with this language (ISO 639-1, for example `es`).","schema":{"type":"string","description":"Only voices labelled with this language (ISO 639-1, for example `es`).","pattern":"^[a-z]{2,3}$"}},{"name":"q","in":"query","required":false,"description":"Matches the name, description and labels.","schema":{"type":"string","description":"Matches the name, description and labels.","maxLength":100,"minLength":1}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizVoicePageResponse"}}}},"400":{"description":"- `INVALID_INPUT`: The request does not match the published schema.\n- `INVALID_CURSOR`: The cursor is malformed or belongs to a different list.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INVALID_INPUT","INVALID_CURSOR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListVoicesBadRequestError"}}}},"401":{"description":"`UNAUTHORIZED`: A valid access token is required.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UNAUTHORIZED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"403":{"description":"`FORBIDDEN`: The token does not authorize this operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["FORBIDDEN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"429":{"description":"`RATE_LIMITED`: The request rate limit was exceeded. Try again later.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before another attempt.","schema":{"type":"integer","minimum":0}}},"x-failure-codes":["RATE_LIMITED"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitedError"}}}},"500":{"description":"`INTERNAL_ERROR`: The service could not complete the operation.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["INTERNAL_ERROR"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"`OUTCOME_UNKNOWN`: The operation may have been applied; check its result before repeating it.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["OUTCOME_UNKNOWN"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutcomeUnknownError"}}}},"503":{"description":"- `UPSTREAM_UNAVAILABLE`: The upstream service could not complete the request.\n- `VOICE_UNAVAILABLE`: Calls are unavailable right now. Try again in a few minutes.\n- `INTEGRATIONS_UNAVAILABLE`: The organization's integrations cannot be read right now. Try again shortly.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_UNAVAILABLE","VOICE_UNAVAILABLE","INTEGRATIONS_UNAVAILABLE"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaizListVoicesServiceUnavailableError"}}}},"504":{"description":"`UPSTREAM_TIMEOUT`: The upstream service did not respond before its deadline.","headers":{"X-Request-Id":{"description":"Request correlation identifier.","schema":{"type":"string"}}},"x-failure-codes":["UPSTREAM_TIMEOUT"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"x-scope-match":"any","x-arbol-api":{"namespace":"raiz","resource":"voices","verb":"list","id":null,"query":{"cursor":"string","direction":"string","limit":"integer","language":"string","q":"string"}},"x-fern-sdk-group-name":["raiz","voices"],"x-fern-sdk-method-name":"list","x-arbol-service-id":"raiz","x-arbol-publication":"selected","x-arbol-publish":{"rest":true,"mcp":true},"x-arbol-input-schema":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque cursor returned by pageInfo; omit it to request the first page."},"direction":{"anyOf":[{"type":"string","const":"forward"},{"type":"string","const":"backward"}],"description":"Direction to traverse the stable keyset ordering from the supplied cursor.","default":"forward"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum items returned in one page. Defaults to 25; larger reads require another cursor.","default":25},"language":{"type":"string","description":"Only voices labelled with this language (ISO 639-1, for example `es`).","pattern":"^[a-z]{2,3}$"},"q":{"type":"string","description":"Matches the name, description and labels.","maxLength":100,"minLength":1}},"additionalProperties":false},"x-arbol-actor-kinds":["user","service"],"x-arbol-method":"listVoices","x-arbol-native-rpc":true}}}}