Developers · API and MCP
Gifting API and MCP server for developers and AI agents
GTM Swag exposes the whole gifting workflow (catalog, campaigns, playbooks, the approval queue, gift links and tracking) through a REST API and an MCP server. Agents and your code prepare the work. People approve the spend.
Updated
Built for software that retries
The API assumes agents and workflows will retry, run twice and act on stale data. Adds are idempotent, every error says what to do next, and anything that spends money is reserved for a signed-in owner or admin, or for limits they set.
- Idempotent adds. Send
sourceSystemandexternalId; a repeat returnsalreadyQueued: trueand never charges twice.create_campaigntakes anidempotencyKey. - Errors with a next step. Every error carries
nextAction(open_url,reread_and_retry,ask_user,retry_laterorstop) andretryable, sometimes withretryAfterMs. - Spending stays with people. Keys and connections read, draft and add people. Approving, paying, adding funds and auto-approve are signed-in only.
- Clear limits. 240 requests a minute per workspace, 500 people per batch campaign and 2,000 per playbook.
- Signed webhooks. HMAC-SHA256 signatures, at-least-once delivery and up to eight attempts per event.
The playbook loop
search_giftsorGET /api/v1/catalogto choose a gift.create_campaignwithmode: "always_on"saves a playbook draft.- A teammate turns it on at the review link. Agents can’t.
add_to_playbook(POST /api/v1/playbooks/CAMPAIGN_ID/people) once per trigger. Readapproval.stateandapproval.reason.list_queueandget_balanceshow who waits and whether funds are low; hand the links to an owner or admin.get_gift_link_recordsonce a gift exists, andlist_tracking_eventsor a signed webhook for status.
curl -X POST https://gtmswag.com/api/v1/playbooks/CAMPAIGN_ID/people \
-H "Authorization: Bearer $GTM_SWAG_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipient": {
"name": "Jamie Chen",
"company": "Northstar",
"title": "VP of Sales",
"sourceSystem": "hubspot",
"externalId": "12345",
"addressMode": "known",
"address": "100 Congress Ave",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
}'
A 200 response includes queued, recipientId, alreadyQueued, approvalUrl and approval: {state, reason}. Without auto-approve, the person waits with reason auto_approve_off and nothing is charged.
Reading the catalog and prices
The public catalog at /api/v1/catalog also lists retired gifts for history, so filter in this order: retired: false, then available: true with no priceQuoteRequired, and skip any gift with priceCents: 0.
- Price per gift is
priceCents + shippingCentsin USD cents, with applicable sales tax included. shippingQuoteRequired: truemeans delivery isn’t priced yet. Budgets don’t include it and auto-approve never approves the gift.requiresPortrait,requiresArtworkandpersonalizationTexttell you what to ask the user for. Never invent them.
MCP tool sets
A workspace key at /mcp sees the full list of 46 tools. /mcp?profile=gifting gives a key the 31 focused gifting tools that sign-in connections get. ChatGPT’s endpoint has its own 12. Tools for approving, paying, adding funds and team changes are never listed for a key or connection.
MCP also serves prompts, such as start_playbook, and resources, including the agent guide and a catalog summary. Start each session with get_workflow_guide, which reports whether delivery is on for the workspace.
Documentation
- Agent gifting guide: the playbook loop, roles, prices, errors, gift links and tracking.
- API and MCP reference: every route and tool with inputs, results and examples.
- OpenAPI 3.1 schema and the public catalog endpoint.
- Connection guide: Claude, Claude Code, other MCP clients and REST keys.
- llms.txt: a short index for AI agents.
Questions about the gifting API
Does the API cost anything?
No. There’s no API, subscription or platform fee. You pay for the gifts your team approves, with delivery included where it’s known and sales tax included.
Can my agent approve or pay for gifts?
No. Keys and connections can read, draft and add people. A signed-in owner or admin approves, pays and adds funds, or sets auto-approve limits on a playbook.
Can I build against it before anything ships?
Yes. Every workspace starts with delivery off. Playbooks, approvals, the balance, checkout and gift links all work, but nothing ships and no real money moves. get_workflow_guide reports the workspace’s state; a person emails eric@betterswag.com to turn delivery on.
What should my code do after a timeout?
Resend an add with the same sourceSystem and externalId, and resend create_campaign with the same idempotencyKey and body. For any other write, read the current state first.
Which events can I subscribe to?
Events include a gift being created or auto-approved, gift link changes and first opens, address confirmations, status, order and tracking changes, and, for webhooks, a person waiting in a playbook. Events never include addresses, emails, notes or gift links.
Which countries can gifts ship to?
The United States only.
Get the meeting.
Reach your next customer with a gift made for them. Preview the gift, the note and the cost before you sign up.