Getting Started

Welcome to the API documentation! This guide will help you integrate your applications with our platform.

Prerequisites

Before you begin, you'll need:

  • An active account on our platform
  • A subscription plan that includes API access
  • Basic knowledge of REST APIs and HTTP requests

Quick Start

Get up and running in 3 simple steps:

1. Create an API Key

Navigate to your Dashboard → Integrations → API Keys and create a new API key.

  1. Click "Create API Key"
  2. Give your key a descriptive name (e.g., "Production Website")
  3. Select the scopes (permissions) you need
  4. Click "Generate Key"

Save Your Key!

Your API key will only be shown once. Make sure to copy and save it securely. If you lose it, you'll need to generate a new key.

2. Make Your First Request

Test your API key with a simple request:

cURLbash
curl -X GET "https://yourdomain.com/api/v1/assets" \
  -H "Authorization: Bearer YOUR_API_KEY"
JavaScriptjavascript
const response = await fetch('https://yourdomain.com/api/v1/assets', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});
const assets = await response.json();
console.log(assets);
Pythonpython
import requests

response = requests.get(
    'https://yourdomain.com/api/v1/assets',
    headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
assets = response.json()
print(assets)

3. Handle the Response

All successful responses return JSON with this structure:

{
  "success": true,
  "data": [...],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 50,
    "total_pages": 3
  }
}

Authentication

All API requests must include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Keep Your Keys Secret

Never expose your API keys in client-side code, public repositories, or insecure locations. Always use environment variables or secure key management systems.

Base URL

All API endpoints use this base URL:

https://yourdomain.com/api/v1

Rate Limits

API calls are rate-limited based on your subscription plan. Rate limit information is included in every response header:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1701388800

When you exceed your rate limit, you'll receive a 429 Too Many Requests response:

{
  "error": "Rate limit exceeded",
  "retry_after": 3600
}

Check Your Usage

Monitor your API usage in real-time from the Usage & Analytics tab.

API Scopes

API keys use granular permissions (scopes) to control access:

ScopeDescription
read:assetsView published digital assets
write:assetsCreate and manage digital assets
read:librariesView published libraries
write:librariesCreate and manage libraries
write:leadsCreate leads in CRM

Error Handling

The API uses standard HTTP status codes:

Status CodeMeaning
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Error responses include details to help you debug:

{
  "error": "Validation failed",
  "message": "Title is required",
  "field": "title"
}

Best Practices

  1. Use Environment Variables: Store API keys in environment variables, never in code
  2. Implement Retry Logic: Handle rate limits and temporary errors gracefully
  3. Cache Responses: Reduce API calls by caching data when appropriate
  4. Use Webhooks: Get real-time updates instead of polling (coming soon)
  5. Monitor Usage: Keep track of your API usage to avoid rate limits

Next Steps