---
title: "Create an automation"
description: "Act on every new mention a filter selects: add labels, assign a member.\n\n- Runs after scoring and before delivery, so alert rules see its labels.\n- At most 25. Existing mentions are untouched; use POST /v1/mentions/batch. See [Labels and automations](/guides/labels)."
canonical: https://docs.mentio.dev/api/automations/create-automation
markdown: https://docs.mentio.dev/api/automations/create-automation.mdx
---

# Create an automation

`POST /v1/automations`

Act on every new mention a filter selects: add labels, assign a member.

- Runs after scoring and before delivery, so alert rules see its labels.
- At most 25. Existing mentions are untouched; use POST /v1/mentions/batch. See [Labels and automations](/guides/labels).

## Parameters

- `idempotency-key` (header): A unique value (a UUID) for this request. Retrying with the same key within 24 hours returns the first response instead of creating twice.

## Body

- `name` (required): Unique per workspace, case-insensitive.
- `enabled`: false saves it without running it.
- `filter`: Which new mentions it acts on; empty acts on every one.
- `actions` (required): What to do to each mention the filter selects; at least one action.

## Responses

- 201: The automation
- 400: Invalid request (no action, a filter_too_complex filter), or invalid_assignee: the assignee is not a workspace member
- 401: Missing or invalid API key
- 409: duplicate_automation: the name is taken; automation_limit_reached: the workspace holds 25

Full schemas: https://api.mentio.dev/v1/openapi.json. Conventions: https://docs.mentio.dev/conventions.mdx
