---
title: "add post"
method: POST
path: "/posts"
tags: ["Posts"]
---

# add post

`POST /posts`

Create a new **post**.

**Specifying the post author (explicit-user rollout):** When the explicit-user
rollout is enabled for the organisation, data.userUuid is an optional author
override. Campaign API key authentication (Authorization header, Bearer
raisely-sk-...) and organisation/campaign admins may supply data.userUuid to
author the post on behalf of any user in the same organisation; a userUuid from
another organisation returns 404 not found. data.userUuid is never required —
when it is omitted (or supplied by a non-admin who cannot override), the author
defaults to the authenticated user. Non-admin callers cannot author as someone
else.

#### For custom components:
`RaiselyComponents.api.all('posts').post(data = {}, params = {}, headers = {}) => Promise<{result}>`

 :fa-gears: See [Restie Response Data](https://github.com/raisely/restie#reading-and-handling-responses) for a more detailed overview of responses through the client wrapper

## Query parameters

- `private` boolean

## Headers

- `Authorization` string

## Request body

- object
  - `data` object
    - `body` string, required — The HTML body of the blog post Example: `<p>My example post here</p>`
    - `date` string — The display date value representing when this post was published Example: `2020-12-03T06:52:46.330Z`
    - `path` string, required — The path of this record (for alternative lookup). Maximum length: 255 characters Example: `example-path`
    - `photoUrl` string, required — An optional photo uploaded to the post Example: `https://source.unsplash.com/random/800x600`
    - `title` string — Title of the blog post Example: `My Blog Title`
    - `profileUuid` string, required — The UUID of the profile that the post will be displayed on
    - `userUuid` string, uuid — Optional UUID of the user to author the post as. When the explicit-user rollout is enabled, campaign API key auth and organisation/campaign admins may set this to author on behalf of another user in the same organisation (a userUuid from another organisation returns 404). If omitted (or supplied by a non-admin), the author defaults to the authenticated user.

## Response `200`

The newly created post

- object
  - `data` NestedPost
    - `body` string, required — `public` The HTML body of the blog post
    - `campaignUuid` string — `public` Unique identifier for the record
    - `createdAt` string — `public` Date the record was created
    - `date` string — `public` The display date value representing when this post was published
    - `path` string, required — `public` The path of this record (for alternative lookup). Maximum length: 255 characters
    - `photoUrl` string, required — `public` An optional photo uploaded to the post
    - `profileUuid` string — `public` Unique identifier for the record
    - `title` string — `public` Title of the blog post
    - `updatedAt` string — `public` Date the record was last updated
    - `userUuid` string — `public` Unique identifier for the record
    - `uuid` string — `public` Unique identifier for the record

## Other responses

- `400` — The request requires a body, but the body was missing
- `401` — Authorization credentials were missing or invalid
- `403` — The user is authenticated, but is not allowed to perform the requested operation
- `404` — One of the records needed to complete the request could not be found
- `409` — The operation cannot be completed because it would result in a duplicate record
- `410` — The requested record no longer exists, or that API has been deprecated
- `412` — Operation cannot proceed with the record in it's current state
- `429` — You have made too many requests to the given endpoint, please try again later
- `500` — An unexpected error has occurred with Raisely. If the error persists you can contact support@raisely.com

---

[API](https://skmtc.dev/raisely/apis/raisely-api.md) · [All operations](https://skmtc.dev/raisely/apis/raisely-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/raisely/raisely-api/revisions/d7f8dd294cb0/schema)
