Skip to content

Commit 5a6bcd2

Browse files
authored
Merge pull request #99 from qtpi-bonding/patch-1
2 parents 76200a4 + ec2f693 commit 5a6bcd2

File tree

1 file changed

+118
-3
lines changed

1 file changed

+118
-3
lines changed

pages/public-api.mdx

Lines changed: 118 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,128 @@ Payload:
157157
]
158158
}
159159
```
160+
### Request
161+
| Property | Type | Required | Description |
162+
| --- | --- | --- | --- |
163+
| type | `draft` \| `schedule` \| `now` | Yes | Type of post creation |
164+
| order | string | No | Order of posts |
165+
| shortLink | boolean | Yes | Whether to use short link |
166+
| inter | number | No | Interval |
167+
| date | string (Date) | Yes | Date of post |
168+
| tags | Tags[] | Yes | Array of tags |
169+
| posts | Post[] | Yes (if type !== 'draft') | Array of posts |
170+
171+
### Posts
172+
| Property | Type | Required | Description |
173+
| --- | --- | --- | --- |
174+
| integration | Integration | Yes | Integration details |
175+
| value | PostContent[] | Yes | Array of post content |
176+
| group | string | No | Group name |
177+
| settings | AllProvidersSettings | No | Settings for providers |
178+
179+
### Post Value
180+
| Property | Type | Required | Description |
181+
| --- | --- | --- | --- |
182+
| content | string | Yes | Post content |
183+
| id | string | No | Post ID |
184+
| image | MediaDto[] | No | Array of media |
185+
186+
### Integration
187+
| Property | Type | Required | Description |
188+
| --- | --- | --- | --- |
189+
| id | string | Yes | Integration ID |
190+
191+
### Tags
192+
| Property | Type | Required | Description |
193+
| --- | --- | --- | --- |
194+
| value | string | Yes | Tag value |
195+
| label | string | Yes | Tag label |
196+
197+
### Settings
198+
| Provider | Type | Required | Description |
199+
| --- | --- | --- | --- |
200+
| devto | DevToSettingsDto | No | Dev.to settings |
201+
| medium | MediumSettingsDto | No | Medium settings |
202+
| hashnode | HashnodeSettingsDto | No | Hashnode settings |
203+
| reddit | RedditSettingsDto | No | Reddit settings |
204+
| lemmy | LemmySettingsDto | No | Lemmy settings |
205+
| youtube | YoutubeSettingsDto | No | Youtube settings |
206+
| pinterest | PinterestSettingsDto | No | Pinterest settings |
207+
| dribbble | DribbbleDto | No | Dribbble settings |
208+
| tiktok | TikTokDto | No | TikTok settings |
209+
| discord | DiscordDto | No | Discord settings |
210+
| slack | SlackDto | No | Slack settings |
211+
212+
### DevToSettingsDto
213+
| Property | Type | Description | Required |
214+
|--------------|----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
215+
| `title` | `string` | The title of the Dev.to post. | Yes |
216+
| `main_image` | `MediaDto` | Optional main image for the Dev.to post. Refers to the `MediaDto` type. | No |
217+
| `canonical` | `string` (URL) | Optional canonical URL for the Dev.to post. | No |
218+
| `organization`| `string` | Optional organization associated with the post. | No |
219+
| `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 |
220+
221+
### MediumSettingsDto
222+
| Property | Type | Description | Required |
223+
|--------------|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
224+
| `title` | `string` | The title of the Medium post. | Yes |
225+
| `subtitle` | `string` | The subtitle of the Medium post. | Yes |
226+
| `canonical` | `string` (URL) | Optional canonical URL for the Medium post. | No |
227+
| `publication`| `string` | Optional publication associated with the post. | No |
228+
| `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 |
229+
230+
### HashnodeSettingsDto
231+
| Property | Type | Description | Required |
232+
|--------------|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
233+
| `title` | `string` | The title of the Hashnode post. | Yes |
234+
| `subtitle` | `string` | The optional subtitle of the Hashnode post. | No |
235+
| `main_image` | `MediaDto` | Optional main image for the Hashnode post. Refers to the `MediaDto` type. | No |
236+
| `canonical` | `string` (URL) | Optional canonical URL for the Hashnode post. | No |
237+
| `publication`| `string` | The slug of the Hashnode publication to post to. | Yes |
238+
| `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 |
239+
240+
241+
curl:
242+
```
243+
curl -X POST \
244+
https://POSTIZ_URL/public/v1/posts \
245+
-H 'Authorization: API_KEY' \
246+
-H 'Content-Type: application/json' \
247+
-d '{
248+
"type": "draft",
249+
"order": "",
250+
"shortLink": true,
251+
"inter": 0,
252+
"date": "2025-05-07T12:00:00.000Z",
253+
"tags": [
254+
{
255+
"value": "",
256+
"label": ""
257+
}
258+
],
259+
"posts": [
260+
{
261+
"integration": {
262+
"id": "INTEGRATION_ID"
263+
},
264+
"value": [
265+
{
266+
"content": "content",
267+
"id": "",
268+
"image": []
269+
}
270+
],
271+
"group": "",
272+
"settings": {}
273+
}
274+
]
275+
}'
276+
```
160277

161278
Response:
162279

163280
```json
164-
{
165-
"id": "e639003b-f727-4a1e-87bd-74a2c48ae41e"
166-
}
281+
[{"postId":"POST_ID","integration":"INTEGRATION_ID"}]
167282
```
168283

169284
---

0 commit comments

Comments
 (0)