API Overview
Learn how to use the CrossPostr API to manage your content programmatically
CrossPostr API
The CrossPostr API allows you to programmatically manage your content, blogs, and integrations. Built with REST principles, our API provides predictable, resource-oriented URLs and uses HTTP response codes to indicate API errors.
Base URL
All API requests should be made to:
https://crosspostr.ai/api/v1
Authentication
The CrossPostr API uses API keys for authentication. You can generate and manage your API keys from the dashboard.
API Key Format
All CrossPostr API keys have the prefix cp_
followed by a secure random string:
cp_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6
Including API Keys
Include your API key in requests using one of these methods:
Using the x-api-key
header (recommended):
curl -H "x-api-key: your_api_key_here" \ https://crosspostr.ai/api/v1/blogs
Using the Authorization
header:
curl -H "Authorization: Bearer your_api_key_here" \ https://crosspostr.ai/api/v1/blogs
Rate Limiting
API requests are rate limited to ensure fair usage:
- Free tier: 100 requests per hour
- Pro tier: 1,000 requests per hour
- Enterprise tier: 10,000 requests per hour
Rate limit headers are included in all responses:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1625097600
Response Format
All API responses are returned in JSON format with a consistent structure:
Success Response
{ "success": true, "data": { // Response data here } }
Error Response
{ "success": false, "error": { "code": "INVALID_API_KEY", "message": "The provided API key is invalid or expired" } }
Pagination
List endpoints support pagination using query parameters:
page
: Page number (default: 1)limit
: Number of items per page (default: 10, max: 50)
Pagination Response
{ "success": true, "data": { "blogs": [...], "pagination": { "page": 1, "limit": 10, "total": 25, "totalPages": 3, "hasNext": true, "hasPrev": false } } }
Available Endpoints
- Blogs API - Manage your blog posts
- Authentication - API key management
- Error Handling - Error codes and troubleshooting
SDK and Libraries
We're working on official SDKs for popular programming languages. Currently, you can use any HTTP client library to interact with our REST API.
Example with JavaScript/Node.js
const apiKey = 'cp_your_api_key_here'; const response = await fetch('https://crosspostr.ai/api/v1/blogs', { headers: { 'x-api-key': apiKey, 'Content-Type': 'application/json', }, }); const data = await response.json(); console.log(data);
Example with Python
import requests api_key = 'cp_your_api_key_here' headers = { 'x-api-key': api_key, 'Content-Type': 'application/json' } response = requests.get('https://crosspostr.ai/api/v1/blogs', headers=headers) data = response.json() print(data)
Example with curl
curl -H "x-api-key: cp_your_api_key_here" \ -H "Content-Type: application/json" \ https://crosspostr.ai/api/v1/blogs
Getting Started
- Generate an API Key: Visit your dashboard settings to create a new API key
- Test the API: Use the blogs endpoint to list your content
- Explore the Documentation: Check out the specific endpoint documentation for detailed usage
Support
If you need help with the API, please:
- Check the Error Handling documentation
- Review the Troubleshooting Guide
- Contact our support team through the dashboard