Integrations › Send a test event to an integration
Integrations
Send a test event to an integration
POST/api/{ORG}/integrations/{integration}/testsPermalink
Sends a signed sample of event (one the webhook receives; link.click when left out) now.
- Permission
- Integrations · edit
- Plan
- Plans that include the API: Pricing
- Retry
- Safe with an
Idempotency-Key
Example request
curl -X POST "https://console.brevily.com/api/NORTHWIND/integrations/01JC6Y8QH2M4ZK7T9VRW3XNB5D/tests" \ -H "x-api-key: brv_ak_7Fq2Lw9xK3" \ -H "x-api-secret: $BREVILY_SECRET" \ -H "Idempotency-Key: 4f9c1e2a-autumn" \ -H "Content-Type: application/json" \ -d '{ "event": "link.click" }'const res = await fetch("https://console.brevily.com/api/NORTHWIND/integrations/01JC6Y8QH2M4ZK7T9VRW3XNB5D/tests", { method: "POST", headers: { "x-api-key": "brv_ak_7Fq2Lw9xK3", "x-api-secret": process.env.BREVILY_SECRET, "Idempotency-Key": "4f9c1e2a-autumn", "Content-Type": "application/json", }, body: JSON.stringify({ "event": "link.click" }),});const answer = await res.json();Example answer
{ "id": "01JC6Y8QH2M4ZK7T9VRW3XNB5D", "target": "example", "ok": false, "status": 1, "error": "example", "messages": [ "example" ]}{ "code": "VALIDATION_FAILED", "message": "Check the form. event: Not a value this field takes.", "details": { "fields": { "event": "Not a value this field takes." } }, "requestId": "18188559082372202519"}Made-up values. Send your own Idempotency-Key, one per change.
PathPermalink
| Name | Type | Required | Description | Allowed values |
|---|---|---|---|---|
ORG | string | required | Your organisation’s code. | 3 to 20 characters |
integration | string | required | — |
BodyPermalink
JSON. An unknown field is refused with a 400 naming it.
| Name | Type | Required | Description | Allowed values |
|---|---|---|---|---|
event | string | optional | An event the webhook receives; link.click when left out. | link.click, link.created, link.updated, link.expired, link.broken, event.reported |
AnswerPermalink
TestSend
| Name | Type | Description | Allowed values |
|---|---|---|---|
id | string | The integration’s id. | — |
target | string | Where it was sent: the webhook’s URL, or the GA4 id. | — |
ok | boolean | The receiver answered 2xx (and GA4 found nothing to reject). | — |
status | integer | The receiver’s HTTP status; null when nothing answered. | or null |
error | string | Why nothing answered; else null. | or null |
messages | string[] | What GA4 would reject (GA4 only). | — |
ErrorsPermalink
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_FAILED |
A field, a parameter or the body is wrong; details.fields says which. |
| 400 | IDEMPOTENCY_KEY_INVALID |
The Idempotency-Key is longer than 255 characters. |
| 401 | UNAUTHENTICATED |
No key, a key that does not match, or one expired or revoked. |
| 403 | ACCESS_DENIED |
The key lacks Integrations · edit, or the organisation’s plan does not include it. |
| 404 | NOT_FOUND |
No organisation with that code for this key, or no such record in it. |
| 409 | CONFLICT |
|
| 409 | IDEMPOTENCY_IN_FLIGHT |
The first call with this Idempotency-Key is still running. |
| 413 | PAYLOAD_TOO_LARGE |
|
| 415 | UNSUPPORTED_MEDIA |
|
| 422 | IDEMPOTENCY_MISMATCH |
The same Idempotency-Key was sent with a different request. |
| 429 | RATE_LIMITED |
Too many calls: wait Retry-After seconds. |
Rate limitsPermalink
Counted with every other call of the organisation, by plan: Pricing. The answer carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset; more on rate limits.
Type a call, a field or a guide.