Authentication
Create a key under Integrations → API & n8n in the dashboard (owners and admins, Super and above). Send it as a bearer token on every request. Keys start with trz_live_, are shown once, and can be rotated or revoked at any time; a revoked key fails on the next request.
Every key belongs to one workspace and carries only the scopes you ticked. A key with any write scope acts as a Manager; a read-only key acts as a Viewer. Billing, team, settings, uploads, exports and key management are never reachable with a key.
curl https://api.trentzy.com/api/v1/customers?limit=20 \ -H "Authorization: Bearer trz_live_…"
Workspaces with more than one Instagram account can pin a request to one of them with the X-Instagram-Account-Id header; without it the oldest connected account is used, as in the dashboard.
Scopes
Tick scopes per area when you create a key. Read and write are separate; a key never gets more than you gave it.
| Area | Read | Write | Covers |
|---|---|---|---|
| Inbox | inbox:read | inbox:write | Conversations and messages; write sends text replies and changes status. |
| Customers | customers:read | customers:write | Customer records and tags; write creates, updates and tags customers. |
| Leads | leads:read | — | Captured leads and their stats. |
| Orders | orders:read | orders:write | Shop inquiries and orders; write changes stage and notes. |
| Bookings | bookings:read | bookings:write | Bookings, services, calendars and availability; write books and manages them. |
| Products | products:read | products:write | Catalogue; write creates, updates and archives products. |
| Automations | automations:read | — | Automation rules and their stats (read only). |
Endpoints
Generated from the live API. Each operation names the scope it needs; paths are relative to the API base.
Inbox
- GET
/api/v1/inbox/conversationsinbox:readList conversations - GET
/api/v1/inbox/conversations/{id}inbox:readGet conversation with messages - GET
/api/v1/inbox/statsinbox:readGet inbox statistics - POST
/api/v1/inbox/conversations/{id}/messagesinbox:writeSend a manual reply (text and/or uploaded attachments) API keys may send text only; attachments need the dashboard. - PATCH
/api/v1/inbox/conversations/{id}/readinbox:writeMark conversation as read - PATCH
/api/v1/inbox/conversations/{id}/statusinbox:writeUpdate conversation status
Customers
- GET
/api/v1/customerscustomers:readList customers - GET
/api/v1/customers/{id}customers:readGet customer detail - GET
/api/v1/customers/tagscustomers:readList customer tags - POST
/api/v1/customerscustomers:writeCreate a customer by Instagram username Dedupes inside the workspace by username, email, then phone: a match is updated (blanks filled, tags attached) and answered with 200 and `created: false`; a new customer answers 201 and `created: true`. - POST
/api/v1/customers/{id}/tagscustomers:writeAssign tag to customer - POST
/api/v1/customers/tagscustomers:writeCreate customer tag - PATCH
/api/v1/customers/{id}customers:writeUpdate customer - PATCH
/api/v1/customers/tags/{tagId}customers:writeUpdate customer tag - DELETE
/api/v1/customers/{id}/tags/{tagId}customers:writeRemove tag from customer - DELETE
/api/v1/customers/tags/{tagId}customers:writeDelete customer tag
Leads
- GET
/api/v1/leadsleads:readPaginated leads list - GET
/api/v1/leads/by-medialeads:readTop posts/reels by lead count - GET
/api/v1/leads/statsleads:readLead capture summary stats - GET
/api/v1/leads/timeseriesleads:readLead captures over time
Orders
- GET
/api/v1/shop/inquiriesorders:readList shop inquiries - GET
/api/v1/shop/inquiries/{id}orders:readGet shop inquiry - GET
/api/v1/shop/inquiries/{id}/eventsorders:readOrder timeline - GET
/api/v1/shop/inquiries/summaryorders:readCounts by source and stage - PATCH
/api/v1/shop/inquiries/{id}orders:writeUpdate shop inquiry
Bookings
- GET
/api/v1/bookingsbookings:readBookings in a range or a paginated list - GET
/api/v1/bookings/{id}bookings:readOne booking - GET
/api/v1/bookings/availabilitybookings:readOpen start times for a service in a date range - GET
/api/v1/bookings/calendarsbookings:readBookable calendars - GET
/api/v1/bookings/servicesbookings:readBookable services - GET
/api/v1/bookings/services/{id}bookings:readOne bookable service - GET
/api/v1/bookings/sessionsbookings:readClass sessions in a range - POST
/api/v1/bookingsbookings:writeBook on behalf of a customer - POST
/api/v1/bookings/{id}/cancelbookings:writeCancel a booking - POST
/api/v1/bookings/{id}/completebookings:writeMark a booking as completed - POST
/api/v1/bookings/{id}/confirmbookings:writeConfirm a booking awaiting payment (paid another way) - POST
/api/v1/bookings/{id}/no-showbookings:writeMark a booking as no-show - POST
/api/v1/bookings/{id}/reschedulebookings:writeMove a booking to a new time
Products
- GET
/api/v1/productsproducts:readList products - GET
/api/v1/products/{id}products:readGet product - POST
/api/v1/productsproducts:writeCreate product - POST
/api/v1/products/{id}/archiveproducts:writeArchive product - PATCH
/api/v1/products/{id}products:writeUpdate product
Automations
- GET
/api/v1/automation/rulesautomations:readList automation rules - GET
/api/v1/automation/rules/{id}automations:readGet automation rule - GET
/api/v1/automation/rules/{id}/statsautomations:readTrigger and lead stats for one DM rule - GET
/api/v1/comment-automationsautomations:readList comment automations - GET
/api/v1/comment-automations/{id}automations:readGet comment automation - GET
/api/v1/comment-automations/{id}/statsautomations:readTrigger and lead stats for one comment automation
Creating customers
POST /customers creates a customer by Instagram username and dedupes inside your workspace by username (case-insensitive), then email, then phone. A match is updated (blank fields filled, tags attached) and answered with 200 and created: false; a new row answers 201 and created: true. The person is linked to their DMs automatically the first time they write in.
POST /customers
{
"instagramUsername": "ananya.wears",
"name": "Ananya",
"email": "[email protected]",
"tagIds": ["<tag uuid>"]
}Rate limits and responses
- 120 requests a minute per key. Over the limit you get 429 with a Retry-After header; wait and retry.
- Every response is JSON with success and data (or message and code on an error). List endpoints take page and limit and answer with items and total.
- Times are ISO 8601 in UTC. Money is in minor units with its currency alongside.
| Status | Code | Meaning |
|---|---|---|
| 401 | API_KEY_INVALID | Unknown key, or the workspace is closed. |
| 401 | API_KEY_REVOKED | The key was revoked in the dashboard. |
| 401 | API_KEY_EXPIRED | The key passed the expiry set at creation. |
| 403 | API_KEY_SCOPE_MISSING | The key lacks the scope the endpoint needs; the response names it. |
| 403 | API_KEY_NOT_ALLOWED | The endpoint is dashboard-only for keys. |
| 403 | PLAN_FEATURE_LOCKED | The workspace dropped below Super. Keys resume when the plan is back. |
| 400 | VALIDATION | A field is missing or malformed; message lists the problems. |
| 429 | RATE_LIMITED | Over the per-key limit; honour Retry-After. |
Webhooks: events out
Outgoing webhooks are set up under Integrations → Webhooks: pick a URL and the events (orders, payments, leads, customers, bookings). Each delivery is a JSON POST with type, created_at and data, signed with the endpoint secret so you can verify it came from Trentzy.
const [t, v1] = req.headers['trentzy-signature']
.split(',').map((p) => p.split('=')[1]);
const expected = crypto.createHmac('sha256', SECRET)
.update(`${t}.${rawBody}`).digest('hex');
if (expected !== v1) return res.status(401).end();n8n, Make and Zapier
In n8n add a Header Auth credential (name Authorization, value Bearer trz_live_…) and use it on HTTP Request nodes; a Webhook node receives the events. Make takes the same header on HTTP → Make a request; Zapier on Webhooks by Zapier → Custom Request.
Two importable n8n workflows ship with the dashboard: Lead to Google Sheet, and Reply to a new order with a DM in the conversation.
- Lead to Google Sheet (n8n workflow JSON)
- Reply to a new order (n8n workflow JSON)
- Step-by-step guide in the help centre
Questions
The same list is served as OpenAPI 3 JSON at /api/v1/public/openapi.json on the API host. It is generated from the live API, so this page and the file never drift apart.
Text only. Attachments need the dashboard. Replies must land inside Instagram’s 24-hour messaging window, the same rule the dashboard follows.
Keys work against your own workspace. Use a test workspace on a Super plan, or create a key with read scopes only while you build.