# Rename an instance

> Change an instance's display name.

`PATCH /api/organizations/{organizationId}/instances/{instanceId}`

Rename an instance.

Updates an instance's display `name`. The body is a [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7396) document.

> **Name only**
>
> Only the display `name` can be changed. The `handle` is permanent - product services and integrations rely on it, so it is never updated.

## Path parameters

| Name             | Type     | Required | Description                              |
| ---------------- | -------- | -------- | ---------------------------------------- |
| `organizationId` | `string` | Yes      | OrganizationInstancesResource identifier |
| `instanceId`     | `string` | Yes      | OrganizationInstancesResource identifier |

## Request body

| Property | Type     | Required | Description                                                                   |
| -------- | -------- | -------- | ----------------------------------------------------------------------------- |
| `name`   | `string` | -        | New human-readable display name for the instance. The handle is not affected. |

## Response

**200** - OrganizationInstancesResource resource updated

| Property                     | Type             | Required | Description                                                                                                                                                                                                                                                                           |
| ---------------------------- | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `@context`                   | `object`         | -        |                                                                                                                                                                                                                                                                                       |
| `@id`                        | `string`         | Yes      |                                                                                                                                                                                                                                                                                       |
| `@type`                      | `string`         | Yes      |                                                                                                                                                                                                                                                                                       |
| `id`                         | `string \| null` | -        | Unique identifier of the instance.                                                                                                                                                                                                                                                    |
| `name`                       | `string \| null` | -        | Human-readable display name of the instance.                                                                                                                                                                                                                                          |
| `handle`                     | `string \| null` | -        | Stable, URL-safe identifier of the instance. Used as the tenant subdomain when addressing the per-instance product services (e.g. `https://acme-eu.product-management.flowkiwi.net`). Lowercase letters and hyphens only, no leading or trailing hyphen, unique across all instances. |
| `created_at`                 | `string \| null` | -        | Date and time the instance was created (ISO 8601, UTC).                                                                                                                                                                                                                               |
| `updated_at`                 | `string \| null` | -        | Date and time the instance was last updated (ISO 8601, UTC).                                                                                                                                                                                                                          |
| `organization_id`            | `string \| null` | -        | Identifier of the organization that currently owns the instance.                                                                                                                                                                                                                      |
| `created_by_organization_id` | `string \| null` | -        | Identifier of the organization that originally created the instance. Immutable, it does not change when the instance is transferred to another organization.                                                                                                                          |

## Errors

**400** - Invalid input

| Property   | Type             | Required | Description                                                                                                                          |
| ---------- | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `@context` | `object`         | -        |                                                                                                                                      |
| `@id`      | `string`         | Yes      |                                                                                                                                      |
| `@type`    | `string`         | Yes      |                                                                                                                                      |
| `title`    | `string \| null` | -        | A short, human-readable summary of the problem.                                                                                      |
| `detail`   | `string \| null` | -        | A human-readable explanation specific to this occurrence of the problem.                                                             |
| `status`   | `number \| null` | -        |                                                                                                                                      |
| `instance` | `string \| null` | -        | A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. |
| `type`     | `string`         | -        | A URI reference that identifies the problem type                                                                                     |

**403** - Forbidden

| Property   | Type             | Required | Description                                                                                                                          |
| ---------- | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `@context` | `object`         | -        |                                                                                                                                      |
| `@id`      | `string`         | Yes      |                                                                                                                                      |
| `@type`    | `string`         | Yes      |                                                                                                                                      |
| `title`    | `string \| null` | -        | A short, human-readable summary of the problem.                                                                                      |
| `detail`   | `string \| null` | -        | A human-readable explanation specific to this occurrence of the problem.                                                             |
| `status`   | `number \| null` | -        |                                                                                                                                      |
| `instance` | `string \| null` | -        | A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. |
| `type`     | `string`         | -        | A URI reference that identifies the problem type                                                                                     |

**404** - Not found

| Property   | Type             | Required | Description                                                                                                                          |
| ---------- | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `@context` | `object`         | -        |                                                                                                                                      |
| `@id`      | `string`         | Yes      |                                                                                                                                      |
| `@type`    | `string`         | Yes      |                                                                                                                                      |
| `title`    | `string \| null` | -        | A short, human-readable summary of the problem.                                                                                      |
| `detail`   | `string \| null` | -        | A human-readable explanation specific to this occurrence of the problem.                                                             |
| `status`   | `number \| null` | -        |                                                                                                                                      |
| `instance` | `string \| null` | -        | A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. |
| `type`     | `string`         | -        | A URI reference that identifies the problem type                                                                                     |

**422** - An error occurred

| Property     | Type             | Required | Description |
| ------------ | ---------------- | -------- | ----------- |
| `@context`   | `object`         | -        |             |
| `@id`        | `string`         | Yes      |             |
| `@type`      | `string`         | Yes      |             |
| `status`     | `integer`        | -        |             |
| `violations` | `object[]`       | -        |             |
| `detail`     | `string`         | -        |             |
| `type`       | `string`         | -        |             |
| `title`      | `string \| null` | -        |             |
| `instance`   | `string \| null` | -        |             |

## Examples

### Example request

```bash
curl -X PATCH 'https://identity.flowkiwi.net/api/organizations/<organization_id>/instances/<instance_id>' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/ld+json' \
  -H 'Content-Type: application/merge-patch+json' \
  -d '{}'
```

### Example response

```json
{
  "@context": "string",
  "@id": "string",
  "@type": "OrganizationInstancesResource",
  "id": "0196f3a0-3333-7000-8000-000000000001",
  "name": "Acme EU",
  "handle": "acme-eu",
  "created_at": "2026-01-16T10:00:00+00:00",
  "updated_at": "2026-01-21T08:45:00+00:00",
  "organization_id": "0196f3a0-1111-7000-8000-000000000001",
  "created_by_organization_id": "0196f3a0-1111-7000-8000-000000000001"
}
```
