# Create a new draft Creates a new draft that can be saved and published later. Drafts can be associated with users, groups, or categories, and can be linked to existing posts for editing. Endpoint: POST /api/v1/drafts Version: 1.0 Security: header ## Request fields (application/json): - `text` (string, required) - `ownerId` (string,null) UUID with type prefix Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `title` (string,null) - `privacy` (string,null) Privacy levels for posts: * PUBLIC - post is visible to anyone, including people who are not logged in and those who do not follow the user. It appears in the public timelines (home, local, and federated). * UNLISTED - post is visible to anyone who visits the user's profile, but it does not appear in public timelines. Only followers and those who visit the user's profile directly can see it. * PRIVATE - post is only visible to the user's followers. It does not appear in public timelines or on the user's profile for non-followers. * DIRECT - post is visible only to the mentioned users. It functions like a direct message and is not visible on public timelines, the user's profile, or to followers. * FOLLOW_POST - comment only. Follow parent post visibility Enum: "PUBLIC", "UNLISTED", "PRIVATE", "DIRECT", "FOLLOW_POST" - `tags` (array,null) - `postId` (string,null) UUID with type prefix Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `postAsOwner` (boolean) - `attachments` (array,null) Example: ["us_01hxcvk1hjexere4pvtrj0ymqq"] ## Response 200 fields (application/json): - `id` (string, required) internal draft id Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `userId` (string, required) ID of the user who owns this draft Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `text` (string, required) Draft text - `ownerId` (string, required) ID of the entity this draft is for (user channel, forum category or event) Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `ownerType` (string, required) Post owner type that determines routing: USER, CATEGORY or EVENT Enum: "USER", "EVENT", "CATEGORY" - `title` (string,null) Optional title for forum/article drafts - `local` (boolean, required) Whether the draft is local to this server - `privacy` (string, required) Draft privacy level for the resulting post Enum: "PUBLIC", "UNLISTED", "PRIVATE", "DIRECT", "FOLLOW_POST" - `tags` (array, required) List of tags associated with the draft - `postId` (string,null) If this draft edits an existing post, its ID Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `createdAt` (string, required) When the draft was created Example: "2022-03-10T16:15:50Z" - `updatedAt` (string, required) When the draft was last updated Example: "2022-03-10T16:15:50Z" - `attachments` (array, required) Upload IDs attached to this draft Example: ["us_01hxcvk1hjexere4pvtrj0ymqq"] - `postAsOwner` (boolean, required) Post as owner ## Response 401 fields (application/json): - `errorCode` (string, required) Error code - `message` (string, required) Error message - `docUrl` (string) Link to documentation ## Response 400 fields