Skip to content

Content API

Endpoints for viewing, approving, and managing generated content.

The Content Object

{
  "id": "cnt_5zN1pSsU7yA9vW6x",
  "mission_id": "msn_2xK9mPqR4vN8sT3w",
  "platform": "twitter",
  "type": "thread",
  "status": "scheduled",
  "copy": {
    "primary": "Main post text...",
    "thread_parts": [
      "1/ First tweet...",
      "2/ Second tweet...",
      "3/ Final tweet with CTA"
    ],
    "hashtags": ["#DevTools", "#API"],
    "mentions": [],
    "cta": "Learn more →",
    "alt_text": null
  },
  "visuals": [
    {
      "type": "image",
      "url": "https://cdn.amp.dev/assets/cnt_xxx/hero.png",
      "thumbnail_url": "https://cdn.amp.dev/assets/cnt_xxx/hero_thumb.png",
      "alt_text": "API workflow diagram",
      "dimensions": {"width": 1200, "height": 675},
      "format": "png",
      "position": 1
    }
  ],
  "metadata": {
    "topic": "API Design",
    "pillar": "Thought Leadership",
    "tags": ["api", "dx"],
    "confidence_score": 0.92,
    "generation_model": "claude-3-opus",
    "generation_cost_cents": 12
  },
  "scheduling": {
    "scheduled_for": "2024-01-16T09:00:00-05:00",
    "timezone": "America/New_York"
  },
  "publishing": {
    "published_at": null,
    "platform_post_id": null,
    "platform_url": null
  },
  "review": {
    "required": false,
    "reviewed_by": null,
    "reviewed_at": null,
    "notes": null
  },
  "version": 1,
  "created_at": "2024-01-15T10:45:00Z",
  "updated_at": "2024-01-15T10:45:00Z"
}

List Content

GET /content

List all content for the current tenant.

Request

curl "https://api.amp.dev/v1/content?status=scheduled&limit=20" \
  -H "Authorization: Bearer $AMP_API_KEY"

Query Parameters

Parameter Type Description
mission_id string Filter by mission
status string Filter by status
platform string Filter by platform
type string Filter by content type
created_after datetime Created after date
created_before datetime Created before date
scheduled_after datetime Scheduled after date
scheduled_before datetime Scheduled before date
limit integer Results per page (1-100)
starting_after string Pagination cursor

Status Values

Status Description
draft Just generated
pending_review Awaiting approval
approved Ready for scheduling
rejected Failed review
scheduled Queued for publishing
published Live on platform
failed Publishing failed
archived Removed from circulation

Response

{
  "data": [
    {
      "id": "cnt_5zN1pSsU7yA9vW6x",
      "mission_id": "msn_2xK9mPqR4vN8sT3w",
      "platform": "twitter",
      "type": "thread",
      "status": "scheduled",
      "copy": {
        "primary": "APIs shouldn't feel like puzzles..."
      },
      "scheduled_for": "2024-01-16T09:00:00-05:00",
      "created_at": "2024-01-15T10:45:00Z"
    }
  ],
  "has_more": true,
  "total": 145
}

Retrieve Content

GET /content/:id

Get full details for a specific content item.

Request

curl https://api.amp.dev/v1/content/cnt_5zN1pSsU7yA9vW6x \
  -H "Authorization: Bearer $AMP_API_KEY"

Query Parameters

Parameter Type Description
expand string Include related objects (mission, analytics)

Response

Returns the full content object.


Preview Content

GET /content/:id/preview

Get a rendered preview of how content will appear.

Request

curl https://api.amp.dev/v1/content/cnt_5zN1pSsU7yA9vW6x/preview \
  -H "Authorization: Bearer $AMP_API_KEY"

Response

{
  "content_id": "cnt_5zN1pSsU7yA9vW6x",
  "platform": "twitter",
  "preview_url": "https://preview.amp.dev/p/cnt_5zN1pSsU7yA9vW6x",
  "preview_html": "<div class=\"preview-frame\">...</div>",
  "expires_at": "2024-01-15T11:45:00Z"
}

Approve Content

POST /content/:id/approve

Approve content for publishing.

Request

curl -X POST https://api.amp.dev/v1/content/cnt_5zN1pSsU7yA9vW6x/approve \
  -H "Authorization: Bearer $AMP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "notes": "Looks good, approved for publishing"
  }'

Parameters

Parameter Type Required Description
notes string No Approval notes
schedule_for datetime No Override scheduled time

Response

{
  "id": "cnt_5zN1pSsU7yA9vW6x",
  "status": "approved",
  "review": {
    "reviewed_by": "usr_xxx",
    "reviewed_at": "2024-01-15T11:00:00Z",
    "notes": "Looks good, approved for publishing"
  },
  "scheduled_for": "2024-01-16T09:00:00-05:00"
}

Reject Content

POST /content/:id/reject

Reject content with feedback.

Request

curl -X POST https://api.amp.dev/v1/content/cnt_5zN1pSsU7yA9vW6x/reject \
  -H "Authorization: Bearer $AMP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Tone too casual",
    "feedback": "Please use more professional language and remove the emoji",
    "regenerate": true
  }'

Parameters

Parameter Type Required Description
reason string Yes Short rejection reason
feedback string No Detailed feedback for regeneration
regenerate boolean No Automatically regenerate content

Response

{
  "id": "cnt_5zN1pSsU7yA9vW6x",
  "status": "rejected",
  "review": {
    "reviewed_by": "usr_xxx",
    "reviewed_at": "2024-01-15T11:00:00Z",
    "reason": "Tone too casual",
    "feedback": "Please use more professional language and remove the emoji"
  },
  "regeneration": {
    "requested": true,
    "job_id": "job_xxx",
    "new_content_id": "cnt_6aO2pTtV8zB0wX7y"
  }
}

Schedule Content

PUT /content/:id/schedule

Schedule or reschedule content.

Request

curl -X PUT https://api.amp.dev/v1/content/cnt_5zN1pSsU7yA9vW6x/schedule \
  -H "Authorization: Bearer $AMP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scheduled_for": "2024-01-17T14:00:00-05:00"
  }'

Parameters

Parameter Type Required Description
scheduled_for datetime Yes New scheduled time
use_optimal_time boolean No Use AI-suggested optimal time
reason string No Reason for rescheduling

Response

{
  "id": "cnt_5zN1pSsU7yA9vW6x",
  "status": "scheduled",
  "scheduling": {
    "scheduled_for": "2024-01-17T14:00:00-05:00",
    "timezone": "America/New_York",
    "original_time": "2024-01-16T09:00:00-05:00"
  }
}

Unschedule Content

DELETE /content/:id/schedule

Remove content from the publishing schedule.

Request

curl -X DELETE https://api.amp.dev/v1/content/cnt_5zN1pSsU7yA9vW6x/schedule \
  -H "Authorization: Bearer $AMP_API_KEY"

Response

{
  "id": "cnt_5zN1pSsU7yA9vW6x",
  "status": "approved",
  "scheduling": {
    "scheduled_for": null
  }
}

Get Content Analytics

GET /content/:id/analytics

Get performance metrics for published content.

Request

curl https://api.amp.dev/v1/content/cnt_5zN1pSsU7yA9vW6x/analytics \
  -H "Authorization: Bearer $AMP_API_KEY"

Response

{
  "content_id": "cnt_5zN1pSsU7yA9vW6x",
  "platform": "twitter",
  "published_at": "2024-01-16T09:00:15Z",
  "metrics": {
    "impressions": 4521,
    "engagements": 187,
    "engagement_rate": 4.14,
    "likes": 142,
    "comments": 23,
    "shares": 22,
    "link_clicks": 45,
    "profile_visits": 12
  },
  "time_series": [
    {"timestamp": "2024-01-16T10:00:00Z", "impressions": 1200, "engagements": 45},
    {"timestamp": "2024-01-16T11:00:00Z", "impressions": 2100, "engagements": 89}
  ],
  "last_updated_at": "2024-01-17T10:00:00Z"
}

Duplicate Content

POST /content/:id/duplicate

Create a copy of content, optionally adapting for different platform.

Request

curl -X POST https://api.amp.dev/v1/content/cnt_5zN1pSsU7yA9vW6x/duplicate \
  -H "Authorization: Bearer $AMP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "target_platform": "linkedin",
    "adapt_copy": true
  }'

Parameters

Parameter Type Required Description
target_platform string No Platform for duplicate
adapt_copy boolean No AI-adapt copy for platform

Response

{
  "original_id": "cnt_5zN1pSsU7yA9vW6x",
  "duplicate": {
    "id": "cnt_7bP3qUtW9aC1xY8z",
    "platform": "linkedin",
    "status": "draft",
    "created_at": "2024-01-15T11:30:00Z"
  }
}

Archive Content

POST /content/:id/archive

Archive content (removes from active views but preserves for analytics).

Request

curl -X POST https://api.amp.dev/v1/content/cnt_5zN1pSsU7yA9vW6x/archive \
  -H "Authorization: Bearer $AMP_API_KEY"

Response

{
  "id": "cnt_5zN1pSsU7yA9vW6x",
  "status": "archived",
  "archived_at": "2024-01-15T11:30:00Z"
}

List Content Versions

GET /content/:id/versions

Get version history for content that was regenerated.

Request

curl https://api.amp.dev/v1/content/cnt_5zN1pSsU7yA9vW6x/versions \
  -H "Authorization: Bearer $AMP_API_KEY"

Response

{
  "data": [
    {
      "id": "cnt_5zN1pSsU7yA9vW6x",
      "version": 2,
      "status": "scheduled",
      "created_at": "2024-01-15T11:00:00Z"
    },
    {
      "id": "cnt_5zN1pSsU7yA9vW6x_v1",
      "version": 1,
      "status": "rejected",
      "rejection_reason": "Tone too casual",
      "created_at": "2024-01-15T10:45:00Z"
    }
  ]
}

Bulk Operations

Bulk Approve

POST /content/bulk/approve

Approve multiple content items at once.

curl -X POST https://api.amp.dev/v1/content/bulk/approve \
  -H "Authorization: Bearer $AMP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_ids": ["cnt_xxx", "cnt_yyy", "cnt_zzz"],
    "notes": "Batch approved after review"
  }'

Response

{
  "approved": ["cnt_xxx", "cnt_yyy", "cnt_zzz"],
  "failed": [],
  "total": 3
}

Errors

400 Bad Request

{
  "error": {
    "code": "invalid_request",
    "message": "Content is not in pending_review status",
    "current_status": "published"
  }
}

404 Not Found

{
  "error": {
    "code": "not_found",
    "message": "Content not found"
  }
}