---
title: "Fire a trigger now (creates its task)"
url: https://hexelstudio.com/docs/api/harness/triggers/fire-a-trigger-now-creates-its-task
---

# Fire a trigger now (creates its task)

**POST** `/harness/triggers/{name}:fire`

The same `Idempotency-Key` fires once (200 `replayed`).

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for your organization.

- `X-Workspace-Id: string`

  The workspace the request acts in (`ws_...`). It never grants access by itself.

- `X-Environment-Id: string`

  The environment the request acts in (`env_...`). It never grants access by itself.

## Body parameters

- `text: optional string`

- `data: optional object`

## Returns

`200` This key already fired. (`TriggerFire`)

- `trigger: string`

- `routine_id: string`

- `fire_id: string`

- `replayed: boolean`

## Errors

- `default` 

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/harness/triggers/{name}:fire' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'X-Workspace-Id: X_WORKSPACE_ID' \
  --header 'X-Environment-Id: X_ENVIRONMENT_ID' \
  --header 'Content-Type: application/json' \
  --data '{
  "text": "string",
  "data": {}
}'
```

### Response (200)

```json
{
  "trigger": "string",
  "routine_id": "string",
  "fire_id": "string",
  "replayed": true
}
```

### Response (202)

```json
{
  "trigger": "string",
  "routine_id": "string",
  "fire_id": "string",
  "replayed": true
}
```
