---
title: "Create agent automation (agent-only)"
method: POST
path: "/v1/agents/{agent_id}/automations"
tags: ["Automations"]
---

# Create agent automation (agent-only)

`POST /v1/agents/{agent_id}/automations`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/agents/{agent_id}/automations`
- Auth: HTTP bearer

Agent-scoped create for simple manual or webhook automations from chat/runtime tools.
Allowed step types: log, notify, memory_get, memory_put, wait (max 10).
Cron, swap, http, and transaction steps require human dashboard setup.
Requires agent JWT; agent_id in path must match the caller.

## Path parameters

- `agent_id` string, uuid, required

## Request body

- AgentCreateAutomationRequest: Agent-scoped automation create. Defaults to manual trigger. workflow_spec must use only agent-allowed step types (log, notify, memory_get, memory_put, wait).
  - `name` string, required
  - `trigger_type` 'manual' | 'webhook'
  - `workflow_spec` union, required
    - object[]
    - object
  - `auto_trigger` boolean: When true (manual trigger only), start a run immediately after creation

## Response `201`

Automation created (includes one-time webhook credentials when trigger_type is webhook)

- AutomationCreatedResponse
  - `id` string, uuid, required
  - `agent_id` string, uuid, required
  - `name` string, required
  - `trigger_type` 'cron' | 'event' | 'webhook' | 'manual', required
  - `cron_expr` string, nullable
  - `timezone` string, required
  - `event_filter` object, nullable
  - `workflow_spec` union, required
    - object[]
    - object
  - `is_active` boolean, required
  - `last_run_at` string, date-time, nullable
  - `next_run_at` string, date-time, nullable
  - `last_run_status` string, nullable: Status of the most recent run (enriched list field)
  - `total_runs` integer, nullable: Total runs in the last 30 days (enriched list field)
  - `success_rate` number, nullable: Success rate percentage (enriched list field)
  - `agent_name` string, nullable: Resolved agent display name (enriched list field)
  - `created_by_type` 'user' | 'agent': Whether the automation was created by a human or agent (chat-native create)
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `spec_version` integer: Current `automation_versions` version.
  - `webhook_signature_scheme` string, nullable: Inbound signature scheme name, never the secret.
  - `webhook_url` string: Full POST URL including token (one-time on create)
  - `webhook_token` string: whk_ token segment (one-time on create)

## Other responses

- `400`: Invalid request
- `401`: Authentication required or invalid
- `403`: Insufficient permissions
- `404`: Resource not found

---

[API](https://skmtc.dev/1claw/apis/1claw-api.md) · [All operations](https://skmtc.dev/1claw/apis/1claw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/1claw/apis/1claw-api/revisions/5fa0918f3b41?raw)
