POST
/
webhooks
curl --request POST \
  --url https://api.loopreturns.com/api/v1/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: <api-key>' \
  --data '{
  "topic": "return",
  "trigger": "return.created",
  "url": "https://example.com/webhook",
  "status": "inactive"
}'
{
  "id": 12345,
  "shop_id": 65432,
  "topic": "return",
  "trigger": "return.created",
  "url": "https://example.com/webhook",
  "status": "active"
}

Authorizations

X-Authorization
string
header
required

Body

application/json
topic
enum<string>
required

The webhook's topic.

Available options:
return,
label,
restock
trigger
enum<string>
required

The condition which triggers the webhook.

Available options:
return.created,
return.updated,
return.closed,
label.created,
label.updated,
restock.requested
url
string
required

The webhook's URL.

status
enum<string>

The webhook's status.

Available options:
active,
inactive

Response

200
application/json
Success
id
integer

The webhook's unique identifier.

shop_id
integer

The unique identifier of the shop that created the webhook.

topic
enum<string>

The webhook's topic.

Available options:
return,
label,
restock
trigger
enum<string>

The condition which triggers the webhook.

Available options:
return.created,
return.updated,
return.closed,
label.created,
label.updated,
restock.requested
url
string

The webhook's URL.

status
enum<string>

The webhook's status.

Available options:
active,
inactive