Destinations
Update Destination
Updates the configuration of an existing destination. The request body structure depends on the destination's type. Type itself cannot be updated. May return an OAuth redirect URL for certain types.
patch/tenants/{tenant_id}/destinations/{destination_id}
Request body
Example request
{
"type": "webhook",
"filter": {
"data": {
"amount": {
"$gte": 100
},
"customer": {
"tier": "premium"
}
}
},
"config": {
"url": "https://example.com/webhooks/user",
"custom_headers": "{\"x-api-key\":\"secret123\",\"x-tenant-id\":\"customer-456\"}"
},
"delivery_metadata": {
"app-id": "my-app",
"region": "us-east-1"
},
"metadata": {
"internal-id": "123",
"team": "platform"
}
}Response
Destination updated successfully or OAuth redirect needed.
Example response
{
"id": "des_webhook_123",
"type": "webhook",
"topics": [
"user.created",
"order.shipped"
],
"disabled_at": null,
"created_at": "2024-02-15T10:00:00Z",
"updated_at": "2024-02-15T10:00:00Z",
"config": {
"url": "https://my-service.com/webhook/handler"
},
"credentials": {
"secret": "whsec_abc123def456",
"previous_secret": "whsec_prev789xyz012",
"previous_secret_invalid_at": "2024-02-16T10:00:00Z"
}
}