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

# Create webhook

> Creates a new webhook to receive events.



## OpenAPI

````yaml /api-reference/openapi.en.json post /v1/webhooks
openapi: 3.1.0
info:
  title: Timely.ai API
  description: >-
    Timely.ai REST API for AI-powered customer service automation. Manage
    agents, conversations, contacts, and integrations.
  version: 1.0.0
  contact:
    name: Timely.ai
    email: contato@timelyai.com.br
    url: https://timelyai.com.br
servers:
  - url: https://api.timelyai.com.br
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: System
    description: Health check and API key introspection
  - name: Agents
    description: AI agents — creation, configuration, and management
  - name: Trainings
    description: Agent knowledge bases
  - name: Channels
    description: Communication channels (WhatsApp, Telegram, Email, Website)
  - name: Contacts
    description: Customer records
  - name: Conversations
    description: Conversation history and messages
  - name: Custom Fields
    description: CRM custom fields
  - name: Chats
    description: Active chat operations and human handoff
  - name: Messages
    description: Individual messages
  - name: MCP
    description: Model Context Protocol — servers and tools
  - name: Webhooks
    description: Outbound webhooks for real-time events
paths:
  /v1/webhooks:
    post:
      tags:
        - Webhooks
      summary: Create webhook
      description: Creates a new webhook to receive events.
      operationId: createWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhook'
      responses:
        '201':
          description: Webhook created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Webhook'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CreateWebhook:
      type: object
      required:
        - name
        - url
        - events
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        url:
          type: string
          format: uri
        events:
          type: array
          minItems: 1
          items:
            type: string
            enum:
              - conversation.created
              - conversation.closed
              - conversation.transferred
              - message.received
              - message.sent
              - contact.created
              - contact.updated
              - appointment.created
              - appointment.cancelled
              - appointment.completed
    Webhook:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        url:
          type: string
          format: uri
        events:
          type: array
          items:
            type: string
        is_active:
          type: boolean
        secret:
          type: string
          description: Returned only at creation
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
  responses:
    ValidationError:
      description: Invalid request data
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key obtained from the dashboard

````