API reference › Resources
Workspace
Contacts, companies, boards, cards, links, search and attachments for Customers, Support and Projects.
The workspace is the shared base of Customers (funnels), Support (inboxes) and Projects. Everything follows the same access rules as the screens: the company decides who uses each module, who enters each space and whether a person sees everything or only their own records. A record you cannot see answers 404.
Every change goes into the record's timeline (who did it, agents included) and can fire event triggers (see Triggers).
Spaces and boards#
| Method and path | What it does |
|---|---|
GET /api/workspace/spaces?module=crm | Spaces of the module (crm, support, projects) you can access, with their boards |
POST /api/workspace/spaces | Creates a space with a default board and columns: { "module": "projects", "name": "New site", "code": "SITE" } |
GET /api/workspace/boards/{id} | Columns with their first cards, count and value total per column |
POST /api/workspace/boards/{id}/columns | New column: { "name", "kind", "position", "rules": { "requiredFields": ["value_cents"], "maxDays": 7 } } |
PATCH /api/workspace/columns/{id} | Rename, change kind, reorder or change rules |
DELETE /api/workspace/columns/{id}?moveTo={column} | Deletes; with cards, moveTo says where they go |
GET /api/workspace/columns/{id}/items?after={position} | More cards of the column (incremental loading) |
Column kinds: open, won, lost, todo, doing, done, waiting, resolved. Entering a won, lost, done or resolved column completes the card.
Cards (work items)#
| Method and path | What it does |
|---|---|
POST /api/workspace/items | Creates: { "spaceId", "title", "columnId?", "parentId?" (subtask), "kind?", "valueCents?", "currency?", "dueAt?", "assignees?", "contactId?", "companyId?", "fields?" } |
GET /api/workspace/items/{id} | The card and its subtasks |
PATCH /api/workspace/items/{id} | Changes fields; "done": true completes a subtask |
DELETE /api/workspace/items/{id} | Deletes (with subtasks) |
POST /api/workspace/items/{id}/move | { "columnId", "afterId?", "beforeId?" }. If the column requires fields, answers 400 with details.missing |
POST /api/workspace/items/{id}/comments | { "text", "internal?" } |
POST /api/workspace/items/{id}/time | { "action": "start" }, { "action": "stop" } or { "action": "log", "minutes": 90 } |
Money in cents (valueCents). Projects with a code number their cards (SITE-12). Assignees accept people (usr_…) and agents (agt_…).
Contacts and companies#
| Method and path | What it does |
|---|---|
GET /api/workspace/contacts?q=&companyId=&cursor= | List with search and pagination |
POST /api/workspace/contacts | Creates; with an e-mail already saved, updates that contact and answers "created": false |
GET, PATCH, DELETE /api/workspace/contacts/{id} | One contact |
GET /api/workspace/companies?q= · POST | Companies, with country (ISO code, e.g. BR, US); the tax ID follows the country (CNPJ/CPF is checked only for Brazil) and the same tax ID is never duplicated |
GET, PATCH, DELETE /api/workspace/companies/{id} | One company |
Links, timeline and search#
| Method and path | What it does |
|---|---|
POST /api/workspace/links | Links two records: { "from": { "type", "id" }, "to": { "type", "id" }, "rel": "deal_of" } |
DELETE /api/workspace/links | Removes it (same body) |
GET /api/workspace/links?type=&id= | Direct links; &depth=2 returns neighbors up to 3 hops; &toType=&toId= returns the path |
GET /api/workspace/timeline?type=&id= | The record's timeline, newest first |
GET /api/workspace/search?q=&types=contact,work_item | Search by keywords and meaning in what you can see |
GET /api/workspace/find?q= | One search: records from the three layers and your Brain notes; when the query matches a customer, about brings everything linked to it (people, deals, conversations, projects, tasks and notes) |
GET /api/workspace/today | For today: deals, conversations and tasks that need you, by urgency, each with its reason (late, first_response_late, today, waiting, unassigned, stale, no_next_action) |
Record types: contact, company, work_item, conversation, space, board, brain, agent.
Customers (CRM)#
| Method and path | What it does |
|---|---|
GET /api/workspace/spaces/{id}/deals | Funnel list with filters: q, ownerId, tag, columnId, status=open|won|lost, noNextAction=1, followUpDue=1, sort, dir, limit, offset |
PATCH /api/workspace/spaces/{id} | Name, settings (defaultOwnerId, cardFields) or archived |
POST /api/workspace/spaces/{id}/duplicate | Duplicates the funnel (stages, rules and fields, without deals) |
POST /api/workspace/items/{id}/move-space | Moves the deal to another funnel: { "spaceId", "columnId?" } |
GET, POST /api/workspace/fields | Custom fields (?entity=contact|company|work_item&spaceId=) |
PATCH, DELETE /api/workspace/fields/{id} | On a type change, without ?force=1 it answers lost with how many values would be lost |
GET, POST /api/workspace/views · DELETE /api/workspace/views/{id} | Saved views (scope=contacts|companies|deals:<space>) |
GET /api/workspace/contacts/duplicates · POST /api/workspace/contacts/merge | Possible duplicates and merge: { "keepId", "mergeId" } |
POST /api/workspace/bulk | Bulk: { "entity": "contact|company|deal", "ids", "action": { "ownerId", "addTags", "removeTags", "columnId", "delete" } } |
POST /api/workspace/notes | Note on the timeline: { "type", "id", "text" } |
GET, POST /api/workspace/forms · GET, PATCH /api/workspace/forms/{id} | Forms: fields with destination (map), deal destination and messages |
GET /api/workspace/forms/{id}/submissions | Received answers, with source and consent |
POST /api/workspace/imports (multipart) → /preview → /run | Spreadsheet import: upload, preview and import; POST /api/workspace/imports/{id}/undo undoes it |
Deals also take nextAction, nextActionAt, lostReason and tags. Contacts and companies take tags.
Chance to close. Every deal comes with score: value (the chance, from 0 to 100), state (frozen, cold, warm, hot, onfire, won or lost), factors (why the calculation got there) and source (auto or manual). To set the chance by hand, send "manualChance": 70 in PATCH /api/workspace/items/{id} (or in the POST that creates it). It replaces the calculated chance while the deal is open, and score.manual holds what the calculation would give (auto), who set it (by) and when (at). "manualChance": null goes back to the automatic calculation. Takes whole numbers from 0 to 100 (70 = 70%); a won deal stays at 100% and a lost one at 0%. The change goes into the timeline.
The public form lives at /f/{key} and the embed code for any website is <script src="https://doublex.ai/live/form-embed.js" data-form="KEY" async></script>. Submitting without login is POST /api/public/forms/{key} with { "fields": { ... } }.
Support#
| Method and path | What it does |
|---|---|
GET, POST /api/workspace/support/setup | Support status; POST turns it on (agent, Support, Sales and Billing inboxes and the widget) |
PATCH /api/workspace/support/settings | AI limits, retention, privacy notice, public knowledge and automatic sending by agents |
GET, POST /api/workspace/support/inboxes · GET, PATCH .../inboxes/{id} | Inboxes: levels, distribution, deadlines, business hours, sensitive topics, categories (categories), AI mode and e-mail |
POST /api/workspace/support/inboxes/{id}/domain | Reply from the company address: { "action": "start|check" } returns the DNS records |
GET /api/workspace/support/conversations | Conversations with filters: filter=open|mine|unassigned|overdue|waiting|resolved|agent|all, spaceId, q (also the conversation code), stateId, channel=widget|email|portal|internal, category (__none = no category), contactId |
POST /api/workspace/support/conversations | The team opens a conversation: { spaceId, contactId | name, email, subject, body, send, category }. With send: true the message is e-mailed to the customer and their reply comes back to the conversation; without it, it is saved as an internal note. Whoever opens it owns it and the AI stays out |
GET /api/workspace/support/conversations/{id} | The whole conversation, with internal notes, contact, files, linked tasks and deals (linkedItems), conversations merged into it (merged) and who else is in it |
POST .../conversations/{id}/reply | Reply to the customer (widget or e-mail) or internal note: { "body", "internal": true } |
POST .../conversations/{id}/assign, /state, /escalate, /tags, /spam | Assign, change state, escalate, tag and mark as spam. On /tags: { add, remove, priority, category } (a category from the inbox list; null clears it) |
POST .../conversations/{id}/merge | Merges this conversation into another: { "intoId": "cnv_…" }. Messages, files, links and the e-mail thread move to the one that stays; this one leaves the list and replies to it land in the one that stayed |
POST .../conversations/{id}/deal · /contact · /copilot | Turn into a deal, link to the right contact and copilot (suggest, summarize, tone, translate) |
GET, POST /api/workspace/support/canned · PATCH, DELETE .../canned/{id} | Canned replies ({nome}, {primeiro_nome}, {atendente}, {empresa}) |
GET /api/workspace/support/gaps · POST .../gaps/{id} | Questions the AI couldn't answer; answer and save as knowledge |
GET, POST /api/workspace/support/widgets · PATCH .../widgets/{id} | Widget: appearance, domains, suggested questions, pre-chat form and proactive messages |
POST /api/workspace/support/forget | Privacy: deletes a contact's conversations at their request |
The widget goes into the site with one line: <script src="https://doublex.ai/live/widget.js" data-widget="KEY" async></script>. It only works on the allowed domains. For identified customers (sites with login), compute on your server the HMAC-SHA256 of id:email with the widget secret and pass it in window.DoubleXWidget = { identity: { id, email, name, signature } } before the widget line.
Projects#
| Method and path | What it does |
|---|---|
GET, POST /api/workspace/projects | Portfolio (status, company, q, templates=1, archived=1) and new project: { name, contactId, companyId, dealId, template, withTasks, startOn, endOn, budgetMinutes, budgetCents, fromProjectId, copyItems }. template: blank or a ready-made template (implementation, software, campaign, event, consulting, website) that creates the suggested tasks with due dates counted from the start (withTasks: false skips them) |
GET /api/workspace/projects/deals | Deals to link to a project, from the funnels the person can see (q, company, contact, id) |
GET, PATCH /api/workspace/projects/{id} | The project, budget use and task types; change details, status, budget, client sees hours, template, archived |
GET /api/workspace/projects/my-tasks | My tasks across all projects and the running timer |
GET /api/workspace/projects/{id}/tasks | Project tasks: q, assignee, status=open|done|all, due=overdue|week|none, story, requirement, from, to |
GET /api/workspace/projects/{id}/requirements | Requirements and stories with progress and estimate vs actual |
POST /api/workspace/projects/{id}/boards · PATCH .../projects/boards/{id} | New board (cardKind: task|story), rename and archive |
GET /api/workspace/projects/workload | Workload per person and agent (from, to, projects) |
POST /api/workspace/projects/from-deal | A won deal opens a project linked to the company: { dealId, fromProjectId? } |
GET, POST, DELETE /api/workspace/projects/{id}/guests | Invited client: list, invite ({ email, name }, e-mails the link) and revoke (?guest=) |
POST /api/workspace/items/{id}/time | Timer and time: { "action": "start|stop|discard" } or { "action": "log", minutes, startedAt, note, billable, userId } |
PATCH, DELETE /api/workspace/time/entries/{id} | Correct or delete an entry (kept in the timeline; closed periods don't change) |
GET /api/workspace/time/running | The caller's running timer |
GET, POST /api/workspace/items/{id}/blockers | Dependencies: { blockerId, blocked } |
POST /api/workspace/items/{id}/approval · /agent | Ask the client to approve; have an agent work on the task ({ agentId, instruction }) |
GET /api/workspace/hours/report | Hours by groupBy=project,person,task,story,requirement,day,client,type, with value, cost and margin only for those allowed |
GET, POST /api/workspace/hours/timesheet | Weekly timesheet (week, user) and a day cell: { workItemId, date, minutes } |
GET, POST /api/workspace/hours/closings · POST .../closings/{id}/reopen | Close the period (approves and locks the hours, freezes the value) and reopen |
GET /api/workspace/hours/to-bill | To bill by client and project (from, to, company; all=1 includes unapproved; format=xlsx|pdf) |
GET, PUT /api/workspace/hours/rates | Hourly sale rate and cost (most specific wins: project+person, project+type, project, person, type, company) |
GET, PATCH /api/workspace/projects/settings | Task types, who sees hours, values and costs, edit window, time zone and currency |
GET, POST /api/workspace/kpis · PATCH, DELETE .../kpis/{id} | Indicators of a client (company) or project (space), with signal, change and forecast |
PUT, DELETE /api/workspace/kpis/{id}/values | Enter or correct a period's value: { period: "2026-10", value, note } |
GET /api/workspace/kpis/grid · /overview · /report | Entry grid, all clients and the period report (format=html|pdf) |
GET, POST /api/workspace/kpis/templates · POST .../kpis/apply · POST .../kpis/import | Indicator sets, apply or copy from another client and import a spreadsheet |
POST /api/workspace/support/conversations/{id}/task | The conversation becomes a task or requirement ({ spaceId, kind, title }) or is linked to an existing task, requirement or deal ({ itemId }); a project task tells the customer in the conversation when done. DELETE ...?itemId= removes the link |
The indicator forecast is a statistical calculation (trend of the entered periods and, with a year or more, seasonality), from three periods on. Values and costs only show for people the company allowed; for others the fields come back null.
Management#
The manager view: the numbers of the funnels, inboxes and projects the person manages (admins: all). Someone who manages no space gets 403. Inside a space with "only mine" access, only that person's records count.
| Method and path | What it does |
|---|---|
GET /api/workspace/reports | Whether the person sees Management (manages), the areas (areas: sales, support, projects), the spaces they manage in each, timezone and currency |
GET /api/workspace/reports/sales | Sales: open value by stage and by salesperson, won (value and count), win rate, conversion between stages and days to win |
GET /api/workspace/reports/support | Support: conversations in the period, open and overdue now, median first response, share resolved by AI and rating, per inbox |
GET /api/workspace/reports/projects | Projects: progress, estimated vs. logged hours, budget use, overdue tasks and workload per person |
Report parameters: period=month|30d|quarter|custom (default month, from the 1st to today), from and to (YYYY-MM-DD, with custom) and space (one funnel, inbox or project). Each number comes with the previous period's (previous): the same stretch of the previous month or quarter, or the same number of days right before. Dates use the caller's timezone (or the organization's). Money comes per currency ([{ "currency": "USD", "cents": 120000 }]): different currencies are never added together. A deal without a currency counts in the organization's currency.
Custom dashboards. After the three areas, Management has one tab for each live dashboard the person sees that is in Management: a dashboard that reads Customers, Support or Projects goes there on its own, and the agent also adds a management dashboard built from connectors. GET /api/live-artifacts?gestao=1 lists these dashboards; PATCH /api/live-artifacts/{id} with { "gestao": false } removes one from Management (and true adds it), without a new version. Only someone who can edit the dashboard can change this.
Automations#
Flows built on the canvas or from a description: a trigger and steps connected by arrows (wait, condition, agent, actions in Customers, Support and Projects, marketing e-mails, notices). Each contact or record goes through the flow in a run, with what each step did. The flow acts with the access of the person responsible for it. Admins and people who manage a funnel, inbox or project build and edit them. The first e-mail or message each automation sends outside the company waits for a person's approval; after that it goes out on its own.
| Method and path | What it does |
|---|---|
GET /api/workspace/flows | List with stats (inside now, done and failed this month, cost this month) |
POST /api/workspace/flows | Creates a draft (off): { "name", "description?", "graph?", "origin?" } |
GET /api/workspace/flows/{id} | The flow with its graph |
PATCH /api/workspace/flows/{id} | Changes the draft: { "name?", "description?", "graph?" } |
DELETE /api/workspace/flows/{id} | Archives |
POST /api/workspace/flows/{id}/publish | Checks and turns it on. An incomplete block answers { "errors": { "<nodeId>": ["…"] } }. Publishing again creates a version; runs in progress finish on the version they started |
POST /api/workspace/flows/{id}/pause · /resume | Pauses and resumes |
POST /api/workspace/flows/{id}/test | Tests with a real record: { "subjectType", "subjectId" }. Shows the path and what each step would do, without sending anything outside or saving; agent steps do run and their cost shows |
GET /api/workspace/flows/{id}/runs?status=&limit= | Runs |
GET /api/workspace/flows/runs/{runId} | One run with its steps |
POST /api/workspace/flows/runs/{runId}/approve · /stop | Approves the outside send or stops the run |
GET /api/workspace/flows/{id}/stats?from=&to= | Entries, done, failed and cost; how many went through each block |
POST /api/workspace/flows/draft | Builds from a description: { "prompt", "flowId?", "graph?" } → { "graph", "name", "description", "notes" }. Saves nothing |
GET /api/workspace/flows/templates | Ready-made automations: { "templates": [{ "key", "name", "description", "graph" }] } |
The graph follows the canvas format:
{
"nodes": [{ "id": "n1", "type": "trigger.form_submitted", "position": { "x": 80, "y": 80 }, "data": { "formId": "frm_…" } }],
"edges": [{ "id": "e1", "source": "n1", "target": "n2", "sourceHandle": "next" }]
}type is the block key, data holds its fields and sourceHandle is the output used (next, yes/no of a condition, the option the agent picked…). Texts accept {{contact.name}}, {{contact.email}}, {{deal.title}}, {{company.name}}, {{conversation.subject}}, {{conversation.inbox}}, {{conversation.channel}}, {{conversation.first_message}} (the customer's first message, up to 500 characters), {{trigger.<field>}} and {{steps.<nodeId>.<field>}} (what an earlier step left).
Build from a description (/draft): the AI uses only blocks from the library and the funnels, stages, lists, e-mails, forms, inboxes, projects, agents and people you can see. Whatever does not exist is left out, names become ids and notes says what is still missing. With flowId (or graph) it edits that flow instead of starting over. It uses the caller's credits (category "Create with AI").
Agent steps. They run with the chosen agent's model, instructions and Brain notes, read records with the access of the person responsible for the automation and use credits (category "Automations", within the agent's budget); each step's cost shows in the run, tests included. Record content is data for the agent, never instructions.
| Block | Does | Fields | Outputs |
|---|---|---|---|
agent.classify | Picks one of the options | agentId, instruction, options (["Hot: asked for a proposal", "Cold"]) | One per option (the name in lowercase, without accents, with _: hot) and other; leaves label and reason |
agent.write | Writes a text or e-mail | agentId, instruction, format (text or email) | next; leaves text (and subject) |
agent.decide | Picks the next path | agentId, instruction, options with when to follow each | One per path |
agent.summarize | Summarizes the history | agentId, about (auto, contact, deal, conversation), instruction (focus) | next; leaves text |
agent.research | Researches the contact or company | agentId, about (auto, contact, company), instruction, web | next; leaves text and sources (records, brain, web) |
Research uses the web only when the agent can search the web and search is set up; otherwise it uses the records and the agent's knowledge (web: false). Templates: form_welcome, cold_nurture, lost_reactivation, support_survey, project_nps and renewal_by_date.
Notify a person (notify.person): userId (blank: whoever is responsible for the automation), channel (app, the default: in the app and on the phone, and by e-mail if the phone doesn't get it; email: always by e-mail, and the notice stays in Alerts without ringing the phone; both: phone and e-mail), title and text (up to 2,000 characters in the e-mail; the in-app notice shows the first 500).
Automations between layers#
Ready-made recipes, with no AI, that the company turns on with one click. They run on their own after each change, once per record, and each action shows in the timeline as Automation, on behalf of whoever owns the record. No recipe invites, writes or e-mails the contact on its own (the customer notice only replies in the conversation the customer opened).
Recipe (id) | When | What it does | Default |
|---|---|---|---|
deal_won_project | The deal enters a won stage (won) | Opens the project linked to the deal and the company, with the deal owner as manager | Off |
conversation_task | The support AI hands the conversation to the team because the customer needs an action (exchange, cancel, change…) | The conversation becomes a task in the chosen project (projectId; if none, the first active project, "General") | Off |
task_done_notify | A task that came from a conversation is finished | Tells the customer in that conversation | On |
form_meeting | A deal that came from a form reaches the qualified stage (columnId; if none, the "Qualified" stage of any funnel) | Next action "Schedule a meeting" for tomorrow at 9 a.m. in the owner's time zone and, with the owner's calendar (Google or Outlook) connected, an internal note with the next 3 free times | Off |
| Method and path | What it does |
|---|---|
GET /api/workspace/automations | Each recipe with enabled, settings, runCount, lastRunAt and lastResult; the projects and stages that can be chosen (options) and canManage |
PATCH /api/workspace/automations/{id} | Turns it on or off and sets the options: { "enabled": true, "settings": { "projectId": "spc_…" } }. null goes back to the default. Admins only (others get 403) |
Attachments#
| Method and path | What it does |
|---|---|
POST /api/workspace/attachments | Multipart with type, id and file (up to 25 MB) |
GET /api/workspace/attachments?type=&id= | A record's attachments |
GET /api/workspace/attachments/{id} | Downloads the file |
DELETE /api/workspace/attachments/{id} | Deletes it |
Access#
GET /api/workspace/access?module=crm lists the rules. PUT /api/workspace/access replaces the rules of a module (admins) or of a space (people who manage it):
{ "module": "crm", "spaceId": "spc_…", "rules": [{ "subjectType": "team", "subjectId": "team_…", "scope": "own", "canManage": false }] }Empty list: every member gets in and sees everything.