Events
Read every change on your account from the last 30 days as an ordered list, as an alternative or a safety net to webhooks.
The Events API returns the changes on your account as a list you pull, instead of a webhook FieldCamp pushes. It holds the last 30 days, oldest first, in the order the changes were recorded.
Use it when your system cannot receive webhooks, or alongside webhooks to pick up anything your receiver missed.
curl "https://api.fieldcamp.ai/api/v1/events?types=job.*,invoice.paid&limit=100" \
-H "Authorization: Bearer $FIELDCAMP_API_KEY"Scopes
The key needs events:read. A scoped key also needs the read scope of each
record type it wants events for: jobs:read for job.*, invoices:read for
invoice.*, objects.<slug>:read or objects:read for a custom object.
Events the key cannot read are left out; they are not an error.
Parameters
| Parameter | Description |
|---|---|
types | Comma-separated event names. Accepts exact names (job.updated), a whole record type (job.*), or * for everything. Leave it out for everything. |
limit | 1–100, default 50. |
cursor | Where to continue from. See below. |
How types is checked:
- A wildcard that matches no event, such as
jbo.*, returns422. - A value that is not shaped like an event name is refused.
- An exact name that is well formed but does not exist returns an empty
list, not an error. Check your names against
GET /api/v1/webhooks/event-types.
inbox.note.created events are returned only to a key that also holds
inbox_notes:read.
The event
Each event has the same shape as a webhook body, and the same id, so you
can mix both sources and ignore an event you have already handled.
| Field | Description |
|---|---|
id | The event ID. |
type | The event name, for example job.status_changed. |
api_version | The version of the body shape. |
created_at | When the change happened. |
sequence | Counts the changes to this one record: 1 for its first event, 2 for the next. It is not the order of events across the account; the list order is. |
data.object, data.id | The record type and the record's ID. |
data.record | The record after the change. |
data.changed_fields, data.previous | Which fields changed, and their earlier values. |
actor | Who made the change: type and id. |
source | Where the change came from, for example app. |
See Webhook events for the event names and the record shapes.
Paging and polling
| To do this | Use |
|---|---|
| Read the next page | Pass meta.next.cursor back as cursor. |
| Know you have caught up | meta.next is null. |
| Poll for new events later | Keep meta.nextCursor and pass it as cursor on the next poll. An empty page keeps the same value. |
A cursor that cannot be read returns 400 INVALID_CURSOR. Always pass the value from the previous response unchanged.
Endpoints
/api/v1/eventsQuery Parameters
Opaque cursor from meta.nextCursor.
Comma-separated event names.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/events"{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}