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

  1. Go to Settings → API and create an API key.
  2. Set the key as a Bearer token in the Authorization header.
  3. Make requests to the base URL below.

Base URL

https://api.pandocast.ai/api/v1

Authentication

All API requests must include a valid API key in the Authorization header using the Bearer scheme.

Header
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.

HeaderDescription
X-RateLimit-LimitMaximum requests allowed per window (100)
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix 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

GET/api/v1/content

Returns a paginated list of content uploads for your workspace. Ordered by creation date, newest first.

Response

JSON
{
  "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
curl -X GET "https://api.pandocast.ai/api/v1/content?limit=10&offset=0" \
  -H "Authorization: Bearer pk_live_abc123..."
POST/api/v1/content/upload

Upload new content for AI analysis and generation. Provide a title, content type, and the raw text content. Analysis begins automatically.

Request Body

JSON
{
  "title": "Why AI Agents Need Memory",
  "content_type": "blog_post",
  "raw_content": "Your full article or transcript text here..."
}

Response

JSON
{
  "id": "abc123",
  "title": "Why AI Agents Need Memory",
  "content_type": "blog_post",
  "status": "analyzing",
  "created_at": "2026-03-28T10:00:00Z"
}

Example

cURL
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..."
  }'
POST/api/v1/content/:id/generate

Trigger AI content generation for a content upload. The content must be in 'analyzed' status. Generates platform-native outputs for all eligible platforms.

Request Body

JSON
{
  "voice_profile_id": "vp_abc123",
  "selected_platforms": ["twitter_single", "linkedin_post"],
  "emphasis_notes": "Focus on the AI memory angle"
}

Response

JSON
{
  "success": true,
  "content_id": "abc123",
  "status": "generating",
  "message": "Generation started for 2 platforms"
}

Example

cURL
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"]
  }'
GET/api/v1/content/:id/outputs

Retrieve all generated outputs for a specific content upload. Each output includes the platform-native content, voice match score, and metadata.

Response

JSON
{
  "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
curl -X GET "https://api.pandocast.ai/api/v1/content/abc123/outputs" \
  -H "Authorization: Bearer pk_live_abc123..."
POST/api/v1/content/:id/schedule

Schedule 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

JSON
{
  "output_id": "out_abc123",
  "scheduled_at": "2026-03-30T14:00:00Z"
}

Response

JSON
{
  "success": true,
  "event_id": "evt_abc123",
  "output_id": "out_abc123",
  "scheduled_at": "2026-03-30T14:00:00Z",
  "status": "scheduled"
}

Example

cURL
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

EventDescription
content.uploadedNew content has been uploaded to your workspace
content.analyzedContent DNA analysis has completed
outputs.generatedAI content generation is finished
post.publishedA scheduled post was successfully published
post.failedA scheduled post failed to publish after all retries
ab_test.completedAn 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:

Headers
Content-Type: application/json
X-Pandocast-Signature: <HMAC-SHA256 hex digest>
X-Pandocast-Event: <event type>
Payload
{
  "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.

Node.js Verification Example
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 Response
{
  "error": "Content not found",
  "code": "not_found",
  "status": 404
}
StatusCodeDescription
400bad_requestThe request body is malformed or missing required fields.
401unauthorizedMissing or invalid API key in the Authorization header.
403forbiddenThe API key does not have permission for this action.
404not_foundThe requested resource does not exist or is not in your workspace.
429rate_limitedToo many requests. Wait for the rate limit window to reset.
500internal_errorAn unexpected error occurred on the server. Contact support if it persists.

Questions? Reach out at hello@pandocast.ai