Skip to main content
All content endpoints require JWT authentication. Content items can be of three types: Text, Link, or Code.

Create Content

curl -X POST https://api.archive.com/api/content \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}" \
  -d '{
    "type": "text",
    "content": "This is my saved text content",
    "title": "Important Note",
    "description": "A quick reminder for later",
    "tags": ["personal", "notes"]
  }'
Create a new content item in the user’s archive. Authentication Required: Yes Rate Limit: API rate limiter applied

Headers

Authorization
string
required
Bearer token: Bearer {accessToken}

Request Body

The request body schema varies by content type. All types support optional title, description, and tags fields.
type
string
required
Must be "text"
content
string
required
Text content (1-100,000 characters, trimmed)
title
string
Optional title (max 200 characters, trimmed)
description
string
Optional description (max 1,000 characters, trimmed)
tags
array
Array of tag strings (converted to lowercase, trimmed). Default: []

Response

message
string
Success message: “Content created successfully”
content
object
Created content item object

Error Responses

  • 400 Bad Request - Validation errors (invalid type, missing required fields, content too long)
  • 401 Unauthorized - Missing or invalid authentication token
  • 500 Internal Server Error - Server error

Get All Content

curl -X GET "https://api.archive.com/api/content" \
  -H "Authorization: Bearer {accessToken}"
Retrieve all content items for the authenticated user with support for search, filtering, and pagination. Authentication Required: Yes Rate Limit: Search rate limiter applied

Headers

Authorization
string
required
Bearer token: Bearer {accessToken}

Query Parameters

q
string
Search query (minimum 1 character, trimmed)
type
string
Filter by content type: "text", "link", or "code"
tag
string
Filter by tag (minimum 1 character, trimmed)
platform
string
Filter by platform (minimum 1 character, trimmed)
page
number
Page number for pagination (minimum 1, default: 1)
limit
number
Items per page (1-100, default: 20)

Response

message
string
Success message: “Content items retrieved successfully”
data
array
Array of content item objects
meta
object
Pagination metadata

Error Responses

  • 400 Bad Request - Invalid query parameters
  • 401 Unauthorized - Missing or invalid authentication token
  • 500 Internal Server Error - Server error

Get Content by ID

curl -X GET "https://api.archive.com/api/content/60d5ec49f1b2c8b1f8e4e1a1" \
  -H "Authorization: Bearer {accessToken}"
Retrieve a single content item by its ID. Authentication Required: Yes Rate Limit: None (JWT middleware applied)

Headers

Authorization
string
required
Bearer token: Bearer {accessToken}

Path Parameters

id
string
required
Content item ID

Response

message
string
Success message: “Content item retrieved successfully!”
content
object
Content item object with all properties

Error Responses

  • 401 Unauthorized - Missing or invalid authentication token
  • 404 Not Found - Content item not found or doesn’t belong to user
  • 500 Internal Server Error - Server error

Update Content

curl -X PUT "https://api.archive.com/api/content/60d5ec49f1b2c8b1f8e4e1a1" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}" \
  -d '{
    "title": "Updated Title",
    "tags": ["updated", "modified"],
    "description": "This content has been updated"
  }'
Update an existing content item. All fields are optional and partial updates are supported. Authentication Required: Yes Rate Limit: API rate limiter applied

Headers

Authorization
string
required
Bearer token: Bearer {accessToken}

Path Parameters

id
string
required
Content item ID

Request Body

All fields are optional. Only provide the fields you want to update.
type
string
Content type: "text", "link", or "code"
title
string
Content title (max 200 characters, trimmed)
description
string
Content description (max 1,000 characters, trimmed)
tags
array
Array of tag strings (converted to lowercase, trimmed)
content
string
Text or code content (1-100,000 characters, trimmed)
url
string
Valid URL (trimmed, must be valid URL format)
previewImageUrl
string
Preview image URL (must be valid URL format)
platform
string
Platform identifier (trimmed)

Response

message
string
Success message: “Content item updated successfully!”
content
object
Updated content item object

Error Responses

  • 400 Bad Request - Validation errors (invalid URL, content too long, etc.)
  • 401 Unauthorized - Missing or invalid authentication token
  • 404 Not Found - Content item not found or doesn’t belong to user
  • 500 Internal Server Error - Server error

Delete Content

curl -X DELETE "https://api.archive.com/api/content/60d5ec49f1b2c8b1f8e4e1a1" \
  -H "Authorization: Bearer {accessToken}"
Permanently delete a content item. Authentication Required: Yes Rate Limit: API rate limiter applied

Headers

Authorization
string
required
Bearer token: Bearer {accessToken}

Path Parameters

id
string
required
Content item ID

Response

message
string
Success message: “Content item deleted successfully!”

Error Responses

  • 401 Unauthorized - Missing or invalid authentication token
  • 404 Not Found - Content item not found or doesn’t belong to user
  • 500 Internal Server Error - Server error

Get Platforms

curl -X GET "https://api.archive.com/api/content/platforms" \
  -H "Authorization: Bearer {accessToken}"
Retrieve all platforms used in the user’s content items along with their counts. Authentication Required: Yes Rate Limit: None (JWT middleware applied)

Headers

Authorization
string
required
Bearer token: Bearer {accessToken}

Response

message
string
Success message: “Platforms retrieved successfully”
platforms
array
Array of platform objects with counts

Error Responses

  • 401 Unauthorized - Missing or invalid authentication token
  • 500 Internal Server Error - Server error

Build docs developers (and LLMs) love