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

# Create or update a webhook relay

> Forward incoming webhooks of the specified type to your URL.



## OpenAPI

````yaml post /api/v2/webhookRelay/{type}
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
paths:
  /api/v2/webhookRelay/{type}:
    post:
      tags:
        - Webhooks
      summary: Create or update a webhook relay
      description: Forward incoming webhooks of the specified type to your URL.
      parameters:
        - name: type
          in: path
          required: true
          schema:
            type: object
            properties:
              type:
                type: string
                example: string
              example:
                type: string
                example: twilioSMS
          description: Relay type (e.g. twilioSMS, chargebee)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                  description: >-
                    Absolute HTTP/HTTPS endpoint that will receive the forwarded
                    webhook.
                  example: https://example.com/webhook/twilio
                timeout:
                  type: number
                  description: Timeout (ms) before the forward request is aborted.
                  example: 5000
                headers:
                  type: array
                  description: Custom HTTP headers (array of single-key objects).
                  items:
                    type: object
                    example:
                      Authorization: Bearer xyz
                  example:
                    - Authorization: Bearer xyz
                    - X-Customer-ID: abc123
                successStatusCodes:
                  type: array
                  description: >-
                    Status codes treated as success by Vida when your endpoint
                    responds.
                  items:
                    type: integer
                    example: 202
                  example:
                    - 200
                    - 201
                    - 202
      responses:
        '200':
          description: Relay stored
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: >-
                      Webhook Relay for type 'twilioSMS' configured
                      successfully.
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: headers must be an array of single-key objects
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Unauthorized Request
        '403':
          description: Premium feature required
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: >-
                      Webhook Relay is a premium feature. Please upgrade your
                      account.
        '404':
          description: Relay type not supported
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Webhook Relay type 'foo' is not supported.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Failed to store configuration.
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````