API reference
API Reference
Complete reference for the ReelMirror API
BetaUpdated
Base URL#
https://reelmirror.com/apiAll endpoints are prefixed with /v1.
Authentication#
Every request must include an Authorization header with a Bearer token:
Authorization: Bearer rm_your_api_keyTwo token types are supported:
| Type | Format | Use case |
|---|---|---|
| API key | rm_xxxxx | Programmatic access |
| JWT | Supabase session token | Browser/frontend |
API keys are created via POST /v1/api-keys. JWT users automatically have all scopes.
Scopes#
API keys can be restricted to specific scopes:
| Scope | Description |
|---|---|
personas:read | Read personas |
personas:write | Create, update, delete personas |
sources:read | List sources |
sources:write | Add, remove sources |
content:read | Read content, poll status |
content:write | Generate, clone, toggle public, approve/reject posts |
sync:write | Trigger sync |
billing:read | View balance and transactions |
billing:write | Top up balance and configure auto-reload |
publishing:read | List connected accounts, view outgoing posts and slots |
publishing:write | Connect accounts, create/update/publish outgoing posts |
profile:read | Read your profile |
profile:write | Update your profile |
uploads:write | Upload files |
feedback:read | Read your feedback tickets and responses |
feedback:write | Submit feedback and post replies |
Rate Limiting#
| Auth type | Limit |
|---|---|
| API key | 60 requests/minute |
| JWT | 120 requests/minute |
Rate limit info is included in response headers:
X-RateLimit-Limit- Maximum requests per windowX-RateLimit-Remaining- Requests remainingX-RateLimit-Reset- Unix timestamp when window resets
Error Format#
All errors follow a consistent format:
{
"error": {
"code": "NOT_FOUND",
"message": "Persona not found",
"details": {}
}
}| Code | Status | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid request body |
UNAUTHORIZED | 401 | Missing or invalid auth |
INSUFFICIENT_BALANCE | 402 | Not enough credits |
FORBIDDEN | 403 | Missing scope or permission |
NOT_FOUND | 404 | Resource not found |
CONFLICT | 409 | Duplicate resource |
RATE_LIMITED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Server error |
UPSTREAM_ERROR | 502 | External service error |
SERVICE_UNAVAILABLE | 503 | Service temporarily down |
Pagination#
List endpoints support pagination via query parameters:
| Parameter | Default | Max | Description |
|---|---|---|---|
limit | 20 | 100 | Results per page |
offset | 0 | - | Results to skip |
Response format:
{
"data": [...],
"count": 42
}Endpoint groups
API Keys
Manage API keys
Personas
Create and manage personas
Sources
Track social accounts
Generation
Generate AI content
Content
Browse synced and generated content
Review
Approve, reject, or compose generated posts
Publishing
Manage outgoing posts and connected publishing accounts
- GET/v1/personas/{persona_id}/publishing-targets
- POST/v1/personas/{persona_id}/publishing-targets
- DELETE/v1/personas/{persona_id}/publishing-targets/{target_id}
- GET/v1/publishing/accounts/connect
- GET/v1/publishing/accounts/slots
- POST/v1/publishing/accounts/slots
- GET/v1/publishing/accounts
- GET/v1/publishing/accounts/{id}
- DELETE/v1/publishing/accounts/{id}
- GET/v1/publishing/posts
- POST/v1/publishing/posts
- GET/v1/publishing/posts/{id}
- PATCH/v1/publishing/posts/{id}
- DELETE/v1/publishing/posts/{id}
- POST/v1/publishing/posts/{id}/publish
- POST/v1/publishing/posts/{id}/schedule
- POST/v1/publishing/posts/{id}/retry
- POST/v1/publishing/posts/{id}/cancel
- POST/v1/publishing/caption
Billing
Balance and transaction history
Feedback
Submit and track feedback tickets