Onfleet Webhooks API

Register HTTPS callbacks against 27 trigger types covering task lifecycle, worker duty/CRUD, route plan state changes, SMS recipient events, and async job completions (auto-dispatch, task batch create, route optimization). Payloads are signed with HMAC-SHA256 using the secret obtained from /webhooks/secret.

Onfleet Webhooks API is one of 8 APIs that Onfleet publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

This API exposes 1 machine-runnable capability that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko.

Tagged areas include Last Mile Delivery, Webhooks, and Events. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, an AsyncAPI specification, sample payloads, and 1 Naftiko capability spec.

OpenAPI Specification

onfleet-webhooks-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Onfleet Webhooks API
  description: |
    The Onfleet Webhooks API lets you register HTTPS URLs to receive
    real-time event payloads for tasks, workers, route plans, and dispatch
    operations. Each webhook is bound to a single trigger ID (0-30); payloads
    are signed with the secret from /webhooks/secret.
  version: '2.7'
  contact:
    name: Onfleet Support
    email: [email protected]
  license:
    name: Onfleet Terms of Service
    url: https://onfleet.com/legal
servers:
  - url: https://onfleet.com/api/v2
    description: Production
security:
  - basicAuth: []
tags:
  - name: Webhooks
paths:
  /webhooks:
    get:
      tags: [Webhooks]
      summary: List Webhooks
      operationId: listWebhooks
      responses:
        '200':
          description: Webhooks
          content:
            application/json:
              schema:
                type: array
                items: {$ref: '#/components/schemas/Webhook'}
    post:
      tags: [Webhooks]
      summary: Create Webhook
      operationId: createWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema: {$ref: '#/components/schemas/WebhookCreate'}
      responses:
        '200':
          description: Webhook created
          content:
            application/json:
              schema: {$ref: '#/components/schemas/Webhook'}
  /webhooks/{webhookId}:
    parameters:
      - name: webhookId
        in: path
        required: true
        schema: {type: string}
    put:
      tags: [Webhooks]
      summary: Update Webhook
      operationId: updateWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url: {type: string, format: uri}
                name: {type: string}
                threshold: {type: integer}
      responses:
        '200':
          description: Updated webhook
          content:
            application/json:
              schema: {$ref: '#/components/schemas/Webhook'}
    delete:
      tags: [Webhooks]
      summary: Delete Webhook
      operationId: deleteWebhook
      responses:
        '200':
          description: Webhook deleted
  /webhooks/secret:
    get:
      tags: [Webhooks]
      summary: Get Webhook Signing Secret
      operationId: getWebhookSecret
      responses:
        '200':
          description: Signing secret
          content:
            application/json:
              schema:
                type: object
                properties:
                  secret: {type: string}
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    Webhook:
      type: object
      properties:
        id: {type: string}
        organization: {type: string}
        url: {type: string, format: uri}
        name: {type: string}
        count: {type: integer}
        trigger:
          type: integer
          enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30]
        threshold: {type: integer, nullable: true}
    WebhookCreate:
      type: object
      required: [url, trigger]
      properties:
        url: {type: string, format: uri}
        name: {type: string}
        trigger: {type: integer}
        threshold: {type: integer, description: Required for triggers that compare against a threshold (taskEta, taskArrival, taskDelayed).}