API Reference

Introduction to the API

The Conduit API provides endpoints to interact with workspaces, dashboards, and other resources in your application.
The base URL for all API requests is:

https://api.getconduit.app/v2/

Authorization

To access the API, include an Authorization Bearer Token in the request headers. In all sample requests, the token is represented as $token; replace this placeholder with your actual API token.

Header format:

Authorization: Bearer $token

For accessing sub-workspace data, you must use the token specific to the sub-workspace, which can be retrieved using the List Workspaces endpoint.

Organization name requirements

For accessing some of the APIs, Organization name is required.
Go to API . Enter the organization's name ("Your company name") and click the Save button.

Workspaces

* All workspace-specific API requires configured Organization name

List Workspaces

Endpoint: GET /workspaces/
Retrieves a list of all workspaces.

Sample cURL Request:

curl -X GET https://api.getconduit.app/v2/workspaces/ \
-H "Authorization: Bearer $token"

Sample JSON Response:

[
  {
    "id": 1,
    "ext_id": "crm1",
    "name": "Workspace 1",
    "token": "workspace_token_1"
  },
  {
    "id": 2,
    "ext_id": null,
    "name": "Workspace 2",
    "token": "workspace_token_2"
  }
]

Create Workspace

Endpoint: POST /workspaces/
Creates a new workspace with a specified name and optional external ID.

Sample cURL Request:

curl -X POST https://api.getconduit.app/v2/workspaces/ \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{
  "name": "Workspace 1",
  "ext_id": "crm1"
}'

Sample JSON Response:

{
  "id": 1,
  "ext_id": "crm1",
  "name": "Workspace 1",
  "token": "new_workspace_token"
}

Disable Workspace

Endpoint: DELETE /workspaces/{workspace_id}/
Disables a workspace.

Sample cURL Request:

curl -X DELETE https://api.getconduit.app/v2/workspaces/12345/ \
-H "Authorization: Bearer $token"

Response:
Returns a 200 status code with an empty response.

List Workspace Users

Endpoint: GET /workspaces/{workspace_id}/users/
Retrieves a list of workspace users.

Sample cURL Request:

curl -X GET https://api.getconduit.app/v2/workspaces/12345/users/ \
-H "Authorization: Bearer $token" 

Sample JSON Response:

[
    {
        "id": 123,
        "email": "test.user.1@example.com",
        "workspace_id": 12345
    },
    {
        "id": 124,
        "email": "test.user.2@example.com",
        "workspace_id": 12345
    }
]

Create Workspace User

Endpoint: POST /workspaces/{workspace_id}/users/
Creates a workspace user.

Sample cURL Request:

curl -X POST https://api.getconduit.app/v2/workspaces/12345/users/ \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{
    "email": "test.user.2@example.com",
    "password": "secretpassword12345"
}'

Response:
Returns a 200 status code with an empty response.

Delete Workspace User

Endpoint: DELETE /workspaces/{workspace_id}/users/{user_id}/
Deletes a workspace user.

Sample cURL Request:

curl -X DELETE https://api.getconduit.app/v2/workspaces/12345/users/124/ \
-H "Authorization: Bearer $token" 

Response:
Returns a 200 status code with an empty response.


Dashboards

List Dashboards

Endpoint: GET /dashboards/
Fetches all dashboards available in the current workspace.

Sample cURL Request:

curl -X GET https://api.getconduit.app/v2/dashboards/ \
-H "Authorization: Bearer $token"

Sample JSON Response:

[
  {
    "id": 1,
    "name": "Sales Dashboard"
  },
  {
    "id": 2,
    "name": "Marketing Dashboard"
  }
]

Get Dashboard URL in Shared Mode

Endpoint: GET /dashboards/{dashboard_id}/share/
Retrieves a sharable URL for a specific dashboard to be embedded or viewed externally.

Sample cURL Request:

curl -X GET https://api.getconduit.app/v2/dashboards/1/share/ \
-H "Authorization: Bearer $token"

Sample JSON Response:

{
  "url": "https://app.getconduit.app/r/public/dashboard/565bdaec-bda7-42eb-82d4/"
}

Clone Dashboard to Workspace

Endpoint: POST /dashboards/{dashboard_id}/clone/
Duplicates a dashboard from the Organization account to a specified sub-workspace, with an optional new name.

* requires configured White-label

Sample cURL Request:

curl -X POST https://api.getconduit.app/v2/dashboards/1/clone/ \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{
  "workspace": 1,
  "name": "Sales Dashboard"
}'

Sample JSON Response:

{
  "id": 2,
  "name": "Sales Dashboard",
  "url": "https://app.getconduit.app/r/public/dashboard/565bdaec-bda7-42eb-82d4/"
}