Create Webhook
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/webhooks/thanksio',
type: 'order.status_update',
description: 'Order status updates',
verb: 'post',
mailing_list_id: null
})
};
fetch('https://api.thanks.io/api/v2/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.thanks.io/api/v2/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks/thanksio",
"type": "order.status_update",
"description": "Order status updates",
"verb": "post",
"mailing_list_id": null
}
'import requests
url = "https://api.thanks.io/api/v2/webhooks"
payload = {
"url": "https://example.com/webhooks/thanksio",
"type": "order.status_update",
"description": "Order status updates",
"verb": "post",
"mailing_list_id": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"type": "order.status_update",
"url": "https://example.com/webhooks/thanksio",
"description": "Order status updates",
"verb": "post",
"mailing_list_id": null,
"user_id": 2,
"invoke_count": 0,
"updated_at": "2026-03-10T18:59:24.000000Z",
"created_at": "2026-03-10T18:59:24.000000Z",
"id": 13
}{
"message": "Unauthorized"
}Webhooks
Create Webhook
Create a webhook destination. Webhooks are available on paid subscriptions only.
POST
/
webhooks
Create Webhook
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/webhooks/thanksio',
type: 'order.status_update',
description: 'Order status updates',
verb: 'post',
mailing_list_id: null
})
};
fetch('https://api.thanks.io/api/v2/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.thanks.io/api/v2/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks/thanksio",
"type": "order.status_update",
"description": "Order status updates",
"verb": "post",
"mailing_list_id": null
}
'import requests
url = "https://api.thanks.io/api/v2/webhooks"
payload = {
"url": "https://example.com/webhooks/thanksio",
"type": "order.status_update",
"description": "Order status updates",
"verb": "post",
"mailing_list_id": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"type": "order.status_update",
"url": "https://example.com/webhooks/thanksio",
"description": "Order status updates",
"verb": "post",
"mailing_list_id": null,
"user_id": 2,
"invoke_count": 0,
"updated_at": "2026-03-10T18:59:24.000000Z",
"created_at": "2026-03-10T18:59:24.000000Z",
"id": 13
}{
"message": "Unauthorized"
}Webhooks are available on paid subscriptions only.
Authorizations
Bearer token authentication using your thanks.io API key
Body
application/json
Example:
"https://example.com/webhooks/thanksio"
Available options:
order_item.status_update, order.status_update, order_item.delivered, scans.scan_update Example:
"order_item.status_update"
Example:
"post"
Example:
"Order status updates"
Example:
null
Response
Created
Available options:
order_item.status_update, order.status_update, order_item.delivered, scans.scan_update Example:
"order_item.status_update"
Example:
"https://example.com/webhooks/thanksio"
Example:
"Order status updates"
Example:
"post"
Example:
null
Example:
2
Example:
0
Example:
"2026-03-10T18:59:24.000000Z"
Example:
"2026-03-10T18:59:24.000000Z"
Example:
13
Was this page helpful?