---
search:
  tags:
    - database-services
    - POST
seo:
  description: >-
    Bind a database service to a different installed… Reference for the POST
    /api/v1/database-services/{id}/license endpoint in the TimescaleDB
    Enterprise API.
  noindex: true
sidebar:
  label: Change a service's license
  badge: POST
title: Change a service's license
type: openapi-operation
---
Bind a database service to a different installed license.

`POST /api/v1/database-services/{id}/license`

**Request body** (`application/json`, required)

- `license_file` (string, required) — Installed license file id to bind this service to
- `restart` (boolean) — On a deployed service, also restart PostgreSQL to apply the new caps now (HA: one switchover; single node: a short outage). Without it, only the caps that need no restart apply now.
- `size` (string) — On a trial license, the size (a tier name) to cap PostgreSQL to. Empty on a trial means no caps. A paid license ignores it.

Request body example:

```json
{
  "license_file": "string",
  "restart": true,
  "size": "string"
}
```

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "caps_apply": "started",
  "detail": "string"
}
```
