Loops
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
POST | |
GET | |
POST |
List all loops
List loops visible to the caller: personal loops they own, plus every team loop. The response also carries max_loops_per_team and total_loop_count so a client can show remaining capacity and disable creation at the cap without hardcoding the limit.
Required API key scopes
loop:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /loopsExample response
Status 200
List all loops
List loops visible to the caller: personal loops they own, plus every team loop. The response also carries max_loops_per_team and total_loop_count so a client can show remaining capacity and disable creation at the cap without hardcoding the limit.
Required API key scopes
loop:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /loopsExample response
Status 200
Create loops
API for managing loops — named, cloud-executed agent automations triggered by
schedule, GitHub events or authenticated API calls. See products/tasks/docs/LOOPS.md.
Required API key scopes
loop:writeRequest parameters
- namestring
- descriptionstringDefault:
- take_ownershipbooleanDefault:
false - visibilityDefault:
personal - instructionsstring
- runtime_adapter
- modelstringDefault:
- reasoning_effort
- repositoriesarray
- sandbox_environmentstring | null
- enabledbooleanDefault:
true - overlap_policyDefault:
skip - behaviors
- connectors
- notifications
- context_target
- triggersarray
Response
Example request
POST /api /projects /:project_id /loopsExample response
Status 201
Status 429 A per-team loop or per-loop trigger safety limit was reached
Create loops
API for managing loops — named, cloud-executed agent automations triggered by
schedule, GitHub events or authenticated API calls. See products/tasks/docs/LOOPS.md.
Required API key scopes
loop:writeRequest parameters
- namestring
- descriptionstringDefault:
- take_ownershipbooleanDefault:
false - visibilityDefault:
personal - instructionsstring
- runtime_adapter
- modelstringDefault:
- reasoning_effort
- repositoriesarray
- sandbox_environmentstring | null
- enabledbooleanDefault:
true - overlap_policyDefault:
skip - behaviors
- connectors
- notifications
- context_target
- triggersarray
Response
Example request
POST /api /projects /:project_id /loopsExample response
Status 201
Status 429 A per-team loop or per-loop trigger safety limit was reached
Retrieve loops
API for managing loops — named, cloud-executed agent automations triggered by
schedule, GitHub events or authenticated API calls. See products/tasks/docs/LOOPS.md.
Required API key scopes
loop:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /loops /:idExample response
Status 200
Status 404 Loop not found
Retrieve loops
API for managing loops — named, cloud-executed agent automations triggered by
schedule, GitHub events or authenticated API calls. See products/tasks/docs/LOOPS.md.
Required API key scopes
loop:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /loops /:idExample response
Status 200
Status 404 Loop not found
Update loops
Partial update. Identity-bearing fields (instructions, repositories, connectors, behaviors, model config, triggers) are owner-only on team loops; name, description, notifications and enable/pause are editable by any team member.
Required API key scopes
loop:writePath parameters
- idstring
Request parameters
- namestring
- descriptionstringDefault:
- take_ownershipbooleanDefault:
false - visibilityDefault:
personal - instructionsstring
- runtime_adapter
- modelstringDefault:
- reasoning_effort
- repositoriesarray
- sandbox_environmentstring | null
- enabledbooleanDefault:
true - overlap_policyDefault:
skip - behaviors
- connectors
- notifications
- context_target
- triggersarray
Response
Example request
PATCH /api /projects /:project_id /loops /:idExample response
Status 200
Status 403 Not permitted to change these fields
Status 404 Loop not found
Status 429 A per-loop trigger safety limit was reached
Update loops
Partial update. Identity-bearing fields (instructions, repositories, connectors, behaviors, model config, triggers) are owner-only on team loops; name, description, notifications and enable/pause are editable by any team member.
Required API key scopes
loop:writePath parameters
- idstring
Request parameters
- namestring
- descriptionstringDefault:
- take_ownershipbooleanDefault:
false - visibilityDefault:
personal - instructionsstring
- runtime_adapter
- modelstringDefault:
- reasoning_effort
- repositoriesarray
- sandbox_environmentstring | null
- enabledbooleanDefault:
true - overlap_policyDefault:
skip - behaviors
- connectors
- notifications
- context_target
- triggersarray
Response
Example request
PATCH /api /projects /:project_id /loops /:idExample response
Status 200
Status 403 Not permitted to change these fields
Status 404 Loop not found
Status 429 A per-loop trigger safety limit was reached
Delete loops
Soft delete. Pauses every trigger's schedule. Owner or a project admin only.
Required API key scopes
loop:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /loops /:idExample response
Status 204 No response body
Status 403 Not permitted to delete this loop
Status 404 Loop not found
Delete loops
Soft delete. Pauses every trigger's schedule. Owner or a project admin only.
Required API key scopes
loop:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /loops /:idExample response
Status 204 No response body
Status 403 Not permitted to delete this loop
Status 404 Loop not found
Create loops preview
Dry run: renders the assembled instructions and trigger context for a supplied sample payload (or a synthetic schedule fire when omitted), without creating a task, run, or any other side effect.
Required API key scopes
loop:readPath parameters
- idstring
Request parameters
- trigger_typeDefault:
schedule - payload
Response
Example request
POST /api /projects /:project_id /loops /:id /previewExample response
Status 200
Status 404 Loop not found
Create loops preview
Dry run: renders the assembled instructions and trigger context for a supplied sample payload (or a synthetic schedule fire when omitted), without creating a task, run, or any other side effect.
Required API key scopes
loop:readPath parameters
- idstring
Request parameters
- trigger_typeDefault:
schedule - payload
Response
Example request
POST /api /projects /:project_id /loops /:id /previewExample response
Status 200
Status 404 Loop not found
Create loops run
Manual fire from the UI. Owner-only for personal loops; any team member for team loops.
Required API key scopes
loop:writePath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /loops /:id /runExample response
Status 200
Status 403 Not permitted to run this loop
Status 404 Loop not found
Create loops run
Manual fire from the UI. Owner-only for personal loops; any team member for team loops.
Required API key scopes
loop:writePath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /loops /:id /runExample response
Status 200
Status 403 Not permitted to run this loop
Status 404 Loop not found
Retrieve loops runs
Run history for a loop, newest first, cursor-paginated.
Required API key scopes
loop:readPath parameters
- idstring
Query parameters
- cursorstring
- limitintegerDefault:
50 - statusstringOne of:
"not_started""queued""in_progress""completed""failed""cancelled"
Response
Example request
GET /api /projects /:project_id /loops /:id /runsExample response
Status 200 Run history page
Status 404 Loop not found
Retrieve loops runs
Run history for a loop, newest first, cursor-paginated.
Required API key scopes
loop:readPath parameters
- idstring
Query parameters
- cursorstring
- limitintegerDefault:
50 - statusstringOne of:
"not_started""queued""in_progress""completed""failed""cancelled"
Response
Example request
GET /api /projects /:project_id /loops /:id /runsExample response
Status 200 Run history page
Status 404 Loop not found
Create loops trigger
Authenticated POST trigger for type=api triggers. Project secret API key auth (loop:write scope), project-wide. Request body (JSON, capped at 64 KB) becomes run context. Send an Idempotency-Key header to dedupe retries.
Required API key scopes
loop:writePath parameters
- idstring
Response
Example request
Example response
Status 200
Status 404 Loop not found
Status 413 Request body exceeds 64 KB
Create loops trigger
Authenticated POST trigger for type=api triggers. Project secret API key auth (loop:write scope), project-wide. Request body (JSON, capped at 64 KB) becomes run context. Send an Idempotency-Key header to dedupe retries.
Required API key scopes
loop:writePath parameters
- idstring