> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zapier.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating action runs

## Prerequisites

Before you begin, make sure:

* This endpoint requires either a **public Zapier integration** or white label API access.

***

To trigger an action, make a `POST` request to [/v2/action-runs/](/powered-by-zapier/api-reference/actions/create-an-action-run)

<Warning>
  **Important:** Before every action run, for the `action` attribute on your request body you should retreive a new/unique `id` from the [Get Actions](/powered-by-zapier/api-reference/actions/get-actions) endpoint for the action that you'd like to execute. This ensures that the action run can be uniquely tracked, that it can be properly debugged, and that attributions are properly reported.

  **Note:** *The `id` attribute will be unique for every lookup on the [Get Actions](/powered-by-zapier/api-reference/actions/get-actions) endpoint, and the `key` attribute will be the action's consistent developer-provided identifier.*
</Warning>

### Request example

```http theme={null}
POST https://api.zapier.com/v2/action-runs/
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

{
  "data": {
    "action": "core:89sg4uhs5g85gh53hso59hs399hgs59",
    "authentication": "UHsi8e6K",
    "input": {
      "email": "user@example.com",
      "message": "Hello from Powered by Zapier!"
    },
    "callback_url": "https://example.com/post_callback"
  }
}
```

### Parameters

| Field | Type | Required | Description |
| - | - | - | - |
| `action` | string | Yes | The unique identifier of the action you want to run. |
| `authentication` | string or null | Yes | The authentication ID for the action. For apps that require authentication, set this to a valid authentication ID. For apps that do not require authentication (for example, Code by Zapier), set this to `null`. |
| `input` | object | Yes | Key-value pairs of input fields required by the action. |
| `callback_url` | string | No | HTTPS URL to receive the result when the run completes. If omitted, poll for the result instead. |

### Actions that do not require authentication

Some apps do not require authentication, such as Code by Zapier. You detect this when the app's `links.connect_new_authentication` value is `null`. For these apps, pass `null` in place of an authentication ID. For the full detail, read [when authentication is not required](/powered-by-zapier/zap-creation/selecting-an-authentication#when-authentication-is-not-required).

The following request runs a Code by Zapier action, which does not require authentication:

```http theme={null}
POST https://api.zapier.com/v2/action-runs/
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

{
  "data": {
    "action": "core:9k2mfp4wq0zskh8loe1jpa7doew",
    "authentication": null,
    "inputs": {
      "code": "return { total: 42 };"
    }
  }
}
```

### Response example

```json theme={null}
{
  "data": {
    "type": "run",
    "id": "arun_abc123"
  }
}
```

You can use this run’s `id` to poll for the run’s status and result, or receive the result via callback if you included a `callback_url`.

<Tip>
  At high volumes, use `callback_url` instead of polling. See [Receiving action run callbacks](/powered-by-zapier/running-actions/action-run-callbacks) for details.
</Tip>
