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.
https://api.dmly.io/restAll endpoints require the x-api-key header:
x-api-key: YOUR_API_KEYGET /v1/workspacesRetrieve a list of workspaces.
Response: 200 OK β Array of Workspace
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 |
curl -X GET "https://api.dmly.io/rest/v1/workspaces?page=1&limit=20&searchText=marketing" \
-H "x-api-key: YOUR_API_KEY"[
{
"id": "ws_001",
"title": "Marketing Team"
},
{
"id": "ws_002",
"title": "Sales Workspace"
}
]GET /v1/workspaces/{workspaceId}Retrieve a workspace by its unique ID.
Response: 200 OK β Workspace
Name | In | Type | Required | Description |
workspaceId | path | string | Yes | Workspace unique ID |
curl -X GET "https://api.dmly.io/rest/v1/workspaces/ws_001" \
-H "x-api-key: YOUR_API_KEY"{
"id": "ws_001",
"title": "Marketing Team"
}{
"id": "string",
"title": "string"
}[
{
// Workspace object
}
]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.
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).