API Reference

Edworking API

Build integrations with scoped API tokens. Read tasks and messages, create or rename tasks, and send messages in your workspace.

8
Queries
6
Mutations
12
Types

Overview

Get started

The Edworking API is a single GraphQL endpoint. Send all queries and mutations as POST requests to:

Endpoint: https://gateway.edworking.com/

Every request must include a valid access token in the Authorization header. See Authentication to obtain one.

What is GraphQL?

GraphQL lets you request exactly the data you need, and nothing more, in a single call. Instead of stitching together multiple REST endpoints, you describe the shape of the response and the server returns it.

All operations are validated against the Edworking schema. Use this reference to discover the available queries, mutations, and types.

Authentication

Send a scoped personal API token as Authorization: Bearer <token>. Tokens start with edw_pat_ and are bound to the workspace where you create them.

  • In Edworking, open your profile settings and select API tokens.
  • Choose a name, the permissions your integration needs, and a lifetime of 7, 30 or 90 days.
  • Select Create and reveal and complete reauthentication, including MFA when required.
  • Copy the secret once into your integration's secret store. It cannot be retrieved again.
Keep credentials on the server. Never embed tokens in frontend code, URLs or logs. Settings show metadata such as creation, expiry, last use and audit events; they do not return the secret.

Permissions

PermissionAllowed operations
Any valid tokenapiTokenInfo
tasks:readapiTasks, apiTask
tasks:writeapiCreateTask, apiRenameTask, apiUpdateTask
messages:readapiMessages
messages:writeapiSendMessage
projects:readapiProjects, apiProjectStates
projects:writeapiCreateProject
chats:readapiPrivateChats
files:readapiFiles
files:writeapiUploadFile

Reading message attachments also requires files:read; attaching existing files to a new task also requires files:write. Read and write permissions are independent. Resource membership and message-history limits still apply. Workspace cookies cannot change the token's workspace.

Expiry, rotation and revocation

Rotate or revoke from API tokens after reauthentication. Rotation immediately revokes the previous credential and keeps its permissions and original expiry. Update your integration's stored secret when rotating; create a new token to extend its lifetime. Revocation blocks subsequent requests, although an already-running operation may finish.

Query example

Once you have a token, include it in the Authorization header and send your query:

// Server-side JavaScript. Store a token with tasks:read in your secret manager.
const token = process.env.EDWORKING_API_TOKEN
if (!token) throw new Error('Set EDWORKING_API_TOKEN')

const response = await fetch('https://gateway.edworking.com/', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${token}`,
  },
  body: JSON.stringify({
    query: `query Tasks($after: ID) {
      apiTasks(after: $after, limit: 50) {
        id name projectId stateProjectId createdAt updatedAt
      }
    }`,
    variables: { after: null },
  }),
})
if (!response.ok) throw new Error(`Edworking HTTP ${response.status}`)
const result = await response.json()
// GraphQL errors may arrive with HTTP 200. Never log credentials or headers.
if (result.errors?.length) throw new Error('Edworking rejected the request; check token permissions and expiry')
const tasks = result.data.apiTasks
// Request the next page with after set to the last task's id.

Send a message

Use a token with messages:write. POST this mutation and its variables to the same endpoint with the same authorization header:

mutation SendMessage($chat: ChatMessageScope!, $body: String!) {
  apiSendMessage(chat: $chat, body: $body) {
    id body authorId createdAt
  }
}

Variables

{"chat":{"id":"<PROJECT_ID>","kind":"project"},"body":"The report is ready."}

Pagination and chat IDs

Lists default to 50 records and allow 1 through 100. Pass the last returned ID as after until a page contains fewer records than requested. Keep filters and ordering unchanged between pages.

Tasks, messages, projects and files accept order: CREATED_DESC or UPDATED_DESC with an ID tie-breaker. Default order is ID_ASC. Project statuses use position order; private chats use ID order. For polling, request the newest page again and deduplicate by record ID (or ID plus update timestamp for changes). A saved cursor is not a durable change feed.

ChatMessageScope needs an existing chat’s id and exact kind: project, task, privat or meetingroom. Discover projects, tasks and private chats with the matching read permission.

Migration and automation

Scoped tokens only accept the operations in this reference. Older session-token examples such as getTask, getTasksNew, setTask, ediTask, getMessages and setMessage cannot be used with a new token.

Adapt task lists to apiTasks, task creation to apiCreateTask, name and due-date changes to apiUpdateTask, and message reads and sends to apiMessages and apiSendMessage. Use apiProjects, apiCreateProject, apiFiles and apiUploadFile for projects and files. Match the arguments and selected response fields below; these are not drop-in replacements.

Account data, editing an existing task’s status, ordinary REST endpoints and WebSocket subscriptions are outside the token permissions. HTTP polling is available; webhooks are not.

Zapier migration: version 2.0.0 is being prepared with scoped tokens and the same trigger/action keys, task search and dropdowns. Existing 1.4.0 connections use account sign-in. After 2.0.0 is available, select that version and reconnect using its API token field; existing password/session connections cannot be automatically converted. Check a Zap’s field mappings and run a test before turning it on. Rotate or replace expiring tokens and reconnect before expiry. For Pabbly, verify explicit scoped-token support before reconnecting; do not put a token in a password field.

For custom integrations, replace password-based login or copied session credentials with scoped tokens. Handle HTTP failures and GraphQL errors, including responses with HTTP 200. Permission or resource access denials can use FORBIDDEN; renew expired credentials and check scopes rather than repeatedly retrying a denied write.

Queries

apiFiles

Query #

Lists accessible files in a project or task. At least one target is required. If both are supplied, the task must belong to that project. The base64 field contains a CDN URL, not encoded bytes.

Required permission: files:read

apiFiles(projectId: ID, taskId: ID, after: ID, limit: Int, order: ApiOrder): [ApiFile!]!

Arguments

ArgumentType
projectId ID Optional
taskId ID Optional
after ID Optional
limit Int Optional
order ApiOrder Optional

Returns

[ApiFile!]!

apiMessages

Query #

Lists messages in an accessible chat within your history limits. Selecting the file field additionally requires files:read.

Required permission: messages:read

apiMessages(chat: ChatMessageScope!, after: ID, limit: Int, order: ApiOrder): [ApiMessage!]!

Arguments

ArgumentType
chat ChatMessageScope! Required
after ID Optional
limit Int Optional
order ApiOrder Optional

Returns

[ApiMessage!]!

apiPrivateChats

Query #

Lists existing private chats in this workspace. Opening a conversation in Edworking creates it; this read operation does not create chats.

Required permission: chats:read

apiPrivateChats(after: ID, limit: Int): [ApiPrivateChat!]!

Arguments

ArgumentType
after ID Optional
limit Int Optional

Returns

[ApiPrivateChat!]!

apiProjects

Query #

Lists accessible, non-deleted projects in the token’s workspace.

Required permission: projects:read

apiProjects(after: ID, limit: Int, order: ApiOrder): [ApiProject!]!

Arguments

ArgumentType
after ID Optional
limit Int Optional
order ApiOrder Optional

Returns

[ApiProject!]!

apiProjectStates

Query #

Lists statuses belonging to one accessible project, in position order.

Required permission: projects:read

apiProjectStates(projectId: ID!, after: ID, limit: Int): [ApiProjectState!]!

Arguments

ArgumentType
projectId ID! Required
after ID Optional
limit Int Optional

Returns

[ApiProjectState!]!

apiTask

Query #

Finds an accessible task by ID; returns null when the task is unavailable or inaccessible.

Required permission: tasks:read

apiTask(id: ID!): ApiTask

Arguments

ArgumentType
id ID! Required

Returns

ApiTask

apiTasks

Query #

Lists accessible tasks. Filter by projectId and use after/limit to paginate. Use CREATED_DESC or UPDATED_DESC for newest-first polling.

Required permission: tasks:read

apiTasks(projectId: ID, after: ID, limit: Int, order: ApiOrder): [ApiTask!]!

Arguments

ArgumentType
projectId ID Optional
after ID Optional
limit Int Optional
order ApiOrder Optional

Returns

[ApiTask!]!

apiTokenInfo

Query #

Returns only this token’s non-secret ID, name, owner/workspace IDs, permissions and expiry. Use it to validate an integration connection.

Required permission: Any valid token

apiTokenInfo: ApiTokenInfo!

Arguments

No arguments.

Returns

ApiTokenInfo!

Mutations

apiCreateProject

Mutation #

Creates a project with the token owner as its member, subject to workspace role permissions. Name is 1 to 500 characters. An optional description of up to 100,000 characters becomes the initial project document.

Required permission: projects:write

apiCreateProject(name: String!, description: String): ApiProject!

Arguments

ArgumentType
name String! Required
description String Optional

Returns

ApiProject!

apiCreateTask

Mutation #

Creates a task assigned to the token owner. Supports description (up to 100,000 characters), due date, a status from the same project, and up to 20 accessible file IDs from that project. Attachments additionally require files:write. Name must be 1 to 500 characters. Omitted status uses the project’s first status.

Required permission: tasks:write

apiCreateTask(projectId: ID!, name: String!, description: String, deadline: DateTime, stateProjectId: ID, fileIds: [ID!]): ApiTask!

Arguments

ArgumentType
projectId ID! Required
name String! Required
description String Optional
deadline DateTime Optional
stateProjectId ID Optional
fileIds [ID!] Optional

Returns

ApiTask!

apiRenameTask

Mutation #

Changes only the name of an accessible task. Name must be 1 to 500 characters after trimming.

Required permission: tasks:write

apiRenameTask(id: ID!, name: String!): ApiTask!

Arguments

ArgumentType
id ID! Required
name String! Required

Returns

ApiTask!

apiSendMessage

Mutation #

Sends text to an accessible chat. Body must be 1 to 20,000 characters after trimming.

Required permission: messages:write

apiSendMessage(chat: ChatMessageScope!, body: String!): ApiMessage!

Arguments

ArgumentType
chat ChatMessageScope! Required
body String! Required

Returns

ApiMessage!

apiUpdateTask

Mutation #

Changes supplied name and/or deadline fields without moving the task or resetting its status. Send deadline: null to clear the due date; omit a field to keep it.

Required permission: tasks:write

apiUpdateTask(id: ID!, name: String, deadline: DateTime): ApiTask!

Arguments

ArgumentType
id ID! Required
name String Optional
deadline DateTime Optional

Returns

ApiTask!

apiUploadFile

Mutation #

Downloads a public HTTP(S) URL into an accessible project or task in this workspace. Maximum 50 MiB and 30 seconds; private addresses, URL credentials and unsafe redirects are rejected. Edworking credentials are never sent to the source. Folder, if supplied, must match the target. The base64 field contains a CDN URL.

Required permission: files:write

apiUploadFile(url: String!, projectId: ID, taskId: ID, folderId: ID, name: String): ApiFile!

Arguments

ArgumentType
url String! Required
projectId ID Optional
taskId ID Optional
folderId ID Optional
name String Optional

Returns

ApiFile!

Types

ApiFile

Object #
FieldType
id ID! Required
name String! Required
code String! Required
type String! Required
size Float! Required
location String! Required
base64 String Optional
category String Optional
duration Int Optional
createdAt DateTime Optional
updatedAt DateTime Optional
authorId ID Optional
projectId ID Optional
taskId ID Optional
folderId ID Optional
privatId ID Optional
meetingroomId ID Optional
freelancerId ID Optional
shared Boolean! Required
gif String Optional
project ApiFileProject Optional

ApiFileProject

Object #
FieldType
teamId ID Optional

ApiMessage

Object #
FieldType
id ID! Required
body String Optional
type String Optional
authorId ID Optional
parentId ID Optional
createdAt DateTime Optional
updatedAt DateTime Optional
author ApiPerson Optional
file ApiFile Optional

ApiPerson

Object #
FieldType
id ID! Required
firstname String Optional
lastname String Optional
profileImg String Optional

ApiPrivateChat

Object #
FieldType
id ID! Required
name String Optional

ApiProject

Object #
FieldType
id ID! Required
name String Optional
createdAt DateTime Optional
updatedAt DateTime Optional

ApiProjectRef

Object #
FieldType
id ID! Required
name String Optional

ApiProjectState

Object #
FieldType
id ID! Required
value String Optional

ApiTokenInfo

Object #
FieldType
id ID! Required
name String! Required
userId ID! Required
teamId ID! Required
scopes [String!]! Required
expiresAt DateTime! Required

ChatMessageScope

Input #
FieldType
id ID! Required
kind String! Required

ApiOrder

ID_ASC, CREATED_DESC, UPDATED_DESC

Custom scalars

Scalar

DateTime: ISO-8601 date-time strings.

No results found.