# Bot Code Transfer System (A-Z)

> Securely transfer bot source code and architecture between Botlify users with automatic credential sanitization.

**Category:** REST API Reference  
**URL:** https://docs.botlify.cloud/?page=api-transfers  
**Platform:** Botlify Cloud (https://botlify.cloud)  

---

## How Bot Transfer Works

      

The Bot Transfer Engine allows developers to clone and transfer bot projects to clients or other developers safely. Sensitive credentials (`.env` tokens and live `database.db`) are automatically sanitized and kept private.

      

## 1. Create Transfer Offer (create_transfer)

      

Action: `create_transfer`
      Parameters: `bot_id`, `target_recipient` (Telegram `@username` or numeric ID)

      
```php
curl -X POST https://botlify.cloud/user_api.php   -H "X-API-KEY: YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{
    "action": "create_transfer",
    "bot_id": 14,
    "target_recipient": "@client_username"
  }'
```

      

Returns a secure 72-hour transfer code: `{"ok": true, "transfer_code": "TR-14-8F92A1BC"}`.

      

## 2. List Pending Transfers (list_transfers)

      

Action: `list_transfers` or `transfers`
      Returns incoming offers awaiting your acceptance as well as outgoing offers you created.

      

## 3. Inspect Transfer Details (get_transfer)

      

Action: `get_transfer`
      Parameters: `transfer_code`
      Returns the bot display name, code file count, sender handle, and expiration timestamp.

      

## 4. Accept Bot Transfer (accept_transfer)

      

Action: `accept_transfer`
      Parameters:

      
        
- transfer_code: The transfer verification code (e.g. TR-14-8F92A1BC).

        
- token: Recipient's new Telegram BotFather token.

        
- admin_chat_id (optional): Recipient's admin chat ID.

      
      
```php
curl -X POST https://botlify.cloud/user_api.php   -H "X-API-KEY: RECIPIENT_API_KEY"   -H "Content-Type: application/json"   -d '{
    "action": "accept_transfer",
    "transfer_code": "TR-14-8F92A1BC",
    "token": "7987654321:AAHnew_recipient_token..."
  }'
```

      

## 5. Reject Bot Transfer (reject_transfer)

      

Action: `reject_transfer`
      Parameters: `transfer_id` (Numeric ID from `list_transfers`).
