Launch offer: service fee 10% 4% until 31 Dec, just enough to cover card processing. See pricing

← REST API reference

List recent events

The latest events (up to 50) sent to your webhook endpoints, newest first, exactly as they were delivered. With sample=true and a type, an account with no such event yet gets one example event instead (livemode: false, an id starting evt_sample, and meta.sample: true), for tools that need an example to map fields from.

View as Markdown
GEThttps://yapfactory.com/api/v1/events
Who can use itEveryone: brands and creators
Tierread: Reads. Changes nothing.
Scopewebhooks:read, or read
Idempotency-KeyNot used
Rate limitReads: 120 a minute
MCP toolNone. This one is REST only.

Parameters

type
queryoptional
"deal.updated" | "deal.invited" | "invite.accepted" | "invite.declined" | "invite.expired" | "deal.started" | "draft.submitted" | "revision.requested" | "draft.approved" | "deal.completed" | "deal.cancelled" | "ask.received" | "message.received" | "campaign.published" | "post.published" | "post.failed"

Only events of this type.

sample
queryoptional
boolean

When there's no real event of type yet, return an example one. Default false.

limit
queryoptional
integer

How many to return. 1 to 50. Default 20.

cursor
queryoptional
string

The nextCursor from the previous page. Leave out for the first page.

Example request

curl "https://yapfactory.com/api/v1/events?type=draft.submitted&sample=true" \
  -H "Authorization: Bearer $YAP_API_KEY"

Response

200 with a list. Each item in data is what the MCP tool returns in events, and meta carries the summary fields. Pass nextCursor back as cursor until hasMore is false. How paging works.

{
  "data": [
    {
      "id": "evt_sampledraftsubmitted",
      "type": "draft.submitted",
      "createdAt": "2026-12-08T16:12:04.000Z",
      "livemode": false,
      "data": {
        "dealId": "3b2f6c1e-7a54-4d0b-9f1a-6e5d4c3b2a19",
        "campaignId": "8f14e45f-ceea-4e7a-9b1d-2c3b4a5d6e7f",
        "status": "draft_submitted",
        "url": "https://yapfactory.com/deals/3b2f6c1e-7a54-4d0b-9f1a-6e5d4c3b2a19",
        "version": 1
      }
    }
  ],
  "nextCursor": null,
  "hasMore": false,
  "meta": {
    "sample": false
  }
}

An example: fields that don't apply are null, and new fields can be added at any time, so ignore ones you don't know. Every response carries Request-Id and the RateLimit-* headers.

Errors

CodeStatusWhen
invalid_request400A field failed validation (see meta.issues), or an unknown query parameter.
unauthorized401No token, or it's wrong, expired, revoked or from the other environment.
insufficient_scope403The token doesn't have webhooks:read (or read).
forbidden403Not allowed for this account, for example while it's paused.
rate_limited429Over the limit. Wait for Retry-After seconds.
internal500Our fault. Retry later, and send us the requestId if it keeps happening.

Every error has the same shape. See Errors for what to do about each one.