Webhooks
Page number to fetch, 1-indexed. Defaults to 1.
Number of results per page (1-100). Defaults to the API's standard page size if omitted.
List of webhooks
Bad Request
Not Authorized
Not found
Unexpected error
GET /v2/webhooks HTTP/1.1
Host: openapi.paintscout.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"totalRows": 1,
"rows": [
{
"id": "42",
"url": "https://sweet-webhooks.com/my/webhook/endpoint",
"events": [
"quote-sent",
"quote-accepted"
],
"token": "123456",
"enabled": true,
"timestamp": {
"created": 1490737206,
"updated": 1490737206
}
}
]
}A unique ID for the Webhook. Ignored when creating & updating webhooks.
The URL of the webhook, which will receive requests with data for any events fired that fall within the events of the Webhook.
Shared secret for this webhook. Generated for you if you do not supply one, and never changed unless you send a new value or rotate it. The full value is returned only by the create and rotate-token calls; every other response masks it as •••• plus its last 4 characters, so store it when you receive it. PaintScout returns it verbatim on every delivery in the Authorization header as Bearer <token>, so you can confirm the request came from PaintScout, and also uses it as the HMAC-SHA256 key to sign the request body. Each delivery carries X-PaintScout-Timestamp (Unix seconds) and X-PaintScout-Signature in the form v1=<hex digest>, where the digest is computed over the string <timestamp>.<raw request body>. Verify against the exact bytes you received, before parsing the JSON, and compare the digests with a constant-time function such as Node's crypto.timingSafeEqual rather than ===. The timestamp is regenerated on each delivery attempt, so a retried event carries a newer timestamp than the original. Every delivery also carries an X-PaintScout-Event-Id header, which stays the same across retries of the same event — use it to deduplicate deliveries. A failed delivery is retried up to 6 times, about 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours after the previous attempt (each wait varies by up to 10%), so the last attempt is about 21 hours after the first. It is retried when your endpoint returns a 5xx, 408 or 429 status or the request fails with a network error such as a timeout or a reset connection. Other 4xx statuses, TLS certificate errors and invalid URLs are not retried. After the last retry the event is not sent again on its own. List a webhook's events with GET /webhooks/{id}/events and send one again with POST /webhook-events/{id}/redeliver, or use the list endpoints (for example GET /quotes and GET /invoices) to catch up after an outage.
Whether or not the Webhook is enabled/active.
Details about the new Webhook
A unique ID for the Webhook. Ignored when creating & updating webhooks.
The URL of the webhook, which will receive requests with data for any events fired that fall within the events of the Webhook.
Shared secret for this webhook. Generated for you if you do not supply one, and never changed unless you send a new value or rotate it. The full value is returned only by the create and rotate-token calls; every other response masks it as •••• plus its last 4 characters, so store it when you receive it. PaintScout returns it verbatim on every delivery in the Authorization header as Bearer <token>, so you can confirm the request came from PaintScout, and also uses it as the HMAC-SHA256 key to sign the request body. Each delivery carries X-PaintScout-Timestamp (Unix seconds) and X-PaintScout-Signature in the form v1=<hex digest>, where the digest is computed over the string <timestamp>.<raw request body>. Verify against the exact bytes you received, before parsing the JSON, and compare the digests with a constant-time function such as Node's crypto.timingSafeEqual rather than ===. The timestamp is regenerated on each delivery attempt, so a retried event carries a newer timestamp than the original. Every delivery also carries an X-PaintScout-Event-Id header, which stays the same across retries of the same event — use it to deduplicate deliveries. A failed delivery is retried up to 6 times, about 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours after the previous attempt (each wait varies by up to 10%), so the last attempt is about 21 hours after the first. It is retried when your endpoint returns a 5xx, 408 or 429 status or the request fails with a network error such as a timeout or a reset connection. Other 4xx statuses, TLS certificate errors and invalid URLs are not retried. After the last retry the event is not sent again on its own. List a webhook's events with GET /webhooks/{id}/events and send one again with POST /webhook-events/{id}/redeliver, or use the list endpoints (for example GET /quotes and GET /invoices) to catch up after an outage.
Whether or not the Webhook is enabled/active.
Bad Request
Not Authorized
Not found
Unexpected error
POST /v2/webhooks HTTP/1.1
Host: openapi.paintscout.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 204
{
"id": "42",
"url": "https://sweet-webhooks.com/my/webhook/endpoint",
"events": [
"quote-status-changed",
"quote-created"
],
"token": "123456",
"enabled": true,
"timestamp": {
"created": 1490737206,
"updated": 1490737206
}
}{
"id": "42",
"url": "https://sweet-webhooks.com/my/webhook/endpoint",
"events": [
"quote-status-changed",
"quote-created"
],
"token": "123456",
"enabled": true,
"timestamp": {
"created": 1490737206,
"updated": 1490737206
}
}ID of the Webhooks
Details about the webhooks
A unique ID for the Webhook. Ignored when creating & updating webhooks.
The URL of the webhook, which will receive requests with data for any events fired that fall within the events of the Webhook.
Shared secret for this webhook. Generated for you if you do not supply one, and never changed unless you send a new value or rotate it. The full value is returned only by the create and rotate-token calls; every other response masks it as •••• plus its last 4 characters, so store it when you receive it. PaintScout returns it verbatim on every delivery in the Authorization header as Bearer <token>, so you can confirm the request came from PaintScout, and also uses it as the HMAC-SHA256 key to sign the request body. Each delivery carries X-PaintScout-Timestamp (Unix seconds) and X-PaintScout-Signature in the form v1=<hex digest>, where the digest is computed over the string <timestamp>.<raw request body>. Verify against the exact bytes you received, before parsing the JSON, and compare the digests with a constant-time function such as Node's crypto.timingSafeEqual rather than ===. The timestamp is regenerated on each delivery attempt, so a retried event carries a newer timestamp than the original. Every delivery also carries an X-PaintScout-Event-Id header, which stays the same across retries of the same event — use it to deduplicate deliveries. A failed delivery is retried up to 6 times, about 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours after the previous attempt (each wait varies by up to 10%), so the last attempt is about 21 hours after the first. It is retried when your endpoint returns a 5xx, 408 or 429 status or the request fails with a network error such as a timeout or a reset connection. Other 4xx statuses, TLS certificate errors and invalid URLs are not retried. After the last retry the event is not sent again on its own. List a webhook's events with GET /webhooks/{id}/events and send one again with POST /webhook-events/{id}/redeliver, or use the list endpoints (for example GET /quotes and GET /invoices) to catch up after an outage.
Whether or not the Webhook is enabled/active.
Bad Request
Not Authorized
Not found
Unexpected error
GET /v2/webhooks/{id} HTTP/1.1
Host: openapi.paintscout.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "42",
"url": "https://sweet-webhooks.com/my/webhook/endpoint",
"events": [
"quote-status-changed",
"quote-created"
],
"token": "123456",
"enabled": true,
"timestamp": {
"created": 1490737206,
"updated": 1490737206
}
}ID of the Webhook
A unique ID for the Webhook. Ignored when creating & updating webhooks.
The URL of the webhook, which will receive requests with data for any events fired that fall within the events of the Webhook.
Shared secret for this webhook. Generated for you if you do not supply one, and never changed unless you send a new value or rotate it. The full value is returned only by the create and rotate-token calls; every other response masks it as •••• plus its last 4 characters, so store it when you receive it. PaintScout returns it verbatim on every delivery in the Authorization header as Bearer <token>, so you can confirm the request came from PaintScout, and also uses it as the HMAC-SHA256 key to sign the request body. Each delivery carries X-PaintScout-Timestamp (Unix seconds) and X-PaintScout-Signature in the form v1=<hex digest>, where the digest is computed over the string <timestamp>.<raw request body>. Verify against the exact bytes you received, before parsing the JSON, and compare the digests with a constant-time function such as Node's crypto.timingSafeEqual rather than ===. The timestamp is regenerated on each delivery attempt, so a retried event carries a newer timestamp than the original. Every delivery also carries an X-PaintScout-Event-Id header, which stays the same across retries of the same event — use it to deduplicate deliveries. A failed delivery is retried up to 6 times, about 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours after the previous attempt (each wait varies by up to 10%), so the last attempt is about 21 hours after the first. It is retried when your endpoint returns a 5xx, 408 or 429 status or the request fails with a network error such as a timeout or a reset connection. Other 4xx statuses, TLS certificate errors and invalid URLs are not retried. After the last retry the event is not sent again on its own. List a webhook's events with GET /webhooks/{id}/events and send one again with POST /webhook-events/{id}/redeliver, or use the list endpoints (for example GET /quotes and GET /invoices) to catch up after an outage.
Whether or not the Webhook is enabled/active.
The updated webhook
A unique ID for the Webhook. Ignored when creating & updating webhooks.
The URL of the webhook, which will receive requests with data for any events fired that fall within the events of the Webhook.
Shared secret for this webhook. Generated for you if you do not supply one, and never changed unless you send a new value or rotate it. The full value is returned only by the create and rotate-token calls; every other response masks it as •••• plus its last 4 characters, so store it when you receive it. PaintScout returns it verbatim on every delivery in the Authorization header as Bearer <token>, so you can confirm the request came from PaintScout, and also uses it as the HMAC-SHA256 key to sign the request body. Each delivery carries X-PaintScout-Timestamp (Unix seconds) and X-PaintScout-Signature in the form v1=<hex digest>, where the digest is computed over the string <timestamp>.<raw request body>. Verify against the exact bytes you received, before parsing the JSON, and compare the digests with a constant-time function such as Node's crypto.timingSafeEqual rather than ===. The timestamp is regenerated on each delivery attempt, so a retried event carries a newer timestamp than the original. Every delivery also carries an X-PaintScout-Event-Id header, which stays the same across retries of the same event — use it to deduplicate deliveries. A failed delivery is retried up to 6 times, about 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours after the previous attempt (each wait varies by up to 10%), so the last attempt is about 21 hours after the first. It is retried when your endpoint returns a 5xx, 408 or 429 status or the request fails with a network error such as a timeout or a reset connection. Other 4xx statuses, TLS certificate errors and invalid URLs are not retried. After the last retry the event is not sent again on its own. List a webhook's events with GET /webhooks/{id}/events and send one again with POST /webhook-events/{id}/redeliver, or use the list endpoints (for example GET /quotes and GET /invoices) to catch up after an outage.
Whether or not the Webhook is enabled/active.
Bad Request
Not Authorized
Not found
Unexpected error
PUT /v2/webhooks/{id} HTTP/1.1
Host: openapi.paintscout.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 204
{
"id": "42",
"url": "https://sweet-webhooks.com/my/webhook/endpoint",
"events": [
"quote-status-changed",
"quote-created"
],
"token": "123456",
"enabled": true,
"timestamp": {
"created": 1490737206,
"updated": 1490737206
}
}{
"id": "42",
"url": "https://sweet-webhooks.com/my/webhook/endpoint",
"events": [
"quote-status-changed",
"quote-created"
],
"token": "123456",
"enabled": true,
"timestamp": {
"created": 1490737206,
"updated": 1490737206
}
}ID of the Webhook
No Content
No content
Bad Request
Not Authorized
Not found
Unexpected error
DELETE /v2/webhooks/{id} HTTP/1.1
Host: openapi.paintscout.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Replaces the webhook's signing token with a new generated value. The response is the only place the new token is shown in full; later reads return it masked. Deliveries sent after this call use the new token, so update your endpoint's verification before you rotate, or accept both tokens while you switch over.
ID of the Webhook
The webhook, with the new token in full
A unique ID for the Webhook. Ignored when creating & updating webhooks.
The URL of the webhook, which will receive requests with data for any events fired that fall within the events of the Webhook.
Shared secret for this webhook. Generated for you if you do not supply one, and never changed unless you send a new value or rotate it. The full value is returned only by the create and rotate-token calls; every other response masks it as •••• plus its last 4 characters, so store it when you receive it. PaintScout returns it verbatim on every delivery in the Authorization header as Bearer <token>, so you can confirm the request came from PaintScout, and also uses it as the HMAC-SHA256 key to sign the request body. Each delivery carries X-PaintScout-Timestamp (Unix seconds) and X-PaintScout-Signature in the form v1=<hex digest>, where the digest is computed over the string <timestamp>.<raw request body>. Verify against the exact bytes you received, before parsing the JSON, and compare the digests with a constant-time function such as Node's crypto.timingSafeEqual rather than ===. The timestamp is regenerated on each delivery attempt, so a retried event carries a newer timestamp than the original. Every delivery also carries an X-PaintScout-Event-Id header, which stays the same across retries of the same event — use it to deduplicate deliveries. A failed delivery is retried up to 6 times, about 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours after the previous attempt (each wait varies by up to 10%), so the last attempt is about 21 hours after the first. It is retried when your endpoint returns a 5xx, 408 or 429 status or the request fails with a network error such as a timeout or a reset connection. Other 4xx statuses, TLS certificate errors and invalid URLs are not retried. After the last retry the event is not sent again on its own. List a webhook's events with GET /webhooks/{id}/events and send one again with POST /webhook-events/{id}/redeliver, or use the list endpoints (for example GET /quotes and GET /invoices) to catch up after an outage.
Whether or not the Webhook is enabled/active.
Not Authorized
Not found
Unexpected error
POST /v2/webhooks/{id}/rotate-token HTTP/1.1
Host: openapi.paintscout.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "42",
"url": "https://sweet-webhooks.com/my/webhook/endpoint",
"events": [
"quote-status-changed",
"quote-created"
],
"token": "123456",
"enabled": true,
"timestamp": {
"created": 1490737206,
"updated": 1490737206
}
}Lists the events sent to one webhook, newest first. Events are kept for at least 30 days. Each row has every attempt with its HTTP status, duration and error, but no bodies: sentBody, sentHeaders and each attempt's responseBody are null. Read one event with GET /webhook-events/{id} to get them. Test pings are included, with event ping. Pages are cursor-based: pass the cursor from one response to get the next page; it is null on the last page.
ID of the Webhook
Only events with this status.
Only events of this type, for example quote-sent or ping.
Only events created at or after this time, in epoch milliseconds.
Only events created at or before this time, in epoch milliseconds.
The cursor from the previous page. Omit it for the first page.
Events per page (1-100). Defaults to 25.
A page of events
Pass as cursor to get the next page. Null on the last page.
Bad Request
Not Authorized
Not found
Unexpected error
GET /v2/webhooks/{id}/events HTTP/1.1
Host: openapi.paintscout.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"rows": [
{
"id": "6b1c5a0e-2f4d-4c1b-9a51-0d3e2b7c9f10",
"webhookId": "42",
"webhookUrl": "https://sweet-webhooks.com/my/webhook/endpoint",
"event": "quote-sent",
"status": "failed",
"httpStatus": 500,
"error": "HTTP 500: Internal Server Error",
"retryCount": 6,
"maxRetries": 6,
"timestamp": 1761660000000,
"lastAttempt": 1761735600000,
"nextRetry": null,
"documentId": "f0a1b2c3",
"documentType": "quote",
"redeliveryOf": null,
"durationMs": 412,
"attempts": [
{
"at": 1761660000412,
"httpStatus": 500,
"durationMs": 412,
"errorCode": null,
"error": "HTTP 500: Internal Server Error",
"responseBody": null,
"responseBodyTruncated": false,
"bodyBytes": 1834
}
],
"sentBody": null,
"sentBodyTruncated": false,
"sentHeaders": null
}
],
"cursor": "text"
}Sends a ping event to the webhook now and waits up to 10 seconds for the answer. It is signed like a real delivery and has the same headers. The body is {"eventType":"ping","timestamp":"<ISO 8601>","companyId":"<id>","webhookId":"<id>"}. The ping is sent even when the webhook is disabled, and is never retried. It is recorded as an event, so it shows in GET /webhooks/{id}/events, but it does not count toward the webhook's health. The response is 200 whenever the send ran; status says whether your endpoint accepted it. At most 30 test sends an hour per company; more return 429.
ID of the Webhook
The result of the send
success when your endpoint returned a 2xx.
How long the request took, in milliseconds.
The HTTP status your endpoint returned, or null when no response arrived.
The first 2 KB of your endpoint's response.
Why the send failed, or null when it succeeded.
Bad Request
Not Authorized
Not found
Rate limited
Unexpected error
POST /v2/webhooks/{id}/test HTTP/1.1
Host: openapi.paintscout.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"event": {
"id": "6b1c5a0e-2f4d-4c1b-9a51-0d3e2b7c9f10",
"webhookId": "42",
"webhookUrl": "https://sweet-webhooks.com/my/webhook/endpoint",
"event": "quote-sent",
"status": "failed",
"httpStatus": 500,
"error": "HTTP 500: Internal Server Error",
"retryCount": 6,
"maxRetries": 6,
"timestamp": 1761660000000,
"lastAttempt": 1761735600000,
"nextRetry": null,
"documentId": "f0a1b2c3",
"documentType": "quote",
"redeliveryOf": null,
"durationMs": 412,
"attempts": [
{
"at": 1761660000412,
"httpStatus": 500,
"durationMs": 412,
"errorCode": null,
"error": "HTTP 500: Internal Server Error",
"responseBody": null,
"responseBodyTruncated": false,
"bodyBytes": 1834
}
],
"sentBody": null,
"sentBodyTruncated": false,
"sentHeaders": null
},
"status": "success",
"durationMs": 1,
"httpStatus": 1,
"responseBody": "text",
"responseBodyTruncated": true,
"error": "text"
}Returns one outbound event with every attempt, the exact body and headers sent (without Authorization and X-PaintScout-Signature), and the first 2 KB of each response. Events are kept for at least 30 days.
ID of the event, from GET /webhooks/{id}/events or the X-PaintScout-Event-Id header
The event
One outbound event: a send of one webhook event to one webhook, with every attempt. Events are kept for at least 30 days.
The event ID. Sent to your endpoint in the X-PaintScout-Event-Id header.
The webhook the event was sent to.
The webhook URL when the event was created.
The event type, for example quote-sent. A test send is ping.
pending and processing: queued or being sent, retries included. success: your endpoint returned a 2xx. failed: the last attempt failed and no retry is left. expired: still not delivered 48 hours after it was created. skipped: the webhook was deleted or disabled when the event was due, so nothing was sent.
The HTTP status of the last attempt.
Why the last attempt failed.
Retries made so far, not counting the first attempt.
Most retries this event can get.
Epoch milliseconds when the event was created.
Epoch milliseconds of the last attempt.
Epoch milliseconds of the next retry, when one is scheduled.
The ID of the record the event is about, for example a quote ID.
The type of that record, for example quote.
For a redelivery, the ID of the event it sent again.
Duration of the last attempt, in milliseconds.
The exact request body sent, up to 64 KB. Null in GET /webhooks/{id}/events rows, in the responses of the test and redeliver calls, and for an event that was never sent. Read the event with GET /webhook-events/{id} to get it.
True when the body was larger than 64 KB and sentBody holds only its start. Such an event cannot be redelivered.
Not Authorized
Not found
Unexpected error
GET /v2/webhook-events/{id} HTTP/1.1
Host: openapi.paintscout.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "6b1c5a0e-2f4d-4c1b-9a51-0d3e2b7c9f10",
"webhookId": "42",
"webhookUrl": "https://sweet-webhooks.com/my/webhook/endpoint",
"event": "quote-sent",
"status": "failed",
"httpStatus": 500,
"error": "HTTP 500: Internal Server Error",
"retryCount": 6,
"maxRetries": 6,
"timestamp": 1761660000000,
"lastAttempt": 1761735600000,
"nextRetry": null,
"documentId": "f0a1b2c3",
"documentType": "quote",
"redeliveryOf": null,
"durationMs": 412,
"attempts": [
{
"at": 1761660000412,
"httpStatus": 500,
"durationMs": 412,
"errorCode": null,
"error": "HTTP 500: Internal Server Error",
"responseBody": null,
"responseBodyTruncated": false,
"bodyBytes": 1834
}
],
"sentBody": null,
"sentBodyTruncated": false,
"sentHeaders": null
}Sends an event again. This creates a new event, with a new ID, linked to the original by redeliveryOf, and queues it at once with the usual retries. The body is the exact body first sent; the timestamp and signature headers are new. Only a success, failed or expired event can be redelivered, and only when its body was stored in full, the webhook still exists and is enabled. Test pings cannot be redelivered. Each event can be redelivered once a minute, and each company can redeliver 30 events an hour; more return 429.
ID of the event to send again
The new event, queued with status pending
One outbound event: a send of one webhook event to one webhook, with every attempt. Events are kept for at least 30 days.
The event ID. Sent to your endpoint in the X-PaintScout-Event-Id header.
The webhook the event was sent to.
The webhook URL when the event was created.
The event type, for example quote-sent. A test send is ping.
pending and processing: queued or being sent, retries included. success: your endpoint returned a 2xx. failed: the last attempt failed and no retry is left. expired: still not delivered 48 hours after it was created. skipped: the webhook was deleted or disabled when the event was due, so nothing was sent.
The HTTP status of the last attempt.
Why the last attempt failed.
Retries made so far, not counting the first attempt.
Most retries this event can get.
Epoch milliseconds when the event was created.
Epoch milliseconds of the last attempt.
Epoch milliseconds of the next retry, when one is scheduled.
The ID of the record the event is about, for example a quote ID.
The type of that record, for example quote.
For a redelivery, the ID of the event it sent again.
Duration of the last attempt, in milliseconds.
The exact request body sent, up to 64 KB. Null in GET /webhooks/{id}/events rows, in the responses of the test and redeliver calls, and for an event that was never sent. Read the event with GET /webhook-events/{id} to get it.
True when the body was larger than 64 KB and sentBody holds only its start. Such an event cannot be redelivered.
Bad Request
Not Authorized
Not found
Rate limited
Unexpected error
POST /v2/webhook-events/{id}/redeliver HTTP/1.1
Host: openapi.paintscout.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "6b1c5a0e-2f4d-4c1b-9a51-0d3e2b7c9f10",
"webhookId": "42",
"webhookUrl": "https://sweet-webhooks.com/my/webhook/endpoint",
"event": "quote-sent",
"status": "failed",
"httpStatus": 500,
"error": "HTTP 500: Internal Server Error",
"retryCount": 6,
"maxRetries": 6,
"timestamp": 1761660000000,
"lastAttempt": 1761735600000,
"nextRetry": null,
"documentId": "f0a1b2c3",
"documentType": "quote",
"redeliveryOf": null,
"durationMs": 412,
"attempts": [
{
"at": 1761660000412,
"httpStatus": 500,
"durationMs": 412,
"errorCode": null,
"error": "HTTP 500: Internal Server Error",
"responseBody": null,
"responseBodyTruncated": false,
"bodyBytes": 1834
}
],
"sentBody": null,
"sentBodyTruncated": false,
"sentHeaders": null
}Last updated
Was this helpful?

