Skip to content

Update a webhook subscription's URL and/or subscribed event types

PUT
/api/v1/webhooks/{id}
curl --request PUT \
--url https://api-omni.linra.net/api/v1/webhooks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "url": "https://example.com", "eventTypes": [ "order.completed" ] }'

If the URL changes, it is re-validated against the same SSRF guard applied at creation.

id
required
string format: uuid
Media typeapplication/json
object
url
string format: uri
nullable
eventTypes
Array<string>
nullable
Allowed values: order.completed order.failed order.cancelled order.returned order.fulfilment-updated variant.back-in-stock order.return-request.updated

The updated subscription.

Media typeapplication/json
object
state
required
string
payload
required
details
object
payload
required
object
id
string format: uuid
partnerId
string format: uuid
url
string format: uri
eventTypes
Array<string>
isActive
boolean
lastDeliveryAt
string format: date-time
nullable
lastDeliveryStatus
string
nullable
createdAt
string format: date-time
nullable
Example
{
"state": "SUCCESS"
}

Request validation failed.

Media typeapplication/json

The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).

object
state
required
string
payload
required

Always null on an error response.

object
details
object
Example
{
"state": "NOT_FOUND_ORDER",
"payload": null
}

Unknown subscription.

Media typeapplication/json

The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).

object
state
required
string
payload
required

Always null on an error response.

object
details
object
Example
{
"state": "NOT_FOUND_ORDER",
"payload": null
}

Too many requests — see the Rate limits guide. Retry after the Retry-After header (seconds).

Media typeapplication/json

The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).

object
state
required
string
payload
required

Always null on an error response.

object
details
object
Example
{
"state": "NOT_FOUND_ORDER",
"payload": null
}
Retry-After
integer

Seconds to wait before retrying.