Save a draft
PUT
/api/orgs/{org}/projects/{project}/drafts
const url = 'https://api-dev.wrktr.com/api/orgs/example/projects/example/drafts';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"branch":"example","path":"example","content":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api-dev.wrktr.com/api/orgs/example/projects/example/drafts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "branch": "example", "path": "example", "content": "example" }'A file’s new content, or null content to delete it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
project
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Draft
BadRequest
Media typeapplication/json
object
_tag
required
string
Example
{ "_tag": "BadRequest"}Unauthorized
Media typeapplication/json
object
_tag
required
string
message
required
string
Example
{ "_tag": "Unauthorized"}ProjectNotFound | BranchNotFound