prompt-webhooks

Create Prompt Webhook

Changed on

Create a new prompt webhook.

LangSmith sends a POST request to the webhook URL for each event listed in triggers on the prompts it matches. A workspace can have one prompt webhook unless its limit was raised; creating one past the limit returns 400.

post/api/v1/prompt-webhooks

Request

  • Base URL
    https://api.smith.langchain.com
  • URL
    https://api.smith.langchain.com/api/v1/prompt-webhooks
  • Auth
    • API key in header X-API-Key
    • or API key in header X-Tenant-Id
    • or HTTP bearer

Request body

urlstring uri required

URL that receives a POST request with the prompt event payload.

headersobject nullable

HTTP headers sent with each request, for example an Authorization header. Values are stored encrypted and are masked in responses to callers who cannot update prompts.

include_promptsstring[] nullable

IDs of the prompts whose events fire the webhook. When empty, events from every prompt in the workspace fire it.

exclude_promptsstring[] nullable

IDs of prompts whose events never fire the webhook.

triggersEPromptWebhookTrigger[]

Events that fire the webhook: commit (a new prompt commit), tag:create, and tag:update. A webhook with no triggers never fires.

idstring uuid nullable

ID to assign to the webhook. Generated when omitted.

Response

Successful Response

urlstring uri required

URL that receives a POST request with the prompt event payload.

headersobject nullable

HTTP headers sent with each request, for example an Authorization header. Values are stored encrypted and are masked in responses to callers who cannot update prompts.

include_promptsstring[] nullable

IDs of the prompts whose events fire the webhook. When empty, events from every prompt in the workspace fire it.

exclude_promptsstring[] nullable

IDs of prompts whose events never fire the webhook.

triggersEPromptWebhookTrigger[]

Events that fire the webhook: commit (a new prompt commit), tag:create, and tag:update. A webhook with no triggers never fires.

idstring uuid required
tenant_idstring uuid required
created_atstring date-time required
updated_atstring date-time required

Changes

    • breaking

      the / response's property type changed from object to string for 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