---
updatedAt: 2025-05-19T20:48:41.000Z
agentTools:
  projectIndex: https://developers.happeo.com/llms.txt
---

# Get a post

Use this when you want to get a post by its id.

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "version": "0.0.4",
    "title": "Happeo Posts API",
    "x-happeo-owner": "Roxana Mirel <roxana.roman@happeo.com>",
    "description": "API to manage posts and articles.",
    "license": {
      "name": "UNLICENSED"
    },
    "termsOfService": "https://www.happeo.com/tos",
    "contact": {
      "name": "API Support",
      "email": "support@happeo.com"
    }
  },
  "servers": [
    {
      "url": "https://api.happeo.com",
      "description": "Production server"
    },
    {
      "url": "https://api.unvrs.io",
      "description": "Staging server"
    }
  ],
  "components": {
    "securitySchemes": {
      "headerAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-happeo-apikey",
        "description": "API key passed in the headers."
      }
    },
    "schemas": {
      "id": {
        "type": "string",
        "description": "The post id.",
        "example": "123213",
        "nullable": false
      },
      "attachmentId": {
        "type": "string",
        "description": "The id of the attachment.",
        "example": "4567",
        "nullable": false
      },
      "heroId": {
        "type": "string",
        "description": "The id of the hero.",
        "example": "4567",
        "nullable": false
      },
      "channelId": {
        "type": "string",
        "description": "The id of the channel where the post belongs to.",
        "example": "123213",
        "nullable": false
      },
      "creatorId": {
        "type": "string",
        "readOnly": true,
        "description": "The id of the user who is the creator of the post.",
        "nullable": true,
        "example": "123213"
      },
      "state": {
        "type": "string",
        "description": "The state of the post. The post can be in 4 different states.\n* `DRAFT` This is a personal draft.\n* `SHARED_DRAFT` This is when it is a shared draft with the editors of the channel.\n* `REVIEW` This is when it is being reviewed.\n* `PUBLISHED` This is when the post is published. It cannot revert to any other state from here.",
        "enum": [
          "PUBLISHED",
          "SHARED_DRAFT",
          "DRAFT",
          "REVIEW"
        ],
        "example": "PUBLISHED"
      },
      "layout": {
        "type": "string",
        "description": "The layout of the post. It can be either:\n* `POST` This is a standard post.\n* `ARTICLE` This is an article layout.",
        "enum": [
          "POST",
          "ARTICLE"
        ],
        "example": "POST",
        "nullable": false
      },
      "announcement": {
        "type": "boolean",
        "description": "True if the post is an announcement. False if not.",
        "example": false,
        "nullable": false
      },
      "updatedMs": {
        "type": "integer",
        "format": "int64",
        "description": "Unix timestamp of when the post was updated.",
        "example": 1549633900290
      },
      "publishedMs": {
        "type": "integer",
        "format": "int64",
        "description": "Unix timestamp of when the post was published.",
        "example": 1549633900290
      },
      "pinned": {
        "type": "boolean",
        "description": "States whether the post is pinned.",
        "example": true,
        "nullable": true,
        "default": false
      },
      "content": {
        "type": "string",
        "format": "html",
        "description": "The content of the post.",
        "example": "This is a nice post.",
        "nullable": true
      },
      "commentsDisabled": {
        "type": "boolean",
        "description": "States whether the comments are disabled for this post.",
        "example": true,
        "nullable": true,
        "default": false
      },
      "hashtags": {
        "type": "array",
        "description": "An array of hashtags attached to the post.",
        "items": {
          "type": "string",
          "description": "A hashtag, which is a lower case word separated by a single underscore character, with a leading `#`.",
          "example": "#pure_awesomeness"
        }
      },
      "mentionedIds": {
        "type": "array",
        "description": "An array of user ids that are being mentioned in the post.",
        "items": {
          "type": "string",
          "description": "A string representing an id of a user.",
          "example": "123"
        }
      },
      "attachmentUrl": {
        "type": "string",
        "description": "The location of the attachment.",
        "example": "https://www.example.com/the-location-of-the-attachment",
        "nullable": false
      },
      "attachmentType": {
        "type": "string",
        "description": "The type of the attachment. \nUsually the file mimetype (`image/jpeg`,`application/pdf`,`application/vnd.google-apps.spreadsheet`, ...) when available. If the property `provider` of the attachment is `imageserver`, then the type refers to the image mimetype,  but the url links to the metadata json containing the different urls for the different sizes.\nThere are some special cases:\n* `link` This is a link to a website / url.\n* `channel` Used when the link is to another channel inside Happeo.\n* `pages` Used when the link is to another page inside Happeo.",
        "example": "image/png",
        "nullable": false
      },
      "attachmentProvider": {
        "type": "object",
        "description": "The \"provider\" of the attachment. Used in conjuction with the type of the attachment. If the property `provider.name` of the attachment is `imageserver`, then the type refers to the image mimetype,  but the attachment url links to the metadata json containing the different urls for the different sizes.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the attachment provider.",
            "example": "imageserver",
            "nullable": true
          }
        }
      },
      "attachmentTitle": {
        "type": "string",
        "description": "A title for the attachment.",
        "example": "Happeo-logo.jpg",
        "nullable": true
      },
      "articleTitle": {
        "type": "string",
        "description": "The title of the article.",
        "example": "My article",
        "nullable": true
      },
      "articleSubTitle": {
        "type": "string",
        "description": "The subtitle of the article.",
        "example": "A subtitle",
        "nullable": true
      },
      "heroPosition": {
        "type": "string",
        "description": "The position of the hero inside the article. The accepted values are `BEFORE` or `AFTER`.",
        "example": "AFTER",
        "nullable": true
      },
      "HeroOutput": {
        "type": "object",
        "description": "The hero used in articles.",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/heroId"
          },
          "url": {
            "type": "string",
            "description": "The location of the hero.",
            "example": "https://www.example.com/the-location-of-the-hero",
            "nullable": false
          },
          "title": {
            "type": "string",
            "description": "A title for the hero.",
            "example": "Happeo-hero.jpg",
            "nullable": true
          },
          "provider": {
            "type": "object",
            "description": "The \"provider\" of the hero url.  If the property `provider.name` of the hero is `imageserver`,  then the hero url links to the metadata json containing the different urls for the different sizes.",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of the hero provider.",
                "example": "imageserver",
                "nullable": true
              }
            }
          }
        }
      },
      "PostOutput": {
        "type": "object",
        "description": "The post response body.",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/id"
          },
          "creatorId": {
            "$ref": "#/components/schemas/creatorId"
          },
          "authorId": {
            "type": "string",
            "description": "The id of the user who is the author (official writer) of the post. If not given, the user id of the user making the request is set as authorId.",
            "nullable": true,
            "example": "123213"
          },
          "channelId": {
            "$ref": "#/components/schemas/channelId"
          },
          "state": {
            "$ref": "#/components/schemas/state"
          },
          "layout": {
            "$ref": "#/components/schemas/layout"
          },
          "announcement": {
            "$ref": "#/components/schemas/announcement"
          },
          "content": {
            "$ref": "#/components/schemas/content"
          },
          "pinned": {
            "$ref": "#/components/schemas/pinned"
          },
          "commentsDisabled": {
            "$ref": "#/components/schemas/commentsDisabled"
          },
          "mentionedIds": {
            "$ref": "#/components/schemas/mentionedIds"
          },
          "hashtags": {
            "$ref": "#/components/schemas/hashtags"
          },
          "title": {
            "$ref": "#/components/schemas/articleTitle"
          },
          "subTitle": {
            "$ref": "#/components/schemas/articleSubTitle"
          },
          "heroPosition": {
            "$ref": "#/components/schemas/heroPosition"
          },
          "hero": {
            "$ref": "#/components/schemas/HeroOutput"
          },
          "attachments": {
            "type": "array",
            "description": "The array of attachments in the post.",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/AttachmentOutput"
            }
          },
          "publishedMs": {
            "$ref": "#/components/schemas/publishedMs"
          },
          "updatedMs": {
            "$ref": "#/components/schemas/updatedMs"
          }
        }
      },
      "AttachmentOutput": {
        "type": "object",
        "description": "An attachment in the post.",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/attachmentId"
          },
          "url": {
            "$ref": "#/components/schemas/attachmentUrl"
          },
          "type": {
            "$ref": "#/components/schemas/attachmentType"
          },
          "provider": {
            "$ref": "#/components/schemas/attachmentProvider"
          },
          "title": {
            "$ref": "#/components/schemas/attachmentTitle"
          }
        }
      }
    },
    "responses": {
      "PostResponse": {
        "description": "A Post resource object.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PostOutput"
            }
          }
        }
      }
    },
    "parameters": {
      "postId": {
        "name": "postId",
        "in": "path",
        "description": "A post id.",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/id"
        }
      }
    }
  },
  "security": [
    {
      "headerAuth": []
    }
  ],
  "paths": {
    "/posts/{postId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/postId"
        }
      ],
      "get": {
        "summary": "Get a post",
        "description": "Use this when you want to get a post by its id.",
        "operationId": "getPost",
        "responses": {
          "200": {
            "$ref": "#/components/responses/PostResponse"
          }
        },
        "tags": [
          "Posts"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Posts",
      "description": "Post related operations"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```