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

Worlds / Support

Freshdesk API

A local Freshdesk with tickets, contacts, companies, agent groups, canned responses and automation rules. Test the agent that sets priority, routes to groups and resolves tickets.

Base path
/api/v2
Auth
API key as Basic username, the world key
Endpoints
15
Status
Active today

This reference previews the surface the Freshdesk world serves in the closed beta. Paths mirror the public Freshdesk 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_FRESHDESK_URLThis world's origin followed by /api/v2
WORLDS_API_KEYThe world key, accepted wherever Freshdesk expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · fetch
const base = process.env.WORLDS_FRESHDESK_URL;
const auth = "Basic " + btoa(process.env.WORLDS_API_KEY + ":X");

const res = await fetch(base + "/tickets?per_page=20", {
  headers: { Authorization: auth },
});
const tickets = await res.json();

API reference

Tickets

Support requests across email, portal and phone.

  • GET/api/v2/ticketsList tickets
  • POST/api/v2/ticketsCreate a ticket
  • GET/api/v2/tickets/{id}View a ticket
  • PUT/api/v2/tickets/{id}Update a ticket
  • GET/api/v2/search/ticketsSearch tickets
Fields · 7
idintegerTicket id
subjectstringTicket subject
statusinteger2 open, 3 pending, 4 resolved, 5 closed
priorityinteger1 low to 4 urgent
requester_idintegerContact who asked
responder_idintegerAgent assigned
tagsarrayTags

Conversations

Replies and notes on a ticket.

  • GET/api/v2/tickets/{id}/conversationsList conversations
  • POST/api/v2/tickets/{id}/replyReply to a ticket
  • POST/api/v2/tickets/{id}/notesAdd a note
Fields · 5
idintegerConversation id
body_textstringPlain-text body
incomingbooleanTrue if from the customer
privatebooleanTrue for a private note
user_idintegerAuthor

Contacts

Customers who raise tickets.

  • GET/api/v2/contactsList contacts
  • POST/api/v2/contactsCreate a contact
  • GET/api/v2/contacts/{id}View a contact
  • PUT/api/v2/contacts/{id}Update a contact
Fields · 5
idintegerContact id
namestringFull name
emailstringEmail address
company_idintegerCompany
activebooleanWhether the contact is verified

Companies

Organizations contacts belong to.

  • GET/api/v2/companiesList companies
  • POST/api/v2/companiesCreate a company
  • GET/api/v2/companies/{id}View a company
Fields · 4
idintegerCompany id
namestringCompany name
domainsarrayEmail domains
health_scorestringAccount health

Test workflow

  1. Prepare. Select the Freshdesk setup for your workflow and review its starting records, including tickets, conversations, contacts.
  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

  • Kim Park ticket in Returns group, priority Medium
  • Moss & Co ticket priority still Medium
  • Ortiz Labs ticket resolved with the Export data canned response
  • Dana Lee ticket still Pending
  • No ticket left in a group with no agent

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 · Freshdesk
version: 2
connector: freshdesk
seed: freshdesk-starter
mode: isolated
policy: >
  Sort the morning queue. Returns go to the Returns group at Medium. Billing
  fixes stay at Medium unless money is at risk. Resolve how-to questions with
  the matching canned response.
tasks:
  - id: set-priority-and-type-on-new-tickets
    prompt: Set priority and type on new tickets
  - id: route-a-ticket-to-the-right-agent-group
    prompt: Route a ticket to the right agent group
  - id: reply-with-a-canned-response-and-resolve
    prompt: Reply with a canned response and resolve
expected:
  - "Kim Park ticket in Returns group, priority Medium"
  - "Moss & Co ticket priority still Medium"
  - Ortiz Labs ticket resolved with the Export data canned response
  - Dana Lee ticket still Pending
  - No ticket left in a group with no agent
scenarios:
  - rate-limited
  - validation-failed
  - missing-field

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 with Retry-After once the per-minute limit is used
validation-failed400 with code invalid_value on an unknown priority
missing-field400 with code missing_field when a required custom field is blank
automation-firesA ticket update rule reassigns the ticket after the agent's write

Starting data

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

RecordsStarting setup
tickets45 across Open, Pending, Resolved and Closed
contacts50, linked to 10 companies
groupsBilling, Returns, Escalations
canned responses12 in three folders
automationsTicket creation and time trigger rules

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.

Tickets records

Tickets

Support requests across email, portal and phone.

FieldTypeMeaning / relationship
idintegerTicket id
subjectstringTicket subject
statusinteger2 open, 3 pending, 4 resolved, 5 closed
priorityinteger1 low to 4 urgent
requester_idintegerContact who asked
responder_idintegerAgent assigned
tagsarrayTags
json · illustrative record shape
{
  "id": 1,
  "subject": "<Ticket subject>",
  "status": 1,
  "priority": 1,
  "requester_id": 1,
  "responder_id": 1
}

See tickets operations

Conversations records

Conversations

Replies and notes on a ticket.

FieldTypeMeaning / relationship
idintegerConversation id
body_textstringPlain-text body
incomingbooleanTrue if from the customer
privatebooleanTrue for a private note
user_idintegerAuthor
json · illustrative record shape
{
  "id": 1,
  "body_text": "<Plain-text body>",
  "incoming": false,
  "private": false,
  "user_id": 1
}

See conversations operations

Contacts records

Contacts

Customers who raise tickets.

FieldTypeMeaning / relationship
idintegerContact id
namestringFull name
emailstringEmail address
company_idintegerCompany
activebooleanWhether the contact is verified
json · illustrative record shape
{
  "id": 1,
  "name": "<Full name>",
  "email": "person@example.test",
  "company_id": 1,
  "active": false
}

See contacts operations

Companies records

Companies

Organizations contacts belong to.

FieldTypeMeaning / relationship
idintegerCompany id
namestringCompany name
domainsarrayEmail domains
health_scorestringAccount health
json · illustrative record shape
{
  "id": 1,
  "name": "<Company name>",
  "domains": [],
  "health_score": "<Account health>"
}

See companies operations

See the Freshdesk world in the catalog