Skip to main content
PUT
/
webhook_endpoints
/
{lago_id}
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"

curl --location --request PUT "$LAGO_URL/api/v1/webhook_endpoints/:lago_id" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "webhook_endpoint": {
      "webhook_url": "https://foo.bar",
      "signature_algo": "hmac"
    }
  }'
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
from lago_python_client.models import WebhookEndpoint

client = Client(api_key='__YOUR_API_KEY__')

webhook_endpoint = WebhookEndpoint(
  webhook_url='https://foo.bar',
  signature_algo: 'hmac'
)

try:
    client.webhook_endpoints.update(webhook_endpoint, '__WEBHOOK_ENDPOINT_ID__')
except LagoApiError as e:
    repair_broken_state(e)  # do something on error or raise your own exception
require 'lago-ruby-client'

client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')

client.webhook_endpoints.update({
    webhook_url: 'https://foo.bar',
    signature_algo: 'hmac'
}, '__WEBHOOK_ENDPOINT_ID__')
await client.webhook_endpoints.updateWebhookEndpoint("webhook-endpoint-id", {
  webhook_endpoint: { webhook_url: "https://foo.bar" },
});
import "fmt"
import "github.com/getlago/lago-go-client"

func main() {
lagoClient := lago.New().
    SetApiKey("__YOUR_API_KEY__")

webhookEndpointInput := &lago.WebhookEndpointInput{
    WebhookURL: "https://foo.bar"
}

webhookEndpoint, err := lagoClient.WebhookEndpoint().Update(webhookEndpointInput, "__WEBHOOK_ENDPOINT_ID__")
if err != nil {
    // Error is *lago.Error
    panic(err)
}

// webhookEndpoint is *lago.WebhookEndpoint
fmt.Println(webhookEndpoint)
}
{
  "webhook_endpoint": {
    "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "lago_organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "webhook_url": "Prepaid",
    "created_at": "2022-04-29T08:59:51Z",
    "signature_algo": "hmac"
  }
}
{
"status": 400,
"error": "Bad request"
}
{
"status": 401,
"error": "Unauthorized"
}
{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}
{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"

curl --location --request PUT "$LAGO_URL/api/v1/webhook_endpoints/:lago_id" \
  --header "Authorization: Bearer $API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "webhook_endpoint": {
      "webhook_url": "https://foo.bar",
      "signature_algo": "hmac"
    }
  }'
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
from lago_python_client.models import WebhookEndpoint

client = Client(api_key='__YOUR_API_KEY__')

webhook_endpoint = WebhookEndpoint(
  webhook_url='https://foo.bar',
  signature_algo: 'hmac'
)

try:
    client.webhook_endpoints.update(webhook_endpoint, '__WEBHOOK_ENDPOINT_ID__')
except LagoApiError as e:
    repair_broken_state(e)  # do something on error or raise your own exception
require 'lago-ruby-client'

client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')

client.webhook_endpoints.update({
    webhook_url: 'https://foo.bar',
    signature_algo: 'hmac'
}, '__WEBHOOK_ENDPOINT_ID__')
await client.webhook_endpoints.updateWebhookEndpoint("webhook-endpoint-id", {
  webhook_endpoint: { webhook_url: "https://foo.bar" },
});
import "fmt"
import "github.com/getlago/lago-go-client"

func main() {
lagoClient := lago.New().
    SetApiKey("__YOUR_API_KEY__")

webhookEndpointInput := &lago.WebhookEndpointInput{
    WebhookURL: "https://foo.bar"
}

webhookEndpoint, err := lagoClient.WebhookEndpoint().Update(webhookEndpointInput, "__WEBHOOK_ENDPOINT_ID__")
if err != nil {
    // Error is *lago.Error
    panic(err)
}

// webhookEndpoint is *lago.WebhookEndpoint
fmt.Println(webhookEndpoint)
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

lago_id
string<uuid>
required

Unique identifier assigned to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.

Example:

"1a901a90-1a90-1a90-1a90-1a901a901a90"

Body

application/json

Webhook Endpoint update payload

webhook_endpoint
object

Response

Webhook Endpoint updated

webhook_endpoint
object
required