Skip to content

Save a draft

PUT
/api/orgs/{org}/projects/{project}/drafts
curl --request PUT \
--url https://api.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.

org
required
string
project
required
string
Media typeapplication/json
object
branch
required
string
path
required
string
content
required
Any of:
string
Examplegenerated
{
"branch": "example",
"path": "example",
"content": "example"
}

Draft

Media typeapplication/json
object
path
required
string
content
required
Any of:
string
original
required
Any of:
string
stale
required
boolean
author
required
string
updatedAt
required
Any of:
number
Example
{
"updatedAt": "Infinity"
}

BadRequest

Media typeapplication/json
object
_tag
required
string
Allowed values: BadRequest
Example
{
"_tag": "BadRequest"
}

Unauthorized

Media typeapplication/json
object
_tag
required
string
Allowed values: Unauthorized
message
required
string
Example
{
"_tag": "Unauthorized"
}

ProjectNotFound | BranchNotFound

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ProjectNotFound
project
required
string
Example
{
"_tag": "ProjectNotFound"
}