Skip to content

Retrieve an Event

Look up the outcome of a call you made. Every write returns an event_id.

GET /api/webhooks/agency/:agency_key/events/:event_id

Authentication

Requires any Bearer token belonging to the agency — no specific scope. See Agency Inbound API.

Path Parameters

ParameterTypeDescription
event_iduuidThe event_id returned by the original call

Statuses

StatusMeaning
pendingQueued for a retry after a transient failure
processingCurrently running
processedCompleted successfully
failedTerminal. Either a business error, or five attempts exhausted.
ignoredRecognised but had no effect

Response

json
{
  "ok": true,
  "data": {
    "id": "3f7b1c2e-9a44-4d1b-8f2e-6c5a1b0d9e83",
    "action": "sub_account.create",
    "status": "processed",
    "attempts": 1,
    "target_account_id": "a1b2c3d4-5678-4e9f-a0b1-c2d3e4f5a6b7",
    "result": {
      "id": "a1b2c3d4-5678-4e9f-a0b1-c2d3e4f5a6b7",
      "name": "Acme Marketing",
      "channels": { "linkedin": 2, "whatsapp": 1, "instagram": 0, "email_marketing": 0 }
    },
    "error_code": null,
    "last_error": null,
    "received_at": "2026-07-28T14:22:00Z",
    "last_attempt_at": "2026-07-28T14:22:00Z",
    "processed_at": "2026-07-28T14:22:03Z"
  }
}

A failed event carries the reason instead:

json
{
  "ok": true,
  "data": {
    "id": "3f7b1c2e-9a44-4d1b-8f2e-6c5a1b0d9e83",
    "action": "sub_account.create",
    "status": "failed",
    "attempts": 1,
    "error_code": "EMAIL_ALREADY_REGISTERED",
    "last_error": "This email is already registered to another account.",
    "processed_at": "2026-07-28T14:22:01Z"
  }
}

action is one of sub_account.create, sub_account.channels.update or sub_account.delete.

Example

cURL

bash
curl --request GET \
  --url "https://api.getraze.co/api/webhooks/agency/AGENCY_KEY/events/EVENT_ID" \
  --header "Authorization: Bearer YOUR_TOKEN"

JavaScript

javascript
const response = await fetch(
  `https://api.getraze.co/api/webhooks/agency/${agencyKey}/events/${eventId}`,
  { headers: { 'Authorization': `Bearer ${token}` } }
);
const data = await response.json();

Python

python
import requests

response = requests.get(
    f'https://api.getraze.co/api/webhooks/agency/{agency_key}/events/{event_id}',
    headers={'Authorization': f'Bearer {token}'}
)
data = response.json()

Errors

StatusCodeDescription
401UNAUTHORIZEDMissing, unknown or revoked token
404EVENT_NOT_FOUNDNo event with that id belongs to this agency

GetRaze - AI-Powered Lead Generation