Authentication
All API requests require an API key. The key authenticates your account and tracks usage against your plan.
Getting Your API Key
- Sign up at synposter.com
- Go to Dashboard → API Keys
- Click Generate API Key
- Copy and store it securely. It is only shown once.
You get 20 free posts on signup. No credit card required.
Using Your API Key
Pass your API key in the x-api-key header of every request.
bash
curl https://api.synposter.com/v1/health \
-H "x-api-key: sk_live_abc123..."Key Format
API keys follow the format sk_live_ followed by 32 alphanumeric characters. Keys are stored as SHA-256 hashes. They are only shown once at generation.
text
sk_live_kk6xaGtQbXvHab8IFuhcTkHH1l0KaNeJSecurity
- Never expose your API key in client-side code or public repositories
- Use environment variables to store your key
- Each account can have one active key at a time
- If your key is compromised, delete it from the dashboard and generate a new one
Full Example
A complete authenticated request to create a post:
bash
curl https://api.synposter.com/v1/posts \
-X POST \
-H "x-api-key: sk_live_kk6xaGtQbXvHab8IFuhcTkHH1l0KaNeJ" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello from Synposter!",
"platforms": ["twitter", "linkedin"]
}'If the key is missing or invalid, you will receive a 401 response:
json
{
"error": "unauthorized"
}