Create a document

Creates a new document in the workspace. Returns the new document with workflow state "draft".

POST/api/v1/documents

Authorization

documents:writeapi key scoperequired
Required scope when calling with an API key.
document:writesession capabilityoptional
Required capability when calling with a signed-in session.

Request body

titlestringrequired
Display name for the document
document_typestringrequired"vsow"
Document template type
Example request
{
  "title": "New vSOW",
  "document_type": "vsow"
}

Request

curl -X POST "https://www.digitalstack360.com/api/v1/documents" \
  -H "Authorization: Bearer $DS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"New vSOW","document_type":"vsow"}'

Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.

Response

200 OK
{
  "data": {
    "document_id": "doc_xyz789",
    "title": "New vSOW",
    "document_type": "vsow",
    "workflow_state": "draft",
    "is_frozen": false,
    "created_at": "2026-05-12T10:00:00.000Z",
    "updated_at": "2026-05-12T10:00:00.000Z"
  }
}

Errors

401
missing_auth

No credentials provided

401
invalid_api_key

API key is invalid or revoked

400
bad_request

Missing or invalid request fields

403
scope_insufficient

Key lacks the required write scope