{"openapi":"3.1.0","info":{"title":"Dealtab API","version":"1.0.0","description":"Brand-deal pipeline for creators: deals, deliverables, usage rights, invoices and payment chases. The same tools are served over MCP at /mcp. Every response carries a `summary` an agent can echo. Money inputs are strings in major units plus a 3-letter currency; dates are YYYY-MM-DD. Emailing a brand is two-step: POST .../chase/preview returns a confirmationToken that .../chase/send requires. Every path and method answers JSON: an unknown path is 404, a method the path doesn't support is 405 (MethodNotAllowed, with an Allow header), a body that isn't a JSON object is 400. HEAD works wherever GET does. Every authenticated request counts toward the rate limit, refused ones included."},"servers":[{"url":"https://dealtab.app/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"read","description":"Needs the read scope."},{"name":"write","description":"Needs the write scope. Refused (403) when the trial has ended."},{"name":"send","description":"Emails a brand. Needs the send scope; two-step with a confirmation token."}],"paths":{"/deals":{"get":{"operationId":"list_deals","summary":"List the creator's brand deals with stage, value, next deadline and open invoices; optionally filter by stage.","description":"List the creator's brand deals with stage, value, next deadline and open invoices; optionally filter by stage.\n\nRequires the `read` scope. MCP tool name: `list_deals`.\n\nExample prompts: \"What deals do I have?\", \"Which deals are still in negotiation?\".","tags":["read"],"x-dealtab-scope":"read","parameters":[{"name":"stage","in":"query","required":false,"description":"Only deals in these stages. Omit for every deal (including lost).","schema":{"description":"Only deals in these stages. Omit for every deal (including lost).","minItems":1,"type":"array","items":{"type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"]}},"style":"form","explode":true},{"name":"limit","in":"query","required":false,"description":"Maximum deals to return (default 100).","schema":{"description":"Maximum deals to return (default 100).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"deals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"campaign":{"type":"string"},"title":{"type":"string","description":"\"Brand · Campaign\""},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]}},"stage":{"type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"]},"stageLabel":{"type":"string"},"value":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","enum":["inbound","outbound"]},"contractSignedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"closedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"createdAt":{"type":"string","description":"ISO 8601 timestamp"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp"},"url":{"type":"string","description":"Deal page in the app"},"nextDeadline":{"anyOf":[{"type":"object","properties":{"on":{"type":"string","description":"YYYY-MM-DD"},"label":{"type":"string"},"urgency":{"type":"string","enum":["overdue","due-today","due-soon","ok","done","none"],"description":"overdue | due-today | due-soon (within 3 days) | ok | done | none (no date)"},"when":{"type":"string"}},"required":["on","label","urgency","when"],"additionalProperties":false},{"type":"null"}],"description":"Soonest open deliverable / invoice / rights date"},"deliverablesTotal":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deliverablesLive":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openInvoices":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Sent or overdue invoices"}},"required":["id","brand","campaign","title","contactName","contactEmail","platforms","stage","stageLabel","value","netDays","source","contractSignedOn","closedOn","createdAt","updatedAt","url","nextDeadline","deliverablesTotal","deliverablesLive","openInvoices"],"additionalProperties":false}},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["deals","count","total"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"create_deal","summary":"Add a new brand deal to the pipeline (bottom of its stage column).","description":"Add a new brand deal to the pipeline (bottom of its stage column).\n\nRequires the `write` scope. MCP tool name: `create_deal`.\n\nExample prompts: \"Add a Juniper Tea deal for their fall launch, $2,000, net 30\".","tags":["write"],"x-dealtab-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"string","minLength":1,"maxLength":120,"description":"Brand name, e.g. \"Juniper Tea\"."},"campaign":{"type":"string","maxLength":200,"description":"Campaign or deal name, e.g. \"Fall launch\"."},"contactName":{"type":"string","maxLength":120,"description":"Name of the person at the brand or agency."},"contactEmail":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}],"description":"Contact email at the brand (used for invoices and chases). \"\" clears it."},"platforms":{"maxItems":9,"type":"array","items":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]},"description":"Platforms the content goes on, e.g. [\"instagram\", \"tiktok\"]."},"value":{"description":"Amount in major units exactly as the user said it, as a string: \"2000\", \"1,250.50\". No currency symbol needed.","type":["string","number"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"3-letter ISO currency code, e.g. USD, EUR, GBP. Defaults to the creator's default currency."},"netDays":{"type":"integer","minimum":0,"maximum":365,"description":"Payment terms in days after the invoice date (net 30 = 30). 0-365. Defaults to the creator's default."},"source":{"type":"string","enum":["inbound","outbound"],"description":"inbound = the brand reached out; outbound = the creator pitched."},"notes":{"type":"string","maxLength":5000,"description":"Free-text notes on the deal."},"stage":{"description":"Starting stage (default lead).","type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"]},"contractSignedOn":{"type":"string","description":"Date the contract was signed. Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"}},"required":["brand"]},"examples":{"example1":{"summary":"Add a Juniper Tea deal for their fall launch, $2,000, net 30","value":{"brand":"Juniper Tea","campaign":"Fall launch","value":"2000","currency":"USD","netDays":30}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"campaign":{"type":"string"},"title":{"type":"string","description":"\"Brand · Campaign\""},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]}},"stage":{"type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"]},"stageLabel":{"type":"string"},"value":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","enum":["inbound","outbound"]},"notes":{"type":"string"},"contractSignedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"closedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"createdAt":{"type":"string","description":"ISO 8601 timestamp"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp"},"url":{"type":"string","description":"Deal page in the app"}},"required":["id","brand","campaign","title","contactName","contactEmail","platforms","stage","stageLabel","value","netDays","source","notes","contractSignedOn","closedOn","createdAt","updatedAt","url"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/deals/{dealId}":{"get":{"operationId":"get_deal","summary":"Get one deal with its deliverables, usage rights, invoices and recent timeline events.","description":"Get one deal with its deliverables, usage rights, invoices and recent timeline events.\n\nRequires the `read` scope. MCP tool name: `get_deal`.\n\nExample prompts: \"Show me the Juniper Tea deal\".","tags":["read"],"x-dealtab-scope":"read","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal id (uuid) from list_deals, search_deals or get_deal.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"campaign":{"type":"string"},"title":{"type":"string","description":"\"Brand · Campaign\""},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]}},"stage":{"type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"]},"stageLabel":{"type":"string"},"value":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","enum":["inbound","outbound"]},"notes":{"type":"string"},"contractSignedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"closedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"createdAt":{"type":"string","description":"ISO 8601 timestamp"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp"},"url":{"type":"string","description":"Deal page in the app"},"deliverables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"type":{"type":"string","enum":["post","reel","video","story","newsletter","short","live","other"]},"platform":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]},"title":{"type":"string"},"label":{"type":"string","description":"Title, or the type when untitled"},"dueOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"draftDueOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"goLiveOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"status":{"type":"string","enum":["planned","drafting","awaiting_approval","approved","live","cancelled"]},"urgency":{"type":"string","enum":["overdue","due-today","due-soon","ok","done","none"],"description":"overdue | due-today | due-soon (within 3 days) | ok | done | none (no date)"},"publishedUrl":{"type":"string"},"notes":{"type":"string"},"url":{"type":"string"}},"required":["id","dealId","type","platform","title","label","dueOn","draftDueOn","goLiveOn","status","urgency","publishedUrl","notes","url"],"additionalProperties":false}},"usageRights":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"type":{"type":"string","enum":["organic","paid_usage","whitelisting"]},"territory":{"type":"string"},"durationLabel":{"type":"string"},"startsOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"expiresOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}],"description":"null = perpetual"},"exclusivityCategory":{"type":"string","description":"\"\" = no exclusivity"},"exclusivityEndsOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"notes":{"type":"string"},"url":{"type":"string"}},"required":["id","dealId","type","territory","durationLabel","startsOn","expiresOn","exclusivityCategory","exclusivityEndsOn","notes","url"],"additionalProperties":false}},"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"number":{"type":"string"},"brand":{"type":"string"},"amount":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"issuedOn":{"type":"string","description":"YYYY-MM-DD"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueOn":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"Stored status"},"effectiveStatus":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"\"sent\" past its due date reads as \"overdue\""},"daysOverdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"paidOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"billToName":{"type":"string"},"billToEmail":{"type":"string"},"billToAddress":{"type":"string"},"poNumber":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"}},"required":["description","quantity","unit","total"],"additionalProperties":false}},"url":{"type":"string","description":"Deal page that holds the invoice"},"pdfUrl":{"type":"string","description":"PDF (needs a signed-in browser session)"}},"required":["id","dealId","number","amount","issuedOn","netDays","dueOn","status","effectiveStatus","daysOverdue","sentAt","paidOn","billToName","billToEmail","billToAddress","poNumber","notes","url","pdfUrl"],"additionalProperties":false}},"recentEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"message":{"type":"string"},"createdAt":{"type":"string","description":"ISO 8601 timestamp"},"via":{"description":"\"agent\" when written through Dealtab Connect, else null","type":["string","null"]},"keyName":{"description":"For agent events: the API key's name (e.g. \"Jo's laptop\"), \"OAuth\" or \"local-demo\". Null otherwise.","type":["string","null"]}},"required":["id","type","message","createdAt","via","keyName"],"additionalProperties":false},"description":"Newest first, up to 20"}},"required":["id","brand","campaign","title","contactName","contactEmail","platforms","stage","stageLabel","value","netDays","source","notes","contractSignedOn","closedOn","createdAt","updatedAt","url","deliverables","usageRights","invoices","recentEvents"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"update_deal","summary":"Change a deal's details (brand, campaign, contact, platforms, value, currency, terms, source, notes, contract date). Use move_deal_stage to change the stage.","description":"Change a deal's details (brand, campaign, contact, platforms, value, currency, terms, source, notes, contract date). Use move_deal_stage to change the stage.\n\nRequires the `write` scope. MCP tool name: `update_deal`.\n\nExample prompts: \"Juniper Tea bumped the fee to $2,500 and wants net 45\".","tags":["write"],"x-dealtab-scope":"write","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal id (uuid) from list_deals, search_deals or get_deal.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"string","minLength":1,"maxLength":120,"description":"Brand name, e.g. \"Juniper Tea\"."},"campaign":{"type":"string","maxLength":200,"description":"Campaign or deal name, e.g. \"Fall launch\"."},"contactName":{"type":"string","maxLength":120,"description":"Name of the person at the brand or agency."},"contactEmail":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}],"description":"Contact email at the brand (used for invoices and chases). \"\" clears it."},"platforms":{"description":"Replaces the whole platform list.","maxItems":9,"type":"array","items":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]}},"value":{"description":"Amount in major units exactly as the user said it, as a string: \"2000\", \"1,250.50\". No currency symbol needed.","type":["string","number"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"3-letter ISO currency code, e.g. USD, EUR, GBP. Defaults to the creator's default currency."},"netDays":{"type":"integer","minimum":0,"maximum":365,"description":"Payment terms in days after the invoice date (net 30 = 30). 0-365. Defaults to the creator's default."},"source":{"type":"string","enum":["inbound","outbound"],"description":"inbound = the brand reached out; outbound = the creator pitched."},"notes":{"description":"Replaces the deal notes. To add a dated note use add_note.","type":"string","maxLength":5000},"contractSignedOn":{"description":"Date the contract was signed. Format YYYY-MM-DD; null clears it; omit to keep the current value.","anyOf":[{"type":"string","description":"Date the contract was signed. Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},{"type":"null"}]}}},"examples":{"example1":{"summary":"Juniper Tea bumped the fee to $2,500 and wants net 45","value":{"value":"2500","netDays":45}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"campaign":{"type":"string"},"title":{"type":"string","description":"\"Brand · Campaign\""},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]}},"stage":{"type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"]},"stageLabel":{"type":"string"},"value":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","enum":["inbound","outbound"]},"notes":{"type":"string"},"contractSignedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"closedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"createdAt":{"type":"string","description":"ISO 8601 timestamp"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp"},"url":{"type":"string","description":"Deal page in the app"},"changed":{"type":"array","items":{"type":"string"}}},"required":["id","brand","campaign","title","contactName","contactEmail","platforms","stage","stageLabel","value","netDays","source","notes","contractSignedOn","closedOn","createdAt","updatedAt","url","changed"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/deals/search":{"get":{"operationId":"search_deals","summary":"Find deals whose brand, campaign, contact name or contact email contains the query (case-insensitive).","description":"Find deals whose brand, campaign, contact name or contact email contains the query (case-insensitive).\n\nRequires the `read` scope. MCP tool name: `search_deals`.\n\nExample prompts: \"Find my deal with Lumen\".","tags":["read"],"x-dealtab-scope":"read","parameters":[{"name":"query","in":"query","required":true,"description":"Text to look for, e.g. \"glossier\" or \"priya@\".","schema":{"type":"string","minLength":1,"maxLength":120,"description":"Text to look for, e.g. \"glossier\" or \"priya@\"."}},{"name":"limit","in":"query","required":false,"description":"Maximum results (default 10).","schema":{"description":"Maximum results (default 10).","type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"deals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"campaign":{"type":"string"},"title":{"type":"string","description":"\"Brand · Campaign\""},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]}},"stage":{"type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"]},"stageLabel":{"type":"string"},"value":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","enum":["inbound","outbound"]},"notes":{"type":"string"},"contractSignedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"closedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"createdAt":{"type":"string","description":"ISO 8601 timestamp"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp"},"url":{"type":"string","description":"Deal page in the app"}},"required":["id","brand","campaign","title","contactName","contactEmail","platforms","stage","stageLabel","value","netDays","source","notes","contractSignedOn","closedOn","createdAt","updatedAt","url"],"additionalProperties":false}},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["deals","count"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/due":{"get":{"operationId":"whats_due","summary":"List everything due in the next N days, oldest first: deliverable drafts, due dates and go-lives, invoices due or overdue, usage-rights and exclusivity expiries.","description":"List everything due in the next N days, oldest first: deliverable drafts, due dates and go-lives, invoices due or overdue, usage-rights and exclusivity expiries.\n\nRequires the `read` scope. MCP tool name: `whats_due`.\n\nExample prompts: \"What's due this week?\", \"Anything due in the next month?\".","tags":["read"],"x-dealtab-scope":"read","parameters":[{"name":"days","in":"query","required":false,"description":"How many days ahead to look (default 7).","schema":{"description":"How many days ahead to look (default 7).","type":"integer","minimum":1,"maximum":90}},{"name":"includeOverdue","in":"query","required":false,"description":"Include items already past due (default true).","schema":{"description":"Include items already past due (default true).","type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"from":{"type":"string","description":"Today (YYYY-MM-DD). Overdue items dated before it are included unless includeOverdue is false."},"to":{"type":"string","description":"Last day of the window (today + days)."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable id: <type>:<entityId>"},"type":{"type":"string","enum":["deliverable","deliverable_draft","deliverable_live","invoice_due","invoice_overdue","rights_expiry","exclusivity_end"],"description":"deliverable (final due), deliverable_draft, deliverable_live (go-live), invoice_due, invoice_overdue, rights_expiry, exclusivity_end"},"on":{"type":"string","description":"YYYY-MM-DD"},"when":{"type":"string","description":"\"today\", \"tomorrow\", \"in 3 days\", \"4 days overdue\""},"urgency":{"type":"string","enum":["overdue","due-today","due-soon","ok","done","none"],"description":"overdue | due-today | due-soon (within 3 days) | ok | done | none (no date)"},"title":{"type":"string"},"brand":{"type":"string"},"dealId":{"type":"string"},"entityId":{"type":"string","description":"Deliverable, invoice or usage-rights id"},"amount":{"description":"Invoice amount (invoice items only)","type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false},"url":{"type":"string"}},"required":["id","type","on","when","urgency","title","brand","dealId","entityId","url"],"additionalProperties":false}},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overdueCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","items","count","overdueCount"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/money":{"get":{"operationId":"money_summary","summary":"Summarise the creator's money: open pipeline by stage, invoices outstanding and overdue, and paid this year and last year.","description":"Summarise the creator's money: open pipeline by stage, invoices outstanding and overdue, and paid this year and last year.\n\nRequires the `read` scope. MCP tool name: `money_summary`.\n\nExample prompts: \"How much am I owed?\".","tags":["read"],"x-dealtab-scope":"read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"primaryCurrency":{"type":"string"},"pipelineTotal":{"type":"array","items":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"description":"Open deals (not paid or lost), by currency"},"outstanding":{"type":"array","items":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"description":"Sent invoices not yet due"},"overdue":{"type":"array","items":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"description":"Sent invoices past their due date"},"paidThisYear":{"type":"array","items":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"description":"One entry per currency"},"paidLastYear":{"type":"array","items":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"description":"One entry per currency"},"byStage":{"type":"array","items":{"type":"object","properties":{"stage":{"type":"string"},"stageLabel":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totals":{"type":"array","items":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"description":"One entry per currency"}},"required":["stage","stageLabel","count","totals"],"additionalProperties":false}},"overdueInvoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"number":{"type":"string"},"brand":{"type":"string"},"amount":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"issuedOn":{"type":"string","description":"YYYY-MM-DD"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueOn":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"Stored status"},"effectiveStatus":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"\"sent\" past its due date reads as \"overdue\""},"daysOverdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"paidOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"billToName":{"type":"string"},"billToEmail":{"type":"string"},"billToAddress":{"type":"string"},"poNumber":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"}},"required":["description","quantity","unit","total"],"additionalProperties":false}},"url":{"type":"string","description":"Deal page that holds the invoice"},"pdfUrl":{"type":"string","description":"PDF (needs a signed-in browser session)"}},"required":["id","dealId","number","amount","issuedOn","netDays","dueOn","status","effectiveStatus","daysOverdue","sentAt","paidOn","billToName","billToEmail","billToAddress","poNumber","notes","url","pdfUrl"],"additionalProperties":false},"description":"Most overdue first"},"outstandingInvoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"number":{"type":"string"},"brand":{"type":"string"},"amount":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"issuedOn":{"type":"string","description":"YYYY-MM-DD"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueOn":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"Stored status"},"effectiveStatus":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"\"sent\" past its due date reads as \"overdue\""},"daysOverdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"paidOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"billToName":{"type":"string"},"billToEmail":{"type":"string"},"billToAddress":{"type":"string"},"poNumber":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"}},"required":["description","quantity","unit","total"],"additionalProperties":false}},"url":{"type":"string","description":"Deal page that holds the invoice"},"pdfUrl":{"type":"string","description":"PDF (needs a signed-in browser session)"}},"required":["id","dealId","number","amount","issuedOn","netDays","dueOn","status","effectiveStatus","daysOverdue","sentAt","paidOn","billToName","billToEmail","billToAddress","poNumber","notes","url","pdfUrl"],"additionalProperties":false},"description":"Soonest due first"}},"required":["year","primaryCurrency","pipelineTotal","outstanding","overdue","paidThisYear","paidLastYear","byStage","overdueInvoices","outstandingInvoices"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/invoices":{"get":{"operationId":"list_invoices","summary":"List invoices with amount, due date and status (sent invoices past due read as overdue); filter by status or deal.","description":"List invoices with amount, due date and status (sent invoices past due read as overdue); filter by status or deal.\n\nRequires the `read` scope. MCP tool name: `list_invoices`.\n\nExample prompts: \"Who owes me money?\", \"Which invoices are overdue?\".","tags":["read"],"x-dealtab-scope":"read","parameters":[{"name":"status","in":"query","required":false,"description":"Only these effective statuses, e.g. [\"overdue\"] or [\"sent\",\"overdue\"] for unpaid. Omit for all.","schema":{"description":"Only these effective statuses, e.g. [\"overdue\"] or [\"sent\",\"overdue\"] for unpaid. Omit for all.","minItems":1,"type":"array","items":{"type":"string","enum":["draft","sent","overdue","paid","void"]}},"style":"form","explode":true},{"name":"dealId","in":"query","required":false,"description":"Only this deal's invoices.","schema":{"description":"Only this deal's invoices.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}},{"name":"limit","in":"query","required":false,"description":"Maximum invoices to return (default 50).","schema":{"description":"Maximum invoices to return (default 50).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"number":{"type":"string"},"brand":{"type":"string"},"amount":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"issuedOn":{"type":"string","description":"YYYY-MM-DD"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueOn":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"Stored status"},"effectiveStatus":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"\"sent\" past its due date reads as \"overdue\""},"daysOverdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"paidOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"billToName":{"type":"string"},"billToEmail":{"type":"string"},"billToAddress":{"type":"string"},"poNumber":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"}},"required":["description","quantity","unit","total"],"additionalProperties":false}},"url":{"type":"string","description":"Deal page that holds the invoice"},"pdfUrl":{"type":"string","description":"PDF (needs a signed-in browser session)"}},"required":["id","dealId","number","amount","issuedOn","netDays","dueOn","status","effectiveStatus","daysOverdue","sentAt","paidOn","billToName","billToEmail","billToAddress","poNumber","notes","url","pdfUrl"],"additionalProperties":false}},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["invoices","count","total"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/invoices/{invoiceId}":{"get":{"operationId":"get_invoice","summary":"Get one invoice with its line items, bill-to details, status and PDF link.","description":"Get one invoice with its line items, bill-to details, status and PDF link.\n\nRequires the `read` scope. MCP tool name: `get_invoice`.\n\nExample prompts: \"Show invoice INV-2026-0006\".","tags":["read"],"x-dealtab-scope":"read","parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Invoice id (uuid) from list_invoices, get_deal or get_invoice.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"number":{"type":"string"},"brand":{"type":"string"},"amount":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"issuedOn":{"type":"string","description":"YYYY-MM-DD"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueOn":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"Stored status"},"effectiveStatus":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"\"sent\" past its due date reads as \"overdue\""},"daysOverdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"paidOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"billToName":{"type":"string"},"billToEmail":{"type":"string"},"billToAddress":{"type":"string"},"poNumber":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"}},"required":["description","quantity","unit","total"],"additionalProperties":false}},"url":{"type":"string","description":"Deal page that holds the invoice"},"pdfUrl":{"type":"string","description":"PDF (needs a signed-in browser session)"}},"required":["id","dealId","number","amount","issuedOn","netDays","dueOn","status","effectiveStatus","daysOverdue","sentAt","paidOn","billToName","billToEmail","billToAddress","poNumber","notes","url","pdfUrl"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/reminders":{"get":{"operationId":"list_reminders","summary":"List the reminder emails Dealtab recently sent the creator and the ones scheduled for the coming days (deliverables due, invoices due/overdue, rights expiring).","description":"List the reminder emails Dealtab recently sent the creator and the ones scheduled for the coming days (deliverables due, invoices due/overdue, rights expiring).\n\nRequires the `read` scope. MCP tool name: `list_reminders`.\n\nExample prompts: \"What reminders are coming up?\".","tags":["read"],"x-dealtab-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum recent reminders (default 20).","schema":{"description":"Maximum recent reminders (default 20).","type":"integer","minimum":1,"maximum":100}},{"name":"upcomingDays","in":"query","required":false,"description":"Days ahead for scheduled reminders (default 30).","schema":{"description":"Days ahead for scheduled reminders (default 30).","type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"recent":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["deliverable_due_3d","deliverable_due_1d","invoice_due_1d","invoice_overdue_1d","invoice_overdue_7d","invoice_overdue_14d","rights_expiring_14d","exclusivity_ending_14d"]},"fireOn":{"type":"string","description":"YYYY-MM-DD the reminder email goes (or went) out"},"subject":{"type":"string","description":"Email subject; upcoming ones are worded as of their fireOn date"},"body":{"type":"string"},"dealId":{"type":"string"},"sentAt":{"description":"When it was emailed; null if not sent yet","type":["string","null"]},"url":{"type":"string"}},"required":["kind","fireOn","subject","body","dealId","sentAt","url"],"additionalProperties":false}},"upcoming":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["deliverable_due_3d","deliverable_due_1d","invoice_due_1d","invoice_overdue_1d","invoice_overdue_7d","invoice_overdue_14d","rights_expiring_14d","exclusivity_ending_14d"]},"fireOn":{"type":"string","description":"YYYY-MM-DD the reminder email goes (or went) out"},"subject":{"type":"string","description":"Email subject; upcoming ones are worded as of their fireOn date"},"body":{"type":"string"},"dealId":{"type":"string"},"sentAt":{"description":"When it was emailed; null if not sent yet","type":["string","null"]},"url":{"type":"string"}},"required":["kind","fireOn","subject","body","dealId","sentAt","url"],"additionalProperties":false}}},"required":["recent","upcoming"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/deals/{dealId}/stage":{"post":{"operationId":"move_deal_stage","summary":"Move a deal to another pipeline stage (bottom of that column). Moving to paid does NOT mark its invoices paid; use mark_invoice_paid for that.","description":"Move a deal to another pipeline stage (bottom of that column). Moving to paid does NOT mark its invoices paid; use mark_invoice_paid for that.\n\nRequires the `write` scope. MCP tool name: `move_deal_stage`.\n\nExample prompts: \"Juniper Tea signed the contract\".","tags":["write"],"x-dealtab-scope":"write","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal id (uuid) from list_deals, search_deals or get_deal.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stage":{"type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"],"description":"Target stage."}},"required":["stage"]},"examples":{"example1":{"summary":"Juniper Tea signed the contract","value":{"stage":"contracted"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"deal":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"campaign":{"type":"string"},"title":{"type":"string","description":"\"Brand · Campaign\""},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]}},"stage":{"type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"]},"stageLabel":{"type":"string"},"value":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","enum":["inbound","outbound"]},"notes":{"type":"string"},"contractSignedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"closedOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"createdAt":{"type":"string","description":"ISO 8601 timestamp"},"updatedAt":{"type":"string","description":"ISO 8601 timestamp"},"url":{"type":"string","description":"Deal page in the app"}},"required":["id","brand","campaign","title","contactName","contactEmail","platforms","stage","stageLabel","value","netDays","source","notes","contractSignedOn","closedOn","createdAt","updatedAt","url"],"additionalProperties":false},"from":{"type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"]},"to":{"type":"string","enum":["lead","negotiating","contracted","in_production","delivered","invoiced","paid","lost"]},"unpaidInvoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"number":{"type":"string"},"brand":{"type":"string"},"amount":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"issuedOn":{"type":"string","description":"YYYY-MM-DD"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueOn":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"Stored status"},"effectiveStatus":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"\"sent\" past its due date reads as \"overdue\""},"daysOverdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"paidOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"billToName":{"type":"string"},"billToEmail":{"type":"string"},"billToAddress":{"type":"string"},"poNumber":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"}},"required":["description","quantity","unit","total"],"additionalProperties":false}},"url":{"type":"string","description":"Deal page that holds the invoice"},"pdfUrl":{"type":"string","description":"PDF (needs a signed-in browser session)"}},"required":["id","dealId","number","amount","issuedOn","netDays","dueOn","status","effectiveStatus","daysOverdue","sentAt","paidOn","billToName","billToEmail","billToAddress","poNumber","notes","url","pdfUrl"],"additionalProperties":false},"description":"Sent/overdue/draft invoices still open when moving to paid."}},"required":["deal","from","to","unpaidInvoices"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/deals/{dealId}/deliverables":{"post":{"operationId":"add_deliverable","summary":"Add a deliverable (a post, reel, video...) with its due, draft and go-live dates to a deal.","description":"Add a deliverable (a post, reel, video...) with its due, draft and go-live dates to a deal.\n\nRequires the `write` scope. MCP tool name: `add_deliverable`.\n\nExample prompts: \"Juniper Tea wants one Instagram reel, draft by Oct 20, live Oct 27\".","tags":["write"],"x-dealtab-scope":"write","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal id (uuid) from list_deals, search_deals or get_deal.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Kind of content (default post).","type":"string","enum":["post","reel","video","story","newsletter","short","live","other"]},"platform":{"description":"Platform (default instagram).","type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]},"title":{"type":"string","maxLength":200,"description":"Short label, e.g. \"Unboxing reel\"."},"dueOn":{"type":"string","description":"Final due date. Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},"draftDueOn":{"type":"string","description":"Date the draft is due to the brand for approval. Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},"goLiveOn":{"type":"string","description":"Date it should be published. Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},"status":{"description":"Current status (default planned).","type":"string","enum":["planned","drafting","awaiting_approval","approved","live","cancelled"]},"publishedUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"uri"}],"description":"Link to the published post once live. \"\" clears it."},"notes":{"type":"string","maxLength":5000,"description":"Brief, talking points, hashtags, etc."}}},"examples":{"example1":{"summary":"Juniper Tea wants one Instagram reel, draft by Oct 20, live Oct 27","value":{"type":"reel","platform":"instagram","title":"Launch reel","draftDueOn":"2026-10-20","dueOn":"2026-10-27","goLiveOn":"2026-10-27"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"type":{"type":"string","enum":["post","reel","video","story","newsletter","short","live","other"]},"platform":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]},"title":{"type":"string"},"label":{"type":"string","description":"Title, or the type when untitled"},"dueOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"draftDueOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"goLiveOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"status":{"type":"string","enum":["planned","drafting","awaiting_approval","approved","live","cancelled"]},"urgency":{"type":"string","enum":["overdue","due-today","due-soon","ok","done","none"],"description":"overdue | due-today | due-soon (within 3 days) | ok | done | none (no date)"},"publishedUrl":{"type":"string"},"notes":{"type":"string"},"url":{"type":"string"}},"required":["id","dealId","type","platform","title","label","dueOn","draftDueOn","goLiveOn","status","urgency","publishedUrl","notes","url"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/deliverables/{deliverableId}":{"patch":{"operationId":"update_deliverable","summary":"Change a deliverable: its status (e.g. mark it live), dates, title, platform, type, published link or notes.","description":"Change a deliverable: its status (e.g. mark it live), dates, title, platform, type, published link or notes.\n\nRequires the `write` scope. MCP tool name: `update_deliverable`.\n\nExample prompts: \"The Juniper Tea reel is live at https://instagram.com/p/abc\".","tags":["write"],"x-dealtab-scope":"write","parameters":[{"name":"deliverableId","in":"path","required":true,"description":"Deliverable id (uuid) from get_deal or whats_due.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["post","reel","video","story","newsletter","short","live","other"],"description":"Kind of content: post, reel, video, story, newsletter, short, live, other."},"platform":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"],"description":"Where it goes: instagram, tiktok, youtube, x, newsletter, podcast, twitch, linkedin, other."},"title":{"type":"string","maxLength":200,"description":"Short label."},"dueOn":{"description":"Final due date. Format YYYY-MM-DD; null clears it; omit to keep the current value.","anyOf":[{"type":"string","description":"Final due date. Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},{"type":"null"}]},"draftDueOn":{"description":"Draft due date. Format YYYY-MM-DD; null clears it; omit to keep the current value.","anyOf":[{"type":"string","description":"Draft due date. Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},{"type":"null"}]},"goLiveOn":{"description":"Publish date. Format YYYY-MM-DD; null clears it; omit to keep the current value.","anyOf":[{"type":"string","description":"Publish date. Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},{"type":"null"}]},"status":{"type":"string","enum":["planned","drafting","awaiting_approval","approved","live","cancelled"],"description":"planned -> drafting -> awaiting_approval -> approved -> live, or cancelled."},"publishedUrl":{"anyOf":[{"type":"string","const":""},{"type":"string","format":"uri"}],"description":"Link to the published post once live. \"\" clears it."},"notes":{"type":"string","maxLength":5000,"description":"Replaces the deliverable notes."}}},"examples":{"example1":{"summary":"The Juniper Tea reel is live at https://instagram.com/p/abc","value":{"status":"live","publishedUrl":"https://instagram.com/p/abc"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"type":{"type":"string","enum":["post","reel","video","story","newsletter","short","live","other"]},"platform":{"type":"string","enum":["instagram","tiktok","youtube","x","newsletter","podcast","twitch","linkedin","other"]},"title":{"type":"string"},"label":{"type":"string","description":"Title, or the type when untitled"},"dueOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"draftDueOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"goLiveOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"status":{"type":"string","enum":["planned","drafting","awaiting_approval","approved","live","cancelled"]},"urgency":{"type":"string","enum":["overdue","due-today","due-soon","ok","done","none"],"description":"overdue | due-today | due-soon (within 3 days) | ok | done | none (no date)"},"publishedUrl":{"type":"string"},"notes":{"type":"string"},"url":{"type":"string"},"changed":{"type":"array","items":{"type":"string"}}},"required":["id","dealId","type","platform","title","label","dueOn","draftDueOn","goLiveOn","status","urgency","publishedUrl","notes","url","changed"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/deals/{dealId}/rights":{"post":{"operationId":"add_usage_rights","summary":"Record the usage rights a brand bought (organic, paid usage or whitelisting), with territory, expiry and any category exclusivity.","description":"Record the usage rights a brand bought (organic, paid usage or whitelisting), with territory, expiry and any category exclusivity.\n\nRequires the `write` scope. MCP tool name: `add_usage_rights`.\n\nExample prompts: \"Juniper Tea gets 6 months of paid usage in the US from Nov 1, plus skincare exclusivity for 3 months\".","tags":["write"],"x-dealtab-scope":"write","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal id (uuid) from list_deals, search_deals or get_deal.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"organic (reposts on brand channels), paid_usage (ads with the content), whitelisting (ads from the creator's handle). Default organic.","type":"string","enum":["organic","paid_usage","whitelisting"]},"territory":{"type":"string","maxLength":200,"description":"Where the rights apply (default \"Worldwide\")."},"durationLabel":{"type":"string","maxLength":120,"description":"Human duration as written in the contract, e.g. \"6 months\", \"perpetual\"."},"startsOn":{"type":"string","description":"Date the rights start. Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},"expiresOn":{"description":"Date the rights end (YYYY-MM-DD). For rights that never end, omit it (or pass null) and set perpetual: true.","anyOf":[{"type":"string","description":"Date the rights end. Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},{"type":"null"}]},"perpetual":{"description":"true when the contract grants the rights forever (no end date). Ask the user rather than assume it.","type":"boolean"},"exclusivityCategory":{"type":"string","maxLength":120,"description":"Category the creator cannot work with competitors in, e.g. \"skincare\". Omit for none."},"exclusivityEndsOn":{"type":"string","description":"Date the exclusivity ends (needed when there is a category). Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},"notes":{"type":"string","maxLength":5000,"description":"Anything else from the contract."}}},"examples":{"example1":{"summary":"Juniper Tea gets 6 months of paid usage in the US from Nov 1, plus skincare exclusivity for 3 months","value":{"type":"paid_usage","territory":"United States","durationLabel":"6 months","startsOn":"2026-11-01","expiresOn":"2027-05-01","exclusivityCategory":"skincare","exclusivityEndsOn":"2027-02-01"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"type":{"type":"string","enum":["organic","paid_usage","whitelisting"]},"territory":{"type":"string"},"durationLabel":{"type":"string"},"startsOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"expiresOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}],"description":"null = perpetual"},"exclusivityCategory":{"type":"string","description":"\"\" = no exclusivity"},"exclusivityEndsOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"notes":{"type":"string"},"url":{"type":"string"}},"required":["id","dealId","type","territory","durationLabel","startsOn","expiresOn","exclusivityCategory","exclusivityEndsOn","notes","url"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/deals/{dealId}/invoices":{"post":{"operationId":"create_invoice","summary":"Create the next numbered invoice for a deal (one line = the deal value, bill-to = the deal contact). Optionally mark it sent right away.","description":"Create the next numbered invoice for a deal (one line = the deal value, bill-to = the deal contact). Optionally mark it sent right away.\n\nRequires the `write` scope. MCP tool name: `create_invoice`.\n\nExample prompts: \"Invoice Juniper Tea\".","tags":["write"],"x-dealtab-scope":"write","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal id (uuid) from list_deals, search_deals or get_deal.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"issuedOn":{"type":"string","description":"Invoice date (default today). Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"},"netDays":{"description":"Payment terms in days (default the deal's net days).","type":"integer","minimum":0,"maximum":365},"status":{"description":"\"draft\" (default) or \"sent\" if the creator already sent it; sent moves a contracted/in-production/delivered deal to invoiced.","type":"string","enum":["draft","sent"]}}},"examples":{"example1":{"summary":"Invoice Juniper Tea","value":{}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"number":{"type":"string"},"brand":{"type":"string"},"amount":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"issuedOn":{"type":"string","description":"YYYY-MM-DD"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueOn":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"Stored status"},"effectiveStatus":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"\"sent\" past its due date reads as \"overdue\""},"daysOverdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"paidOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"billToName":{"type":"string"},"billToEmail":{"type":"string"},"billToAddress":{"type":"string"},"poNumber":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"}},"required":["description","quantity","unit","total"],"additionalProperties":false}},"url":{"type":"string","description":"Deal page that holds the invoice"},"pdfUrl":{"type":"string","description":"PDF (needs a signed-in browser session)"}},"required":["id","dealId","number","amount","issuedOn","netDays","dueOn","status","effectiveStatus","daysOverdue","sentAt","paidOn","billToName","billToEmail","billToAddress","poNumber","notes","url","pdfUrl"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/invoices/{invoiceId}/sent":{"post":{"operationId":"mark_invoice_sent","summary":"Mark a draft invoice as sent to the brand (starts the due-date clock and reminders; a contracted/in-production/delivered deal moves to invoiced).","description":"Mark a draft invoice as sent to the brand (starts the due-date clock and reminders; a contracted/in-production/delivered deal moves to invoiced).\n\nRequires the `write` scope. MCP tool name: `mark_invoice_sent`.\n\nExample prompts: \"I sent the Juniper Tea invoice\".","tags":["write"],"x-dealtab-scope":"write","parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Invoice id (uuid) from list_invoices, get_deal or get_invoice.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}},"examples":{"example1":{"summary":"I sent the Juniper Tea invoice","value":{}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"number":{"type":"string"},"brand":{"type":"string"},"amount":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"issuedOn":{"type":"string","description":"YYYY-MM-DD"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueOn":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"Stored status"},"effectiveStatus":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"\"sent\" past its due date reads as \"overdue\""},"daysOverdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"paidOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"billToName":{"type":"string"},"billToEmail":{"type":"string"},"billToAddress":{"type":"string"},"poNumber":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"}},"required":["description","quantity","unit","total"],"additionalProperties":false}},"url":{"type":"string","description":"Deal page that holds the invoice"},"pdfUrl":{"type":"string","description":"PDF (needs a signed-in browser session)"},"dealStage":{"type":"string"}},"required":["id","dealId","number","amount","issuedOn","netDays","dueOn","status","effectiveStatus","daysOverdue","sentAt","paidOn","billToName","billToEmail","billToAddress","poNumber","notes","url","pdfUrl","dealStage"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/invoices/{invoiceId}/paid":{"post":{"operationId":"mark_invoice_paid","summary":"Record that an invoice was paid (when every invoice of the deal is paid, the deal moves to paid).","description":"Record that an invoice was paid (when every invoice of the deal is paid, the deal moves to paid).\n\nRequires the `write` scope. MCP tool name: `mark_invoice_paid`.\n\nExample prompts: \"Cedar & Salt paid INV-2026-0006 yesterday\".","tags":["write"],"x-dealtab-scope":"write","parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Invoice id (uuid) from list_invoices, get_deal or get_invoice.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"paidOn":{"type":"string","description":"Date the money arrived (default today). Format YYYY-MM-DD (resolve relative dates like \"next Friday\" yourself).","format":"date"}}},"examples":{"example1":{"summary":"Cedar & Salt paid INV-2026-0006 yesterday","value":{"paidOn":"2026-10-13"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"dealId":{"type":"string"},"number":{"type":"string"},"brand":{"type":"string"},"amount":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"issuedOn":{"type":"string","description":"YYYY-MM-DD"},"netDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dueOn":{"type":"string","description":"YYYY-MM-DD"},"status":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"Stored status"},"effectiveStatus":{"type":"string","enum":["draft","sent","overdue","paid","void"],"description":"\"sent\" past its due date reads as \"overdue\""},"daysOverdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sentAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"paidOn":{"anyOf":[{"type":"string","description":"YYYY-MM-DD"},{"type":"null"}]},"billToName":{"type":"string"},"billToEmail":{"type":"string"},"billToAddress":{"type":"string"},"poNumber":{"type":"string"},"notes":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"},"total":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integer minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 code, e.g. USD."},"formatted":{"type":"string","description":"Human string, e.g. \"$2,000.00 USD\"."}},"required":["amountMinor","currency","formatted"],"additionalProperties":false,"description":"Money amount"}},"required":["description","quantity","unit","total"],"additionalProperties":false}},"url":{"type":"string","description":"Deal page that holds the invoice"},"pdfUrl":{"type":"string","description":"PDF (needs a signed-in browser session)"},"dealStage":{"type":"string"}},"required":["id","dealId","number","amount","issuedOn","netDays","dueOn","status","effectiveStatus","daysOverdue","sentAt","paidOn","billToName","billToEmail","billToAddress","poNumber","notes","url","pdfUrl","dealStage"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/deals/{dealId}/notes":{"post":{"operationId":"add_note","summary":"Add a dated note to a deal's timeline (e.g. a call summary or what the brand said).","description":"Add a dated note to a deal's timeline (e.g. a call summary or what the brand said).\n\nRequires the `write` scope. MCP tool name: `add_note`.\n\nExample prompts: \"Note on Juniper Tea: they want the draft a week early\".","tags":["write"],"x-dealtab-scope":"write","parameters":[{"name":"dealId","in":"path","required":true,"description":"Deal id (uuid) from list_deals, search_deals or get_deal.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":5000,"description":"The note, in plain text."}},"required":["text"]},"examples":{"example1":{"summary":"Note on Juniper Tea: they want the draft a week early","value":{"text":"They want the draft a week early."}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"dealId":{"type":"string"},"eventId":{"type":"string"},"createdAt":{"type":"string"}},"required":["dealId","eventId","createdAt"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/invoices/{invoiceId}/chase/preview":{"post":{"operationId":"preview_chase_email","summary":"Draft the polite payment-chase email for a sent or overdue invoice WITHOUT sending it; returns the email and a confirmationToken (valid 10 minutes) that send_chase_email requires. Show the email to the user and get their OK first.","description":"Draft the polite payment-chase email for a sent or overdue invoice WITHOUT sending it; returns the email and a confirmationToken (valid 10 minutes) that send_chase_email requires. Show the email to the user and get their OK first.\n\nRequires the `send` scope. MCP tool name: `preview_chase_email`.\n\nExample prompts: \"Nudge Cedar & Salt about the late invoice\".","tags":["send"],"x-dealtab-scope":"send","parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Invoice id (uuid) from list_invoices, get_deal or get_invoice.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","maxLength":5000,"description":"Optional replacement body for the email (plain text). Omit to use Dealtab's polite default. send_chase_email must pass the same text."}}},"examples":{"example1":{"summary":"Nudge Cedar & Salt about the late invoice","value":{}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"to":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"invoiceNumber":{"type":"string"},"daysOverdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"attachmentName":{"type":"string"},"confirmationToken":{"type":"string","description":"Pass to send_chase_email after the user approves."},"expiresAt":{"type":"string","description":"Token expiry (ISO timestamp)."}},"required":["to","subject","body","invoiceNumber","daysOverdue","attachmentName","confirmationToken","expiresAt"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/invoices/{invoiceId}/chase/send":{"post":{"operationId":"send_chase_email","summary":"Send the chase email previewed with preview_chase_email (PDF attached, reply-to the creator). Requires the confirmationToken from the preview and the user's explicit approval.","description":"Send the chase email previewed with preview_chase_email (PDF attached, reply-to the creator). Requires the confirmationToken from the preview and the user's explicit approval.\n\nRequires the `send` scope. MCP tool name: `send_chase_email`.\n\nExample prompts: \"Yes, send it\".","tags":["send"],"x-dealtab-scope":"send","parameters":[{"name":"invoiceId","in":"path","required":true,"description":"Invoice id (uuid) from list_invoices, get_deal or get_invoice.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmationToken":{"type":"string","minLength":1,"description":"Token returned by preview_chase_email for this invoice (valid 10 minutes, single use)."},"message":{"description":"Must be exactly the message passed to preview_chase_email (omit if none was).","type":"string","maxLength":5000}},"required":["confirmationToken"]},"examples":{"example1":{"summary":"Yes, send it","value":{"confirmationToken":"<token from preview_chase_email>"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"to":{"type":"string"},"subject":{"type":"string"},"provider":{"type":"string","description":"\"resend\" (delivered) or \"local\" (dev: logged only)"},"invoiceNumber":{"type":"string"}},"required":["to","subject","provider","invoiceNumber"],"additionalProperties":false},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/me":{"get":{"operationId":"get_me","summary":"Who am I: the account and scopes behind the credential.","tags":["read"],"responses":{"200":{"description":"The resolved principal","content":{"application/json":{"schema":{"type":"object","required":["ok","data","summary"],"properties":{"ok":{"const":true},"data":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"},"scopes":{"type":"array","items":{"enum":["read","write","send"]}},"via":{"enum":["api_key","oauth","session"]},"keyId":{"type":"string"},"keyName":{"type":"string"}}},"summary":{"type":"string","description":"One or two sentences the agent can show the user verbatim."},"url":{"type":"string","description":"Deep link into the Dealtab app."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/openapi.json":{"get":{"operationId":"get_openapi","summary":"This document.","security":[],"tags":["read"],"responses":{"200":{"description":"OpenAPI 3.1 document","content":{"application/json":{}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A Dealtab API key (dtab_sk_...) from Settings -> Agents, or an OAuth access token from Dealtab's auth server."}},"schemas":{"Error":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string","description":"Human-readable reason, safe to show the user."},"fieldErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Per-field messages for 422, keyed by field path (e.g. \"dueOn\")."},"hint":{"type":"string"}}}},"responses":{"BadRequest":{"description":"The request body is not a JSON object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing, invalid or revoked credential","headers":{"WWW-Authenticate":{"description":"Bearer challenge with resource_metadata pointing at /.well-known/oauth-protected-resource/api/v1 (RFC 9728).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Missing scope, expired trial (write/send), or invalid confirmation token. Checked before the input is validated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such deal / invoice / deliverable for this account, or no such endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"MethodNotAllowed":{"description":"The path exists but not with this method (any path, not listed per operation)","headers":{"Allow":{"description":"Methods this path supports.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"The change is not allowed in the current state (e.g. invoice already paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ValidationError":{"description":"Input failed validation; see fieldErrors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests (120/min per key) or brand emails (20/day)","headers":{"Retry-After":{"description":"Seconds to wait: until the next request token, or until midnight (server time) for the daily email cap.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}