company logo

Help center

Go to DMLY
FacebookInstagramXLinkedIn
All collectionsIntegrations & APIREST API ReferenceREST API EndpointsWorkspace API

Workspace API

Access and manage workspace-level settings and information with the Workspace API endpoints.

The Workspace API allows you to access and manage workspace-level information in DMLY.
Use it to list available workspaces and fetch a workspace’s details by ID.

VIDEO GUIDE:


πŸ”— Base URL

https://api.dmly.io/rest

πŸ” Authentication

All endpoints require the x-api-key header:

x-api-key: YOUR_API_KEY

πŸ“Œ Endpoints


1⃣ List Workspaces

GET /v1/workspaces

Retrieve a list of workspaces.

Response: 200 OK β€” Array of Workspace


πŸ”Ž Query Parameters

Name

In

Type

Required

Description

limit

query

string

No

Max number of results

page

query

string

No

Page number for pagination

searchText

query

string

No

Free text search


πŸ“₯ Example Request

curl -X GET "https://api.dmly.io/rest/v1/workspaces?page=1&limit=20&searchText=marketing" \
  -H "x-api-key: YOUR_API_KEY"

βœ… Example Response

[
  {
    "id": "ws_001",
    "title": "Marketing Team"
  },
  {
    "id": "ws_002",
    "title": "Sales Workspace"
  }
]

2⃣ Get Workspace by ID

GET /v1/workspaces/{workspaceId}

Retrieve a workspace by its unique ID.

Response: 200 OK β€” Workspace


πŸ”Ž Path Parameters

Name

In

Type

Required

Description

workspaceId

path

string

Yes

Workspace unique ID


πŸ“₯ Example Request

curl -X GET "https://api.dmly.io/rest/v1/workspaces/ws_001" \
  -H "x-api-key: YOUR_API_KEY"

βœ… Example Response

{
  "id": "ws_001",
  "title": "Marketing Team"
}

πŸ“¦ Schemas


Workspace Schema

{
  "id": "string",
  "title": "string"
}

Workspaces Schema

[
  {
    // Workspace object
  }
]

βœ… Best Practices

  • Use searchText to support workspace pickers in your UI.

  • Paginate large results using page and limit.

  • Cache workspace lists server-side if your integration requests them frequently.

  • Store workspaceId and reuse it when calling Contacts, Messages, Broadcasts, Templates, and Segments endpoints.


πŸ” Security Notes

  • Never expose x-api-key in browser/frontend applications.

  • Restrict API key usage to server-side services.

  • Ensure the caller is authorized to access the requested workspace (especially in multi-tenant integrations).

Did this answer your question?
😞
😐
😁