Webhooks

Creates a new webhook that listens for specific events. Supports optional association with a chat.

post/hooks

Request

  • Base URL
    https://api.v0.dev/v2
  • URL
    https://api.v0.dev/v2/hooks
  • Auth
    HTTP bearer

Request body

namestring required

A human-readable name for the webhook.

eventsstring[] required

List of event types the webhook should subscribe to.

urlstring uri required

The target URL to receive the webhook payloads.

chatIdstring nullable required

The ID of a chat to scope the webhook to.

Response

Response for status 200

idstring required

A unique identifier for the webhook.

createdAtstring date-time required

The ISO timestamp representing when the chat was created.

namestring required

A user-defined name to label the webhook.

eventsstring[] required

List of event types this webhook is subscribed to.

urlstring required

Target URL that receives event payloads for this webhook.

chatIdstring nullable required

Optional ID of the chat that this webhook is scoped to.

Changes

    • breaking

      the request property became required

    • breaking

      response property chatId list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • info

      api operation id hooks.create removed and replaced with webhooks.create

    • info

      the endpoint scheme security apiKey was removed from the API

    • info

      api tag Webhooks added

    • info

      api tag hooks removed

    • info

      added the media type application/x-www-form-urlencoded to the request body

    • info

      added the media type multipart/form-data to the request body

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      the response property became required for the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • warning

      added the new message.finished enum value to the / response property for the response status

    • info

      added the new message.finished enum value to the request property /