Warning: This Feature is currently in Beta and is in active-development. It does not provide all of the Postiz Features currently.
For NodeJS / N8N users
You can use the Postiz NodeJS SDK to interact with the Postiz Public API.
For a custom n8n node check Postiz n8n custom node
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.
It does not mean you can post only 30 posts per hour, it means you can make 30
requests to the API per hour. If you plan ahead, you can have a lot more every
hour.
NOTE: The UI representation is a channel, but on the API it is called
integration. So when you see integration in the API, it means a channel.
Here are the following API endpoints you can use:
Get all added channels
GET https://api.postiz.com/public/v1/integrationsResponse:
[
{
"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"
}
}
]Get the next available slot for a channel
GET https://api.postiz.com/public/v1/find-slot/:idPayload:
id - Channel ID
Response:
{
"date": "2025-01-01T10:00:00.000Z"
}Upload a new file (form-data)
POST https://api.postiz.com/public/v1/uploadPayload:
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"
}Upload a new file from an existing URL
POST https://api.postiz.com/public/v1/upload-from-urlPayload:
{
"url": "Your URL path"
}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?startDate=2024-12-14T08:18:54.274Z&endDate=2024-12-14T08:18:54.274Z&customer=optionalCustomerIdQuery Parameters:
| Property | Type | Required | Description |
|---|---|---|---|
| startDate | string | Yes | UTC date in ISO format |
| endDate | string | Yes | UTC date in ISO format |
| customer | string | No | Customer ID |
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/postsPayload:
{
"type": "draft|schedule|now",
"date": "2024-12-14T08:18:54.274Z",
"posts": [
{
"integration": {
"id": "asdfsad23rwdfasfsddc" // your channel id
},
"value": [
{
"content": "This is my cool post",
"id": "Only if you want to edit an existing post",
"image": [
{
"id": "string",
"path": "string"
}
]
}
],
"group": "uniqueId for all the posts in the same group",
"settings": {
"[key]": "check each channel DTOs in the files, or wait for the error on a new request"
}
}
]
}Response:
[{ "postId": "POST_ID", "integration": "INTEGRATION_ID" }]For self-hosting, you can access the modal code generator at: http://localhost:5000/modal/dark/all
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 |
Delete a post
DELETE https://api.postiz.com/public/v1/posts/:idResponse:
{
"id": "e639003b-f727-4a1e-87bd-74a2c48ae41e"
}NEW! (Generate videos with AI)
Request:
POST https://api.postiz.com/public/v1/generate-videoResponse:
[
{
"id": "string",
"path": "URL of the generated video"
}
]Payload (Slides of images)
{
"type": "image-text-slides",
"output": "vertical|horizontal",
"customParams": {
"voice": "elevenlabs voice id",
"prompt": "description of the video"
}
}Get voices
POST https://api.postiz.com/public/v1/video/functionPayload
{
"functionName": "loadVoices",
"identifier": "image-text-slides"
}Response
{
"voices": [
{
"id": "string",
"name": "string"
}
]
}Payload (VEO3 fast video) - Subscribed users after trial
{
"type": "veo3",
"output": "vertical|horizontal",
"customParams": {
"prompt": "",
// images - optional (Maximum 3 images)
"images": [{ "id": "string", "path": "string" }]
}
}