Closed beta · run Worlds on your machineBrowse worlds →
Docs menu · Kustomer API

Worlds / Support

Kustomer API

A local Kustomer with customers, conversations, a timeline per customer, queues, shortcuts and business rules. Test the agent that routes, merges customers and moves conversations to done.

Base path
/v1
Auth
Bearer API key, the world key
Endpoints
13
Status
Active today

This reference previews the surface the Kustomer world serves in the closed beta. Paths mirror the public Kustomer API; the exact subset is confirmed when your workflow is scoped.

Connect

The run gives your agent these bindings. Keep your SDK; change only where it sends requests.

bindingmeaning
WORLDS_KUSTOMER_URLThis world's origin followed by /v1
WORLDS_API_KEYThe world key, accepted wherever Kustomer expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · fetch
const base = process.env.WORLDS_KUSTOMER_URL;
const headers = {
  Authorization: "Bearer " + process.env.WORLDS_API_KEY,
  "Content-Type": "application/json",
};

const res = await fetch(base + "/customers?page=1&pageSize=20", { headers });
const { data } = await res.json();

API reference

Customers

Unified customer profiles.

  • GET/v1/customersList customers
  • POST/v1/customersCreate a customer
  • GET/v1/customers/{id}Get a customer
  • PATCH/v1/customers/{id}Update a customer
Fields · 5
idstringCustomer id
typestringcustomer
attributes.namestringFull name
attributes.emailsarrayEmail addresses
attributes.phonesarrayPhone numbers

Conversations

Support threads tied to a customer.

  • GET/v1/conversationsList conversations
  • POST/v1/conversationsCreate a conversation
  • GET/v1/conversations/{id}Get a conversation
  • PATCH/v1/conversations/{id}Update a conversation
Fields · 6
idstringConversation id
attributes.namestringTitle
attributes.statusstringopen or done
attributes.priorityinteger1 to 5
attributes.tagsarrayTag ids
relationships.customerobjectCustomer link

Messages

Emails, chats and notes on a conversation.

  • GET/v1/conversations/{id}/messagesList messages
  • POST/v1/messagesCreate a message
  • GET/v1/messages/{id}Get a message
Fields · 5
idstringMessage id
attributes.channelstringemail, chat, sms and so on
attributes.directionstringin or out
attributes.bodystringMessage body
attributes.subjectstringSubject

Notes

Internal notes on a conversation.

  • POST/v1/conversations/{id}/notesCreate a note
  • GET/v1/conversations/{id}/notesList notes
Fields · 4
idstringNote id
attributes.bodystringNote text
attributes.createdAtstringISO 8601 timestamp
relationships.conversationobjectConversation link

Test workflow

  1. Prepare. Select the Kustomer setup for your workflow and review its starting records, including customers, conversations, messages.
  2. Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
  3. Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
  4. Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.

What to verify

  • Dana Lee conversation in VIP queue
  • Dana Lee records merged by matching phone
  • Dana Leigh still a separate customer
  • No conversation done without an outbound reply
  • Ortiz Labs conversation still snoozed

Test file

A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.

yaml · worlds/tasks.yaml
# worlds/tasks.yaml · Kustomer
version: 2
connector: kustomer
seed: kustomer-starter
mode: isolated
policy: >
  Clean up the General queue. VIP customers move to the VIP queue. Merge
  customer records only when the email or phone matches. Reply with a shortcut
  before marking anything done.
tasks:
  - id: route-a-conversation-to-the-right-queue
    prompt: Route a conversation to the right queue
  - id: merge-duplicate-customer-records
    prompt: Merge duplicate customer records
  - id: reply-with-a-shortcut-and-mark-done
    prompt: Reply with a shortcut and mark done
expected:
  - Dana Lee conversation in VIP queue
  - Dana Lee records merged by matching phone
  - Dana Leigh still a separate customer
  - No conversation done without an outbound reply
  - Ortiz Labs conversation still snoozed
scenarios:
  - rate-limited
  - merge-conflict
  - rule-overrides

See Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.

Failure conditions

Each one fires before the handler, at the same step on every run.

conditionwhat the agent sees
rate-limited429 on the conversations endpoint
merge-conflictThe customer was already merged by another agent
rule-overridesA business rule reroutes the conversation after the write
token-expired401 when the API key is rotated

Starting data

Start each run from the same records and relationships. The overview below describes the Kustomer starter; use the setup supplied for your workflow when preparing your own snapshot.

RecordsStarting setup
customers45, five with duplicate records
conversations50 across open, snoozed and done
queuesGeneral, Orders, VIP
shortcuts12 reply shortcuts
business rulesRoute VIP by customer tag

The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.

Customers records

Customers

Unified customer profiles.

FieldTypeMeaning / relationship
idstringCustomer id
typestringcustomer
attributes.namestringFull name
attributes.emailsarrayEmail addresses
attributes.phonesarrayPhone numbers
json · illustrative record shape
{
  "id": "<Customer id>",
  "type": "<customer>",
  "attributes.name": "<Full name>",
  "attributes.emails": [],
  "attributes.phones": []
}

See customers operations

Conversations records

Conversations

Support threads tied to a customer.

FieldTypeMeaning / relationship
idstringConversation id
attributes.namestringTitle
attributes.statusstringopen or done
attributes.priorityinteger1 to 5
attributes.tagsarrayTag ids
relationships.customerobjectCustomer link
json · illustrative record shape
{
  "id": "<Conversation id>",
  "attributes.name": "<Title>",
  "attributes.status": "<open or done>",
  "attributes.priority": 1,
  "attributes.tags": [],
  "relationships.customer": {}
}

See conversations operations

Messages records

Messages

Emails, chats and notes on a conversation.

FieldTypeMeaning / relationship
idstringMessage id
attributes.channelstringemail, chat, sms and so on
attributes.directionstringin or out
attributes.bodystringMessage body
attributes.subjectstringSubject
json · illustrative record shape
{
  "id": "<Message id>",
  "attributes.channel": "<email, chat, sms and so on>",
  "attributes.direction": "<in or out>",
  "attributes.body": "<Message body>",
  "attributes.subject": "<Subject>"
}

See messages operations

Notes records

Notes

Internal notes on a conversation.

FieldTypeMeaning / relationship
idstringNote id
attributes.bodystringNote text
attributes.createdAtstringISO 8601 timestamp
relationships.conversationobjectConversation link
json · illustrative record shape
{
  "id": "<Note id>",
  "attributes.body": "<Note text>",
  "attributes.createdAt": "<ISO 8601 timestamp>",
  "relationships.conversation": {}
}

See notes operations

See the Kustomer world in the catalog