Guest Machines
API referencePipelines

Create a pipeline

POST/api/v1/pipelines

Create a private pipeline owned by the user represented by the delegated token. Steps are saved as one validated configuration after every referenced agent, team, and fallback is authorized.

Required access

Credentials: delegated token, user session

Scope: pipelines:create

The delegated user must be an active non-viewer member. In addition to pipelines:create, each referenced agent or team must be visible and invocable by the delegate, using agents:invoke or teams:invoke as applicable. Service-principal keys cannot create a pipeline 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 pipeline.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/pipelines" \  -H "Authorization: Bearer $GUEST_MACHINES_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "name": "release_gate",    "description": "Audit, then summarize the release decision.",    "steps": [      {        "name": "audit",        "agent_id": "10000000-0000-4000-8000-000000000001"      },      {        "name": "decision",        "agent_id": "10000000-0000-4000-8000-000000000002"      }    ],    "visibility": "private"  }'
{  "pipeline": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",    "owner_user_id": "65139110-7c3c-4777-b692-80c218be3b9d",    "visibility": "org_shared",    "name": "string",    "description": "string",    "steps": [      {        "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",        "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",        "name": "string",        "on_error": {          "strategy": "bubble",          "max_attempts": 3,          "backoff": "exponential",          "backoff_delay_seconds": 1,          "fallback_agent_id": "ea74c5a8-d285-4937-959b-1e318178db0b",          "transform_template": "string"        },        "input_mapping": {          "property1": "string",          "property2": "string"        },        "output_mapping": {          "property1": "string",          "property2": "string"        },        "artifact_input_mapping": [          {            "source": {              "kind": "pipeline_input",              "input_alias": "string",              "source_step_index": 0,              "selector": {                "file_name": "string",                "primary": true              }            },            "target_alias": "string",            "required": true          }        ],        "skip_if": "string"      }    ],    "on_error": {      "strategy": "bubble",      "max_attempts": 3,      "backoff": "exponential",      "backoff_delay_seconds": 1,      "fallback_agent_id": "ea74c5a8-d285-4937-959b-1e318178db0b",      "transform_template": "string"    },    "loop_config": {      "enabled": false,      "max_iterations": 10,      "continue_while": "string",      "until": "string",      "loop_back_to_step": 0    },    "resource_limits": {      "max_total_tokens": 0,      "max_tokens_per_step": 0,      "max_total_cost_usd": 0,      "max_duration_seconds": 300,      "max_duration_per_step_seconds": 0,      "max_physical_tool_attempts": 1    },    "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"}