Getting Started
Get up and running with the Postally API in just a few minutes. This guide will walk you through authentication, making your first API call, and scheduling your first social media post.
Prerequisites
Before you begin
- A Postally account (sign up for free at postally.io)
- Basic knowledge of REST APIs
- Your favorite programming language or API testing tool
Step 1: Get Your API Key
First, you'll need to generate an API key from your Postally dashboard.
- Log in to your Postally dashboard
- Navigate to Settings → API Keys
- Click "Generate New API Key"
- Copy and securely store your API key
Important: Keep your API key secure and never expose it in client-side code.
Step 2: Authentication
Include your API key in the Authorization header of all requests:
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://app.postally.io/api/v1/postsStep 3: Make Your First API Call
Let's start by fetching your connected social media accounts:
curl -X GET \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://app.postally.io/api/v1/accountsResponse:
{
"accounts": [
{
"id": "acc_123456",
"platform": "twitter",
"username": "@yourhandle",
"status": "connected"
},
{
"id": "acc_789012",
"platform": "instagram",
"username": "yourhandle",
"status": "connected"
}
]
}Step 4: Schedule Your First Post
Now let's schedule a post to be published:
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Hello from Postally API! 🚀",
"platforms": ["twitter", "instagram"],
"schedule_time": "2024-01-01T12:00:00Z"
}' \
https://app.postally.io/api/v1/posts🎉 Congratulations!
You've successfully made your first API calls and scheduled a post. Here's what to explore next:
- • Explore the full API Reference for all available endpoints
- • Check out our Examples for common use cases
- • Learn about webhooks for real-time notifications
- • Try our AI content generation endpoints