Skip to content
Navigation

Register a task

POST
/v1/tasks

Register an HTTPS handler. Store its one-time signing secret before delivering work. The destination must be allowlisted.

Authorization

  • bearerAuth
    optional
    HTTP Bearer

    Authorization: Bearer <token>

  • browserSession
    optional
    API key in cookie
  • localBrowserSession
    optional
    API key in cookie

Request body JSON required

  • name
    string
    required
    maxLength: 100 · minLength: 1
  • slug
    string
    required
    maxLength: 64 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
  • url
    string
    required

    Allowed public HTTPS destination on port 443; redirects are not followed.

    format: uri · maxLength: 2048
  • description
    optional
    string
    maxLength: 200
  • maxAttempts
    optional
    integer
    maximum: 5 · minimum: 1 · default: 3

Returns

201

Task registered

JSON
  • task
    object
    required
    • id
      string
      required
    • name
      string
      required
      maxLength: 100 · minLength: 1
    • slug
      string
      required
      maxLength: 64 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
    • url
      string
      required

      An allowlisted public HTTPS handler or a fixture URL for a built-in starter.

      format: uri · maxLength: 2048
    • maxAttempts
      integer
      required
      maximum: 5 · minimum: 1 · default: 3
    • createdAt
      string
      required
      format: date-time
    • description
      optional
      string
      maxLength: 200
    • starterId
      optional
      string

      The catalog identifier when this task was registered from a starter.

  • secret
    string
    required

    One-time HMAC signing secret. Store it in your application’s secret store.

400

Invalid input
JSON
  • error
    string
    required

401

Authentication is required
JSON
  • error
    string
    required

403

The credential lacks permission
JSON
  • error
    string
    required

409

Task slug already registered
JSON
  • error
    string
    required

429

Task limit reached
JSON
  • error
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close