API Reference
Complete reference for Creator Studio API v1. All endpoints, parameters, and response formats.
Base URL
https://api.studio.ei.au/v1Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYContent Endpoints
Generate Content
Create AI-generated content for social media platforms.
POST /content/generateRequest Body
{
"prompt": "string", // Required: Content generation prompt
"platforms": ["instagram", "tiktok"], // Required: Target platforms
"settings": {
"creativity": 5, // 1-10, default: 5
"tone": "professional", // professional, casual, friendly, etc.
"length": "medium", // short, medium, long
"includeHashtags": true,
"hashtagCount": 10,
"includeEmojis": true,
"brandId": "brnd_123", // Optional: Apply brand guidelines
"language": "en" // ISO 639-1 code
},
"media": {
"generate": true, // Generate AI images
"style": "photorealistic", // photorealistic, illustration, etc.
"count": 3 // Number of images to generate
}
}Response
{
"id": "cnt_abc123",
"status": "generated",
"createdAt": "2024-01-15T10:00:00Z",
"content": {
"instagram": {
"caption": "Generated caption text...",
"hashtags": ["#hashtag1", "#hashtag2"],
"firstComment": "Optional first comment",
"altText": "Image description"
},
"tiktok": {
"caption": "TikTok optimized caption...",
"hashtags": ["#trending", "#fyp"],
"sounds": ["sound_id_123"]
}
},
"media": [
{
"id": "med_123",
"type": "image",
"url": "https://cdn.studio.ei.au/...",
"thumbnailUrl": "https://cdn.studio.ei.au/...",
"dimensions": {
"width": 1080,
"height": 1080
}
}
]
}List Content
Retrieve content items with filtering and pagination.
GET /contentQuery Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
page | integer | Page number | 1 |
limit | integer | Items per page (max 100) | 20 |
status | string | Filter by status | all |
platform | string | Filter by platform | all |
profileId | string | Filter by profile | all |
startDate | ISO 8601 | Start date range | - |
endDate | ISO 8601 | End date range | - |
sortBy | string | Sort field | createdAt |
sortOrder | string | asc or desc | desc |
Response
{
"data": [
{
"id": "cnt_123",
"status": "scheduled",
"platforms": ["instagram"],
"createdAt": "2024-01-15T10:00:00Z",
"scheduledFor": "2024-01-16T14:00:00Z",
"content": {...}
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 145,
"pages": 8
}
}Get Content
Retrieve a specific content item.
GET /content/{contentId}Response
{
"id": "cnt_123",
"status": "published",
"platforms": ["instagram", "facebook"],
"createdAt": "2024-01-15T10:00:00Z",
"publishedAt": "2024-01-15T14:00:00Z",
"content": {
"instagram": {...},
"facebook": {...}
},
"media": [...],
"analytics": {
"views": 1250,
"likes": 89,
"comments": 12,
"shares": 5
}
}Update Content
Update existing content.
PUT /content/{contentId}Request Body
{
"content": {
"instagram": {
"caption": "Updated caption text..."
}
},
"status": "draft"
}Delete Content
Delete content item.
DELETE /content/{contentId}Schedule Content
Schedule content for publishing.
POST /content/{contentId}/scheduleRequest Body
{
"scheduledFor": "2024-01-20T14:00:00Z",
"profiles": ["prf_123", "prf_456"],
"options": {
"crossPost": true,
"firstComment": "Check link in bio",
"timezone": "America/New_York"
}
}Publish Content
Publish content immediately.
POST /content/{contentId}/publishRequest Body
{
"profiles": ["prf_123", "prf_456"],
"options": {
"crossPost": true,
"notifyFollowers": true
}
}Profile Endpoints
List Profiles
Get all connected social media profiles.
GET /profilesResponse
{
"data": [
{
"id": "prf_123",
"platform": "instagram",
"username": "@yourbrand",
"displayName": "Your Brand",
"connected": true,
"connectedAt": "2024-01-01T10:00:00Z",
"followerCount": 10500,
"profilePicture": "https://...",
"settings": {
"autoHashtags": ["#brand"],
"defaultVisibility": "public"
}
}
]
}Connect Profile
Initiate OAuth connection for a social platform.
POST /profiles/connectRequest Body
{
"platform": "instagram",
"redirectUri": "https://yourapp.com/callback"
}Response
{
"authUrl": "https://api.instagram.com/oauth/authorize?...",
"state": "state_token_123"
}Disconnect Profile
Disconnect a social media profile.
DELETE /profiles/{profileId}Update Profile Settings
Update profile configuration.
PUT /profiles/{profileId}/settingsRequest Body
{
"displayName": "Updated Name",
"settings": {
"autoHashtags": ["#newtag"],
"postingTimes": ["09:00", "14:00", "19:00"],
"timezone": "America/New_York"
}
}Brand Endpoints
List Brands
Get all brands.
GET /brandsCreate Brand
Create a new brand.
POST /brandsRequest Body
{
"name": "Brand Name",
"description": "Brand description",
"guidelines": {
"voice": "professional",
"tone": ["friendly", "informative"],
"colors": {
"primary": "#FF6B6B",
"secondary": "#4ECDC4"
},
"hashtags": ["#brand", "#official"]
},
"assets": {
"logo": "https://...",
"fonts": ["Helvetica", "Arial"]
}
}Update Brand
Update brand information.
PUT /brands/{brandId}Delete Brand
Delete a brand.
DELETE /brands/{brandId}Upload Brand Asset
Upload media assets for a brand.
POST /brands/{brandId}/assetsRequest
Multipart form data with file upload.
Response
{
"assetId": "ast_123",
"type": "image",
"url": "https://cdn.studio.ei.au/...",
"metadata": {
"filename": "logo.png",
"size": 45678,
"dimensions": {
"width": 500,
"height": 500
}
}
}Analytics Endpoints
Content Analytics
Get analytics for content performance.
GET /analytics/contentQuery Parameters
| Parameter | Type | Description |
|---|---|---|
contentId | string | Specific content item |
startDate | ISO 8601 | Start of date range |
endDate | ISO 8601 | End of date range |
platform | string | Filter by platform |
metric | string | Specific metric |
groupBy | string | day, week, month |
Response
{
"period": {
"start": "2024-01-01",
"end": "2024-01-31"
},
"metrics": {
"totalPosts": 45,
"totalReach": 125000,
"totalEngagement": 8900,
"avgEngagementRate": 3.4
},
"breakdown": [
{
"date": "2024-01-15",
"posts": 2,
"reach": 5600,
"engagement": 234
}
]
}Profile Analytics
Get analytics for profile performance.
GET /analytics/profiles/{profileId}Response
{
"profile": {
"id": "prf_123",
"platform": "instagram",
"username": "@yourbrand"
},
"metrics": {
"followers": 10500,
"followersGrowth": 2.3,
"avgEngagement": 4.5,
"postsPerWeek": 5.2
},
"topContent": [
{
"id": "cnt_789",
"engagement": 1250,
"type": "reel"
}
]
}Webhook Endpoints
Register Webhook
Register a new webhook endpoint.
POST /webhooksRequest Body
{
"url": "https://yourapp.com/webhooks",
"events": ["content.published", "content.failed"],
"secret": "webhook_secret_key",
"active": true
}List Webhooks
Get all registered webhooks.
GET /webhooksUpdate Webhook
Update webhook configuration.
PUT /webhooks/{webhookId}Delete Webhook
Remove a webhook.
DELETE /webhooks/{webhookId}Test Webhook
Send a test event to webhook.
POST /webhooks/{webhookId}/testError Responses
All error responses follow this format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human readable message",
"details": {
// Additional error context
}
},
"requestId": "req_abc123"
}Error Codes
| Code | HTTP Status | Description |
|---|---|---|
AUTHENTICATION_ERROR | 401 | Missing or invalid API key |
AUTHORIZATION_ERROR | 403 | Insufficient permissions |
VALIDATION_ERROR | 400 | Invalid request parameters |
NOT_FOUND | 404 | Resource not found |
CONFLICT | 409 | Resource conflict |
RATE_LIMIT_ERROR | 429 | Rate limit exceeded |
PLATFORM_ERROR | 502 | Social platform API error |
SERVER_ERROR | 500 | Internal server error |
Rate Limiting
Rate limit information is included in response headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1641024000
X-RateLimit-Retry-After: 60Pagination
Paginated endpoints support these parameters:
| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
page | integer | 1 | - | Page number |
limit | integer | 20 | 100 | Items per page |
cursor | string | - | - | Cursor pagination |
Filtering
Most list endpoints support filtering:
GET /content?status=scheduled&platform=instagram&startDate=2024-01-01Sorting
Sort results using sortBy and sortOrder:
GET /content?sortBy=createdAt&sortOrder=descField Selection
Select specific fields to reduce payload size:
GET /content?fields=id,status,createdAtBatch Operations
Some endpoints support batch operations:
POST /content/batch
{
"operations": [
{
"method": "update",
"id": "cnt_123",
"data": {...}
},
{
"method": "delete",
"id": "cnt_456"
}
]
}Versioning
API version is included in the URL path. Current version: v1
Future versions will be accessible at:
https://api.studio.ei.au/v2Support
For API support, contact api@studio.ei.au