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
.
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:
Name | Type | Value |
---|---|---|
display | string | day | week | month |
day | number | 0-6 |
week | number | 1-52 |
month | number | 1-12 |
year | number | 2022+ |
** 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
Property | Type | Required | Description |
---|---|---|---|
type | draft | schedule | now | Yes | Type of post creation |
order | string | No | Order of posts |
shortLink | boolean | Yes | Whether to use short link |
inter | number | No | Interval |
date | string (Date) | Yes | Date of post |
tags | Tags[] | Yes | Array of tags |
posts | Post[] | Yes (if type !== ‘draft’) | Array of posts |
Posts
Property | Type | Required | Description |
---|---|---|---|
integration | Integration | Yes | Integration details |
value | PostContent[] | Yes | Array of post content |
group | string | No | Group name |
settings | AllProvidersSettings | No | Settings for providers |
Post Value
Property | Type | Required | Description |
---|---|---|---|
content | string | Yes | Post content |
id | string | No | Post ID |
image | MediaDto[] | No | Array of media |
Integration
Property | Type | Required | Description |
---|---|---|---|
id | string | Yes | Integration ID |
Tags
Property | Type | Required | Description |
---|---|---|---|
value | string | Yes | Tag value |
label | string | Yes | Tag label |
Settings
Provider | Type | Required | Description |
---|---|---|---|
devto | DevToSettingsDto | No | Dev.to settings |
medium | MediumSettingsDto | No | Medium settings |
hashnode | HashnodeSettingsDto | No | Hashnode settings |
RedditSettingsDto | No | Reddit settings | |
lemmy | LemmySettingsDto | No | Lemmy settings |
youtube | YoutubeSettingsDto | No | Youtube settings |
PinterestSettingsDto | No | Pinterest settings | |
dribbble | DribbbleDto | No | Dribbble settings |
tiktok | TikTokDto | No | TikTok settings |
discord | DiscordDto | No | Discord settings |
slack | SlackDto | No | Slack settings |
DevToSettingsDto
Property | Type | Description | Required |
---|---|---|---|
title | string | The title of the Dev.to post. | Yes |
main_image | MediaDto | Optional main image for the Dev.to post. Refers to the MediaDto type. | No |
canonical | string (URL) | Optional canonical URL for the Dev.to post. | No |
organization | string | Optional organization associated with the post. | No |
tags | DevToTagsSettingsDto[] (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
Property | Type | Description | Required |
---|---|---|---|
title | string | The title of the Medium post. | Yes |
subtitle | string | The subtitle of the Medium post. | Yes |
canonical | string (URL) | Optional canonical URL for the Medium post. | No |
publication | string | Optional publication associated with the post. | No |
tags | MediumTagsSettings[] (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
Property | Type | Description | Required |
---|---|---|---|
title | string | The title of the Hashnode post. | Yes |
subtitle | string | The optional subtitle of the Hashnode post. | No |
main_image | MediaDto | Optional main image for the Hashnode post. Refers to the MediaDto type. | No |
canonical | string (URL) | Optional canonical URL for the Hashnode post. | No |
publication | string | The slug of the Hashnode publication to post to. | Yes |
tags | HashnodeTagsSettings[] (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"
}