---
title: "Create loop definition"
method: POST
path: "/api/v1/loops"
tags: ["Loops"]
---

# Create loop definition

`POST /api/v1/loops`

## Request

- Base URL: `https://arcadeops.leadalpes.fr`
- URL: `https://arcadeops.leadalpes.fr/api/v1/loops`
- Auth: none declared

Create loop definition.

## Request body

- object
  - `name` string, required
  - `description` string
  - `triggerType` 'MANUAL' | 'SCHEDULE' | 'EVENT'
  - `scheduledJobId` string
  - `agentId` string, required
  - `taskTemplate` object, required
    - `title` string, required
    - `objective` string
    - `input` object
  - `evalPolicy` object
    - `blockOnFail` boolean, required
    - `gate` 'basic' | 'none'
    - `checks` string[]
  - `learnPolicy` object
    - `gate` 'off' | 'capture_only' | 'suggest_patch', required
    - `rerun` 'manual' | 'auto'
  - `approvalPolicy` object
  - `budgetPolicy` object
  - `maxIterations` integer
  - `cooldownSec` integer

## Response `201`

Created

- object
  - `id` string, required

---

[API](https://skmtc.dev/leadalpes/apis/arcadeops-api.md) · [All operations](https://skmtc.dev/leadalpes/apis/arcadeops-api/llms.txt) · [OpenAPI document](https://skmtc.dev/leadalpes/apis/arcadeops-api/revisions/f10422ec7412?raw)
