Skip to main content
POST
/
post
cURL
curl --request POST \
  --url https://our-secret-api-url.com/post \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-API-KEY: <x-api-key>' \
  --form 'content=<string>' \
  --form 'hashtags=<string>' \
  --form type=post \
  --form originalId=123 \
  --form parentId=123 \
  --form parentUserId=123 \
  --form media_1='@example-file' \
  --form media_2='@example-file' \
  --form media_3='@example-file' \
  --form media_4='@example-file'
{
  "id": 123,
  "snowflakeId": "<string>",
  "userId": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "type": "post",
  "hashtags": [
    "<string>"
  ],
  "repliesCount": 123,
  "repostsCount": 123,
  "content": "<string>",
  "originalId": 123,
  "parentId": 123,
  "reposts": [
    123
  ],
  "media": [
    {
      "id": 123,
      "mediaUrl": "<string>",
      "mimeType": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ]
}
For repost / quote type, ensure parentId & originalId are passed
For repost type, you can use empty string ("") or null for the content

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-KEY
string
required

API key required for authentication

Body

multipart/form-data

Post content and media to be uploaded

content
string
required

Content of the post

hashtags
string[]
required

List of hashtags associated with the post without the hashtag symbol (#), e.g. ['viral']

type
enum<string>
required

Type of the post

Available options:
post,
quote,
repost
originalId
integer | null

ID of the original post if this is a reply, repost & quote repost

parentId
integer | null

ID of the parent post if applicable

parentUserId
integer

The userId of the parent's post to send notifications to, if applicable

media_1
file

First media file to be uploaded

media_2
file

Second media file to be uploaded

media_3
file

Third media file to be uploaded

media_4
file

Fourth media file to be uploaded

Response

Post created successfully

id
integer
required

ID of the post

snowflakeId
string
required

Snowflake ID of the post

userId
integer
required

ID of the user who created the post

createdAt
string<date-time>
required

Creation timestamp of the post

updatedAt
string<date-time>
required

Last update timestamp of the post

type
enum<string>
required

Type of the post

Available options:
post,
quote,
repost
hashtags
string[]
required

List of hashtags associated with the post without the hashtag symbol (#), e.g. ['viral']

repliesCount
integer
required

Number of replies to the post

repostsCount
integer
required

Number of reposts of the post

content
string | null

Content of the post

originalId
integer | null

ID of the original post if this is a reply, repost & quote repost

parentId
integer | null

ID of the parent post if applicable

reposts
integer[]

List of userIds reposted

media
object[] | null

List of media items associated with the post