API Reference
Introduction
The EZPost API allows you to programmatically manage your social media content, schedule posts, and analyze performance. This reference provides detailed information about available endpoints, authentication, and usage examples.
Authentication
All API requests must include your API key in the Authorization header:
Authorization: Bearer your_api_key_here
You can find your API key in your account settings under the API Access section.
Base URL
https://api.ezpost.com/v1
Endpoints
Content Generation
/content/generate
Generate AI-powered content for social media posts.
Request Body
{
"prompt": "string",
"platforms": ["twitter", "linkedin", "facebook", "instagram"],
"tone": "professional" | "casual" | "humorous",
"keywords": ["string"]
}
Response
{
"content": [
{
"platform": "string",
"text": "string",
"hashtags": ["string"],
"suggestedTime": "string"
}
]
}
/content
List all generated content.
Query Parameters
- page (optional): Page number for pagination
- limit (optional): Number of items per page
- platform (optional): Filter by platform
- status (optional): Filter by content status
Scheduling
/schedule
Schedule a social media post.
Request Body
{
"contentId": "string",
"platform": "string",
"scheduledTime": "ISO-8601 timestamp",
"timezone": "string"
}
/schedule
List all scheduled posts.
Analytics
/analytics/posts
Get performance metrics for your posts.
Query Parameters
- startDate: Start date for the analysis period
- endDate: End date for the analysis period
- platform (optional): Filter by platform
- metrics (optional): Specific metrics to include
Rate Limits
API requests are subject to the following rate limits:
- Content Generation: 60 requests per hour
- Scheduling: 120 requests per hour
- Analytics: 300 requests per hour
Rate limits are based on your API key. The response headers include your current rate limit status:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
X-RateLimit-Reset: 1635724800
Error Handling
The API uses standard HTTP response codes to indicate success or failure:
- 200: Success
- 400: Bad Request - Invalid parameters
- 401: Unauthorized - Invalid API key
- 403: Forbidden - Insufficient permissions
- 404: Not Found - Resource doesn't exist
- 429: Too Many Requests - Rate limit exceeded
- 500: Internal Server Error
Error responses include a message explaining what went wrong:
{
"error": {
"code": "invalid_request",
"message": "The request parameters are invalid",
"details": {
"field": "platform",
"issue": "must be one of: twitter, linkedin, facebook, instagram"
}
}
}
SDKs and Libraries
We provide official SDKs for popular programming languages:
Need Help?
If you need help with API integration or have any questions, our developer support team is here to assist you.
Email us at: api-support@ezpost.com
Join our Developer Community for discussions and updates.