Get a deal
One deal in full: the offer, status, whose move it is, the latest draft's review state, recent messages and the link to the deal page. Paying, approving a draft and cancelling happen on that page.
View as MarkdownGET
https://yapfactory.com/api/v1/deals/{dealId}| Who can use it | Everyone: brands and creators |
| Tier | read: Reads. Changes nothing. |
| Scope | deals:read, or read |
| Idempotency-Key | Not used |
| Rate limit | Reads: 120 a minute |
| MCP tool | get_deal |
Parameters
dealIdpathrequired
The deal's id.
messagesqueryoptional
How many recent messages to include. 0 to 50. Default 10.
Example request
curl "https://yapfactory.com/api/v1/deals/8f14e45f-ceea-4e7a-9b1d-2c3b4a5d6e7f" \
-H "Authorization: Bearer $YAP_API_KEY"Response
200 with the result in data: the same object the MCP tool returns.
{
"data": {
"id": "3b2f6c1e-7a54-4d0b-9f1a-6e5d4c3b2a19",
"you": "brand",
"status": "draft_submitted",
"nextStep": "Review the draft by 11 Dec",
"outcome": null,
"campaign": {
"id": "8f14e45f-ceea-4e7a-9b1d-2c3b4a5d6e7f",
"title": "Morning routine with Sleepwell",
"product": "Sleepwell"
},
"with": "Maya R.",
"offer": {
"brandPays": {
"minor": 2750,
"currency": "USD",
"formatted": "$27.50"
},
"serviceFee": {
"minor": 250,
"currency": "USD",
"formatted": "$2.50"
},
"creatorEarns": {
"minor": 2500,
"currency": "USD",
"formatted": "$25.00"
},
"lines": [
{
"label": "1 × 30s video creation fee",
"amount": {
"minor": 2500,
"currency": "USD",
"formatted": "$25.00"
}
},
{
"label": "Licence: Brand's channels, no ads",
"amount": {
"minor": 0,
"currency": "USD",
"formatted": "$0.00"
}
}
],
"adRights": "Brand's channels, no ads",
"deadline": "2026-12-16T12:00:00.000Z",
"accessBy": "2026-12-04T12:00:00.000Z",
"lengthSeconds": 30,
"revisionRoundsIncluded": 3,
"revisionsUsed": 0
},
"dates": {
"invited": "2026-12-02T09:39:13.000Z",
"inviteExpires": "2026-12-05T09:39:13.000Z",
"accepted": "2026-12-02T14:46:04.000Z",
"paymentDue": null,
"funded": "2026-12-03T10:02:10.000Z",
"draftDue": "2026-12-10T10:02:10.000Z",
"reviewDue": "2026-12-11T16:12:04.000Z",
"closed": null
},
"paymentSecured": true,
"latestDraft": {
"version": 1,
"submittedAt": "2026-12-08T16:12:04.000Z",
"review": "pending",
"notes": null,
"creatorNote": "Went with the 2am hook.",
"previewReady": true
},
"messages": [
{
"from": "Maya",
"at": "2026-12-08T16:13:20.000Z",
"text": "Draft is up. Happy to reshoot the opening if you'd like it brighter."
}
],
"canMessage": true,
"url": "https://yapfactory.com/deals/3b2f6c1e-7a54-4d0b-9f1a-6e5d4c3b2a19",
"onSiteOnly": "Starting the deal (charges the brand's card), approving a draft (pays the creator), uploading drafts, cancelling and disputes happen on the deal page."
}
}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
| Code | Status | When |
|---|---|---|
invalid_request | 400 | A field failed validation (see meta.issues), or an unknown query parameter. |
unauthorized | 401 | No token, or it's wrong, expired, revoked or from the other environment. |
insufficient_scope | 403 | The token doesn't have deals:read (or read). |
forbidden | 403 | Not allowed for this account, for example while it's paused. |
not_found | 404 | No such deal, or it isn't yours. |
rate_limited | 429 | Over the limit. Wait for Retry-After seconds. |
internal | 500 | Our 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.