---
title: "Create brand from template file"
url: "https://docs.signnow.com/docs/general-branding/operations/post-v2-brands-upload-file"
type: "endpoint"
section: "general-branding"
slug: "general-branding/operations/post-v2-brands-upload-file"
method: "POST"
path: "/v2/brands/upload-file"
operation_id: "post-v2-brands-upload-file"
authorization: "bearer"
---

# Create brand from template file

`POST /v2/brands/upload-file`

This endpoint allows users to upload a template in JSON/XML file with brand settings and current resources.

Get the up-to-date template file [here](/docs/general-branding/operations/get-v2-brands-template-file). 

Assign the created brand ID to any of these levels: 

* [Brand your documents](/docs/general-branding/operations/put-v2-documents-document_id-brand). 
* [Brand your document groups](/docs/general-branding/operations/put-v2-document-groups-document_group_id-brand). 
* [Brand your applications](/docs/general-branding/operations/put-v2-applications-application_id-brand). 
 
The template structure consists of two required objects: 

* `title`: a string parameter with a brand title. 
* `resources`: an array of objects with the list of resources and their properties. 

Example schema:

```
{
    "title": "some brand title",
    "resources": [
        "general": {...},
        "editor": {...},
        "send-invite": {...},
        "logo": {...},
        "email-general": {...},
        "email-invite": {...},
        ...
    ]
}

```

## Authorization

bearer

## Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Content-Type` | string | No | multipart/form-data |

## Form Data Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `file` | file | Yes | @/path/to/your/file.json |

## Responses

### 201

Success

**Example** (`Success`)

```json
{
  "data": {
    "id": "17XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  }
}
```

### 400

* Incorrect or missing token.
* Template file missing.
* Template file is empty.
* JSON is empty.
* Resources parameter is missing.
* Incorrect file format.
* Incorrect JSON format.
* `resources` is not an array.
* `resources` array is empty.
* `general` is not an array.
* `general` array is empty.
* `editor` is not an array.
* `editor` array is empty.
* `logo` is not an array.
* `logo` array is empty.
* `email-logo` is not an array.
* `email-logo` is empty.
* Missing `email-logo.url`.
* Incorrect `email-logo.url`.
* `email-logo.url` is not a string.
* `email-logo.url` does not contain an image.
* `email-logo.url` contains an image that cannot be downloaded.
* `email-logo.url` contains an image that is too big.
* Missing `logo.url`.
* Incorrect `logo.url`.
* `logo.url` is not a string.
* `logo.url` does not contain an image.
* `logo.url` contains an image that cannot be downloaded.
* `logo.url` contains an image that is too big.
* `email-invite` is not an array.
* `email-invite` array is empty.
* `email-invite-reassign` is not an array.
* `email-invite-reassign` array is empty.
* `email-invite-completed` is not an array.
* `email-invite-completed` array is empty.
* `email-invite-canceled` is not an array.
* `email-invite-canceled` array is empty.
* `email-invite-reminder` is not an array.
* `email-invite-reminder` array is empty.
* `email-general` is not an array.
* `email-general` array is empty.
* `title` is missing.
* `title` is empty.
* `title` not string.
* `title` is longer than 100 characters.
* Unexpected resources.
* Send invite resource parameter validation errors.
* Editor resource parameter validation errors.
* General resource parameter validation errors.

**Example** (`Example 1`)

```json
{
  "errors": [
    [
      {
        "code": 25002292,
        "message": "The `continue-button.visibility` must be a boolean."
      }
    ]
  ]
}
```

**Example** (`Empty JSON`)

```json
{
  "code": 25002122,
  "message": "Empty JSON provided."
}
```

**Example** (`Missing title`)

```json
{
  "code": 25002113,
  "message": "The `title` is required."
}
```

**Example** (`logo not array`)

```json
{
  "code": 25002101,
  "message": "The `resources.logo` must be an array."
}
```

**Example** (`editor not array`)

```json
{
  "code": 25002099,
  "message": "The `resources.editor` must be an array."
}
```

**Example** (`title not string`)

```json
{
  "code": 25002115,
  "message": "The `title` must be a string."
}
```

**Example** (`Missing resources`)

```json
{
  "code": 25002123,
  "message": "The `resources` is required."
}
```

**Example** (`general not array`)

```json
{
  "code": 25002097,
  "message": "The `resources.general` must be an array."
}
```

**Example** (`Missing `logo.url``)

```json
{
  "code": 25002128,
  "message": "The `url` is required."
}
```

**Example** (`Empty template file`)

```json
{
  "code": 25002133,
  "message": "An empty file is not allowed."
}
```

**Example** (`logo.url not string`)

```json
{
  "code": 25002132,
  "message": "The `url` should be a string."
}
```

**Example** (`resources not array`)

```json
{
  "code": 25002095,
  "message": "The `resources` must be an array."
}
```

**Example** (`Unexpected resources`)

```json
{
  "code": 25002117,
  "message": "The \"test\" was not expected in `resources` field."
}
```

**Example** (`email-logo not array`)

```json
{
  "code": 25002125,
  "message": "The `resources.email-logo` must not be an empty array."
}
```

**Example** (`Incorrect JSON format`)

```json
{
  "code": 25002002,
  "message": "Invalid payload given."
}
```

**Example** (`Incorrect file format`)

```json
{
  "code": 25002120,
  "message": "The mime type of the file is invalid"
}
```

**Example** (`Missing template file`)

```json
{
  "code": 25002118,
  "message": "Brand file is required."
}
```

**Example** (`Missing email-logo.url`)

```json
{
  "code": 25002128,
  "message": "The `url` is required."
}
```

**Example** (`email-invite not array`)

```json
{
  "code": 25002103,
  "message": "The `resources.email-invite` must be an array."
}
```

**Example** (`email-general not array`)

```json
{
  "code": 25002126,
  "message": "The `resources.email-general` must be an array."
}
```

**Example** (`email-logo.url not string`)

```json
{
  "code": 25002132,
  "message": "The `url` should be a string."
}
```

**Example** (`Incorrect or missing token`)

```json
{
  "code": 1537,
  "error": "invalid_token"
}
```

**Example** (`resources.send-invite is empty`)

```json
{
  "code": 25002353,
  "message": "The `resources.send-invite` must not be an empty array."
}
```

**Example** (`email-invite-canceled not array`)

```json
{
  "code": 25002109,
  "message": "The `resources.email-invite-canceled` must be an array."
}
```

**Example** (`email-invite-reassign not array`)

```json
{
  "code": 25002105,
  "message": "The `resources.email-invite-reassign` must be an array."
}
```

**Example** (`email-invite-reminder not array`)

```json
{
  "code": 25002111,
  "message": "The `resources.email-invite-reminder` must be an array."
}
```

**Example** (`email-invite-completed not array`)

```json
{
  "code": 25002107,
  "message": "The `resources.email-invite-completed` must be an array."
}
```

**Example** (`Request body incorrect or missing`)

```json
{
  "code": 25002002,
  "message": "Invalid payload given."
}
```

**Example** (`resources.send-invite not an array`)

```json
{
  "code": 25002352,
  "message": "The `resources.send-invite` must be an array."
}
```

### 403

The user is authorized with a token from an app they don’t own.

**Example** (`Example 1`)

```json
{
  "code": 25002001,
  "message": "Brand action not allowed."
}
```

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/v2/brands/upload-file" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json"
```

---
*Full reference: https://docs.signnow.com/docs/general-branding/operations/post-v2-brands-upload-file*
