# Get NanoId from UUID

**Documentation:** /reference/api-reference/migration/getMigrationGetNanoid

Convert a legacy UUID to its corresponding NanoId for migration purposes. This endpoint facilitates the transition from UUID-based identifiers to the more compact NanoId format used in the v3 API.

---

## GET `/api/v3/migration/get-nanoid`

**Endpoint:** `https://backend.composio.dev/api/v3/migration/get-nanoid`

**Summary:** Get NanoId from UUID

Convert a legacy UUID to its corresponding NanoId for migration purposes. This endpoint facilitates the transition from UUID-based identifiers to the more compact NanoId format used in the v3 API.

### Authentication

**ApiKeyAuth** - API Key in `header` header `x-api-key` OR **UserApiKeyAuth** - API Key in `header` header `x-user-api-key`

### Query Parameters

- `uuid` (string (uuid)) *(required)*: The legacy UUID that needs to be converted to a NanoId
- `type` (enum: "CONNECTED_ACCOUNT" | "AUTH_CONFIG" | "TRIGGER_INSTANCE") *(required)*: The type of resource that the UUID belongs to

### Responses

#### 200 - Successfully retrieved NanoId for the given UUID

**Response Schema:**

- `nanoid` (string) *(required)*: The NanoId corresponding to the provided UUID. This is the new identifier that should be used in place of the legacy UUID.

**Example Response:**

```json
{
  "nanoid": "string"
}
```

#### 400 - Bad Request - Invalid UUID or resource not found

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 401 - Unauthorized - Invalid or missing API key

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 404 - Not Found - The UUID does not correspond to any resource of the specified type

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 410 - Gone - The UUID does not correspond to any resource of the specified type

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 500 - Internal server error - An unexpected error occurred during processing

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

### Example cURL Request

```bash
curl -X GET "https://backend.composio.dev/api/v3/migration/get-nanoid?uuid=550e8400-e29b-41d4-a716-446655440000&type=CONNECTED_ACCOUNT" \
  -H "x-api-key: YOUR_API_KEY"
```