Blogs and Articles

Read and manage the articles and products that already live on a connected site.

Most of the API creates content. These endpoints reach content the connected site already owns: the articles on a WordPress site or a Shopify store's blog, and a Shopify store's products. Every id in a path below is the platform's own id, not a FoPost id.

Reads need the posts scope. Anything that changes the site needs posts and publish, because a change here is visible to the site's own readers.

Accounts on a platform that cannot manage articles answer 400 unsupported_platform. Today that means WordPress and Shopify can; products are Shopify only.

List the blogs on a site

GET /v1/accounts/{id}/blogs
curl https://api.fopost.com/v1/accounts/$ACCOUNT_ID/blogs \
  -H "X-API-Key: $FOPOST_API_KEY"
{
  "data": [
    { "id": "11", "title": "News", "handle": "news", "url": "https://your-store.myshopify.com/blogs/news" }
  ]
}

A Shopify store reports every blog it has. WordPress has one implicit blog and reports it as a single entry with the id default, so both platforms answer the same shape.

List articles

GET /v1/accounts/{id}/blogs/{blogId}/articles
QueryTypeDescription
limitintegerHow many to return, 1 to 50. Defaults to 20
statusstringpublished, draft, pending or scheduled
qstringMatch the article title
curl "https://api.fopost.com/v1/accounts/$ACCOUNT_ID/blogs/11/articles?status=draft" \
  -H "X-API-Key: $FOPOST_API_KEY"

Articles come back newest first, drafts included, whether FoPost created them or the site owner wrote them in the store admin.

{
  "data": [
    {
      "id": "99",
      "blog_id": "11",
      "title": "Spring drop",
      "body_html": "<p>Hello</p>",
      "excerpt": "A short summary",
      "status": "published",
      "author_name": "Store Owner",
      "tags": ["news"],
      "image_url": "https://cdn.example/img.png",
      "url": "https://your-store.myshopify.com/blogs/article/spring-drop",
      "published_at": "2026-09-01T10:00:00.000Z",
      "updated_at": "2026-09-02T10:00:00.000Z"
    }
  ]
}

Read one article

GET /v1/accounts/{id}/blogs/{blogId}/articles/{articleId}

An article that does not exist answers 404.

Create an article

POST /v1/accounts/{id}/blogs/{blogId}/articles

Needs the publish scope.

FieldTypeRequiredDescription
titlestringYesThe article title
bodystringYesFoPost body markup, rendered to the site's own format
excerptstringNoSummary shown in listings
statusstringNopublished, draft, pending or scheduled. Defaults to draft
tagsstring[]NoUp to 50 tags
author_namestringNoByline, where the platform accepts one
image_urlstringNoPublic http(s) URL of the featured image

A platform maps the status onto what it actually has. WordPress carries all four. Shopify has only published and unpublished, so draft, pending and scheduled all leave the article unpublished.

curl -X POST https://api.fopost.com/v1/accounts/$ACCOUNT_ID/blogs/11/articles \
  -H "X-API-Key: $FOPOST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Spring drop",
    "body": "The new collection is live.",
    "status": "draft",
    "tags": ["news"]
  }'

Update an article

PATCH /v1/accounts/{id}/blogs/{blogId}/articles/{articleId}

Needs the publish scope. Takes the same fields as create, all optional, and at least one.

Only the fields you send change; everything else on the article stays as it is. The article is addressed by its own id, so an update changes the live article in place and never creates a second post. The link you already shared keeps working.

curl -X PATCH https://api.fopost.com/v1/accounts/$ACCOUNT_ID/blogs/11/articles/99 \
  -H "X-API-Key: $FOPOST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "title": "Spring drop, restocked", "status": "published" }'

Delete an article

DELETE /v1/accounts/{id}/blogs/{blogId}/articles/{articleId}

Needs the publish scope. Answers 204 with no body. The article is removed from the site permanently; this cannot be undone.

List products

GET /v1/accounts/{id}/products
QueryTypeDescription
limitintegerHow many to return, 1 to 50. Defaults to 20
statusstringactive, draft or archived
qstringMatch the product title
{
  "data": [
    {
      "id": "7",
      "title": "Mug",
      "handle": "mug",
      "status": "active",
      "description": null,
      "vendor": "Your Brand",
      "product_type": "Drinkware",
      "tags": ["kitchen"],
      "image_url": "https://cdn.example/mug.png",
      "url": "https://your-store.myshopify.com/products/mug",
      "price": "12.00",
      "currency": "USD",
      "updated_at": "2026-09-02T10:00:00.000Z"
    }
  ]
}

price is the lowest variant price, as a decimal string.

Update a product

PATCH /v1/accounts/{id}/products/{productId}

Needs the publish scope.

FieldTypeDescription
titlestringThe product title
descriptionstringBody markup, rendered to HTML
statusstringactive, draft or archived
tagsstring[]Up to 50 tags
product_typestringThe product type
vendorstringThe vendor

At least one field is required. Only what you send changes.

Errors

StatusCodeMeaning
400unsupported_platformThe account's platform cannot manage articles or products
400validation_errorA field failed validation
401reconnect_requiredThe platform rejected the stored token; reconnect the account
404not_foundNo such account in your workspaces, or no such article or product
429rate_limitedThe platform's own rate limit was reached
502platform_errorThe platform refused the request; its message is passed through

Next

Related documentation
  • API Overview

    Base URL, envelopes, pagination, and errors for the FoPost REST API.

  • Authentication

    API keys, scopes, and workspace binding.

  • Publishing

    Create a post, target accounts, publish it, and read the per-account result.

  • Scheduling

    Schedule a post, repeat it, and import a batch from a spreadsheet.

  • Media

    Upload files, list the media library, and attach media to a post.

  • Validation

    Check content, text length, and media against platform rules before a post exists.

  • Blog

    A keyword plan, articles written in the background, a review window, and a target they publish to.

  • Accounts

    List connected social accounts, check their health, and refresh credentials.

Was this helpful?

On this page