> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Install a template in the environment

POST https://api.contentful.com/spaces/{space_id}/environments/{environment_id}/template_installations/{template_id}/versions

Installs a template version in the environment, creating a new installation object on success. Defaults to the latest version if no version is specified.

Reference: https://contentful.com/developers/docs/references/content-management-api/content-model-templates/install-a-template-in-the-environment

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `space_id` (string, required) — The ID of the space. Alphanumerical.
- `environment_id` (string, required) — The ID of the environment.
- `template_id` (string, required) — The ID of the template. Alphanumerical.

## Response

### 201

Created - Resource created successfully

- `map from string to any`

## Examples

**Response**

```json
{
  "sys": {
    "createdAt": "2025-04-04T23:40:54.000Z",
    "createdBy": {
      "id": "75cxRYbSLlWMlCrN1tZGdP",
      "linkType": "User",
      "sys": "",
      "type": "Link"
    },
    "environment": {
      "id": "master",
      "linkType": "Environment",
      "sys": "",
      "type": "Link"
    },
    "id": "8a428ae1",
    "space": {
      "id": "hx6fedvayan0",
      "linkType": "Space",
      "sys": "",
      "type": "Link"
    },
    "status": "created",
    "template": {
      "id": "2nZrYQn7N7xijNAOhkKUrH",
      "linkType": "Template",
      "sys": "",
      "type": "Link",
      "version": "1"
    },
    "type": "EnvironmentTemplateInstallation",
    "updatedAt": "2025-04-04T23:40:54.000Z",
    "updatedBy": {
      "id": "75cxRYbSLlWMlCrN1tZGdP",
      "linkType": "User",
      "sys": "",
      "type": "Link"
    }
  }
}
```

**SDK Code**

```android Android
SDK currently doesn't implement this endpoint.
```

```java Java
SDK currently doesn't implement this endpoint.
```

```kotlin Kotlin
SDK currently doesn't implement this endpoint.
```

```swift Swift
We currently don't provide a CMA SDK for this platform.
```

```js-legacy JavaScript (legacy)
SDK currently doesn't implement this endpoint.
```

```javascript JavaScript
import { createClient } from 'contentful-management'

// Client init
const client = contentful.createClient({
  accessToken: '<content_management_api_key>'
})

const environmentTemplate = await client.environmentTemplate.install({
  spaceId: '<space_id>',
  environmentId: '<environment_id>',
  environmentTemplateId: '<environment_template_id>',
}, {
  version: 1
});
```

```php PHP
SDK currently doesn't implement this endpoint.
```

```ruby Ruby
SDK currently doesn't implement this endpoint.
```

```python Python
SDK currently doesn't implement this endpoint.
```

```.net .NET
SDK currently doesn't implement this endpoint.
```