Skip to main content

REST API

S
Written by Sergey Yudovskiy
Updated over 3 months ago

Overview

The WRKDN API allows users to manage workspaces, workers, projects, and integrations programmatically. This guide provides step-by-step instructions on how to authenticate, retrieve data, create projects, and manage workflow automation using the API.

The full API documentation is available here https://app.wrkdn.com/api-docs


Authentication

To interact with the WRKDN API, you must first authenticate using Supabase’s authentication service to obtain an access token.

Get Supabase Auth Token

Use the following API request to generate an authentication token:

curl -X POST 'https://auth.wrkdn.com/auth/v1/token?grant_type=password' \ -H "apikey: supabase-anon-key" \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "password": "your_password" }'

πŸ“Œ Response:
The API returns a JSON object containing access_token. Use this token for all subsequent API requests.


Retrieve Workspace Data

Once authenticated, you can retrieve details about your workspace, users, and integrations.

Get Workspaces

Retrieve the list of workspaces associated with your account:

curl -X GET "https://app.wrkdn.com/api/v1/workspaces" \ -H "Authorization: Bearer YOUR_AUTH_TOKEN"

Get Workspace Workers

Fetch all workers assigned to a specific workspace:

curl -X GET "https://app.wrkdn.com/api/v1/workers?workspaceId=WORKSPACE_ID" \ -H "Authorization: Bearer YOUR_AUTH_TOKEN"

Get Users and Permissions

Retrieve the list of users within an organization and their associated permissions:

curl -X GET "https://app.wrkdn.com/api/v1/permissions?organizationId=ORGANIZATION_ID" \ -H "Authorization: Bearer YOUR_AUTH_TOKEN"

Get Restrictions

Fetch any restrictions applied to a workspace:

curl -X GET "https://app.wrkdn.com/api/v1/restrictions?workspaceId=WORKSPACE_ID" \ -H "Authorization: Bearer YOUR_AUTH_TOKEN"

Get Integrations

Retrieve a list of integrations linked to a workspace:

curl -X GET "https://app.wrkdn.com/api/v1/integrations?workspaceId=WORKSPACE_ID" \ -H "Authorization: Bearer YOUR_AUTH_TOKEN"

Project Management

Once you have the necessary workspace and user details, you can create and manage projects.

Create a Project

To create a new project, use the following API request:

curl -X POST "https://app.wrkdn.com/api/v1/projects" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_AUTH_TOKEN" \ -d '{ "workspaceId": "WORKSPACE_ID", "enabled": false, "name": "Ongoing Project Example", "description": "Project with team, workers, restrictions, and integrations.", "type": "ONGOING", "workerIds": ["WORKER_ID_1", "WORKER_ID_2"], "userIds": ["USER_ID_1", "USER_ID_2"], "aiConfig": { "restrictionIds": ["RESTRICTION_ID_1"], "integrationIds": ["INTEGRATION_ID_1", "INTEGRATION_ID_2"] } }'

πŸ“Œ Required Parameters:

  • workspaceId – The ID of the workspace where the project will be created.

  • enabled – Boolean (true/false) indicating if the project is active.

  • name – Project name.

  • description – Short project description.

  • type – Can be "ONGOING" or another project type.

  • workerIds – List of worker IDs assigned to the project.

  • userIds – List of user IDs with project permissions.

  • aiConfig – Optional AI-related configurations (restrictions, integrations).


Start a Project

Once a project is created, you can start it using:

curl -X POST "https://app.wrkdn.com/api/v1/projects/PROJECT_ID/start" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_AUTH_TOKEN"

πŸ“Œ Required Parameter:

  • PROJECT_ID – The unique identifier of the project to start.

Did this answer your question?