Logo
Search
API Docs

Squad API: Create, Update, List

Squads

Squad API: Create, Update, List

Overview

The Squad API provides the three endpoints used to create, update, and list Squads — the multi-assistant call-routing resource described conceptually on the Squads & Handoffs page. All three endpoints live under /squad, and every request requires a Bearer token in the Authorization header.

EndpointMethodPurpose
/squadPOSTCreate a new squad
/squad/{id}PATCHUpdate an existing squad
/squadGETList squads for your account

Create Squad

POST https://api.sulus.ai/squad — creates a new squad.

Request headers:

NameTypeRequiredDescription
AuthorizationstringYesBearer <token> — your Sulus API key

Request body (application/json): a members array of squad member objects, plus an optional name field.

Response: 201 — returns the created Squad object.

Example creating a two-member squad:

curl -X POST https://api.sulus.ai/squad \
  -H "Authorization: Bearer $SULUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Routing Squad",
    "members": [
      {
        "assistant": {
          "name": "Router",
          "model": {
            "provider": "openai",
            "model": "gpt-4o",
            "messages": [{"role": "system", "content": "Classify inquiries and transfer accordingly."}]
          },
          "firstMessage": "Thanks for calling. How can I help?",
          "firstMessageMode": "assistant-speaks-first"
        }
      },
      {
        "assistant": {
          "name": "Specialist",
          "model": {
            "provider": "openai",
            "model": "gpt-4o",
            "messages": [{"role": "system", "content": "Domain specialist assistant."}]
          }
        }
      }
    ]
  }'

Update Squad

PATCH https://api.sulus.ai/squad/{id} — updates an existing squad.

Path parameters:

NameTypeRequiredDescription
idstringYesThe unique identifier of the squad

Request body: uses the same field shape as create (members, name). Only the fields included in the request body are updated — any field you omit is left unchanged.

Response: 200 — returns the updated Squad object.

curl -X PATCH https://api.sulus.ai/squad/<squad-id> \
  -H "Authorization: Bearer $SULUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Squad Name"
  }'

List Squads

GET https://api.sulus.ai/squad — returns squads for your account, with optional filtering and pagination.

Query parameters:

NameTypeDescription
limitnumberMaximum number of items to return. Defaults to 100
createdAtGtdate-timeItems where createdAt is greater than this value
createdAtLtdate-timeItems where createdAt is less than this value
createdAtGedate-timeItems where createdAt is greater than or equal to this value
createdAtLedate-timeItems where createdAt is less than or equal to this value
updatedAtGtdate-timeItems where updatedAt is greater than this value
updatedAtLtdate-timeItems where updatedAt is less than this value
updatedAtGedate-timeItems where updatedAt is greater than or equal to this value
updatedAtLedate-timeItems where updatedAt is less than or equal to this value

Response: 200 — returns an array of Squad objects.

curl -X GET "https://api.sulus.ai/squad?limit=10&createdAtGt=2026-01-01T00:00:00Z" \
  -H "Authorization: Bearer $SULUS_API_KEY"