Spinrun Docs
REST APIAgents

Create an agent

Create through the collection: the document carries no `id` and no `updated_at`.

PUT/api/build/agents

Authorization

bearerAuth
AuthorizationBearer <token>

OAuth access token whose grant carries Build authorization.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

A whole agent as one JSON document.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/build/agents" \  -H "Content-Type: application/json" \  -d '{    "kind": "spinrun.agent/v1",    "name": "string",    "description": "string",    "icon": "string",    "space": {      "team": "string"    },    "folder": "string",    "instructions": "string",    "model": "string",    "max_steps": 1,    "tools": {      "apps": [        "string"      ],      "connections": "all",      "disabled_tools": [        "string"      ],      "approval": "destructive"    },    "skills": [      "string"    ],    "workspace_skills": [      "string"    ],    "workflows": [      "string"    ],    "schedule": {},    "email": {},    "whatsapp": {},    "triggers": [      {        "kind": "webhook",        "name": "string"      }    ],    "eval_criteria": "string"  }'
{  "data": {    "document": null,    "applied": [      "string"    ],    "changes": [      "string"    ],    "version": 0,    "webhook_urls": [      {        "trigger_id": "string",        "url": "string"      }    ]  }}