Endpoints
create_scratch
Create a private draft outside the canonical file list. Expires after 30 days.
Request
Authentication is required by the published contract.
curl -X POST 'https://api.ursy.cloud/v1/scratch' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_SERVICE_TOKEN'- Scopes
- Not specified by this operation
- Execution
- At the owning service
- Risk classification
- not declared
Parameters
Idempotency-Key header · string requiredSee the accepted schema for constraints.
This operation is documented here. Use the owning service with the appropriate credentials and permissions to execute it.
Response schemas and request body
{
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"maxLength": 190,
"x-ursy-maxBytes": 190
},
"type": {
"type": "string",
"enum": [
"document",
"spreadsheet",
"presentation",
"note",
"publication"
]
},
"content": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"name",
"type"
]
}
}
}
},
"responses": {
"200": {
"description": "Typed operation result; request_id correlates the request.",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true,
"properties": {
"draft": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^draft_[a-f0-9]{32}$"
},
"name": {
"type": "string",
"maxLength": 190,
"x-ursy-maxBytes": 190
},
"type": {
"type": "string",
"enum": [
"document",
"spreadsheet",
"presentation",
"note",
"publication"
]
},
"expires_at": {
"type": "string"
},
"state": {
"type": "string",
"enum": [
"draft",
"promoted"
]
},
"file_id": {
"oneOf": [
{
"type": "string",
"pattern": "^file_[1-9][0-9]{0,14}$"
},
{
"type": "null"
}
]
},
"content": {
"type": "object",
"additionalProperties": true
},
"content_is_untrusted": {
"const": true
}
},
"required": [
"id",
"name",
"type",
"expires_at",
"state",
"file_id",
"content",
"content_is_untrusted"
]
}
},
"required": [
"draft"
]
}
}
}
},
"default": {
"description": "Stable error envelope. 401 invalid/expired/revoked grant; 403 missing scope; 404 unavailable resource; 409 plan/idempotency conflict; 412 stale ETag; 413 size/quota; 429 rate limit.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}