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

# Update Webhook Endpoint

> Change a webhook endpoint's URL, events or description, or turn it on or off, with PATCH /api/webhooks/{id}.

Send only the fields you want to change.

Needs an API key with full access.

## Request Body

| Field | Type | Description |
| - | - | - |
| `url` | string | New HTTPS URL. |
| `events` | string\[] | Replaces the subscribed events. At least one. |
| `description` | string | New description; `null` or `""` clears it. |
| `enabled` | boolean | `false` turns the endpoint off and stops deliveries that wait for a retry. `true` turns it back on, also after it answered `410 Gone`. |

## Example Request

```bash theme={null}
curl -X PATCH \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": false }' \
  "https://octanist.com/api/webhooks/9b2f1c4e-6a1d-4f7e-9a51-2c8f0f3d1a77"
```

## Example Response

```json theme={null}
{
  "success": true,
  "data": {
    "id": "9b2f1c4e-6a1d-4f7e-9a51-2c8f0f3d1a77",
    "url": "https://crm.example.com/webhooks/octanist",
    "description": "CRM sync",
    "events": ["lead.created", "lead.status_changed"],
    "enabled": false,
    "disabledReason": "user",
    "createdAt": "2026-11-30T10:00:00.000Z",
    "updatedAt": "2026-11-30T11:00:00.000Z"
  },
  "meta": {
    "requestId": "req_a1b2c3d4e5f6",
    "timestamp": "2026-11-30T11:00:00.000Z"
  }
}
```


## OpenAPI

````yaml PATCH /api/webhooks/{id}
openapi: 3.0.1
info:
  title: Octanist API
  description: >-
    The Octanist API allows you to create, update and read leads, run reports,
    read workspace settings, retrieve statistics, and access ad spend data.
  version: 2.5.0
  contact:
    name: Octanist Support
    url: https://octanist.com/docs
servers:
  - url: https://octanist.com
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /api/webhooks/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Webhook endpoint ID
        schema:
          type: string
    patch:
      tags:
        - Webhooks
      summary: Update Webhook Endpoint
      description: >-
        Change the URL, events or description, or turn the endpoint on or off.
        Send only the fields to change.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhookRequest'
      responses:
        '200':
          description: Endpoint updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/WebhookEndpoint'
                  meta:
                    $ref: '#/components/schemas/Meta'
        '400':
          description: Invalid URL or events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: A read-only API key, or the organization is a read-only demo
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Endpoint not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    UpdateWebhookRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          maxLength: 2048
        events:
          type: array
          items:
            type: string
            enum:
              - lead.created
              - lead.status_changed
              - lead.updated
          minItems: 1
          description: Events to send to this endpoint
          example:
            - lead.created
            - lead.status_changed
        description:
          type: string
          maxLength: 200
          nullable: true
        enabled:
          type: boolean
          description: >-
            `false` turns the endpoint off; deliveries waiting for a retry are
            stopped
    WebhookEndpoint:
      type: object
      properties:
        id:
          type: string
          example: 9b2f1c4e-6a1d-4f7e-9a51-2c8f0f3d1a77
        url:
          type: string
          format: uri
          example: https://crm.example.com/webhooks/octanist
        description:
          type: string
          nullable: true
          example: CRM sync
        events:
          type: array
          items:
            type: string
            enum:
              - lead.created
              - lead.status_changed
              - lead.updated
          minItems: 1
          description: Events to send to this endpoint
          example:
            - lead.created
            - lead.status_changed
        enabled:
          type: boolean
          example: true
        disabledReason:
          type: string
          nullable: true
          enum:
            - user
            - gone
            - null
          description: >-
            Why the endpoint is off: `user` (turned off in Octanist or with the
            API) or `gone` (it answered HTTP 410)
          example: null
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Meta:
      type: object
      properties:
        requestId:
          type: string
          example: req_a1b2c3d4e5f6
        timestamp:
          type: string
          format: date-time
          example: '2026-03-10T12:00:00.000Z'
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human readable error message
              example: Human readable error message
            details:
              type: object
              description: Optional additional error details
        meta:
          $ref: '#/components/schemas/Meta'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key for authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.