# Method: projects.locations.templates.upload

- [HTTP request](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/upload#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/upload#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/upload#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/upload#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/upload#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/upload#body.UploadTemplateResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/upload#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/upload#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates/upload#try-it)

Uploads a template. The content can be a previously downloaded template. Performs the same function as templates.create, but accepts input in a string format, which holds the complete representation of the Template content.

### HTTP request

`POST https://integrations.googleapis.com/v1/{parent=projects/*/locations/*}/templates:upload`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The template to upload. Format: projects/{project}/locations/{location} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "content": string, "fileFormat": enum (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/FileFormat`) } ``` |

| Fields ||
|---|---|
| `content` | `string` Required. The textproto of the template. |
| `fileFormat` | ``enum (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/FileFormat`)`` Required. File format for upload request. |

### Response body

Response for templates.upload.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "template": { object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Template`) } } ``` |

| Fields ||
|---|---|
| `template` | ``object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.templates#Template`)`` The uploaded Template |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `integrations.templates.create`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).