# Run an action — or preview it with dry_run

[All field references](/en/developers/field-reference) · [Actions](/en/developers/fields-group-actions)

`POST /v1/actions/{name}`

Runs one action with {"arguments": {...}} through the same executor, rules and rights as the AI access. Actions that change data need the additional scope actions:run and accept "dry_run": true for a preview that changes nothing. In switch mode ask, and for actions that always need approval, the real call answers 202 with status=pending_approval and request_id: the owner approves it in Meykt; poll GET /v1/action-requests/{id}. Results and failures are those of the action (failures: errors[].message names its code). Live keys only. Rate limits of the AI access apply. Actions need a key created by the organization owner, AI access switched on in Meykt with its current notices confirmed, and a plan that includes AI access (else 403 with reason owner_key_required, ai_access_off, consent_required or plan_required). The key appears under AI access → Connected apps in Meykt; ending it there stops the key’s actions (403 reason=connection_ended).

Required scopes: `"actions:read"`.

[How to read these tables](/en/developers/field-reference#reading-the-field-tables)

## Parameters

### path: name

Required. Action name from GET /v1/actions, e.g. query_data or cancel_orders.

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | string | Whole value | Not allowed | pattern: `"^[a-z][a-z0-9_]{1,63}$"`. |

## Request body

Request body required.

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | Additional properties are not allowed. |
| arguments | object | Optional | Not allowed | Arguments as in input_schema; dry_run where the action offers it. |

## Response 200, 202

200: Success 202: Success; see the status meaning of the operation.

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | — |
| data | object | Required when parent is present | Not allowed | Authorized response payload or documented event data. |
| data.action | string | Required when parent is present | Not allowed | Name of the selected authorized action. |
| data.status | string | Required when parent is present | Not allowed | Current status; use listed choices where provided. enum: `["done","preview","pending_approval"]`. |
| data.request_id | string | Optional | Not allowed | Only with pending_approval. format: `"uuid"`. |
| data.result | object | Required when parent is present | Not allowed | The action’s own result. |

## Response 400, 401, 403, 404, 409, 422, 429, 500, 503

400: The request is not valid JSON. 401: The key is missing, unknown, revoked or expired. 403: The key lacks a required scope, or the operation requires a live key. 404: Not found. Also applies to IDs that belong to another organization — we deliberately do not distinguish between "does not exist" and "does not belong to you". 409: The same ID already exists with different content. It is never overwritten. 422: Content validation failed. The response lists all affected locations at once. 429: A rate limit was reached and the request did not run. Wait for Retry-After, then repeat it unchanged. X-RateLimit-Scope names the limit: key (120 requests per minute), organization (300 per minute across all keys), write (1,000 at once, refilling at 60 per minute) or list (300 unfiltered list pages at once, refilling at 10 per minute). 500: Unexpected error on our side. 503: Temporarily unavailable. Repeat the same request with the same business identity.

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | — |
| error | object | Required when parent is present | Not allowed | Machine-readable error code; use it to select the documented recovery path. |
| error.code | string | Required when parent is present | Not allowed | Machine-readable, permanently stable error code. Program against it, not against message. |
| error.message | string | Required when parent is present | Not allowed | Explanation for humans. May change at any time. |
| error.field | string | Optional | Not allowed | Affected location in the request, if it can be determined. |
| error.doc_url | string | Required when parent is present | Not allowed | Documentation link explaining this API error. format: `"uri"`. |
