Public API
⚠️

Warning: This Feature is currently in Beta and is in active-development. It does not provide all of the Postiz Features currently.

Public API allows you to work with Postiz in headless mode

To use the Public API, go to Postiz settings and copy the API Key.
With each request you need to pass the API Key in the header Authorization: {apiKey}.
If you are using the hosted version of Postiz the URL will be https://api.postiz.com/public/v1.
If you are self-hosting Postiz the URL will be https://{NEXT_PUBLIC_BACKEND_URL}/public/v1.

There is a limit of 30 requests per hour.

Here are the following API endpoints you can use:


Get all added integrations

GET https://api.postiz.com/public/v1/integrations

Response:

[
  {
    "id": "asdfasf2342dsaxfcsf",
    "name": "Nevo David",
    "identifier": "facebook",
    "picture": "https://upload.postiz.com/picture.png",
    "disabled": false,
    "profile": "nevo_david",
    "customer": {
      "id": "asdfasf2342dsaxfcsfsadfsadf",
      "name": "My Customer"
    }
  }
]


Upload a new file (from-data)

POST https://api.postiz.com/public/v1/upload

Payload: file - File

Response:

{
  "id": "e639003b-f727-4a1e-87bd-74a2c48ae41e",
  "name": "vXJYn8EzSB.png",
  "path": "https://uploads.gitroom.com/vXJYn8EzSB.png",
  "organizationId": "85460a39-6329-4cf4-a252-187ce89a3480",
  "createdAt": "2024-12-14T08:18:54.274Z",
  "updatedAt": "2024-12-14T08:18:54.274Z"
}


Post list

GET https://api.postiz.com/public/v1/posts

Query:

NameTypeValue
displaystringday | week | month
daynumber0-6
weeknumber1-52
monthnumber1-12
yearnumber2022+

** day is required if display is day
** week is required if display is week or day
** month is required if display is month or week
** year is required

Response:

{
    "posts": [
        {
            "id": "cm4gklk8o00008copo77fa0f8",
            "content": "blabla",
            "publishDate": "2024-12-09T05:06:00.000Z",
            "releaseURL": "https://twitter.com/nevodavid/status/1865986385708204316",
            "state": "QUEUE|PUBLISHED|ERROR|DRAFT",
            "integration": {
                "id": "cm4ean69r0003w8w1cdomox9n",
                "providerIdentifier": "x",
                "name": "Nevo David",
                "picture": "https://uploads.gitroom.com/5g9mEIVCAq.jpeg"
            }
        }
    ]
}


Create / update a post

POST https://api.postiz.com/public/v1/posts

Payload:

{
  "type": "draft|schedule|now",
  "date": "2024-12-14T08:18:54.274Z",
  "posts": [
    {
      "integration": {
        "id": "asdfsad23rwdfasfsddc"
      },
      "value": [
        {
          "content": "This is my cool post",
          "id": "Only if you want to edit an existing post",
          "image": [
            {
              "id": "string"
            }
          ]
        }
      ],
      "group": "uniqueId for all the posts in the same group",
      "settings": {
        "[key]": "check each integration DTOs in the files, or wait for the error on a new request"
      }
    }
  ]
}

Request

PropertyTypeRequiredDescription
typedraft | schedule | nowYesType of post creation
orderstringNoOrder of posts
shortLinkbooleanYesWhether to use short link
internumberNoInterval
datestring (Date)YesDate of post
tagsTags[]YesArray of tags
postsPost[]Yes (if type !== ‘draft’)Array of posts

Posts

PropertyTypeRequiredDescription
integrationIntegrationYesIntegration details
valuePostContent[]YesArray of post content
groupstringNoGroup name
settingsAllProvidersSettingsNoSettings for providers

Post Value

PropertyTypeRequiredDescription
contentstringYesPost content
idstringNoPost ID
imageMediaDto[]NoArray of media

Integration

PropertyTypeRequiredDescription
idstringYesIntegration ID

Tags

PropertyTypeRequiredDescription
valuestringYesTag value
labelstringYesTag label

Settings

ProviderTypeRequiredDescription
devtoDevToSettingsDtoNoDev.to settings
mediumMediumSettingsDtoNoMedium settings
hashnodeHashnodeSettingsDtoNoHashnode settings
redditRedditSettingsDtoNoReddit settings
lemmyLemmySettingsDtoNoLemmy settings
youtubeYoutubeSettingsDtoNoYoutube settings
pinterestPinterestSettingsDtoNoPinterest settings
dribbbleDribbbleDtoNoDribbble settings
tiktokTikTokDtoNoTikTok settings
discordDiscordDtoNoDiscord settings
slackSlackDtoNoSlack settings

DevToSettingsDto

PropertyTypeDescriptionRequired
titlestringThe title of the Dev.to post.Yes
main_imageMediaDtoOptional main image for the Dev.to post. Refers to the MediaDto type.No
canonicalstring (URL)Optional canonical URL for the Dev.to post.No
organizationstringOptional organization associated with the post.No
tagsDevToTagsSettingsDto[] (Array of up to 4)Optional array of tags for the Dev.to post. Each item in the array is of type DevToTagsSettingsDto. The array can have a maximum of 4 items.No

MediumSettingsDto

PropertyTypeDescriptionRequired
titlestringThe title of the Medium post.Yes
subtitlestringThe subtitle of the Medium post.Yes
canonicalstring (URL)Optional canonical URL for the Medium post.No
publicationstringOptional publication associated with the post.No
tagsMediumTagsSettings[] (Array of up to 4)Optional array of tags for the Medium post. Each item in the array is of type MediumTagsSettings. The array can have a maximum of 4 items.No

HashnodeSettingsDto

PropertyTypeDescriptionRequired
titlestringThe title of the Hashnode post.Yes
subtitlestringThe optional subtitle of the Hashnode post.No
main_imageMediaDtoOptional main image for the Hashnode post. Refers to the MediaDto type.No
canonicalstring (URL)Optional canonical URL for the Hashnode post.No
publicationstringThe slug of the Hashnode publication to post to.Yes
tagsHashnodeTagsSettings[] (Array with at least 1 item)An array of tags for the Hashnode post. Each item in the array is of type HashnodeTagsSettings. The array must contain at least one tag.Yes

curl:

curl -X POST \
  https://POSTIZ_URL/public/v1/posts \
  -H 'Authorization: API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "draft",
  "order": "",
  "shortLink": true,
  "inter": 0,
  "date": "2025-05-07T12:00:00.000Z",
  "tags": [
    {
      "value": "",
      "label": ""
    }
  ],
  "posts": [
    {
      "integration": {
        "id": "INTEGRATION_ID"
      },
      "value": [
        {
          "content": "content",
          "id": "",
          "image": []
        }
      ],
      "group": "",
      "settings": {}
    }
  ]
}'

Response:

[{"postId":"POST_ID","integration":"INTEGRATION_ID"}]


Delete a post

DELETE https://api.postiz.com/public/v1/posts/:id

Response:

{
  "id": "e639003b-f727-4a1e-87bd-74a2c48ae41e"
}