Getting Started
The Pandocast API lets you programmatically upload content, trigger AI generation, retrieve outputs, and schedule posts. Everything you can do in the dashboard is available via the API.
Quick Start
- Go to Settings → API and create an API key.
- Set the key as a Bearer token in the
Authorizationheader. - Make requests to the base URL below.
Base URL
https://api.pandocast.ai/api/v1Authentication
All API requests must include a valid API key in the Authorization header using the Bearer scheme.
Authorization: Bearer pk_live_abc123...Keep your API key secret. Do not expose it in client-side code, public repositories, or browser requests. If compromised, revoke it immediately from Settings → API.
Rate Limits
API requests are rate-limited to 100 requests per minute per API key. Rate limit information is included in every response via headers.
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed per window (100) |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
When you exceed the limit, the API returns a 429 Too Many Requests response. Wait until the reset time before retrying.
Endpoints
/api/v1/contentReturns a paginated list of content uploads for your workspace. Ordered by creation date, newest first.
Response
{
"items": [
{
"id": "abc123",
"title": "Why AI Agents Need Memory",
"content_type": "blog_post",
"status": "analyzed",
"created_at": "2026-03-28T10:00:00Z"
}
],
"total": 42,
"has_more": true
}Example
curl -X GET "https://api.pandocast.ai/api/v1/content?limit=10&offset=0" \
-H "Authorization: Bearer pk_live_abc123..."/api/v1/content/uploadUpload new content for AI analysis and generation. Provide a title, content type, and the raw text content. Analysis begins automatically.
Request Body
{
"title": "Why AI Agents Need Memory",
"content_type": "blog_post",
"raw_content": "Your full article or transcript text here..."
}Response
{
"id": "abc123",
"title": "Why AI Agents Need Memory",
"content_type": "blog_post",
"status": "analyzing",
"created_at": "2026-03-28T10:00:00Z"
}Example
curl -X POST "https://api.pandocast.ai/api/v1/content/upload" \
-H "Authorization: Bearer pk_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"title": "Why AI Agents Need Memory",
"content_type": "blog_post",
"raw_content": "Your content here..."
}'/api/v1/content/:id/generateTrigger AI content generation for a content upload. The content must be in 'analyzed' status. Generates platform-native outputs for all eligible platforms.
Request Body
{
"voice_profile_id": "vp_abc123",
"selected_platforms": ["twitter_single", "linkedin_post"],
"emphasis_notes": "Focus on the AI memory angle"
}Response
{
"success": true,
"content_id": "abc123",
"status": "generating",
"message": "Generation started for 2 platforms"
}Example
curl -X POST "https://api.pandocast.ai/api/v1/content/abc123/generate" \
-H "Authorization: Bearer pk_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"voice_profile_id": "vp_abc123",
"selected_platforms": ["twitter_single", "linkedin_post"]
}'/api/v1/content/:id/outputsRetrieve all generated outputs for a specific content upload. Each output includes the platform-native content, voice match score, and metadata.
Response
{
"items": [
{
"id": "out_abc123",
"platform_id": "twitter_single",
"format_name": "Twitter / X Post",
"content": "AI agents without memory are just expensive autocomplete...",
"voice_match_score": 87,
"status": "draft",
"created_at": "2026-03-28T10:05:00Z"
},
{
"id": "out_def456",
"platform_id": "linkedin_post",
"format_name": "LinkedIn Post",
"content": "Most AI agents today have a fundamental flaw...",
"voice_match_score": 92,
"status": "draft",
"created_at": "2026-03-28T10:05:00Z"
}
],
"total": 2
}Example
curl -X GET "https://api.pandocast.ai/api/v1/content/abc123/outputs" \
-H "Authorization: Bearer pk_live_abc123..."/api/v1/content/:id/scheduleSchedule a generated output for publishing at a specific time. The output must be in 'draft' or 'approved' status, and you must have a connected platform.
Request Body
{
"output_id": "out_abc123",
"scheduled_at": "2026-03-30T14:00:00Z"
}Response
{
"success": true,
"event_id": "evt_abc123",
"output_id": "out_abc123",
"scheduled_at": "2026-03-30T14:00:00Z",
"status": "scheduled"
}Example
curl -X POST "https://api.pandocast.ai/api/v1/content/abc123/schedule" \
-H "Authorization: Bearer pk_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"output_id": "out_abc123",
"scheduled_at": "2026-03-30T14:00:00Z"
}'Webhooks
Webhooks let you receive real-time HTTP POST notifications when events occur in your workspace. Configure webhook endpoints in Settings → Webhooks.
Event Types
| Event | Description |
|---|---|
content.uploaded | New content has been uploaded to your workspace |
content.analyzed | Content DNA analysis has completed |
outputs.generated | AI content generation is finished |
post.published | A scheduled post was successfully published |
post.failed | A scheduled post failed to publish after all retries |
ab_test.completed | An A/B test has finished with a winner |
Payload Format
Every webhook delivery is a POST request with a JSON body and the following headers:
Content-Type: application/json
X-Pandocast-Signature: <HMAC-SHA256 hex digest>
X-Pandocast-Event: <event type>{
"event": "content.analyzed",
"timestamp": "2026-03-28T10:05:00.000Z",
"data": {
"workspace_id": "ws_abc123",
"content_id": "abc123",
"title": "Why AI Agents Need Memory"
}
}Signature Verification
Every delivery includes an X-Pandocast-Signature header containing an HMAC-SHA256 hex digest of the raw request body, signed with your webhook secret. Always verify this signature to ensure the request came from Pandocast.
const crypto = require('crypto');
function verifyWebhook(body, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(body)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
// In your request handler:
const isValid = verifyWebhook(
req.rawBody,
req.headers['x-pandocast-signature'],
process.env.PANDOCAST_WEBHOOK_SECRET
);
if (!isValid) {
return res.status(401).send('Invalid signature');
}Retry Policy
If your endpoint returns a non-2xx response or the connection times out (10 seconds), the delivery is marked as failed. After 10 consecutive failures, the webhook endpoint is automatically disabled. You can re-enable it from Settings → Webhooks after fixing the issue. Successful deliveries reset the failure counter.
Error Codes
The API uses standard HTTP status codes. Error responses include a JSON body with a error field describing what went wrong.
{
"error": "Content not found",
"code": "not_found",
"status": 404
}| Status | Code | Description |
|---|---|---|
400 | bad_request | The request body is malformed or missing required fields. |
401 | unauthorized | Missing or invalid API key in the Authorization header. |
403 | forbidden | The API key does not have permission for this action. |
404 | not_found | The requested resource does not exist or is not in your workspace. |
429 | rate_limited | Too many requests. Wait for the rate limit window to reset. |
500 | internal_error | An unexpected error occurred on the server. Contact support if it persists. |
Questions? Reach out at hello@pandocast.ai