Work
Non défini
20 minute de lecture
Oui Post API is a comprehensive social media publishing platform that enables multi-platform content publishing, scheduling, and analytics across 9 major social networks.
Oui Post API is a comprehensive social media publishing platform that enables multi-platform content publishing, scheduling, and analytics across 9 major social networks.
Post API Overview
| Backend | PHP 8.2+ with strict typing |
| Database | MySQL/MariaDB |
| Authentication | API Key (API), Firebase JWT (Admin) |
| Rate Limiting | Tier-based (Starter, Professional, Enterprise) |
| Media Storage | Signed URLs with expiration |
https://oui-post.example.com
Authentication
Note: The
X-Workspace-ID header is required for most operations. Workspace listing endpoints may work without it.
X-API-Key: your_api_key_here
X-Workspace-ID: workspace_uuid
Supported Platforms
GET /api/platforms
Response
{
"success": true,
"data": {
"platforms": [
{
"id": "facebook",
"name": "Facebook",
"supports_images": true,
"supports_videos": true,
"supports_carousel": true,
"supports_stories": true,
"max_characters": 63206,
"max_images": 10,
"max_video_duration": 240,
"oauth_supported": true
},
{
"id": "instagram",
"name": "Instagram",
"supports_images": true,
"supports_videos": true,
"supports_carousel": true,
"supports_stories": true,
"max_characters": 2200,
"max_images": 10,
"max_video_duration": 60,
"oauth_supported": true
},
{
"id": "twitter",
"name": "Twitter/X",
"supports_images": true,
"supports_videos": true,
"supports_carousel": false,
"supports_stories": false,
"max_characters": 280,
"max_images": 4,
"max_video_duration": 140,
"oauth_supported": true
}
]
}
}
Error Handling
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error description",
"details": {}
}
}
Workspaces
GET /api/workspaces
Parameters
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) Optional |
| limit | integer | Items per page (default: 20, max: 100) Optional |
Response
{
"success": true,
"data": {
"workspaces": [
{
"id": "ws_550e8400-e29b-41d4-a716-446655440000",
"name": "Marketing Team",
"description": "Marketing content and campaigns",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:25:00Z",
"accounts_count": 5,
"posts_count": 128,
"members_count": 3
}
],
"pagination": {
"current_page": 1,
"total_pages": 1,
"total_items": 1,
"per_page": 20
}
}
}
POST /api/workspaces
Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | Workspace name (max 100 chars) Required |
| description | string | Workspace description Optional |
| settings | object | Workspace settings Optional |
Response
{
"success": true,
"data": {
"workspace": {
"id": "ws_550e8400-e29b-41d4-a716-446655440001",
"name": "Marketing Team",
"description": "Marketing content and campaigns",
"settings": {
"timezone": "Europe/Paris",
"default_hashtags": ["#marketing", "#brand"]
},
"created_at": "2024-01-22T10:30:00Z"
}
}
}
GET /api/workspaces/{id}
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | Workspace UUID Required |
Response
{
"success": true,
"data": {
"workspace": {
"id": "ws_550e8400-e29b-41d4-a716-446655440000",
"name": "Marketing Team",
"description": "Marketing content and campaigns",
"settings": {
"timezone": "Europe/Paris",
"default_hashtags": ["#marketing", "#brand"]
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:25:00Z",
"accounts": [
{
"id": "acc_123",
"platform": "facebook",
"name": "Company Page",
"connected_at": "2024-01-15T11:00:00Z"
}
],
"stats": {
"total_posts": 128,
"scheduled_posts": 12,
"published_posts": 116
}
}
}
}
PUT /api/workspaces/{id}
Request Body
{
"name": "Marketing Team - 2024",
"description": "Updated description",
"settings": {
"timezone": "Europe/London"
}
}
Response
{
"success": true,
"data": {
"workspace": {
"id": "ws_550e8400-e29b-41d4-a716-446655440000",
"name": "Marketing Team - 2024",
"updated_at": "2024-01-22T15:00:00Z"
}
}
}
DELETE /api/workspaces/{id}
Response
{
"success": true,
"data": {
"message": "Workspace deleted successfully"
}
}
Warning: Deleting a workspace will permanently remove all associated posts, schedules, and analytics data. This action cannot be undone.
Posts
GET /api/posts
Parameters
| Parameter | Type | Description |
|---|---|---|
| status | string | Filter by status: draft, scheduled, published, failed Optional |
| platform | string | Filter by platform Optional |
| from | string | Start date (ISO 8601) Optional |
| to | string | End date (ISO 8601) Optional |
| page | integer | Page number Optional |
| limit | integer | Items per page (max: 100) Optional |
Response
{
"success": true,
"data": {
"posts": [
{
"id": "post_abc123",
"content": "Check out our latest product launch! #newproduct",
"status": "published",
"platforms": ["facebook", "twitter", "linkedin"],
"media": [
{
"id": "media_xyz",
"type": "image",
"url": "https://storage.example.com/images/product.jpg"
}
],
"scheduled_at": null,
"published_at": "2024-01-20T15:00:00Z",
"created_at": "2024-01-20T14:30:00Z",
"analytics": {
"impressions": 5420,
"engagement": 342,
"clicks": 89
}
}
],
"pagination": {
"current_page": 1,
"total_pages": 5,
"total_items": 98,
"per_page": 20
}
}
}
POST /api/posts
Parameters
| Parameter | Type | Description |
|---|---|---|
| content | string | Post content/text Required |
| platforms | array | Target platforms (or account IDs) Required |
| title | string | Post title (for platforms that support it) Optional |
| link | string | URL to include in post Optional |
| hashtags | array | Hashtags to append Optional |
| platform_content | object | Platform-specific content overrides Optional |
Response
{
"success": true,
"data": {
"post": {
"id": "post_def456",
"content": "Excited to announce our new product line! Check it out at our website.",
"status": "draft",
"platforms": ["facebook", "twitter", "linkedin"],
"link": "https://example.com/products",
"hashtags": ["#newproduct", "#launch"],
"created_at": "2024-01-22T10:00:00Z"
}
}
}
GET /api/posts/{id}
Response
{
"success": true,
"data": {
"post": {
"id": "post_abc123",
"content": "Check out our latest product launch!",
"status": "published",
"platforms": ["facebook", "twitter"],
"media": [
{
"id": "media_xyz",
"type": "image",
"url": "https://storage.example.com/images/product.jpg",
"thumbnail_url": "https://storage.example.com/thumbs/product.jpg"
}
],
"published_at": "2024-01-20T15:00:00Z",
"platform_posts": [
{
"platform": "facebook",
"post_id": "fb_12345",
"url": "https://facebook.com/post/12345",
"status": "published"
},
{
"platform": "twitter",
"post_id": "tw_67890",
"url": "https://twitter.com/user/status/67890",
"status": "published"
}
],
"analytics": {
"total_impressions": 8500,
"total_engagement": 523,
"total_clicks": 156,
"by_platform": {
"facebook": {
"impressions": 5000,
"engagement": 300,
"clicks": 90
},
"twitter": {
"impressions": 3500,
"engagement": 223,
"clicks": 66
}
}
}
}
}
}
PUT /api/posts/{id}
Request Body
{
"content": "Updated content for the post",
"platforms": ["facebook", "instagram"],
"hashtags": ["#updated", "#content"]
}
Response
{
"success": true,
"data": {
"post": {
"id": "post_abc123",
"content": "Updated content for the post",
"status": "draft",
"updated_at": "2024-01-22T11:00:00Z"
}
}
}
DELETE /api/posts/{id}
Response
{
"success": true,
"data": {
"message": "Post deleted successfully"
}
}
POST /api/posts/{id}/schedule
Parameters
| Parameter | Type | Description |
|---|---|---|
| scheduled_at | string | ISO 8601 datetime for publishing Required |
| timezone | string | Timezone for the schedule (default: workspace timezone) Optional |
Response
{
"success": true,
"data": {
"post": {
"id": "post_abc123",
"status": "scheduled",
"scheduled_at": "2024-01-25T09:00:00Z",
"scheduled_timezone": "Europe/Paris"
}
}
}
POST /api/posts/{id}/publish
Response
{
"success": true,
"data": {
"post": {
"id": "post_abc123",
"status": "published",
"published_at": "2024-01-22T12:30:00Z",
"platform_results": [
{
"platform": "facebook",
"status": "success",
"post_id": "fb_12345",
"url": "https://facebook.com/post/12345"
},
{
"platform": "twitter",
"status": "success",
"post_id": "tw_67890",
"url": "https://twitter.com/user/status/67890"
}
]
}
}
}
GET /api/posts/{id}/analytics
Response
{
"success": true,
"data": {
"post_id": "post_abc123",
"analytics": {
"summary": {
"total_impressions": 15420,
"total_reach": 12850,
"total_engagement": 892,
"total_clicks": 234,
"engagement_rate": 5.78
},
"by_platform": {
"facebook": {
"impressions": 8500,
"reach": 7200,
"engagement": 520,
"reactions": 380,
"comments": 85,
"shares": 55,
"clicks": 145
},
"twitter": {
"impressions": 6920,
"reach": 5650,
"engagement": 372,
"likes": 280,
"retweets": 62,
"replies": 30,
"clicks": 89
}
},
"timeline": [
{
"timestamp": "2024-01-20T15:00:00Z",
"impressions": 500,
"engagement": 45
}
]
}
}
}
Note: Only draft and scheduled posts can be updated. Published posts cannot be modified.
Warning: Deleting a published post will only remove it from the system. The post will remain on the social platforms.
Media
POST /api/posts/{id}/media
Use multipart/form-data content type for file uploads.
Parameters
| Parameter | Type | Description |
|---|---|---|
| file | file | The media file to upload Required |
| type | string | Media type: image, video, document Optional |
| alt_text | string | Alt text for accessibility Optional |
Response
{
"success": true,
"data": {
"media": {
"id": "media_xyz789",
"type": "image",
"filename": "image.jpg",
"size": 245678,
"mime_type": "image/jpeg",
"dimensions": {
"width": 1200,
"height": 800
},
"url": "https://storage.example.com/media/signed/image.jpg?token=xyz",
"thumbnail_url": "https://storage.example.com/thumbs/signed/image.jpg?token=xyz",
"alt_text": "Product showcase image",
"created_at": "2024-01-22T10:30:00Z"
}
}
}
DELETE /api/media/{id}
Response
{
"success": true,
"data": {
"message": "Media deleted successfully"
}
}
Note: Media cannot be deleted if it's attached to a published post.
Schedules
GET /api/schedules
Response
{
"success": true,
"data": {
"schedules": [
{
"id": "sched_abc123",
"name": "Morning Posts",
"description": "Daily morning content",
"timezone": "Europe/Paris",
"is_active": true,
"slots": [
{
"day": "monday",
"time": "09:00",
"platforms": ["facebook", "twitter"]
},
{
"day": "wednesday",
"time": "09:00",
"platforms": ["facebook", "linkedin"]
}
],
"created_at": "2024-01-15T10:00:00Z"
}
]
}
}
POST /api/schedules
Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | Schedule name Required |
| description | string | Schedule description Optional |
| timezone | string | Timezone for slots Optional |
| slots | array | Publishing time slots Required |
Response
{
"success": true,
"data": {
"schedule": {
"id": "sched_def456",
"name": "Weekly Content Schedule",
"is_active": true,
"created_at": "2024-01-22T10:00:00Z"
}
}
}
GET /api/schedules/{id}
Response
{
"success": true,
"data": {
"schedule": {
"id": "sched_abc123",
"name": "Morning Posts",
"description": "Daily morning content",
"timezone": "Europe/Paris",
"is_active": true,
"slots": [
{
"id": "slot_1",
"day": "monday",
"time": "09:00",
"platforms": ["facebook", "twitter"]
}
],
"upcoming_posts": [
{
"slot_time": "2024-01-29T09:00:00+01:00",
"post_id": "post_xyz",
"platforms": ["facebook", "twitter"]
}
],
"stats": {
"total_published": 45,
"this_week": 3,
"next_slot": "2024-01-29T09:00:00+01:00"
}
}
}
}
PUT /api/schedules/{id}
Request Body
{
"name": "Updated Schedule Name",
"is_active": false,
"slots": [
{
"day": "tuesday",
"time": "10:00",
"platforms": ["facebook"]
}
]
}
DELETE /api/schedules/{id}
Response
{
"success": true,
"data": {
"message": "Schedule deleted successfully"
}
}
Social Accounts
GET /api/accounts
Parameters
| Parameter | Type | Description |
|---|---|---|
| platform | string | Filter by platform Optional |
| status | string | Filter by status: active, expired, error Optional |
Response
{
"success": true,
"data": {
"accounts": [
{
"id": "acc_fb123",
"platform": "facebook",
"type": "page",
"name": "Company Page",
"username": "companypage",
"profile_image": "https://graph.facebook.com/...",
"status": "active",
"connected_at": "2024-01-10T15:00:00Z",
"expires_at": "2024-04-10T15:00:00Z",
"permissions": ["publish_pages", "read_insights"],
"stats": {
"followers": 15420,
"posts_this_month": 12
}
},
{
"id": "acc_tw456",
"platform": "twitter",
"type": "profile",
"name": "Company",
"username": "@company",
"profile_image": "https://pbs.twimg.com/...",
"status": "active",
"connected_at": "2024-01-12T10:00:00Z"
}
]
}
}
POST /api/accounts
Parameters
| Parameter | Type | Description |
|---|---|---|
| platform | string | Platform to connect Required |
| callback_url | string | OAuth callback URL Required |
| scopes | array | Requested permissions Optional |
Response
{
"success": true,
"data": {
"auth_url": "https://www.facebook.com/v18.0/dialog/oauth?client_id=...",
"state": "oauth_state_token",
"expires_in": 600
}
}
GET /api/accounts/{id}
Response
{
"success": true,
"data": {
"account": {
"id": "acc_fb123",
"platform": "facebook",
"type": "page",
"name": "Company Page",
"username": "companypage",
"profile_image": "https://graph.facebook.com/...",
"status": "active",
"connected_at": "2024-01-10T15:00:00Z",
"expires_at": "2024-04-10T15:00:00Z",
"permissions": ["publish_pages", "read_insights"],
"metadata": {
"page_id": "123456789",
"category": "Company"
},
"stats": {
"followers": 15420,
"following": 250,
"posts_total": 458,
"posts_this_month": 12
},
"health": {
"token_valid": true,
"last_sync": "2024-01-22T10:00:00Z",
"errors": []
}
}
}
}
PUT /api/accounts/{id}
Request Body
{
"name": "Updated Account Name",
"is_default": true,
"settings": {
"auto_hashtags": true,
"default_hashtags": ["#company", "#brand"]
}
}
DELETE /api/accounts/{id}
Response
{
"success": true,
"data": {
"message": "Account disconnected successfully",
"cancelled_posts": 3
}
}
OAuth Flow:
- Call this endpoint to get the authorization URL
- Redirect user to the
auth_url - User authorizes access on the platform
- Platform redirects to your
callback_urlwith a code - Exchange the code using the callback endpoint
Warning: Disconnecting an account will:
- Revoke access tokens
- Cancel scheduled posts for this account
- Remove account from all schedules
Analytics
GET /api/analytics
Parameters
| Parameter | Type | Description |
|---|---|---|
| from | string | Start date (ISO 8601) Optional |
| to | string | End date (ISO 8601) Optional |
| platform | string | Filter by platform Optional |
| granularity | string | Data granularity: hour, day, week, month Optional |
Response
{
"success": true,
"data": {
"period": {
"from": "2024-01-01T00:00:00Z",
"to": "2024-01-22T23:59:59Z"
},
"summary": {
"total_posts": 45,
"total_impressions": 125420,
"total_reach": 98500,
"total_engagement": 8920,
"total_clicks": 2340,
"avg_engagement_rate": 7.12,
"best_performing_platform": "instagram"
},
"by_platform": {
"facebook": {
"posts": 15,
"impressions": 45000,
"reach": 38000,
"engagement": 2800,
"clicks": 890,
"engagement_rate": 6.22
},
"instagram": {
"posts": 18,
"impressions": 52000,
"reach": 42000,
"engagement": 4200,
"clicks": 980,
"engagement_rate": 8.08
},
"twitter": {
"posts": 12,
"impressions": 28420,
"reach": 18500,
"engagement": 1920,
"clicks": 470,
"engagement_rate": 6.76
}
},
"timeline": [
{
"date": "2024-01-01",
"impressions": 5200,
"engagement": 380,
"posts": 2
},
{
"date": "2024-01-02",
"impressions": 6100,
"engagement": 450,
"posts": 3
}
],
"top_posts": [
{
"id": "post_abc123",
"content": "Our biggest announcement yet!",
"platform": "instagram",
"impressions": 12500,
"engagement": 1250,
"published_at": "2024-01-15T10:00:00Z"
}
],
"audience": {
"total_followers": 45890,
"follower_growth": 1250,
"growth_rate": 2.8,
"demographics": {
"age_groups": {
"18-24": 15,
"25-34": 35,
"35-44": 28,
"45-54": 15,
"55+": 7
},
"top_locations": [
{"country": "France", "percentage": 45},
{"country": "Belgium", "percentage": 12},
{"country": "Canada", "percentage": 10}
]
}
}
}
}
Admin Authentication
POST /admin/login
Request Body
{
"email": "Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. ",
"password": "your_password"
}
Response
{
"success": true,
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": "2024-01-23T10:00:00Z",
"user": {
"id": "user_123",
"email": "Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. ",
"name": "Admin User",
"role": "admin"
}
}
}
POST /admin/logout
Response
{
"success": true,
"data": {
"message": "Logged out successfully"
}
}
GET /admin/profile
Response
{
"success": true,
"data": {
"user": {
"id": "user_123",
"email": "Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. ",
"name": "Admin User",
"role": "admin",
"created_at": "2024-01-01T00:00:00Z",
"last_login": "2024-01-22T09:00:00Z",
"permissions": ["users.manage", "api_keys.manage", "workspaces.manage"]
}
}
}
Using the Token: Include the JWT in the Authorization header for all admin endpoints:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
User Management
GET /admin/users
Response
{
"success": true,
"data": {
"users": [
{
"id": "user_123",
"email": "Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. ",
"name": "Admin User",
"role": "admin",
"is_active": true,
"created_at": "2024-01-01T00:00:00Z",
"last_login": "2024-01-22T09:00:00Z"
}
]
}
}
POST /admin/users
Request Body
{
"email": "Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. ",
"name": "New User",
"password": "secure_password",
"role": "editor",
"permissions": ["posts.manage", "analytics.view"]
}
PUT /admin/users/{id}
Request Body
{
"name": "Updated Name",
"role": "admin",
"is_active": true
}
DELETE /admin/users/{id}
Response
{
"success": true,
"data": {
"message": "User deleted successfully"
}
}
API Key Management
GET /admin/keys
Response
{
"success": true,
"data": {
"keys": [
{
"id": "key_abc123",
"name": "Production Key",
"prefix": "pk_live_abc",
"tier": "professional",
"is_active": true,
"created_at": "2024-01-01T00:00:00Z",
"last_used_at": "2024-01-22T09:30:00Z",
"usage": {
"requests_today": 245,
"requests_this_month": 12450
}
}
]
}
}
POST /admin/keys
Request Body
{
"name": "New Integration Key",
"tier": "professional",
"workspaces": ["ws_123", "ws_456"],
"permissions": ["posts.read", "posts.write", "analytics.read"]
}
Response
{
"success": true,
"data": {
"key": {
"id": "key_def456",
"name": "New Integration Key",
"api_key": "pk_live_def456ghi789jkl012mno345",
"tier": "professional",
"created_at": "2024-01-22T10:00:00Z"
}
}
}
POST /admin/keys/{id}/rotate
Response
{
"success": true,
"data": {
"key": {
"id": "key_abc123",
"new_api_key": "pk_live_new123key456here789",
"old_key_expires_at": "2024-01-23T10:00:00Z"
}
}
}
Important: The full API key is only shown once at creation. Store it securely as it cannot be retrieved later.
Grace Period: The old key remains valid for 24 hours after rotation to allow for seamless key updates.
Statistics & Dashboard
GET /admin/dashboard
Response
{
"success": true,
"data": {
"overview": {
"total_workspaces": 12,
"total_posts": 1458,
"total_accounts": 45,
"total_users": 8
},
"activity": {
"posts_today": 15,
"posts_this_week": 78,
"scheduled_posts": 34,
"failed_posts": 2
},
"api_usage": {
"requests_today": 2450,
"requests_this_month": 45890,
"active_keys": 5
},
"platform_distribution": {
"facebook": 320,
"instagram": 280,
"twitter": 245,
"linkedin": 180,
"other": 433
}
}
}
GET /admin/stats
Response
{
"success": true,
"data": {
"posts": {
"total": 1458,
"by_status": {
"draft": 45,
"scheduled": 34,
"published": 1350,
"failed": 29
},
"by_platform": {
"facebook": 320,
"instagram": 280,
"twitter": 245
}
},
"accounts": {
"total": 45,
"by_status": {
"active": 42,
"expired": 2,
"error": 1
}
},
"usage": {
"storage_used_mb": 2450,
"storage_limit_mb": 10000,
"api_calls_this_month": 45890
}
}
}
GET /admin/analytics
Parameters
| Parameter | Type | Description |
|---|---|---|
| period | string | Time period: 7d, 30d, 90d, 1y Optional |
Webhooks
GET /admin/webhooks
Response
{
"success": true,
"data": {
"webhooks": [
{
"id": "wh_abc123",
"url": "https://yourapp.com/webhooks/post",
"events": ["post.published", "post.failed"],
"is_active": true,
"created_at": "2024-01-10T10:00:00Z",
"last_triggered_at": "2024-01-22T09:30:00Z",
"stats": {
"total_deliveries": 145,
"successful_deliveries": 143,
"failed_deliveries": 2
}
}
]
}
}
POST /admin/webhooks
Parameters
| Event | Description |
|---|---|
| post.created | New post created |
| post.scheduled | Post scheduled for publishing |
| post.published | Post published successfully |
| post.failed | Post publishing failed |
| account.connected | Social account connected |
| account.disconnected | Social account disconnected |
| account.expired | Account token expired |
Request Body
{
"url": "https://yourapp.com/webhooks/post",
"events": ["post.published", "post.failed", "account.disconnected"],
"secret": "your_webhook_secret"
}
Audit Logs
GET /admin/audit
Parameters
| Parameter | Type | Description |
|---|---|---|
| user_id | string | Filter by user Optional |
| action | string | Filter by action type Optional |
| from | string | Start date (ISO 8601) Optional |
| to | string | End date (ISO 8601) Optional |
Response
{
"success": true,
"data": {
"logs": [
{
"id": "log_abc123",
"user_id": "user_123",
"user_email": "Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. ",
"action": "api_key.created",
"resource_type": "api_key",
"resource_id": "key_def456",
"details": {
"key_name": "New Integration Key",
"tier": "professional"
},
"ip_address": "192.168.1.100",
"user_agent": "Mozilla/5.0...",
"created_at": "2024-01-22T10:00:00Z"
}
],
"pagination": {
"current_page": 1,
"total_pages": 15,
"total_items": 298
}
}
}
Platform Health
GET /admin/health
Response
{
"success": true,
"data": {
"status": "healthy",
"timestamp": "2024-01-22T10:00:00Z",
"components": {
"database": {
"status": "healthy",
"latency_ms": 5
},
"cache": {
"status": "healthy",
"latency_ms": 2
},
"storage": {
"status": "healthy",
"used_percent": 24.5
},
"queue": {
"status": "healthy",
"pending_jobs": 12
}
}
}
}
GET /admin/platform-health
Response
{
"success": true,
"data": {
"platforms": {
"facebook": {
"status": "operational",
"api_status": "healthy",
"last_successful_post": "2024-01-22T09:45:00Z",
"error_rate_24h": 0.5,
"avg_response_time_ms": 450
},
"instagram": {
"status": "operational",
"api_status": "healthy",
"last_successful_post": "2024-01-22T09:30:00Z",
"error_rate_24h": 0.8,
"avg_response_time_ms": 520
},
"twitter": {
"status": "degraded",
"api_status": "partial_outage",
"last_successful_post": "2024-01-22T08:00:00Z",
"error_rate_24h": 5.2,
"avg_response_time_ms": 1200,
"issues": ["Rate limiting more aggressive than usual"]
}
},
"overall_status": "degraded",
"last_updated": "2024-01-22T10:00:00Z"
}
}
GET /admin/system
Response
{
"success": true,
"data": {
"version": "1.5.2",
"environment": "production",
"php_version": "8.2.15",
"database_version": "MySQL 8.0.35",
"uptime_seconds": 864000,
"memory": {
"used_mb": 256,
"limit_mb": 512
},
"features": {
"multi_platform": true,
"scheduling": true,
"analytics": true,
"webhooks": true,
"media_upload": true
}
}
}
Rate Limiting
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705920000