Create a spec draft

Stores inline markdown files as a temporary draft

OAuth scopes
  • openid
Body
required
application/json
  • files
    Type: array object[] 1…50
    required

    Inline markdown files

  • name
    Type: string
    min length:  
    1
    max length:  
    200
    required

    Draft display name

Responses
  • application/json
Request Example for post/viewer/v1/drafts
curl https://api.specs.wseng.ai/viewer/v1/drafts \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "My spec draft",
  "files": [
    {
      "fileName": "overview.md",
      "content": "# Overview\n\nDraft content.\n"
    }
  ]
}'
{
  "draftId": "string",
  "continuationUrl": "string",
  "expiresAt": "string"
}