Guest Machines
API referenceTeams

Create a team

POST/api/v1/teams

Create a saved team owned by the user represented by the delegated token. members defines the initial ordered member set; omit it to create an empty team and configure members later.

Required access

Credentials: delegated token, user session

Scope: teams:create

The delegated user must be an active non-viewer member of the selected organization. In addition to teams:create, every initial member agent must be visible and invocable by the delegate using agents:invoke; a delegate cannot add another user's private agent. Service-principal keys cannot create a team because they have no user identity to own it.

Authorization

DelegatedToken
AuthorizationBearer <token>

A token issued to an external application acting for a specific user, prefixed gsmc_dt_. Carries that user's identity for attribution and ownership, and stays capped at member role however privileged the user is.

In: header

Header Parameters

X-Org-Id?|

Selects the active organization for a credential that belongs to more than one. Service-principal keys are bound to a single organization and ignore it.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for creating a team.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/teams" \  -H "Authorization: Bearer $GUEST_MACHINES_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "name": "release_review",    "description": "Coordinates independent release checks.",    "execution_profile": "map_reduce",    "members": [      {        "agent_id": "10000000-0000-4000-8000-000000000001",        "role": "security reviewer",        "position": 0      },      {        "agent_id": "10000000-0000-4000-8000-000000000002",        "role": "test reviewer",        "position": 1      }    ]  }'
{  "team": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",    "owner_user_id": "65139110-7c3c-4777-b692-80c218be3b9d",    "name": "string",    "description": "string",    "input_schema": {},    "output_schema": {},    "execution_profile": "map_reduce",    "workforce_config": {      "execution_profile": "map_reduce",      "allowed_worker_roles": [        "string"      ],      "runtime_policy": {        "max_fan_out": 5,        "expected_children": 1,        "max_failed_children": 0,        "ownership_mode": "explicit_scope",        "merge_strategy": "collect_array",        "verification_policy": {          "mode": "none",          "child_output_schema": {},          "require_all_children_success": true        },        "straggler_timeout_seconds": 120,        "replication_policy": "none",        "budget_policy": {          "max_total_tokens": 1,          "max_duration_seconds": 1        },        "bootstrap_policy": {          "enabled": true,          "planner_budget_fraction": 0.2,          "planner_timeout_seconds": 120        },        "allow_decentralized_claims": false,        "max_messages_per_child": 1      },      "artifact_input_mapping": [        {          "source_alias": "string",          "target_alias": "string",          "worker_agent_ids": [            "692ece4d-fec3-48e8-86b4-13504d7d05ca"          ]        }      ]    },    "members": [],    "is_active": true,    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}