Docs · Guides
Custom metadata
Attach your own ids and fields to contacts, inboxes and threads, and filter on them.
Metadata links Agentboxd to your own systems. Put your CRM id on a contact, your team name on an inbox, or an order number on a thread. Your agent reads it back with the record and can look the rest up where it lives.
#Where it goes
| Object | Set with | Filter with |
|---|---|---|
| Contact | PATCH /v1/contacts/:id { metadata } | GET /v1/contacts?metadata.crm_id=hs_48213 |
| Inbox | POST /v1/inboxes { metadata } or PATCH /v1/inboxes/:id { metadata } | GET /v1/inboxes?metadata.team=support |
| Thread | PATCH /v1/threads/:id { metadata } | Read it on GET /v1/threads/:id. |
#Rules
- Values are strings, numbers, booleans or null.
- Updates are merged into what’s there. A
nullvalue deletes that key. - Up to 50 keys per object; each value up to 1,000 characters.
- Filters are exact string matches:
?metadata.vip=truematches the booleantrueand the string"true".
curl -s -X PATCH https://api.agentboxd.com/v1/threads/$THREAD_ID \
-H "Authorization: Bearer $MAILROOM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"metadata":{"shopify_order":"1042","crm_ticket":null},"add_labels":["order"]}'Threads also have their own labels, set with add_labels and remove_labels on the same route.