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

# Trigger job

> Fire a job's webhook immediately

Manually triggers the job's webhook without waiting for the scheduled time. The job's status is updated to `completed` or `failed` based on the webhook response.

<Note>
  Only jobs with `status: "pending"` can be triggered. Already completed or failed jobs return a `400` error.
</Note>

## Path parameters

<ResponseField name="id" type="string" required>
  The UUID of the job to trigger.
</ResponseField>

## Response

Returns the execution result.

<ResponseField name="status_code" type="integer">
  HTTP status code returned by the webhook endpoint.
</ResponseField>

<ResponseField name="success" type="boolean">
  `true` if the webhook returned a 2xx status code.
</ResponseField>

<ResponseField name="response_time_ms" type="integer">
  Execution time in milliseconds.
</ResponseField>

<ResponseField name="fired_at" type="string">
  ISO 8601 timestamp of when the webhook was fired.
</ResponseField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://app.cronapi.dev/api/v1/jobs/b2c3d4e5-f6a7-8901-bcde-f12345678901/trigger \
    -H "Authorization: Bearer your_api_key_here"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    `https://app.cronapi.dev/api/v1/jobs/${jobId}/trigger`,
    {
      method: "POST",
      headers: { "Authorization": `Bearer your_api_key_here` },
    }
  );
  const result = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      f"https://app.cronapi.dev/api/v1/jobs/{job_id}/trigger",
      headers={"Authorization": "Bearer your_api_key_here"},
  )
  result = response.json()
  ```
</CodeGroup>

```json 200 theme={null}
{
  "status_code": 200,
  "success": true,
  "response_time_ms": 230,
  "fired_at": "2026-04-15T14:35:00.123Z"
}
```

```json 400 theme={null}
{
  "error": "Job already completed"
}
```
