Skip to main content
POST
Sends one test delivery to the webhook’s saved URL, so an agent can check a receiver end to end before it relies on it. The body is the same sample payload the app’s Test button sends for that event, with the webhook’s own webhook_id, webhook_name, event_type, campaign_id (when the webhook is on a campaign), webhookUrl and webhook_url filled in and is_test: true added. When signing is on for the webhook (see Webhook Signing Secret), the test is signed like real deliveries only if your key may manage signing: a main account key, or a client key whose client has full access. Other keys get an unsigned test (signed: false) even though real deliveries are signed; the test is also sent unsigned if the signing lookup fails. Check signed before you test your signature verification. Only public addresses are called: a webhook URL that points to a private or local address is refused with a 400, and redirects are not followed. The URL must answer within 10 seconds, with at most 64 KB. With a client API key, only webhooks of that client can be tested.

Path Parameters

integer
required
The webhook ID (a positive integer, at most 2147483647)

Query Parameters

string
required
Your SmartLead API key (a main or client key)

Request Body

string
The event to send a sample of. One of EMAIL_SENT, FIRST_EMAIL_SENT, EMAIL_OPEN, EMAIL_LINK_CLICK, EMAIL_REPLY, LEAD_UNSUBSCRIBED, LEAD_CATEGORY_UPDATED, EMAIL_BOUNCE, CAMPAIGN_STATUS_CHANGED, UNTRACKED_REPLIES, MANUAL_STEP_REACHED, MANUAL_REPLY_SENT. Default: the first event type the webhook is subscribed to that has a sample (EMAIL_ACCOUNT_DISCONNECTED and LINKEDIN_DISCONNECTED have none). A webhook subscribed to no event gets an EMAIL_SENT sample; one subscribed only to the two DISCONNECTED events gets a 400 unless you pass event_type.

Response Fields

boolean
true when your URL accepted the test (a 2xx answer)
boolean
Same as ok for a delivery attempt
boolean
Whether the test carried signature headers or a bearer token (only on success). See the signing note above.
integer
The webhook tested
string
The event type whose sample was sent
integer
On a 502: the HTTP status your URL answered, or null when it could not be reached, timed out or answered with more than 64 KB
string
On any failure: what went wrong

Response Codes

Success
Your URL answered with a 2xx
Bad Request
event_type is not one of the values above; the chosen event type has no test sample; the saved URL is not a valid URL or points to a private or local address; webhook_id is not a positive integer up to 2147483647; or an unknown query parameter or body key
Unauthorized
Invalid or missing API key
Not Found
No webhook with this ID in your account (or your client, for a client key)
Bad Gateway
Your URL answered with a non-2xx status, could not be reached, did not answer within 10 seconds, or answered with more than 64 KB
Internal Server Error
Server error; retry the request