Common Concepts

These concepts apply to all /v1 External API endpoints.


Base URL

Base URL: https://api.puq.ai

All endpoints are relative to this base URL.


Authentication

All endpoints require an API key passed in the Authorization header with the Token prefix.

curl https://api.puq.ai/v1/workflows \
  -H "Authorization: Token your-api-key-here"

Generate API keys via /keys endpoint (requires JWT authentication) or through the dashboard under Account Settings → API Tokens.

Error (401 Unauthorized):

{
  "error": "Unauthorized: Invalid or expired API key"
}

Pagination

All list endpoints accept page and limit query parameters.

ParameterDefaultRangeDescription
page1≥ 1Page number to retrieve
limit201–100Items per page

Paginated responses always include:

{
  "items": [...],
  "total": 150,
  "page": 2,
  "limit": 20
}

Common Error Responses

StatusCodeDescription
400VALIDATION_ERRORInvalid parameter value
401Invalid or expired API key
402SUBSCRIPTION_LIMITPlan limit reached
403Resource not found or access denied
404Resource not found
422Unprocessable entity
500INTERNAL_ERRORUnexpected server error