Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.smartlyq.com/llms.txt

Use this file to discover all available pages before exploring further.

Every resource in SmartlyQ belongs to a workspace. Workspaces provide tenant isolation — data in one workspace is invisible to another.

Passing workspace_id

Most endpoints accept an optional workspace_id parameter. When provided, the API:
  1. Verifies your API key’s user is a member of that workspace
  2. Scopes all returned data to that workspace
  3. Returns 403 Forbidden if you don’t have access
curl -X GET "https://api.smartlyq.com/v1/social/accounts?workspace_id=42" \
  -H "Authorization: Bearer sqk_live_xxxxxxxxxxxx"
If you omit workspace_id, some endpoints may return data across all your workspaces or return empty results. Always pass workspace_id for consistent, scoped results.

Finding your workspace ID

Use the /v1/me endpoint to list your available workspaces:
curl -X GET https://api.smartlyq.com/v1/me \
  -H "Authorization: Bearer sqk_live_xxxxxxxxxxxx"
The response includes a workspaces array with each workspace’s id and name.

Workspace isolation guarantees

  • You can only access workspaces where your user is a member
  • All create, read, update, and delete operations are scoped by workspace_id
  • Passing another user’s workspace_id returns 403 Forbidden
  • Resources created without a workspace_id default to your primary workspace

Endpoints that require workspace_id

Endpointworkspace_idNotes
POST /v1/chatbotsRequiredChatbot is created in the specified workspace
GET /v1/social/accountsRecommendedReturns only accounts for that workspace
POST /v1/social/postsRecommendedPost is associated with the workspace
GET /v1/urlsRecommendedReturns only URLs for that workspace
GET /v1/articlesRecommendedReturns only articles for that workspace
GET /v1/imagesRecommendedReturns only images for that workspace
GET /v1/mediaRecommendedReturns only media for that workspace

Error response

If you pass a workspace_id you don’t have access to:
{
  "success": false,
  "error": {
    "code": "FORBIDDEN",
    "message": "You do not have access to this workspace."
  }
}