Write post
/api/postsSaves a draft, or schedules a post: when is now or later with sendAt in timeZone. Each site is ticked by sending its section (discord, vrChat, bluesky); none is ticked unless sent. VRChat needs a title, the post's or its own. Bluesky gets the title and text, or its own text, of at most 300 characters and 3000 bytes. Nothing is sent by this request: Modbot's Discord loop sends a post within about twenty seconds of its time, its VRChat loop within about fifteen and its Bluesky loop within about thirty, unless Pause all posting is on or that site's posts are off. A refusal (400) lists everything wrong at once, in problems.
Needs the ManagePosts permission.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/posts" \ -H "Content-Type: application/json" \ -d '{ "title": null, "text": null }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "title": null, "text": "string", "pictureId": null, "status": "string", "lists": [ "string" ], "sendAt": null, "sendAtLocal": null, "timeZone": "string", "eventId": null, "eventTitle": null, "kind": null, "version": 0, "createdBy": null, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "cancelledAt": null, "destinations": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "network": "string", "target": "string", "targetName": null, "roleId": null, "roleName": null, "publish": true, "state": "string", "shown": "string", "link": null, "externalId": null, "error": null, "errorAt": null, "notPublished": true, "mayBeSent": true, "titleOverride": null, "textOverride": null, "sentText": null, "sentAt": null, "postedAt": null, "publishedAt": null, "vrChat": null, "missingPermission": null, "bluesky": null } ], "keepUpdated": false, "listsUpdatedAt": null}List posts GET
One page of one list on the Marketing tab, with how many posts each list holds. `list` is `scheduled` (soonest first), `sent` and `drafts` (newest first), `failed`, or `cancelled`. A post that went to one site and failed on another is in `failed` and in whatever else it is. Each destination's `shown` says what the list shows: its state, or for one waiting on a site that sends nothing now, `paused`, `off` or `notSetUp`. `vrChatRoles` are the VRChat group's roles as the last group read found them, for choosing who a VRChat post is for. Needs the `ViewPosts` permission.
Get posts health GET
What the Health page's Posts card shows: whether posting is paused, destinations that failed in the last 7 days, posts Modbot has been looking for on a site for more than 15 minutes, and sites scheduled posts wait on that are switched off or not set up. Needs the `ViewPosts` permission.