> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v1/organizations/{orgId}/wallets/import

Register an imported Turnkey private key wallet for an organization

` POST /v1/organizations/{orgId}/wallets/import `

Register an imported Turnkey private key wallet for an organization

## Parameters

### ` orgId ` (path, required)

Organization ID

- ` value `: type ` string `

## Request body (required)

Content type: ` application/json `

Import wallet params

- ` value `: type ` unknown `

  - ` oneOf alternative 1 `: type ` object `

  - ` oneOf alternative 2 `: type ` object `

    - Required fields: ` address `, ` name `, ` turnkeyPrivateKeyId `

    - ` address `: type ` string `

    - ` name `: type ` string `

      - maxLength: ` 100 `

    - ` turnkeyPrivateKeyId `: type ` string `

## Responses

### ` 200 ` — OK

Content type: ` application/json `

- ` value `: type ` object `

  - ` accountType `: type ` string `

  - ` address `: type ` string `

  - ` createdAt `: type ` integer `

  - ` id `: type ` string `

  - ` isDefault `: type ` boolean `

  - ` isImported `: type ` boolean `

  - ` name `: type ` string `

  - ` organizationId `: type ` string `

  - ` providerType `: type ` string `

  - ` providerWalletId `: type ` string `

  - ` turnkeyRootUserId `: type ` string ` — TurnkeyRootUserId is an internal Turnkey infrastructure ID. Only populated for the import-wallet flow; do not rely on it in other consumers.

  - ` turnkeySubOrgId `: type ` string `

  - ` updatedAt `: type ` integer `

### ` 400 ` — Bad Request

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

### ` 401 ` — Unauthorized

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

### ` 409 ` — Conflict

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

### ` 500 ` — Internal Server Error

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

## Request examples

### cURL

```curl
curl -X POST 'https://api.example.com/v1/organizations/string/wallets/import' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

### JavaScript

```javascript
const response = await fetch('https://api.example.com/v1/organizations/string/wallets/import', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({})
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://api.example.com/v1/organizations/string/wallets/import', headers=headers, json={})
print(response.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{}`)
	req, _ := http.NewRequest("POST", "https://api.example.com/v1/organizations/string/wallets/import", body)
	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
	req.Header.Set("Content-Type", "application/json")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	result, _ := io.ReadAll(resp.Body)
	fmt.Println(string(result))
}
```