Search documentation

Find pages, sections, and snippets across the Clog docs.

Update a post

PATCH
/external/posts/{idOrSlug}

Partial update of a post by id or slug. Requires posts:write. A bodyJson change re-derives bodyText, tocItems, and readingTimeMin.

Authorization

ApiKeyAuth
X-API-Key<token>

Workspace-scoped API key, e.g. clog_live_AbCdEfGh.... Passed in the X-API-Key header on every request.

In: header

Path Parameters

idOrSlug*string

A UUID (resolved by id) or a slug (resolved by slug), scoped to the bound workspace.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/external/posts/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
  "slug": "string",
  "title": "string",
  "excerpt": "string",
  "bodyJson": [
    {
      "type": "key_takeaways",
      "items": [
        "string"
      ]
    }
  ],
  "bodyText": "string",
  "tocItems": [
    {
      "level": 2,
      "text": "string",
      "id": "string"
    }
  ],
  "readingTimeMin": 0,
  "featuredMediaId": "ae12f69f-58ad-4875-a887-b7bcc16d920b",
  "featuredMedia": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
    "url": "string",
    "storagePath": "string",
    "mimeType": "string",
    "sizeBytes": 0,
    "width": 0,
    "height": 0,
    "alt": "string",
    "caption": "string",
    "uploadedByUserId": "ff762bdd-4d44-4e20-aa37-a40adf9d1fba",
    "uploadedByApiKeyId": "257878ec-f2ca-4417-bbd5-6ec6cdaf172c",
    "createdAt": "2019-08-24T14:15:22Z"
  },
  "authorId": "ee6f7132-bd0a-4fcd-83b3-a8022377067b",
  "author": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
    "slug": "string",
    "displayName": "string",
    "bio": "string",
    "avatarMediaId": "baab65f7-7971-4dbb-b3cd-124fc0b57236",
    "avatarMedia": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
      "url": "string",
      "storagePath": "string",
      "mimeType": "string",
      "sizeBytes": 0,
      "width": 0,
      "height": 0,
      "alt": "string",
      "caption": "string",
      "uploadedByUserId": "ff762bdd-4d44-4e20-aa37-a40adf9d1fba",
      "uploadedByApiKeyId": "257878ec-f2ca-4417-bbd5-6ec6cdaf172c",
      "createdAt": "2019-08-24T14:15:22Z"
    },
    "credentials": "string",
    "sameAs": [
      "string"
    ],
    "isActive": true,
    "seo": {
      "title": "string",
      "description": "string",
      "canonicalUrl": "http://example.com",
      "focusKeyword": "string",
      "secondaryKeywords": [
        "string"
      ],
      "robots": {
        "index": true,
        "follow": true,
        "archive": true,
        "imageIndex": true,
        "snippet": true,
        "maxSnippet": 0,
        "maxImagePreview": "none",
        "maxVideoPreview": 0
      },
      "og": {
        "title": "string",
        "description": "string",
        "imageMediaId": "3f20166c-49be-4ccb-ba75-df70e6c4a22f",
        "type": "string"
      },
      "twitter": {
        "card": "summary",
        "title": "string",
        "description": "string",
        "imageMediaId": "3f20166c-49be-4ccb-ba75-df70e6c4a22f",
        "creator": "string"
      },
      "breadcrumbsTitle": "string",
      "noindexReason": "string",
      "redirectTo": "string"
    },
    "person": {
      "jobTitle": "string",
      "worksFor": "string",
      "knowsAbout": [
        "string"
      ],
      "alumniOf": "string",
      "award": "string",
      "honorificPrefix": "string",
      "honorificSuffix": "string"
    },
    "jsonLd": {},
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "categoryId": "337f5e5d-288b-40d5-be14-901cc3acacc0",
  "category": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
    "slug": "string",
    "name": "string",
    "description": "string",
    "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
    "path": "string",
    "sortOrder": 0,
    "isActive": true,
    "seo": {
      "title": "string",
      "description": "string",
      "canonicalUrl": "http://example.com",
      "focusKeyword": "string",
      "secondaryKeywords": [
        "string"
      ],
      "robots": {
        "index": true,
        "follow": true,
        "archive": true,
        "imageIndex": true,
        "snippet": true,
        "maxSnippet": 0,
        "maxImagePreview": "none",
        "maxVideoPreview": 0
      },
      "og": {
        "title": "string",
        "description": "string",
        "imageMediaId": "3f20166c-49be-4ccb-ba75-df70e6c4a22f",
        "type": "string"
      },
      "twitter": {
        "card": "summary",
        "title": "string",
        "description": "string",
        "imageMediaId": "3f20166c-49be-4ccb-ba75-df70e6c4a22f",
        "creator": "string"
      },
      "breadcrumbsTitle": "string",
      "noindexReason": "string",
      "redirectTo": "string"
    },
    "collectionMetadata": {
      "includeChildCategories": true,
      "sortPostsBy": "publishedAt"
    },
    "jsonLd": {},
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "status": "draft",
  "publishedAt": "2019-08-24T14:15:22Z",
  "scheduledAt": "2019-08-24T14:15:22Z",
  "isHowTo": true,
  "summaryForAi": "string",
  "canonicalUrl": "string",
  "viewCount": 0,
  "seo": {
    "title": "string",
    "description": "string",
    "canonicalUrl": "http://example.com",
    "focusKeyword": "string",
    "secondaryKeywords": [
      "string"
    ],
    "robots": {
      "index": true,
      "follow": true,
      "archive": true,
      "imageIndex": true,
      "snippet": true,
      "maxSnippet": 0,
      "maxImagePreview": "none",
      "maxVideoPreview": 0
    },
    "og": {
      "title": "string",
      "description": "string",
      "imageMediaId": "3f20166c-49be-4ccb-ba75-df70e6c4a22f",
      "type": "string"
    },
    "twitter": {
      "card": "summary",
      "title": "string",
      "description": "string",
      "imageMediaId": "3f20166c-49be-4ccb-ba75-df70e6c4a22f",
      "creator": "string"
    },
    "breadcrumbsTitle": "string",
    "noindexReason": "string",
    "redirectTo": "string"
  },
  "schemaType": "BlogPosting",
  "structuredData": {},
  "structuredBlocks": [
    {
      "type": "key_takeaways",
      "items": [
        "string"
      ]
    }
  ],
  "seoScore": 0,
  "readabilityScore": 0,
  "jsonLd": {},
  "deletedAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "tags": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",
      "slug": "string",
      "name": "string",
      "seo": {
        "title": "string",
        "description": "string",
        "canonicalUrl": "http://example.com",
        "focusKeyword": "string",
        "secondaryKeywords": [
          "string"
        ],
        "robots": {
          "index": true,
          "follow": true,
          "archive": true,
          "imageIndex": true,
          "snippet": true,
          "maxSnippet": 0,
          "maxImagePreview": "none",
          "maxVideoPreview": 0
        },
        "og": {
          "title": "string",
          "description": "string",
          "imageMediaId": "3f20166c-49be-4ccb-ba75-df70e6c4a22f",
          "type": "string"
        },
        "twitter": {
          "card": "summary",
          "title": "string",
          "description": "string",
          "imageMediaId": "3f20166c-49be-4ccb-ba75-df70e6c4a22f",
          "creator": "string"
        },
        "breadcrumbsTitle": "string",
        "noindexReason": "string",
        "redirectTo": "string"
      },
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ],
  "relatedPosts": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "slug": "string",
      "title": "string",
      "excerpt": "string",
      "status": "draft",
      "featuredMediaId": "ae12f69f-58ad-4875-a887-b7bcc16d920b"
    }
  ]
}
{
  "code": "BAD_REQUEST",
  "message": "string",
  "details": null
}
{
  "code": "BAD_REQUEST",
  "message": "string",
  "details": null
}
{
  "code": "BAD_REQUEST",
  "message": "string",
  "details": null
}
{
  "code": "BAD_REQUEST",
  "message": "string",
  "details": null
}
{
  "code": "BAD_REQUEST",
  "message": "string",
  "details": null
}