Getting Started
Make your first ContentHub API request in under 5 minutes. You will need a ContentHub workspace account with the CLIENT_ADMIN role.
Prerequisites
- A ContentHub workspace account
- CLIENT_ADMIN role in your workspace (or superadmin)
curlor an API client like Postman or Insomnia
Prefer a GUI client? Use our Postman collection.
Import the ready-to-use collection and environment — all 12 endpoints pre-wired with variables for your API key, base URL, and resource IDs.
- In Postman, click Import and import both files
- Select the ContentHub API environment from the top-right dropdown
- Set
api_keyto your key andbase_urlto your domain — then send any request
Generate an API key
- Open your workspace dashboard
- Navigate to Settings → API Keys
- Click Create API Key
- Give it a name (e.g., "ERP Sync") and select the scopes you need
- Click Create — your key is shown once. Copy it now.
.env file).Make your first request
Use the API key as a Bearer token in the Authorization header. Replace YOUR_KEY with your actual key.
curl https://your-domain.com/api/v1/projects \
-H "Authorization: Bearer uch_live_YOUR_KEY"You should receive a response like this:
{
"data": [
{
"id": "clxyz1234",
"name": "Main WordPress Blog",
"platform": "WORDPRESS",
"language": "en",
"active": true,
"createdAt": "2025-01-15T10:30:00.000Z"
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 20,
"pages": 1
}
}List your products (ERP sync example)
If your API key has the products:read scope, you can list your product catalog:
curl "https://your-domain.com/api/v1/products?limit=50&active=true" \
-H "Authorization: Bearer uch_live_YOUR_KEY"To sync a product from your ERP into ContentHub (requires products:write):
curl -X POST https://your-domain.com/api/v1/products \
-H "Authorization: Bearer uch_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Widget Pro 5000",
"description": "Industrial-grade widget with 5-year warranty.",
"productLink": "https://yourstore.com/products/widget-pro-5000",
"price": 299.99,
"discountPrice": 249.99
}'Handle errors
All errors return a consistent JSON shape. Always check the HTTP status code first, then read error.code for machine-readable details.
{
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "Scope 'products:write' is required for this operation"
}
}Common error codes: UNAUTHORIZED, INVALID_KEY, KEY_REVOKED, KEY_EXPIRED, INSUFFICIENT_SCOPE, NOT_FOUND, QUOTA_EXCEEDED, VALIDATION_ERROR.
Next steps
- Authentication — understanding scopes and key rotation
- API Reference — interactive endpoint explorer with all parameters
- Rate Limits — quotas, 429 responses, and retry strategies