v1

latestOpenAPI 3.0.0Apache 2.02026-07-2410185524.2 KB
Posts

add post

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 for a more detailed overview of responses through the client wrapper

post/posts

Query parameters

privateboolean

Returns the full record when authenticated

Headers

Authorizationstring

A valid HTTP Bearer token, required to access private records.

Request body

Example request

{
  "data": {
    "body": "<p>My example post here</p>",
    "date": "2020-12-03T06:52:46.330Z",
    "path": "example-path",
    "photoUrl": "https://source.unsplash.com/random/800x600",
    "title": "My Blog Title",
    "profileUuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
    "userUuid": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
  }
}

Response

The newly created post

Example response

{
  "data": {
    "body": "<p>My example post here</p>",
    "campaignUuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
    "createdAt": "2020-12-03T06:52:46.330Z",
    "date": "2020-12-03T06:52:46.330Z",
    "path": "example-path",
    "photoUrl": "https://source.unsplash.com/random/800x600",
    "profileUuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
    "title": "My Blog Title",
    "updatedAt": "2020-12-03T06:52:46.330Z",
    "userUuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
    "uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
  }
}