# Transfer an instance

> Move an instance to another organization.

`POST /api/organizations/{organizationId}/instances/{instanceId}/transfer`

Transfer an instance.

Moves an instance from its current organization to another one. Ownership of the instance - and the product data scoped to it - passes to the target organization identified by `organization_id`.

> **Ownership change**
>
> Transferring an instance hands its data and access to the target organization. The `handle` is preserved, so existing integrations keep resolving, but authorization is re-evaluated against the new owner.

## Path parameters

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

## Request body

| Property          | Type     | Required | Description                                                                                                                                                         |
| ----------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `organization_id` | `string` | Yes      | Identifier of the organization the instance is transferred to. It must already be one of the instance's authorized organizations and must not be the current owner. |

## Response

**200** - Instance successfully transferred

| 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** - Only organization owners can transfer instances

_No response body._

**404** - Organization or instance not found

_No response body._

**409** - Target organization is not authorized or is already the owner

_No response body._

**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 POST 'https://identity.flowkiwi.net/api/organizations/<organization_id>/instances/<instance_id>/transfer' \
  -H 'Authorization: Bearer {token}' \
  -H 'Accept: application/ld+json' \
  -H 'Content-Type: application/ld+json' \
  -d '{
  "organization_id": "0196f3a0-1111-7000-8000-000000000002"
}'
```

### 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"
}
```
