Public APIAPI Quickstart
API Quickstart
Get from zero to your first API request in 5 minutes. Create an API key, schedule a post, and verify it worked.
Get up and running with the SocialRails API in under 5 minutes.
Prerequisites
- A SocialRails account on the Creator plan or higher
- At least one connected social media account
- A terminal or HTTP client (curl, Postman, etc.)
Step 1: Create an API Key
- Go to Settings > API Keys in your SocialRails dashboard
- Click Create Key
- Give it a name (e.g., "My first integration")
- Select scopes: Read and Write
- Click Create Key and copy the key immediately, you won't see it again
Your key looks like: sr_live_abc123...
Step 2: Test Your Connection
Verify your key works by hitting the health endpoint (no auth required) and then your workspace:
# Health check (no auth needed)
curl https://socialrails.com/api/v1/health
# Verify your API key
curl https://socialrails.com/api/v1/workspace \
-H "Authorization: Bearer sr_live_YOUR_KEY_HERE"You should see your workspace name, plan, and limits in the response.
Step 3: Schedule Your First Post
curl -X POST https://socialrails.com/api/v1/posts \
-H "Authorization: Bearer sr_live_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"content": "Hello from the SocialRails API!",
"platform": "twitter",
"scheduled_for": "2026-03-03T10:00:00Z"
}'Step 4: Verify It Worked
curl https://socialrails.com/api/v1/posts?status=scheduled \
-H "Authorization: Bearer sr_live_YOUR_KEY_HERE"You should see your newly scheduled post in the response.
What's Next?
- API Endpoints Reference, Full reference for all endpoints
- Code Examples, Copy-paste examples in JavaScript and Python
- Batch Posting, Schedule to multiple platforms at once
- Rate Limits, Understand request limits for your plan
- Error Handling, Handle errors gracefully
Frequently Asked Questions
What plan do I need for API access?
API access is available on all paid plans: Creator ($29/mo), Business ($49/mo), and Agency ($99/mo). Each plan has different rate limits and maximum API keys.
Can I create a post without scheduling it?
Yes. If you omit the scheduled_for field when creating a post, it will be saved as a draft. You can schedule it later through the API or dashboard.
What format should the scheduled_for date be in?
Use ISO 8601 format with a timezone, for example: 2026-03-05T14:00:00Z. The date must be in the future.
Can I test the API without actually publishing posts?
Yes. Create posts as drafts by omitting the scheduled_for field, or schedule them far in the future and delete them after testing. The GET /api/v1/health endpoint is also available for connectivity testing without authentication.
Updated 2 days ago