Developer
API Reference

API Reference

Complete reference for Creator Studio API v1. All endpoints, parameters, and response formats.

Base URL

https://api.studio.ei.au/v1

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Content Endpoints

Generate Content

Create AI-generated content for social media platforms.

POST /content/generate

Request 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 /content

Query Parameters

ParameterTypeDescriptionDefault
pageintegerPage number1
limitintegerItems per page (max 100)20
statusstringFilter by statusall
platformstringFilter by platformall
profileIdstringFilter by profileall
startDateISO 8601Start date range-
endDateISO 8601End date range-
sortBystringSort fieldcreatedAt
sortOrderstringasc or descdesc

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}/schedule

Request 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}/publish

Request Body

{
  "profiles": ["prf_123", "prf_456"],
  "options": {
    "crossPost": true,
    "notifyFollowers": true
  }
}

Profile Endpoints

List Profiles

Get all connected social media profiles.

GET /profiles

Response

{
  "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/connect

Request 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}/settings

Request 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 /brands

Create Brand

Create a new brand.

POST /brands

Request 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}/assets

Request

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/content

Query Parameters

ParameterTypeDescription
contentIdstringSpecific content item
startDateISO 8601Start of date range
endDateISO 8601End of date range
platformstringFilter by platform
metricstringSpecific metric
groupBystringday, 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 /webhooks

Request Body

{
  "url": "https://yourapp.com/webhooks",
  "events": ["content.published", "content.failed"],
  "secret": "webhook_secret_key",
  "active": true
}

List Webhooks

Get all registered webhooks.

GET /webhooks

Update 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}/test

Error Responses

All error responses follow this format:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable message",
    "details": {
      // Additional error context
    }
  },
  "requestId": "req_abc123"
}

Error Codes

CodeHTTP StatusDescription
AUTHENTICATION_ERROR401Missing or invalid API key
AUTHORIZATION_ERROR403Insufficient permissions
VALIDATION_ERROR400Invalid request parameters
NOT_FOUND404Resource not found
CONFLICT409Resource conflict
RATE_LIMIT_ERROR429Rate limit exceeded
PLATFORM_ERROR502Social platform API error
SERVER_ERROR500Internal 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: 60

Pagination

Paginated endpoints support these parameters:

ParameterTypeDefaultMaxDescription
pageinteger1-Page number
limitinteger20100Items per page
cursorstring--Cursor pagination

Filtering

Most list endpoints support filtering:

GET /content?status=scheduled&platform=instagram&startDate=2024-01-01

Sorting

Sort results using sortBy and sortOrder:

GET /content?sortBy=createdAt&sortOrder=desc

Field Selection

Select specific fields to reduce payload size:

GET /content?fields=id,status,createdAt

Batch 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/v2

Support

For API support, contact api@studio.ei.au