Skip to main content
Skip table of contents

Creating a document

Creating a document

Creating a document

POST /api/admin/v1/documents

Method parameters

string title, name of the document


string description, description of the document


file file, document file (maximum file size 70MB)


file version, version of the document


bool is_public_download, file for public download

200 OK

Successful response

JSON
{
    "id": 2,
    "title": "2",
    "description": "1",
    "url": "https://vms.local/storage/downloads/documents/620261318effe/v1.3.docx",
    "version": "1",
    "is_public_download": false,
    "created_at": "2022-02-08 15:25:21"
}

401 Unauthorized

Authorization token is not provided or is invalid. Obtaining a token

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/documents' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "title": "string",
    "description": "string",
    "file": "file",
    "version": "file",
    "is_public_download": true
}'
PHP
PHP
$data = array (
  'title' => 'string',
  'description' => 'string',
  'file' => 'file',
  'version' => 'file',
  'is_public_download' => true,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/documents', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.