> ## 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.

# Create job

> Schedule a one-time delayed webhook

## Request body

<ResponseField name="at" type="string" required>
  ISO 8601 timestamp of when to fire the webhook. Must be in the future.
</ResponseField>

<ResponseField name="url" type="string" required>
  Webhook URL to call.
</ResponseField>

<ResponseField name="name" type="string">
  Optional display name for the job.
</ResponseField>

<ResponseField name="method" type="string" default="POST">
  HTTP method: `GET`, `POST`, or `DELETE`.
</ResponseField>

<ResponseField name="headers" type="object" default="{}">
  Custom HTTP headers to include in the webhook request.
</ResponseField>

<ResponseField name="body" type="object" default="{}">
  JSON body to send with the webhook request.
</ResponseField>

## Response

Returns the created job object with a `201` status code. The job starts with `status: "pending"`.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://app.cronapi.dev/api/v1/jobs \
    -H "Authorization: Bearer your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Send welcome email",
      "at": "2026-04-20T15:00:00.000Z",
      "url": "https://example.com/send-email",
      "method": "POST",
      "body": {"user_id": "usr_123"}
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://app.cronapi.dev/api/v1/jobs", {
    method: "POST",
    headers: {
      "Authorization": `Bearer your_api_key_here`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      name: "Send welcome email",
      at: "2026-04-20T15:00:00.000Z",
      url: "https://example.com/send-email",
      method: "POST",
      body: { user_id: "usr_123" },
    }),
  });
  const job = await response.json();
  ```

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

  response = requests.post(
      "https://app.cronapi.dev/api/v1/jobs",
      headers={"Authorization": "Bearer your_api_key_here"},
      json={
          "name": "Send welcome email",
          "at": "2026-04-20T15:00:00.000Z",
          "url": "https://example.com/send-email",
          "method": "POST",
          "body": {"user_id": "usr_123"},
      },
  )
  job = response.json()
  ```
</CodeGroup>

```json 201 theme={null}
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "user_id": "d4e5f6a7-b890-1234-cdef-567890abcdef",
  "name": "Send welcome email",
  "at": "2026-04-20T15:00:00.000Z",
  "url": "https://example.com/send-email",
  "method": "POST",
  "headers": {},
  "body": {"user_id": "usr_123"},
  "status": "pending",
  "created_at": "2026-04-15T14:31:00.000Z"
}
```

```json 400 theme={null}
{
  "error": "at must be in the future"
}
```
