webhook
parameter. If this parameter is specified by an endpoint that can accept POST requests, LangGraph Platform will send a request at the completion of a run.
When working with LangGraph Platform, you may want to use webhooks to receive updates after an API call completes. Webhooks are useful for triggering actions in your service once a run has finished processing. To implement this, you need to expose an endpoint that can accept POST
requests and pass this endpoint as a webhook
parameter in your API request.
Currently, the SDK does not provide built-in support for defining webhook endpoints, but you can specify them manually using API requests.
webhook
parameter:
Operation | HTTP Method | Endpoint |
---|---|---|
Create Run | POST | /thread/{thread_id}/runs |
Create Thread Cron | POST | /thread/{thread_id}/runs/crons |
Stream Run | POST | /thread/{thread_id}/runs/stream |
Wait Run | POST | /thread/{thread_id}/runs/wait |
Create Cron | POST | /runs/crons |
Stream Run Stateless | POST | /runs/stream |
Wait Run Stateless | POST | /runs/wait |
webhook
parameter in your API request. When the run completes, LangGraph Platform sends a POST
request to the specified webhook URL.
For example, if your server listens for webhook events at https://my-server.app/my-webhook-endpoint
, include this in your request:
kwargs
field.
langgraph-api>=0.2.78
, developers can disable webhooks in the langgraph.json
file: