curl --request POST \
--url https://api.example.com/api/projects/{projectId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sample document",
"type": "f",
"contentType": "<string>",
"content": "<unknown>",
"testEvent": "<string>",
"parent": "<string>",
"duplicate": false,
"meta": {},
"source": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"path": "<string>",
"name": "<string>",
"type": "f",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"meta": {},
"contentType": "<string>",
"size": 123,
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedAt": "<string>",
"publishedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"published": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"content": "<unknown>",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"createdAt": "<string>",
"versions": [
"<unknown>"
],
"releases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}
]
},
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"content": "<unknown>",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"createdAt": "<string>",
"versions": [
"<unknown>"
],
"releases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}
]
}
],
"changeRequests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"status": "<string>",
"createdAt": "<string>"
}
],
"view": {
"description": "<string>",
"permissions": {}
},
"updatedAt": "<string>",
"deletedAt": "<string>"
}Create a new document or directory within a project.
curl --request POST \
--url https://api.example.com/api/projects/{projectId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sample document",
"type": "f",
"contentType": "<string>",
"content": "<unknown>",
"testEvent": "<string>",
"parent": "<string>",
"duplicate": false,
"meta": {},
"source": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"path": "<string>",
"name": "<string>",
"type": "f",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"meta": {},
"contentType": "<string>",
"size": 123,
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedAt": "<string>",
"publishedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"published": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"content": "<unknown>",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"createdAt": "<string>",
"versions": [
"<unknown>"
],
"releases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}
]
},
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"content": "<unknown>",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"createdAt": "<string>",
"versions": [
"<unknown>"
],
"releases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}
]
}
],
"changeRequests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"status": "<string>",
"createdAt": "<string>"
}
],
"view": {
"description": "<string>",
"permissions": {}
},
"updatedAt": "<string>",
"deletedAt": "<string>"
}Personal access token is obtained through your profile
Project unique identifier
Document name
"Sample document"
Document type (file or directory)
f, d, e Content MIME type for files
Initial document content
Default test event context
Parent directory key path
Allow duplicate names
Document metadata
Show child attributes
Source document key to copy content from
Newly created document
Newly created document
Document unique identifier
Materialized lowercase path based on the name
Materialized path based on the name
Document name
Document type (file, directory, or external file)
f, d, e Project ID
Document metadata
Show child attributes
Content MIME type
Document size in bytes
Parent document ID
Currently published version ID
Publication timestamp
User who published the document
Show child attributes
Published version details
Show child attributes
Document versions
Show child attributes
Pending change requests
Show child attributes
Document view configuration
Show child attributes
Last update timestamp
Deletion timestamp if soft deleted
Was this page helpful?