Skip to main content
POST
/
squads

Endpoint

POST https://gateway.orkeia.ai/squads Authentication
Requires header authorization: <your_token>.

Request Body (JSON)

The service expects a wrapper with the property squad.
{
  "squad": {
    "name": "Equipe Alpha",
    "tasks": [
      {
        "id": "TASK_INGEST",
        "agent": "AGENT_INGEST",
        "name": "Ingestão de Dados",
        "objective": "Coletar e normalizar dados de origem externa",
        "dependsOn": [],
        "coordinates": { "x": 80, "y": 40, "width": 320, "height": 160 }
      }
    ],
    "order": "sequential",
    "enabled": true,
    "do_plan": false,
    "sectors": ["engineering"],
    "publisher": "Orkeia",
    "planningAgent": { "id": "AGENT_PLANNER" },
    "supervisor": { "id": "AGENT_SUPERVISOR" }
  }
}
Main fields of Squad
FieldTypeRequiredDescription
namestringYesFriendly name of the squad.
tasksTask[]YesList of tasks orchestrated by the squad.
order"sequential" | "hierarchical"YesExecution strategy of the tasks.
enabledbooleanYesActivates/deactivates the squad.
do_planbooleanYesIf there is a planning step before execution.
sectorsstring[]YesSectors with permission to use the squad.
publisherstringYesPublisher/organization responsible.
planningAgent{ id: string, coordinates? }No(Optional) Agent dedicated to planning.
supervisor{ id: string, coordinates? }No(Optional) Supervisor/validator agent.

Example (cURL)

curl -X POST "https://gateway.orkeia.ai/squads"   -H "authorization:  <your_token>"   -H "Content-Type: application/json"   -d '{
    "squad": {
      "name": "Equipe Alpha",
      "tasks": [
        {
          "id": "TASK_INGEST",
          "agent": "AGENT_INGEST",
          "name": "Ingestão de Dados",
          "objective": "Coletar e normalizar dados de origem externa",
          "dependsOn": [],
          "coordinates": { "x": 80, "y": 40, "width": 320, "height": 160 }
        }
      ],
      "order": "sequential",
      "enabled": true,
      "do_plan": false,
      "sectors": ["engineering"],
      "publisher": "Orkeia",
      "planningAgent": { "id": "AGENT_PLANNER" },
      "supervisor": { "id": "AGENT_SUPERVISOR" }
    }
  }'

Responses

Response - Success

response
{
  "status": "OK",
  "data": { "id": "SQUAD_123456" }
}

500 — Server Error

{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}

400 — Client Error

{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}