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

# Set webhook URL

> Sets the webhook URL where your account receives conversation-related events, and picks which events to receive.



## OpenAPI

````yaml POST /v1/accounts/{account_id}/webhook
openapi: 3.1.0
info:
  title: WotNot API
  version: 1.0.0
  description: 'WotNot API: Set webhook URL.'
servers:
  - url: https://api.wotnot.io
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/accounts/{account_id}/webhook:
    post:
      summary: Set webhook URL
      description: >-
        Sets the webhook URL where your account receives conversation-related
        events, and picks which events to receive.
      operationId: setWebhookUrl
      parameters:
        - name: account_id
          in: path
          required: true
          description: The ID of your WotNot account.
          schema:
            type: string
      requestBody:
        required: true
        description: The webhook URL and the events to send to it.
        content:
          application/json:
            schema:
              type: object
              required:
                - webhook_url
                - subscribed_events
                - is_enabled
                - token
              properties:
                webhook_url:
                  type: string
                  description: >-
                    The URL where WotNot sends the events. The example leaves it
                    empty (`""`).
                  example: ''
                subscribed_events:
                  type: array
                  description: The events to turn on or off for this webhook.
                  items:
                    type: object
                    required:
                      - key
                      - is_subscribed
                    properties:
                      key:
                        type: string
                        description: >-
                          The event, for example `conversation_create`,
                          `message` or `assignee_change`.
                        example: conversation_create
                      is_subscribed:
                        type: boolean
                        description: >-
                          `true` to receive this event, `false` to stop
                          receiving it.
                        example: true
                is_enabled:
                  type: boolean
                  description: '`true` to turn the webhook on.'
                  example: true
                token:
                  type: string
                  description: A token for the webhook, for example `Test`.
                  example: Test
            example:
              webhook_url: ''
              subscribed_events:
                - key: conversation_create
                  is_subscribed: true
                - key: message
                  is_subscribed: true
                - key: status
                  is_subscribed: true
                - key: assignee_change
                  is_subscribed: true
                - key: sla_breached
                  is_subscribed: true
                - key: variables
                  is_subscribed: true
                - key: conversation_labels
                  is_subscribed: true
                - key: note
                  is_subscribed: true
              is_enabled: true
              token: Test
      responses:
        '200':
          description: The webhook was saved. Returns `ok` set to `true`.
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                properties:
                  ok:
                    type: boolean
                    description: '`true` when the request worked. Errors return `false`.'
                    example: true
              example:
                ok: true
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: >-
        The token is missing or wrong. Check that the `Authorization` header is
        `Bearer` followed by your account token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: UNAUTHORIZED
            ok: false
            status: 401
            message: Invalid token. Provide the valid account token.
  schemas:
    Error:
      type: object
      description: Returned whenever a request fails.
      required:
        - error
        - ok
        - status
        - message
      properties:
        error:
          type: string
          description: >-
            A short error code in capital letters, for example `UNAUTHORIZED`.
            Check this in your code to tell errors apart.
          example: UNAUTHORIZED
        ok:
          type: boolean
          description: Always `false` when something went wrong.
          example: false
        status:
          type: integer
          description: The HTTP status code, repeated in the body, for example `401`.
          example: 401
        message:
          type: string
          description: What went wrong and how to fix it, in plain words.
          example: Invalid token. Provide the valid account token.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        All of WotNot's APIs use Bearer token authentication. Send your account
        token as `Bearer <token>`. You can find it in Settings > Account
        Settings > Developer. Keep it on your server: anyone who has it can call
        the API as your account.

````

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