---
title: "Create a File"
slug: "createafile"
updated: 2026-04-16T07:04:17Z
published: 2026-04-16T07:04:17Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.12dsynergy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a File

This tutorial demonstrates how to create a file via the RESTful API.

The commands are provided in curl and can be run from the command prompt when the 12d Synergy Server is running (or in a batch script).

> [!NOTE]
> Additional API documentation
> 
> To get a list of most of the API requests available, with the 12d Synergy server running, browse [http://synergy.myserver.com/api-docs/ui/index](http://synergy.myserver.com/api-docs/ui/index).
> 
> (Replace [synergy.myserver.com](http://synergy.myserver.com) with the external server address and update the port numbers if necessary.)

### 1.1. Getting the Personal Access Token to access API

The tutorial for getting the PAT is here:[Generate PAT in Web client](/v1/docs/webclientgenerateapersonalaccesstokenpatinwebclientdoc).

### 1.2. Create a File

This request is in the API documentation under Files marked 'Create a new file'.

Click ![](https://cdn.document360.io/36833d89-59e3-46a5-b491-e9aa1b524a85/Images/Documentation/expand.png) in the line below to see the code.

****Sample Request****

```SampleRequest
curl --location 'http://synergy.myserver.com/api/v1/files/createFile' \
--header 'Authorization: Bearer <your-token-here>' \
--header 'Content-Type: application/json' \
--data '{
  "folder_id": {
    "_id": 0,
    "_server_id": 0,
    "_server_guid": "00000000-0000-0000-0000-000000000000",
    "IDString": "string"
  },
  "file_name": "string",
  "base_doc_id": {
    "_id": 0,
    "_server_id": 0,
    "_server_guid": "00000000-0000-0000-0000-000000000000",
    "IDString": "string"
  },
  "resolved_attribs": {},
  "replacements": {},
  "create_resolved_as_plain_text": true,
  "create_user_defined_as_file_attribs": true,
  "id": {
    "_id": 0,
    "_server_id": 0,
    "_server_guid": "00000000-0000-0000-0000-000000000000",
    "IDString": "string"
  },
  "description": "string",
  "change_attributes": [
    {
      "attribute_id": {
        "_id": 0,
        "_server_id": 0,
        "_server_guid": "00000000-0000-0000-0000-000000000000",
        "IDString": "string"
      },
      "type": 0,
      "value": {}
    }
  ],
  "file_attributes": [
    {
      "attribute_id": {
        "_id": 0,
        "_server_id": 0,
        "_server_guid": "00000000-0000-0000-0000-000000000000",
        "IDString": "string"
      },
      "type": 0,
      "value": {}
    }
  ],
  "workflow_capture_data": [
    {}
  ]
}'
```

**Sample Response**

The response will either be true if successful or false.
