> For the complete documentation index, see [llms.txt](https://docs.zaia.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaia.app/documentation/api-reference-alpha/reference/squads.md).

# Squads

## GET /api/v1/squads

> Retrieves multiple squads.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/squads":{"get":{"description":"Retrieves multiple squads.","tags":["Squads"],"parameters":[{"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}},{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}],"default":[]},"required":false,"name":"agentIds","in":"query"},{"schema":{"anyOf":[{"type":"array","items":{"type":"string","enum":["agents"]}},{"type":"string","enum":["agents"]}],"default":[]},"required":false,"name":"joins","in":"query"},{"schema":{"type":"number","minimum":1,"default":1,"description":"The page number."},"required":false,"description":"The page number.","name":"pageNumber","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":10,"description":"The page size."},"required":false,"description":"The page size.","name":"pageSize","in":"query"},{"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}},{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}],"default":[]},"required":false,"name":"referenceIds","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Search term to filter squads by name or description."},"required":false,"description":"Search term to filter squads by name or description.","name":"search","in":"query"},{"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}},{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}],"default":[]},"required":false,"name":"versionIds","in":"query"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"responses":{"200":{"description":"Retrieves all squads for the workspace.","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"isRemoved":{"type":"boolean"},"referenceId":{"type":"string","nullable":true,"format":"uuid","description":"The ID of the original entity in production."},"updatedAt":{"type":"string","format":"date-time"},"versionId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"description":{"type":"string","nullable":true,"minLength":3,"maxLength":250,"description":"The internal description of the squad."},"lastExecutedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this squad was last executed."},"mode":{"type":"string","enum":["hierarchical","flat"],"description":"The management mode. In flat, agents redirect the chat to one another. In hierarchical, all iterations are intermediated by the manager."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the squad."},"picture":{"type":"string","nullable":true,"description":"The picture associated with the squad."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the squad."},"workspaceId":{"type":"string","format":"uuid","description":"The workspace ID that owns the squad."},"squadAgents":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"squadId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"type":{"type":"string","enum":["member","main"]},"agent":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"isRemoved":{"type":"boolean"},"referenceId":{"type":"string","nullable":true,"format":"uuid","description":"The ID of the original entity in production."},"updatedAt":{"type":"string","format":"date-time"},"versionId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"codeRuntime":{"type":"boolean","description":"Whether the agent should be able to execute JavaScript code using the Code Runtime tool."},"internalName":{"type":"string","nullable":true,"minLength":3,"maxLength":50,"description":"The internal name of the agent. For internal use only."},"iterations":{"type":"number","minimum":2,"maximum":100,"description":"The number of iterations (steps) the agent can execute in a single execution."},"lastExecutedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this agent was last executed."},"llm":{"type":"string","enum":["claude-haiku-4-5","claude-opus-4-8","claude-opus-4-6","claude-opus-4-5","claude-sonnet-4-6","claude-sonnet-4-5","gpt-5.2","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.6-luna","gpt-5.6-sol","gpt-5.6-terra","gemini-2.5-flash","gemini-2.5-pro","gemini-3.5-flash","gemini-3-flash","gemini-3-pro","gemini-3.1-pro","kimi-k2.5","kimi-k2.6","grok-4.3","grok-4.5"],"description":"The LLM model key to use for the agent."},"llmProviderId":{"type":"string","nullable":true,"format":"uuid","description":"The id of the LLM provider to use for the agent."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The name of the agent."},"picture":{"type":"string","nullable":true,"description":"The picture of the agent."},"planning":{"type":"boolean","description":"Whether the agent should plan before each execution."},"prompt":{"type":"string","minLength":1,"maxLength":10000,"description":"The main description of the agent's behavior."},"reasoningMode":{"type":"string","nullable":true,"enum":["low","medium","high","xhigh",null],"description":"The reasoning mode to use for the agent. If null, reasoning will be disabled."},"role":{"type":"string","minLength":1,"maxLength":250,"description":"The role of the agent. Particularly useful to give other agents context of what the agent does."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the agent."},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"The temperature to use for the agent. The lower the more deterministic. The higher the more creative."},"timezone":{"type":"string","nullable":true,"enum":["Africa/Cairo","Africa/Johannesburg","America/Chicago","America/Denver","America/Los_Angeles","America/New_York","America/Sao_Paulo","America/Manaus","Asia/Dubai","Asia/Kolkata","Asia/Shanghai","Asia/Singapore","Asia/Tokyo","Australia/Sydney","Europe/Berlin","Europe/London","Europe/Moscow","Europe/Paris","Pacific/Auckland","Pacific/Auckland2","UTC","auto",null],"description":"The timezone to use for the agent. If null, no timezone will be used."},"toolCount":{"type":"integer","minimum":0,"description":"The number of tools currently associated with the agent."},"voiceId":{"type":"string","nullable":true,"format":"uuid","description":"The TTS voice to use for audio responses. Null when disabled for the agent."},"workspaceId":{"type":"string","format":"uuid","description":"The workspace ID that owns the agent."}},"required":["createdAt","id","isRemoved","referenceId","updatedAt","versionId","codeRuntime","internalName","iterations","lastExecutedAt","llm","llmProviderId","name","picture","planning","prompt","reasoningMode","role","superIdentityId","temperature","timezone","toolCount","voiceId","workspaceId"]}},"required":["createdAt","updatedAt","agentId","squadId","type","agent"]}}},"required":["createdAt","id","isRemoved","referenceId","updatedAt","versionId","description","lastExecutedAt","mode","name","picture","superIdentityId","workspaceId","squadAgents"]},{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"isRemoved":{"type":"boolean"},"referenceId":{"type":"string","nullable":true,"format":"uuid","description":"The ID of the original entity in production."},"updatedAt":{"type":"string","format":"date-time"},"versionId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"description":{"type":"string","nullable":true,"minLength":3,"maxLength":250,"description":"The internal description of the squad."},"lastExecutedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this squad was last executed."},"mode":{"type":"string","enum":["hierarchical","flat"],"description":"The management mode. In flat, agents redirect the chat to one another. In hierarchical, all iterations are intermediated by the manager."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the squad."},"picture":{"type":"string","nullable":true,"description":"The picture associated with the squad."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the squad."},"workspaceId":{"type":"string","format":"uuid","description":"The workspace ID that owns the squad."}},"required":["createdAt","id","isRemoved","referenceId","updatedAt","versionId","description","lastExecutedAt","mode","name","picture","superIdentityId","workspaceId"]}]}}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## POST /api/v1/squads

> Creates a new squad.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/squads":{"post":{"description":"Creates a new squad.","tags":["Squads"],"parameters":[{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","nullable":true,"minLength":3,"maxLength":250,"description":"The internal description of the squad."},"mode":{"type":"string","enum":["hierarchical","flat"],"description":"The management mode. In flat, agents redirect the chat to one another. In hierarchical, all iterations are intermediated by the manager."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the squad."},"picture":{"type":"string","nullable":true,"description":"The picture associated with the squad."}},"required":["description","mode","name","picture"]}}}},"responses":{"200":{"description":"The squad was created.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"isRemoved":{"type":"boolean"},"referenceId":{"type":"string","nullable":true,"format":"uuid","description":"The ID of the original entity in production."},"updatedAt":{"type":"string","format":"date-time"},"versionId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"description":{"type":"string","nullable":true,"minLength":3,"maxLength":250,"description":"The internal description of the squad."},"lastExecutedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this squad was last executed."},"mode":{"type":"string","enum":["hierarchical","flat"],"description":"The management mode. In flat, agents redirect the chat to one another. In hierarchical, all iterations are intermediated by the manager."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the squad."},"picture":{"type":"string","nullable":true,"description":"The picture associated with the squad."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the squad."},"workspaceId":{"type":"string","format":"uuid","description":"The workspace ID that owns the squad."}},"required":["createdAt","id","isRemoved","referenceId","updatedAt","versionId","description","lastExecutedAt","mode","name","picture","superIdentityId","workspaceId"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"403":{"description":"Plan limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## POST /api/v1/squads/{squadId}/agents

> Creates a new agent or attaches an existing one to a squad.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/squads/{squadId}/agents":{"post":{"description":"Creates a new agent or attaches an existing one to a squad.","tags":["Squads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"squadId","in":"path"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["member","main"]},"agent":{"type":"object","properties":{"codeRuntime":{"type":"boolean","description":"Whether the agent should be able to execute JavaScript code using the Code Runtime tool."},"internalName":{"type":"string","nullable":true,"minLength":3,"maxLength":50,"description":"The internal name of the agent. For internal use only."},"iterations":{"type":"number","minimum":2,"maximum":100,"description":"The number of iterations (steps) the agent can execute in a single execution."},"llm":{"type":"string","enum":["claude-haiku-4-5","claude-opus-4-8","claude-opus-4-6","claude-opus-4-5","claude-sonnet-4-6","claude-sonnet-4-5","gpt-5.2","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.6-luna","gpt-5.6-sol","gpt-5.6-terra","gemini-2.5-flash","gemini-2.5-pro","gemini-3.5-flash","gemini-3-flash","gemini-3-pro","gemini-3.1-pro","kimi-k2.5","kimi-k2.6","grok-4.3","grok-4.5"],"description":"The LLM model key to use for the agent."},"llmProviderId":{"type":"string","nullable":true,"format":"uuid","description":"The id of the LLM provider to use for the agent."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The name of the agent."},"picture":{"type":"string","nullable":true,"description":"The picture of the agent."},"planning":{"type":"boolean","description":"Whether the agent should plan before each execution."},"prompt":{"type":"string","minLength":1,"maxLength":10000,"description":"The main description of the agent's behavior."},"reasoningMode":{"type":"string","nullable":true,"enum":["low","medium","high","xhigh",null],"description":"The reasoning mode to use for the agent. If null, reasoning will be disabled."},"role":{"type":"string","minLength":1,"maxLength":250,"description":"The role of the agent. Particularly useful to give other agents context of what the agent does."},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"The temperature to use for the agent. The lower the more deterministic. The higher the more creative."},"timezone":{"type":"string","nullable":true,"enum":["Africa/Cairo","Africa/Johannesburg","America/Chicago","America/Denver","America/Los_Angeles","America/New_York","America/Sao_Paulo","America/Manaus","Asia/Dubai","Asia/Kolkata","Asia/Shanghai","Asia/Singapore","Asia/Tokyo","Australia/Sydney","Europe/Berlin","Europe/London","Europe/Moscow","Europe/Paris","Pacific/Auckland","Pacific/Auckland2","UTC","auto",null],"description":"The timezone to use for the agent. If null, no timezone will be used."}},"required":["codeRuntime","internalName","iterations","llm","llmProviderId","name","picture","planning","prompt","reasoningMode","role","temperature","timezone"]}},"required":["type","agent"]},{"type":"object","properties":{"agentId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"type":{"type":"string","enum":["member","main"]}},"required":["agentId","type"]}]}}}},"responses":{"200":{"description":"The agent was created.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"squadId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"type":{"type":"string","enum":["member","main"]},"agent":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"isRemoved":{"type":"boolean"},"referenceId":{"type":"string","nullable":true,"format":"uuid","description":"The ID of the original entity in production."},"updatedAt":{"type":"string","format":"date-time"},"versionId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"codeRuntime":{"type":"boolean","description":"Whether the agent should be able to execute JavaScript code using the Code Runtime tool."},"internalName":{"type":"string","nullable":true,"minLength":3,"maxLength":50,"description":"The internal name of the agent. For internal use only."},"iterations":{"type":"number","minimum":2,"maximum":100,"description":"The number of iterations (steps) the agent can execute in a single execution."},"lastExecutedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this agent was last executed."},"llm":{"type":"string","enum":["claude-haiku-4-5","claude-opus-4-8","claude-opus-4-6","claude-opus-4-5","claude-sonnet-4-6","claude-sonnet-4-5","gpt-5.2","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.6-luna","gpt-5.6-sol","gpt-5.6-terra","gemini-2.5-flash","gemini-2.5-pro","gemini-3.5-flash","gemini-3-flash","gemini-3-pro","gemini-3.1-pro","kimi-k2.5","kimi-k2.6","grok-4.3","grok-4.5"],"description":"The LLM model key to use for the agent."},"llmProviderId":{"type":"string","nullable":true,"format":"uuid","description":"The id of the LLM provider to use for the agent."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The name of the agent."},"picture":{"type":"string","nullable":true,"description":"The picture of the agent."},"planning":{"type":"boolean","description":"Whether the agent should plan before each execution."},"prompt":{"type":"string","minLength":1,"maxLength":10000,"description":"The main description of the agent's behavior."},"reasoningMode":{"type":"string","nullable":true,"enum":["low","medium","high","xhigh",null],"description":"The reasoning mode to use for the agent. If null, reasoning will be disabled."},"role":{"type":"string","minLength":1,"maxLength":250,"description":"The role of the agent. Particularly useful to give other agents context of what the agent does."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the agent."},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"The temperature to use for the agent. The lower the more deterministic. The higher the more creative."},"timezone":{"type":"string","nullable":true,"enum":["Africa/Cairo","Africa/Johannesburg","America/Chicago","America/Denver","America/Los_Angeles","America/New_York","America/Sao_Paulo","America/Manaus","Asia/Dubai","Asia/Kolkata","Asia/Shanghai","Asia/Singapore","Asia/Tokyo","Australia/Sydney","Europe/Berlin","Europe/London","Europe/Moscow","Europe/Paris","Pacific/Auckland","Pacific/Auckland2","UTC","auto",null],"description":"The timezone to use for the agent. If null, no timezone will be used."},"toolCount":{"type":"integer","minimum":0,"description":"The number of tools currently associated with the agent."},"voiceId":{"type":"string","nullable":true,"format":"uuid","description":"The TTS voice to use for audio responses. Null when disabled for the agent."},"workspaceId":{"type":"string","format":"uuid","description":"The workspace ID that owns the agent."}},"required":["createdAt","id","isRemoved","referenceId","updatedAt","versionId","codeRuntime","internalName","iterations","lastExecutedAt","llm","llmProviderId","name","picture","planning","prompt","reasoningMode","role","superIdentityId","temperature","timezone","toolCount","voiceId","workspaceId"]}},"required":["createdAt","updatedAt","agentId","squadId","type","agent"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"403":{"description":"Plan limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"The agent was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"412":{"description":"Agent is already associated with this squad.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## POST /api/v1/squads/{id}/execute

> Executes a squad with provided messages.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/squads/{id}/execute":{"post":{"description":"Executes a squad with provided messages.","tags":["Squads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"id","in":"path"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"context":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"attachments":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"base64":{"type":"string","pattern":"^data:.*;base64,","description":"A base64 encoded string with prefix."},"extension":{"type":"string","enum":["png"]}},"required":["base64","extension"]},{"type":"object","properties":{"base64":{"type":"string","pattern":"^data:.*;base64,","description":"A base64 encoded string with prefix."},"extension":{"type":"string","enum":["pdf"]},"name":{"type":"string"}},"required":["base64","extension"]},{"type":"object","properties":{"base64":{"type":"string","pattern":"^data:.*;base64,","description":"A base64 encoded string with prefix."},"extension":{"type":"string","enum":["md"]}},"required":["base64","extension"]},{"type":"object","properties":{"base64":{"type":"string","pattern":"^data:.*;base64,","description":"A base64 encoded string with prefix."},"extension":{"type":"string","enum":["txt"]}},"required":["base64","extension"]}]}},"content":{"type":"string"},"role":{"anyOf":[{"type":"string","enum":["assistant"]},{"type":"string","enum":["user"]}]}},"required":["attachments","content","role"]},"minItems":1},"output":{"type":"object","description":"A JSON Schema definition object","properties":{"properties":{"additionalProperties":{"oneOf":[{"properties":{"description":{"type":"string"},"enum":{"items":{},"type":"array"},"nullable":{"type":"boolean"},"type":{"enum":["string","number","integer","boolean","null"],"type":"string"}},"required":["type"],"type":"object"},{"properties":{"description":{"type":"string"},"items":{"type":"object"},"nullable":{"type":"boolean"},"type":{"enum":["array"],"type":"string"}},"required":["type"],"type":"object"},{"properties":{"description":{"type":"string"},"nullable":{"type":"boolean"},"properties":{"type":"object"},"required":{"items":{"type":"string"},"type":"array"},"type":{"enum":["object"],"type":"string"}},"required":["type"],"type":"object"},{"properties":{"anyOf":{"items":{"type":"object"},"type":"array"},"description":{"type":"string"},"nullable":{"type":"boolean"}},"required":["anyOf"],"type":"object"}]},"type":"object"},"required":{"items":{"type":"string"},"type":"array"},"type":{"enum":["object"],"type":"string"}},"required":["type","properties"]}},"required":["messages"]}}}},"responses":{"200":{"description":"The squad was executed.","content":{"application/json":{"schema":{"type":"object","properties":{"attachmentsUrls":{"type":"array","items":{"type":"string"}},"content":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{"nullable":true}}]},"execution":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"updatedAt":{"type":"string","format":"date-time"},"creditsUsed":{"type":"number","minimum":0,"description":"The total number of credits used by this execution."},"detail":{"anyOf":[{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this agent execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this agent execution."},"type":{"type":"string","enum":["agent-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this squad execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this squad execution."},"squadId":{"type":"string","description":"The squad identifier."},"type":{"type":"string","enum":["squad-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","squadId","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"events":{"type":"array","items":{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"nodeType":{"type":"string","description":"The type of workflow node."},"type":{"type":"string","enum":["workflow-node"],"description":"The event subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","nodeType","type","workflowNodeId"]},"description":"The events that occurred during this workflow execution."},"origin":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["webhook-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"type":{"type":"string","enum":["agent-tool-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this workflow execution."},"type":{"type":"string","enum":["workflow-execution"],"description":"The execution detail subtype represented by this payload."},"workflowId":{"type":"string","description":"The workflow identifier."},"workflowImplementationId":{"type":"string","description":"The workflow implementation identifier."}},"required":["input","output","events","origin","type","workflowId","workflowImplementationId"]}],"description":"The execution detail containing type-specific information."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this execution ended."},"isAgentic":{"type":"boolean","description":"Whether this execution is agentic."},"isFailedAttempt":{"type":"boolean","description":"Whether this execution belongs to a failed retry attempt."},"isPurged":{"type":"boolean","description":"Whether this execution has been purged."},"parentId":{"type":"string","nullable":true,"format":"uuid","description":"The parent execution ID of this execution."},"responderId":{"type":"string","description":"The responder ID of this execution."},"startedAt":{"type":"string","format":"date-time","description":"When this execution started."},"status":{"type":"string","enum":["running","completed","failed","cancelled"],"description":"The status of the execution."},"workspaceId":{"type":"string","description":"The workspace ID of this execution."}},"required":["createdAt","id","updatedAt","creditsUsed","detail","endedAt","isAgentic","isFailedAttempt","isPurged","parentId","responderId","startedAt","status","workspaceId"]}},"required":["attachmentsUrls","content","execution"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"Squad not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"412":{"description":"Flat collaboration mode is exclusive for chats.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## GET /api/v1/squads/{id}

> Retrieves a squad.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/squads/{id}":{"get":{"description":"Retrieves a squad.","tags":["Squads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"id","in":"path"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"responses":{"200":{"description":"Retrieves a squad.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"isRemoved":{"type":"boolean"},"referenceId":{"type":"string","nullable":true,"format":"uuid","description":"The ID of the original entity in production."},"updatedAt":{"type":"string","format":"date-time"},"versionId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"description":{"type":"string","nullable":true,"minLength":3,"maxLength":250,"description":"The internal description of the squad."},"lastExecutedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this squad was last executed."},"mode":{"type":"string","enum":["hierarchical","flat"],"description":"The management mode. In flat, agents redirect the chat to one another. In hierarchical, all iterations are intermediated by the manager."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the squad."},"picture":{"type":"string","nullable":true,"description":"The picture associated with the squad."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the squad."},"workspaceId":{"type":"string","format":"uuid","description":"The workspace ID that owns the squad."}},"required":["createdAt","id","isRemoved","referenceId","updatedAt","versionId","description","lastExecutedAt","mode","name","picture","superIdentityId","workspaceId"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"Squad not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## DELETE /api/v1/squads/{id}

> Removes a squad.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/squads/{id}":{"delete":{"description":"Removes a squad.","tags":["Squads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"id","in":"path"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"responses":{"200":{"description":"The squad was removed.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"An informative message for a call that has no effective result to be returned."}},"required":["message"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"Squad not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## PATCH /api/v1/squads/{id}

> Updates a squad.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/squads/{id}":{"patch":{"description":"Updates a squad.","tags":["Squads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"id","in":"path"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","nullable":true,"minLength":3,"maxLength":250,"description":"The internal description of the squad."},"mode":{"type":"string","enum":["hierarchical","flat"],"description":"The management mode. In flat, agents redirect the chat to one another. In hierarchical, all iterations are intermediated by the manager."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the squad."},"picture":{"type":"string","nullable":true,"description":"The picture associated with the squad."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the squad."}}}}}},"responses":{"200":{"description":"The squad was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"isRemoved":{"type":"boolean"},"referenceId":{"type":"string","nullable":true,"format":"uuid","description":"The ID of the original entity in production."},"updatedAt":{"type":"string","format":"date-time"},"versionId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"description":{"type":"string","nullable":true,"minLength":3,"maxLength":250,"description":"The internal description of the squad."},"lastExecutedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this squad was last executed."},"mode":{"type":"string","enum":["hierarchical","flat"],"description":"The management mode. In flat, agents redirect the chat to one another. In hierarchical, all iterations are intermediated by the manager."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the squad."},"picture":{"type":"string","nullable":true,"description":"The picture associated with the squad."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the squad."},"workspaceId":{"type":"string","format":"uuid","description":"The workspace ID that owns the squad."}},"required":["createdAt","id","isRemoved","referenceId","updatedAt","versionId","description","lastExecutedAt","mode","name","picture","superIdentityId","workspaceId"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"Squad not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## GET /api/v1/squads/{squadId}/agents/{agentId}

> Retrieves agents in a squad.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/squads/{squadId}/agents/{agentId}":{"get":{"description":"Retrieves agents in a squad.","tags":["Squads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"squadId","in":"path"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"responses":{"200":{"description":"Retrieves a squad agent.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"squadId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"type":{"type":"string","enum":["member","main"]},"agent":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"isRemoved":{"type":"boolean"},"referenceId":{"type":"string","nullable":true,"format":"uuid","description":"The ID of the original entity in production."},"updatedAt":{"type":"string","format":"date-time"},"versionId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"codeRuntime":{"type":"boolean","description":"Whether the agent should be able to execute JavaScript code using the Code Runtime tool."},"internalName":{"type":"string","nullable":true,"minLength":3,"maxLength":50,"description":"The internal name of the agent. For internal use only."},"iterations":{"type":"number","minimum":2,"maximum":100,"description":"The number of iterations (steps) the agent can execute in a single execution."},"lastExecutedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this agent was last executed."},"llm":{"type":"string","enum":["claude-haiku-4-5","claude-opus-4-8","claude-opus-4-6","claude-opus-4-5","claude-sonnet-4-6","claude-sonnet-4-5","gpt-5.2","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.6-luna","gpt-5.6-sol","gpt-5.6-terra","gemini-2.5-flash","gemini-2.5-pro","gemini-3.5-flash","gemini-3-flash","gemini-3-pro","gemini-3.1-pro","kimi-k2.5","kimi-k2.6","grok-4.3","grok-4.5"],"description":"The LLM model key to use for the agent."},"llmProviderId":{"type":"string","nullable":true,"format":"uuid","description":"The id of the LLM provider to use for the agent."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The name of the agent."},"picture":{"type":"string","nullable":true,"description":"The picture of the agent."},"planning":{"type":"boolean","description":"Whether the agent should plan before each execution."},"prompt":{"type":"string","minLength":1,"maxLength":10000,"description":"The main description of the agent's behavior."},"reasoningMode":{"type":"string","nullable":true,"enum":["low","medium","high","xhigh",null],"description":"The reasoning mode to use for the agent. If null, reasoning will be disabled."},"role":{"type":"string","minLength":1,"maxLength":250,"description":"The role of the agent. Particularly useful to give other agents context of what the agent does."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the agent."},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"The temperature to use for the agent. The lower the more deterministic. The higher the more creative."},"timezone":{"type":"string","nullable":true,"enum":["Africa/Cairo","Africa/Johannesburg","America/Chicago","America/Denver","America/Los_Angeles","America/New_York","America/Sao_Paulo","America/Manaus","Asia/Dubai","Asia/Kolkata","Asia/Shanghai","Asia/Singapore","Asia/Tokyo","Australia/Sydney","Europe/Berlin","Europe/London","Europe/Moscow","Europe/Paris","Pacific/Auckland","Pacific/Auckland2","UTC","auto",null],"description":"The timezone to use for the agent. If null, no timezone will be used."},"toolCount":{"type":"integer","minimum":0,"description":"The number of tools currently associated with the agent."},"voiceId":{"type":"string","nullable":true,"format":"uuid","description":"The TTS voice to use for audio responses. Null when disabled for the agent."},"workspaceId":{"type":"string","format":"uuid","description":"The workspace ID that owns the agent."}},"required":["createdAt","id","isRemoved","referenceId","updatedAt","versionId","codeRuntime","internalName","iterations","lastExecutedAt","llm","llmProviderId","name","picture","planning","prompt","reasoningMode","role","superIdentityId","temperature","timezone","toolCount","voiceId","workspaceId"]}},"required":["createdAt","updatedAt","agentId","squadId","type","agent"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"Squad agent not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## DELETE /api/v1/squads/{squadId}/agents/{agentId}

> Detaches an agent from a squad.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/squads/{squadId}/agents/{agentId}":{"delete":{"description":"Detaches an agent from a squad.","tags":["Squads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"squadId","in":"path"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"responses":{"200":{"description":"The squad agent relationship was removed.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"An informative message for a call that has no effective result to be returned."}},"required":["message"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"Squad agent relationship not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"412":{"description":"Precondition failed.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## PATCH /api/v1/squads/{squadId}/agents/{agentId}

> Updates agents in a squad.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/squads/{squadId}/agents/{agentId}":{"patch":{"description":"Updates agents in a squad.","tags":["Squads"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"agentId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"squadId","in":"path"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["member","main"]},"agent":{"type":"object","properties":{"codeRuntime":{"type":"boolean","description":"Whether the agent should be able to execute JavaScript code using the Code Runtime tool."},"internalName":{"type":"string","nullable":true,"minLength":3,"maxLength":50,"description":"The internal name of the agent. For internal use only."},"iterations":{"type":"number","minimum":2,"maximum":100,"description":"The number of iterations (steps) the agent can execute in a single execution."},"llm":{"type":"string","enum":["claude-haiku-4-5","claude-opus-4-8","claude-opus-4-6","claude-opus-4-5","claude-sonnet-4-6","claude-sonnet-4-5","gpt-5.2","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.6-luna","gpt-5.6-sol","gpt-5.6-terra","gemini-2.5-flash","gemini-2.5-pro","gemini-3.5-flash","gemini-3-flash","gemini-3-pro","gemini-3.1-pro","kimi-k2.5","kimi-k2.6","grok-4.3","grok-4.5"],"description":"The LLM model key to use for the agent."},"llmProviderId":{"type":"string","nullable":true,"format":"uuid","description":"The id of the LLM provider to use for the agent."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The name of the agent."},"picture":{"type":"string","nullable":true,"description":"The picture of the agent."},"planning":{"type":"boolean","description":"Whether the agent should plan before each execution."},"prompt":{"type":"string","minLength":1,"maxLength":10000,"description":"The main description of the agent's behavior."},"reasoningMode":{"type":"string","nullable":true,"enum":["low","medium","high","xhigh",null],"description":"The reasoning mode to use for the agent. If null, reasoning will be disabled."},"role":{"type":"string","minLength":1,"maxLength":250,"description":"The role of the agent. Particularly useful to give other agents context of what the agent does."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the agent."},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"The temperature to use for the agent. The lower the more deterministic. The higher the more creative."},"timezone":{"type":"string","nullable":true,"enum":["Africa/Cairo","Africa/Johannesburg","America/Chicago","America/Denver","America/Los_Angeles","America/New_York","America/Sao_Paulo","America/Manaus","Asia/Dubai","Asia/Kolkata","Asia/Shanghai","Asia/Singapore","Asia/Tokyo","Australia/Sydney","Europe/Berlin","Europe/London","Europe/Moscow","Europe/Paris","Pacific/Auckland","Pacific/Auckland2","UTC","auto",null],"description":"The timezone to use for the agent. If null, no timezone will be used."},"toolCount":{"type":"integer","minimum":0,"description":"The number of tools currently associated with the agent."},"voiceId":{"type":"string","nullable":true,"format":"uuid","description":"The TTS voice for audio responses. Null to disable."}}}}}}}},"responses":{"200":{"description":"The squad agent was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"squadId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"type":{"type":"string","enum":["member","main"]},"agent":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"isRemoved":{"type":"boolean"},"referenceId":{"type":"string","nullable":true,"format":"uuid","description":"The ID of the original entity in production."},"updatedAt":{"type":"string","format":"date-time"},"versionId":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"codeRuntime":{"type":"boolean","description":"Whether the agent should be able to execute JavaScript code using the Code Runtime tool."},"internalName":{"type":"string","nullable":true,"minLength":3,"maxLength":50,"description":"The internal name of the agent. For internal use only."},"iterations":{"type":"number","minimum":2,"maximum":100,"description":"The number of iterations (steps) the agent can execute in a single execution."},"lastExecutedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this agent was last executed."},"llm":{"type":"string","enum":["claude-haiku-4-5","claude-opus-4-8","claude-opus-4-6","claude-opus-4-5","claude-sonnet-4-6","claude-sonnet-4-5","gpt-5.2","gpt-5.5","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.6-luna","gpt-5.6-sol","gpt-5.6-terra","gemini-2.5-flash","gemini-2.5-pro","gemini-3.5-flash","gemini-3-flash","gemini-3-pro","gemini-3.1-pro","kimi-k2.5","kimi-k2.6","grok-4.3","grok-4.5"],"description":"The LLM model key to use for the agent."},"llmProviderId":{"type":"string","nullable":true,"format":"uuid","description":"The id of the LLM provider to use for the agent."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The name of the agent."},"picture":{"type":"string","nullable":true,"description":"The picture of the agent."},"planning":{"type":"boolean","description":"Whether the agent should plan before each execution."},"prompt":{"type":"string","minLength":1,"maxLength":10000,"description":"The main description of the agent's behavior."},"reasoningMode":{"type":"string","nullable":true,"enum":["low","medium","high","xhigh",null],"description":"The reasoning mode to use for the agent. If null, reasoning will be disabled."},"role":{"type":"string","minLength":1,"maxLength":250,"description":"The role of the agent. Particularly useful to give other agents context of what the agent does."},"superIdentityId":{"type":"string","format":"uuid","description":"The super identity ID associated with the agent."},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"The temperature to use for the agent. The lower the more deterministic. The higher the more creative."},"timezone":{"type":"string","nullable":true,"enum":["Africa/Cairo","Africa/Johannesburg","America/Chicago","America/Denver","America/Los_Angeles","America/New_York","America/Sao_Paulo","America/Manaus","Asia/Dubai","Asia/Kolkata","Asia/Shanghai","Asia/Singapore","Asia/Tokyo","Australia/Sydney","Europe/Berlin","Europe/London","Europe/Moscow","Europe/Paris","Pacific/Auckland","Pacific/Auckland2","UTC","auto",null],"description":"The timezone to use for the agent. If null, no timezone will be used."},"toolCount":{"type":"integer","minimum":0,"description":"The number of tools currently associated with the agent."},"voiceId":{"type":"string","nullable":true,"format":"uuid","description":"The TTS voice to use for audio responses. Null when disabled for the agent."},"workspaceId":{"type":"string","format":"uuid","description":"The workspace ID that owns the agent."}},"required":["createdAt","id","isRemoved","referenceId","updatedAt","versionId","codeRuntime","internalName","iterations","lastExecutedAt","llm","llmProviderId","name","picture","planning","prompt","reasoningMode","role","superIdentityId","temperature","timezone","toolCount","voiceId","workspaceId"]}},"required":["createdAt","updatedAt","agentId","squadId","type","agent"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"The squad agent was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```
