v1

latestOpenAPI 3.0.02026-07-1752017.1 KB

Get post

Returns a post with at least one content in published status.

get/api/v1/post/{id}

Path parameters

idstring required

Primary Key (UUID)

Example:a8c4891c-6bc0-4f58-81c6-5e89bb572d4c

Primary Key (UUID)

Query parameters

languagestring

Primary Key (UUID)

Example:a8c4891c-6bc0-4f58-81c6-5e89bb572d4c

Lowercase language code

Response

Example response

{
  "post": {
    "id": "a8c4891c-6bc0-4f58-81c6-5e89bb572d4c",
    "contents": [
      {
        "id": "a8c4891c-6bc0-4f58-81c6-5e89bb572d4c",
        "slug": "my-first-post",
        "title": "This is a title",
        "subtitle": "This is a subtitle",
        "body": "This is a body",
        "bodyHtml": "<p>This is a body</p>",
        "status": "published",
        "language": "en-us",
        "version": 1,
        "coverUrl": "https://your-subdomain.collections.dev/assets/a8c4891c-6bc0-4f58-81c6-5e89bb572d4c",
        "metaTitle": "This is a meta title",
        "metaDescription": "This is a meta description",
        "publishedAt": "2023-09-29T00:53:20.604Z",
        "author": {
          "id": "a8c4891c-6bc0-4f58-81c6-5e89bb572d4c",
          "name": "John Doe",
          "avatarUrl": "https://your-subdomain.collections.dev/assets/a8c4891c-6bc0-4f58-81c6-5e89bb572d4c",
          "bio": "This is a bio",
          "bioUrl": "https://john-doe.com",
          "employer": "John Doe Inc."
        }
      }
    ]
  }
}