DoubleX IA OSDocs

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 pathWhat it does
GET /api/workspace/spaces?module=crmSpaces of the module (crm, support, projects) you can access, with their boards
POST /api/workspace/spacesCreates 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}/columnsNew 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 pathWhat it does
POST /api/workspace/itemsCreates: { "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 pathWhat it does
GET /api/workspace/contacts?q=&companyId=&cursor=List with search and pagination
POST /api/workspace/contactsCreates; 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= · POSTCompanies, 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
Method and pathWhat it does
POST /api/workspace/linksLinks two records: { "from": { "type", "id" }, "to": { "type", "id" }, "rel": "deal_of" }
DELETE /api/workspace/linksRemoves 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_itemSearch 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/todayFor 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 pathWhat it does
GET /api/workspace/spaces/{id}/dealsFunnel 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}/duplicateDuplicates the funnel (stages, rules and fields, without deals)
POST /api/workspace/items/{id}/move-spaceMoves the deal to another funnel: { "spaceId", "columnId?" }
GET, POST /api/workspace/fieldsCustom 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/mergePossible duplicates and merge: { "keepId", "mergeId" }
POST /api/workspace/bulkBulk: { "entity": "contact|company|deal", "ids", "action": { "ownerId", "addTags", "removeTags", "columnId", "delete" } }
POST /api/workspace/notesNote 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}/submissionsReceived answers, with source and consent
POST /api/workspace/imports (multipart) → /preview → /runSpreadsheet 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 pathWhat it does
GET, POST /api/workspace/support/setupSupport status; POST turns it on (agent, Support, Sales and Billing inboxes and the widget)
PATCH /api/workspace/support/settingsAI 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}/domainReply from the company address: { "action": "start|check" } returns the DNS records
GET /api/workspace/support/conversationsConversations 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/conversationsThe 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}/replyReply to the customer (widget or e-mail) or internal note: { "body", "internal": true }
POST .../conversations/{id}/assign, /state, /escalate, /tags, /spamAssign, 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}/mergeMerges 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 · /copilotTurn 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/forgetPrivacy: 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 pathWhat it does
GET, POST /api/workspace/projectsPortfolio (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/dealsDeals 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-tasksMy tasks across all projects and the running timer
GET /api/workspace/projects/{id}/tasksProject tasks: q, assignee, status=open|done|all, due=overdue|week|none, story, requirement, from, to
GET /api/workspace/projects/{id}/requirementsRequirements 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/workloadWorkload per person and agent (from, to, projects)
POST /api/workspace/projects/from-dealA won deal opens a project linked to the company: { dealId, fromProjectId? }
GET, POST, DELETE /api/workspace/projects/{id}/guestsInvited client: list, invite ({ email, name }, e-mails the link) and revoke (?guest=)
POST /api/workspace/items/{id}/timeTimer 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/runningThe caller's running timer
GET, POST /api/workspace/items/{id}/blockersDependencies: { blockerId, blocked }
POST /api/workspace/items/{id}/approval · /agentAsk the client to approve; have an agent work on the task ({ agentId, instruction })
GET /api/workspace/hours/reportHours by groupBy=project,person,task,story,requirement,day,client,type, with value, cost and margin only for those allowed
GET, POST /api/workspace/hours/timesheetWeekly timesheet (week, user) and a day cell: { workItemId, date, minutes }
GET, POST /api/workspace/hours/closings · POST .../closings/{id}/reopenClose the period (approves and locks the hours, freezes the value) and reopen
GET /api/workspace/hours/to-billTo bill by client and project (from, to, company; all=1 includes unapproved; format=xlsx|pdf)
GET, PUT /api/workspace/hours/ratesHourly sale rate and cost (most specific wins: project+person, project+type, project, person, type, company)
GET, PATCH /api/workspace/projects/settingsTask 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}/valuesEnter or correct a period's value: { period: "2026-10", value, note }
GET /api/workspace/kpis/grid · /overview · /reportEntry grid, all clients and the period report (format=html|pdf)
GET, POST /api/workspace/kpis/templates · POST .../kpis/apply · POST .../kpis/importIndicator sets, apply or copy from another client and import a spreadsheet
POST /api/workspace/support/conversations/{id}/taskThe 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 pathWhat it does
GET /api/workspace/reportsWhether the person sees Management (manages), the areas (areas: sales, support, projects), the spaces they manage in each, timezone and currency
GET /api/workspace/reports/salesSales: open value by stage and by salesperson, won (value and count), win rate, conversion between stages and days to win
GET /api/workspace/reports/supportSupport: conversations in the period, open and overdue now, median first response, share resolved by AI and rating, per inbox
GET /api/workspace/reports/projectsProjects: 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 pathWhat it does
GET /api/workspace/flowsList with stats (inside now, done and failed this month, cost this month)
POST /api/workspace/flowsCreates 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}/publishChecks 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 · /resumePauses and resumes
POST /api/workspace/flows/{id}/testTests 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 · /stopApproves 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/draftBuilds from a description: { "prompt", "flowId?", "graph?" } → { "graph", "name", "description", "notes" }. Saves nothing
GET /api/workspace/flows/templatesReady-made automations: { "templates": [{ "key", "name", "description", "graph" }] }

The graph follows the canvas format:

JSON
{
  "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.

BlockDoesFieldsOutputs
agent.classifyPicks one of the optionsagentId, 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.writeWrites a text or e-mailagentId, instruction, format (text or email)next; leaves text (and subject)
agent.decidePicks the next pathagentId, instruction, options with when to follow eachOne per path
agent.summarizeSummarizes the historyagentId, about (auto, contact, deal, conversation), instruction (focus)next; leaves text
agent.researchResearches the contact or companyagentId, about (auto, contact, company), instruction, webnext; 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)WhenWhat it doesDefault
deal_won_projectThe deal enters a won stage (won)Opens the project linked to the deal and the company, with the deal owner as managerOff
conversation_taskThe 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_notifyA task that came from a conversation is finishedTells the customer in that conversationOn
form_meetingA 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 timesOff
Method and pathWhat it does
GET /api/workspace/automationsEach 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 pathWhat it does
POST /api/workspace/attachmentsMultipart 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):

JSON
{ "module": "crm", "spaceId": "spc_…", "rules": [{ "subjectType": "team", "subjectId": "team_…", "scope": "own", "canManage": false }] }

Empty list: every member gets in and sees everything.