API Endpoints

Learn how to use the API to manage your subscribers.

List posts

POST https://api.letterdrop.com/api/v1/posts

Get a summary of all your posts to be displayed on your home page. The API is paginated. Start with offset: 0 and a fixed small value for limit. We recommend 5. Then you can query again, but this time, increment the offset to 5 to get the next 5 posts. You can check if there are most posts to query by checking if hasNextPage in the response is true.

Headers

NameTypeDescription

api-key

string

API key that is unique to your workspace

Request Body

NameTypeDescription

query

string

Search for posts containing these words

offset

number

Index of first post to return

limit

number

Number of posts to return

{
    success: true,
    meta: {
      page: 0,
      hasNextPage: true,
      totalPosts: 20
    },
    posts: [
      {
          "id": "6030dc61a21da91db1d593c0",
          "title": "Title",
          "subtitle": "Subtitle",
          "text": "Lorem ipsum dolor sit amet...",
          "textPreview": "Lorem ipsum dolor sit amet"
          "body": "<p>Lorem ipsum dolor sit amet,</p>",
          "slug": "my-new-post",
          "url": "https://letterdop.com/blog/my-new-post",
          "publishedOn": "2020-10-20T12:18:13.095Z",
          "coverImage": "https://cdn.letterdrop.co/images/2022/11/24/hir0hq8n.jpeg",
          "thumbnail": "https://cdn.letterdrop.co/images/2022/11/24/hir0hq8n.jpeg",
          "metaTitle": "Meta Title",
          "metaDescription": "This is a post via Letterdrop",
          "status": "published",
          "tags": ["chocolate", "food", "restaurant"],
          "updated": "2020-10-20T12:18:13.095Z",
          "publication": "piedpiper",
          "readTime": 3,
          "wordCount": 1565,
          "featured": false,
          "markdown": "Lorem ipsum dolor sit amet"
          "customFields": [
            {
              "name": "Related Posts",
              "type": "Multi-Select List",
              "value": "",
              "allowedValues": [
                "Post 1", "Post 2", ...
              ]
            },
            ...
          ]
        },
        ...
    ]
}

Get post

POST https://api.letterdrop.com/api/v1/post/get/:{id}

Get a single post.

Path Parameters

NameTypeDescription

id

string

The ID of the post

Headers

NameTypeDescription

api-key

string

API key that is unique to your workspace

{
  "id": "6030dc61a21da91db1d593c0",
  "title": "Title",
  "subtitle": "Subtitle",
  "text": "Lorem ipsum dolor sit amet...",
  "textPreview": "Lorem ipsum dolor sit amet"
  "body": "<p>Lorem ipsum dolor sit amet,</p>",
  "slug": "my-new-post",
  "url": "https://letterdop.com/blog/my-new-post",
  "publishedOn": "2020-10-20T12:18:13.095Z",
  "coverImage": "https://cdn.letterdrop.co/images/2022/11/24/hir0hq8n.jpeg",
  "thumbnail": "https://cdn.letterdrop.co/images/2022/11/24/hir0hq8n.jpeg",
  "metaTitle": "Meta Title",
  "metaDescription": "This is a post via Letterdrop",
  "status": "published",
  "tags": ["chocolate", "food", "restaurant"],
  "updated": "2020-10-20T12:18:13.095Z",
  "publication": "piedpiper",
  "readTime": 3,
  "wordCount": 1565,
  "featured": false,
  "markdown": "Lorem ipsum dolor sit amet"
  "customFields": [
    {
      "name": "Related Posts",
      "type": "Multi-Select List",
      "value": "",
      "allowedValues": [
        "Post 1", "Post 2", ...
      ]
    },
    ...
  ]
}

Draft post

POST https://api.letterdrop.com/api/v1/post/draft

Draft a post.

Headers

NameTypeDescription

api-key

string

API key that is unique to your workspace

Request Body

NameTypeDescription

html

string

Body of your post in HTML format

subtitle

string

Subtitle of your post

title

string

Title of your post

{
  success: true,
  draftLink: "https://app.letterdrop.com/post/6049755c5392b01d67ffd8cf"
}

Get project

POST https://api.letterdrop.com/api/v1/project/get/:{id}

Get project details.

Headers

NameTypeDescription

api-key*

string

API key that is unique to your workspace

Request Body

NameTypeDescription

id

string

Project ID

{
  title: "Project title",
  description: "Project description",
  labels: ["label1", "label2", "label3"],
  keyword: "keyword",
  status: "content_map_draft",
  suggestedBy: "support@letterdrop.co",
  suggestedOn: "2022-07-19T16:43:35.033Z",
  assignedBy: "support@letterdrop.co",
  assignedTo: "support@letterdrop.co",
  contributors: ["support@letterdrop.co"],
  contentMapDeadline: "2022-07-27T03:30:00.000Z",
  approvers: ["news@letterdrop.com"],
  reviewDeadline: "2022-08-04T03:30:00.000Z",
  approvedBy: "news@letterdrop.com",
  publishDate: "2022-08-05T03:30:00.000Z"
}
          

Create idea

POST https://api.letterdrop.com/api/v1/idea/new

Create a new idea.

Headers

NameTypeDescription

api-key*

string

API key that is unique to your workspace

Request Body

NameTypeDescription

title*

string

Idea title

suggestedBy*

string

Email address of the person who suggested the idea

description

string

Description of the idea. This is where your content brief goes.

keyword

string

Keyword associated with the idea

labels

list

List of labels

{
  success: true,
  title: "A Guide To B2B Marketing",
  description: "B2B marketing spans content, paid acquisition, events, and PR...",
  labels: ["b2b", "marketing", "guide"],
  keyword: "b2b marketing",
  suggestedBy: "support@letterdrop.co",
  message: "New idea created"
}

Assign idea

POST https://api.letterdrop.com/api/v1/idea/assign

Create a project from an idea.

Headers

NameTypeDescription

api-key*

string

API key that is unique to your workspace

Request Body

NameTypeDescription

id*

string

Idea ID

publishOn*

date

Date you want to target publishing your content.

assignedTo

string

Email address of the user writing the content.

approvers

List

List of emails of approvers

{
    "success": true,
    "message": "Project created."
}

Last updated