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

# Update User Profile

## Endpoint Overview

**POST** `https://api.unibee.dev/merchant/user/update`

Update User Profile

***

## Authorization

All UniBee Merchant API requests require authentication via API key.

| Header          | Required | Description                           |
| --------------- | -------- | ------------------------------------- |
| `Authorization` | Yes      | Bearer `<your_api_key>`               |
| `Content-Type`  | Yes      | `application/json` (for request body) |

***

## Parameters

Parameters for this endpoint are listed below. The schema is also shown in the Try it panel.

### Request body

| Name                 | Type    | Required | Description                                                                                       |
| -------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------- |
| `LinkedIn`           | string  | No       | LinkedIn                                                                                          |
| `address`            | string  | No       | Billing Address                                                                                   |
| `city`               | string  | No       | city                                                                                              |
| `companyName`        | string  | No       | Company Name                                                                                      |
| `countryCode`        | string  | No       | Country Code                                                                                      |
| `countryName`        | string  | No       | Country Name                                                                                      |
| `email`              | string  | No       | The email of user, either Email or UserId needed                                                  |
| `externalUserId`     | string  | No       | ExternalUserId                                                                                    |
| `facebook`           | string  | No       | Facebook                                                                                          |
| `firstName`          | string  | No       | First name                                                                                        |
| `gatewayId`          | integer | No       | GatewayId                                                                                         |
| `gatewayPaymentType` | string  | No       | Gateway Payment Type                                                                              |
| `language`           | string  | No       | User Language, en\|ru\|cn\|vi\|bp                                                                 |
| `lastName`           | string  | No       | Last Name                                                                                         |
| `metadata`           | object  | No       | Metadata，Map                                                                                      |
| `otherSocialInfo`    | string  | No       | Other Social Info                                                                                 |
| `paymentMethodId`    | string  | No       | PaymentMethodId of gateway, available for card type gateway, payment automatic will enable if set |
| `phone`              | string  | No       | Phone                                                                                             |
| `registrationNumber` | string  | No       | RegistrationNumber                                                                                |
| `state`              | string  | No       | State                                                                                             |
| `telegram`           | string  | No       | Telegram                                                                                          |
| `tiktok`             | string  | No       | Tiktok                                                                                            |
| `type`               | integer | No       | User type, 1-Individual\|2-Business                                                               |
| `userId`             | integer | No       | The id of user, either Email or UserId needed                                                     |
| `vATNumber`          | string  | No       | VAT Number                                                                                        |
| `weChat`             | string  | No       | WeChat                                                                                            |
| `whatsApp`           | string  | No       | WhatsApp                                                                                          |
| `zipCode`            | string  | No       | zip\_code                                                                                         |

***

## Request examples

### cURL

```bash theme={null}
curl -X POST "https://api.unibee.dev/merchant/user/update" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "LinkedIn": "",
  "address": "",
  "city": "",
  "companyName": "",
  "countryCode": "",
  "countryName": "",
  "email": "user@example.com",
  "externalUserId": "id_example",
  "facebook": "",
  "firstName": "",
  "gatewayId": 0,
  "gatewayPaymentType": "",
  "language": "",
  "lastName": "",
  "metadata": {},
  "otherSocialInfo": "",
  "paymentMethodId": "id_example",
  "phone": "",
  "registrationNumber": "",
  "state": "",
  "telegram": "",
  "tiktok": "",
  "type": 0,
  "userId": 0,
  "vATNumber": "",
  "weChat": "",
  "whatsApp": "",
  "zipCode": ""
}'
```

### Sandbox

```bash theme={null}
curl -X POST "https://api-sandbox.unibee.top/merchant/user/update" \
  -H "Authorization: Bearer YOUR_SANDBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "LinkedIn": "",
  "address": "",
  "city": "",
  "companyName": "",
  "countryCode": "",
  "countryName": "",
  "email": "user@example.com",
  "externalUserId": "id_example",
  "facebook": "",
  "firstName": "",
  "gatewayId": 0,
  "gatewayPaymentType": "",
  "language": "",
  "lastName": "",
  "metadata": {},
  "otherSocialInfo": "",
  "paymentMethodId": "id_example",
  "phone": "",
  "registrationNumber": "",
  "state": "",
  "telegram": "",
  "tiktok": "",
  "type": 0,
  "userId": 0,
  "vATNumber": "",
  "weChat": "",
  "whatsApp": "",
  "zipCode": ""
}'
```

***

## Response

Success responses return a JSON envelope with `code`, `data`, `message`, `redirect`, and `requestId`. `code` `0` indicates success.

| Field       | Type    | Description                  |
| ----------- | ------- | ---------------------------- |
| `code`      | integer | Response code. `0` = success |
| `data`      | object  | Response payload             |
| `data.user` | object  |                              |
| `message`   | string  | Human-readable message       |
| `requestId` | string  | Request ID for support       |

***

## Error handling

| HTTP status | Meaning                                                                   |
| ----------- | ------------------------------------------------------------------------- |
| 400         | Bad request — invalid or missing parameters. Check `message` in the body. |
| 401         | Unauthorized — missing or invalid API key.                                |
| 404         | Not found — invalid path or resource.                                     |
| 500         | Server error — retry with backoff.                                        |

When `code` in the response body is non-zero, check `message` for details. Use `requestId` when contacting support.


## OpenAPI

````yaml post /merchant/user/update
openapi: 3.0.0
info:
  description: UniBee Api Server
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  title: OpenAPI UniBee
  version: daily,buildtime:202603161017
servers:
  - url: https://api.unibee.dev
  - url: https://api-sandbox.unibee.top
security:
  - Authorization: []
paths:
  /merchant/user/update:
    post:
      tags:
        - User
      summary: Update User Profile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/unibee.api.merchant.user.UpdateReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  code:
                    format: int
                    properties: {}
                    type: integer
                  data:
                    properties:
                      user:
                        $ref: >-
                          #/components/schemas/unibee.api.bean.detail.UserAccountDetail
                    type: object
                  merchantId:
                    format: int64
                    properties: {}
                    type: integer
                  message:
                    format: string
                    properties: {}
                    type: string
                  redirect:
                    format: string
                    properties: {}
                    type: string
                  requestId:
                    format: string
                    properties: {}
                    type: string
                type: object
          description: ''
components:
  schemas:
    unibee.api.merchant.user.UpdateReq:
      properties:
        LinkedIn:
          description: LinkedIn
          format: '*string'
          properties: {}
          type: string
        address:
          description: Billing Address
          format: '*string'
          properties: {}
          type: string
        city:
          description: city
          format: '*string'
          properties: {}
          type: string
        companyName:
          description: Company Name
          format: '*string'
          properties: {}
          type: string
        countryCode:
          description: Country Code
          format: '*string'
          properties: {}
          type: string
        countryName:
          description: Country Name
          format: '*string'
          properties: {}
          type: string
        email:
          description: The email of user, either Email or UserId needed
          format: '*string'
          properties: {}
          type: string
        externalUserId:
          description: ExternalUserId
          format: '*string'
          properties: {}
          type: string
        facebook:
          description: Facebook
          format: '*string'
          properties: {}
          type: string
        firstName:
          description: First name
          format: '*string'
          properties: {}
          type: string
        gatewayId:
          description: GatewayId
          format: '*int64'
          properties: {}
          type: integer
        gatewayPaymentType:
          description: Gateway Payment Type
          format: '*string'
          properties: {}
          type: string
        language:
          description: User Language, en|ru|cn|vi|bp
          format: '*string'
          properties: {}
          type: string
        lastName:
          description: Last Name
          format: '*string'
          properties: {}
          type: string
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          description: Metadata，Map
          format: '*map[string]interface {}'
          properties: {}
          type: object
        otherSocialInfo:
          description: Other Social Info
          format: '*string'
          properties: {}
          type: string
        paymentMethodId:
          description: >-
            PaymentMethodId of gateway, available for card type gateway, payment
            automatic will enable if set
          format: '*string'
          properties: {}
          type: string
        phone:
          description: Phone
          format: '*string'
          properties: {}
          type: string
        registrationNumber:
          description: RegistrationNumber
          format: '*string'
          properties: {}
          type: string
        state:
          description: State
          format: string
          properties: {}
          type: string
        telegram:
          description: Telegram
          format: '*string'
          properties: {}
          type: string
        tiktok:
          description: Tiktok
          format: '*string'
          properties: {}
          type: string
        type:
          description: User type, 1-Individual|2-Business
          format: '*int64'
          properties: {}
          type: integer
        userId:
          description: The id of user, either Email or UserId needed
          format: '*int64'
          properties: {}
          type: integer
        vATNumber:
          description: VAT Number
          format: '*string'
          properties: {}
          type: string
        weChat:
          description: WeChat
          format: '*string'
          properties: {}
          type: string
        whatsApp:
          description: WhatsApp
          format: '*string'
          properties: {}
          type: string
        zipCode:
          description: zip_code
          format: '*string'
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.UserAccountDetail:
      properties:
        address:
          description: address
          format: string
          properties: {}
          type: string
        avatarUrl:
          description: avator url
          format: string
          properties: {}
          type: string
        billingType:
          description: 1-recurring,2-one-time
          format: int
          properties: {}
          type: integer
        birthday:
          description: brithday
          format: string
          properties: {}
          type: string
        city:
          description: city
          format: string
          properties: {}
          type: string
        companyName:
          description: company name
          format: string
          properties: {}
          type: string
        countryCode:
          description: country_code
          format: string
          properties: {}
          type: string
        countryName:
          description: country_name
          format: string
          properties: {}
          type: string
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        creditAccounts:
          description: creditAccounts
          format: '[]*bean.CreditAccount'
          items:
            $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
          properties: {}
          type: array
        custom:
          description: custom
          format: string
          properties: {}
          type: string
        email:
          description: email
          format: string
          properties: {}
          type: string
        externalUserId:
          description: external_user_id
          format: string
          properties: {}
          type: string
        facebook:
          description: facebook
          format: string
          properties: {}
          type: string
        firstName:
          description: first name
          format: string
          properties: {}
          type: string
        gateway:
          $ref: '#/components/schemas/unibee.api.bean.detail.Gateway'
        gatewayId:
          description: gateway_id
          format: int64
          properties: {}
          type: integer
        gatewayPaymentType:
          format: string
          properties: {}
          type: string
        gender:
          description: gender
          format: string
          properties: {}
          type: string
        id:
          description: userId
          format: int64
          properties: {}
          type: integer
        isRisk:
          description: is risk account (deperated)
          format: int
          properties: {}
          type: integer
        isSpecial:
          description: is special account（0.no，1.yes）- deperated
          format: int
          properties: {}
          type: integer
        language:
          description: User Language, en|ru|cn|vi|bp
          format: string
          properties: {}
          type: string
        lastLoginAt:
          description: last login time, utc time
          format: int64
          properties: {}
          type: integer
        lastName:
          description: last name
          format: string
          properties: {}
          type: string
        linkedIn:
          description: linkedin
          format: string
          properties: {}
          type: string
        merchantId:
          description: merchant_id
          format: int64
          properties: {}
          type: integer
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        mobile:
          description: mobile
          format: string
          properties: {}
          type: string
        otherSocialInfo:
          format: string
          properties: {}
          type: string
        paymentMethod:
          format: string
          properties: {}
          type: string
        phone:
          description: phone
          format: string
          properties: {}
          type: string
        planId:
          description: PlanId
          format: int64
          properties: {}
          type: integer
        promoCreditAccounts:
          description: promoCreditAccounts
          format: '[]*bean.CreditAccount'
          items:
            $ref: '#/components/schemas/unibee.api.bean.CreditAccount'
          properties: {}
          type: array
        recurringAmount:
          description: total recurring amount, cent
          format: int64
          properties: {}
          type: integer
        registrationNumber:
          description: RegistrationNumber
          format: string
          properties: {}
          type: string
        school:
          description: school
          format: string
          properties: {}
          type: string
        state:
          description: state
          format: string
          properties: {}
          type: string
        status:
          description: 0-Active, 2-Suspend
          format: int
          properties: {}
          type: integer
        subscriptionId:
          description: subscription id
          format: string
          properties: {}
          type: string
        subscriptionName:
          description: subscription name
          format: string
          properties: {}
          type: string
        subscriptionStatus:
          description: >-
            sub status， 1-Pending｜2-Active｜3-PendingInActive | 4-Cancel |
            5-Expire | 6- Suspend| 7-Incomplete | 8-Processing | 9-Failed
          format: int
          properties: {}
          type: integer
        taxPercentage:
          description: taxPercentage，1000 = 10%
          format: int64
          properties: {}
          type: integer
        telegram:
          description: telegram
          format: string
          properties: {}
          type: string
        tikTok:
          description: tictok
          format: string
          properties: {}
          type: string
        timeZone:
          format: string
          properties: {}
          type: string
        type:
          description: User type, 1-Individual|2-Business
          format: int64
          properties: {}
          type: integer
        userName:
          description: user name
          format: string
          properties: {}
          type: string
        vATNumber:
          description: vat number
          format: string
          properties: {}
          type: string
        version:
          description: version
          format: int
          properties: {}
          type: integer
        weChat:
          description: wechat
          format: string
          properties: {}
          type: string
        whatsAPP:
          description: whats app
          format: string
          properties: {}
          type: string
        zipCode:
          description: zip_code
          format: string
          properties: {}
          type: string
      type: object
    interface:
      properties: {}
      type: object
    unibee.api.bean.CreditAccount:
      properties:
        amount:
          description: credit amount, in cent if type is main
          format: int64
          properties: {}
          type: integer
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: currency
          format: string
          properties: {}
          type: string
        currencyAmount:
          description: currency amount, in cent
          format: int64
          properties: {}
          type: integer
        exchangeRate:
          description: >-
            keep two decimal places，multiply by 100 saved, 1 currency = 1 credit
            * (exchange_rate/100), main account fixed rate to 100
          format: int64
          properties: {}
          type: integer
        id:
          description: Id
          format: int64
          properties: {}
          type: integer
        payoutEnable:
          description: 0-no, 1-yes
          format: int
          properties: {}
          type: integer
        rechargeEnable:
          description: 0-no, 1-yes
          format: int
          properties: {}
          type: integer
        totalDecrementAmount:
          description: the total decrement amount
          format: int64
          properties: {}
          type: integer
        totalIncrementAmount:
          description: the total increment amount
          format: int64
          properties: {}
          type: integer
        type:
          description: type of credit account, 1-main account, 2-gift account
          format: int
          properties: {}
          type: integer
        userId:
          description: user_id
          format: int64
          properties: {}
          type: integer
      type: object
    unibee.api.bean.detail.Gateway:
      properties:
        IsSetupFinished:
          description: Whether the gateway finished setup process
          format: bool
          properties: {}
          type: boolean
        archive:
          format: bool
          properties: {}
          type: boolean
        autoChargeEnabled:
          format: bool
          properties: {}
          type: boolean
        bank:
          $ref: '#/components/schemas/unibee.api.bean.detail.GatewayBank'
        companyIssuer:
          $ref: '#/components/schemas/unibee.api.bean.detail.GatewayCompanyIssuer'
        countryConfig:
          additionalProperties:
            format: bool
            properties: {}
            type: boolean
          format: map[string]bool
          properties: {}
          type: object
        createTime:
          description: create utc time
          format: int64
          properties: {}
          type: integer
        currency:
          description: 'The currency of wire transfer '
          format: string
          properties: {}
          type: string
        currencyExchange:
          description: >-
            The currency exchange for gateway payment, effect at start of
            payment creation when currency matched
          format: '[]*detail.GatewayCurrencyExchange'
          items:
            $ref: >-
              #/components/schemas/unibee.api.bean.detail.GatewayCurrencyExchange
          properties: {}
          type: array
        currencyExchangeEnabled:
          description: whether to enable currency exchange
          format: bool
          properties: {}
          type: boolean
        defaultGatewayPaymentType:
          $ref: '#/components/schemas/unibee.internal.interface.GatewayPaymentType'
        description:
          description: The description of gateway
          format: string
          properties: {}
          type: string
        displayName:
          description: The gateway display name, used at user portal
          format: string
          properties: {}
          type: string
        gatewayIcons:
          description: The gateway display name, used at user portal
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
        gatewayId:
          format: int64
          properties: {}
          type: integer
        gatewayKey:
          format: string
          properties: {}
          type: string
        gatewayLogo:
          format: string
          properties: {}
          type: string
        gatewayName:
          description: >-
            The gateway name,
            stripe|paypal|changelly|unitpay|payssion|cryptadium
          format: string
          properties: {}
          type: string
        gatewayPaymentTypes:
          description: gatewayPaymentTypes
          format: '[]*_interface.GatewayPaymentType'
          items:
            $ref: '#/components/schemas/unibee.internal.interface.GatewayPaymentType'
          properties: {}
          type: array
        gatewaySecret:
          format: string
          properties: {}
          type: string
        gatewayType:
          description: >-
            gateway type: 1-Card | 2-Crypto | 3-Wire Transfer | 4-PayPal |
            5-Credit | 6-Alipay+ | 7-Hyperswitch | 8-External
          format: int64
          properties: {}
          type: integer
        gatewayWebhookIntegrationLink:
          description: >-
            The gateway webhook integration guide link, gateway webhook need
            setup if not blank
          format: string
          properties: {}
          type: string
        gatewayWebsiteLink:
          description: The gateway website link
          format: string
          properties: {}
          type: string
        isDefault:
          format: bool
          properties: {}
          type: boolean
        metadata:
          additionalProperties:
            $ref: '#/components/schemas/interface'
          format: map[string]interface {}
          properties: {}
          type: object
        minimumAmount:
          description: The minimum amount of wire transfer
          format: int64
          properties: {}
          type: integer
        name:
          description: The name of gateway
          format: string
          properties: {}
          type: string
        privateSecretName:
          format: string
          properties: {}
          type: string
        publicKeyName:
          format: string
          properties: {}
          type: string
        setupGatewayPaymentTypes:
          description: The total list of gateway payment types, used for setup
          format: '[]*_interface.GatewayPaymentType'
          items:
            $ref: '#/components/schemas/unibee.internal.interface.GatewayPaymentType'
          properties: {}
          type: array
        sort:
          description: >-
            The sort value of payment gateway, The higher the value, the lower
            the ranking
          format: int64
          properties: {}
          type: integer
        subGateway:
          format: string
          properties: {}
          type: string
        subGatewayName:
          format: string
          properties: {}
          type: string
        webhookEndpointUrl:
          description: 'The endpoint url of gateway webhook '
          format: string
          properties: {}
          type: string
        webhookSecret:
          description: The secret of gateway webhook
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.GatewayBank:
      properties:
        ABARoutingNumber:
          description: 'The ABARoutingNumber of wire transfer '
          format: string
          properties: {}
          type: string
        CNAPS:
          description: 'The CNAPS of wire transfer '
          format: string
          properties: {}
          type: string
        Remarks:
          description: 'The Remarks additional content '
          format: string
          properties: {}
          type: string
        accountHolder:
          description: 'The AccountHolder of wire transfer '
          format: string
          properties: {}
          type: string
        accountNumber:
          description: The Account Number
          format: string
          properties: {}
          type: string
        address:
          description: 'The address of wire transfer '
          format: string
          properties: {}
          type: string
        bankName:
          description: The Bank Name
          format: string
          properties: {}
          type: string
        bic:
          description: 'The BIC of wire transfer '
          format: string
          properties: {}
          type: string
        bsbCode:
          description: The BSB Code
          format: string
          properties: {}
          type: string
        iban:
          description: 'The IBAN of wire transfer '
          format: string
          properties: {}
          type: string
        swiftCode:
          description: The Swift Code
          format: string
          properties: {}
          type: string
      required:
        - accountHolder
        - address
      type: object
    unibee.api.bean.detail.GatewayCompanyIssuer:
      properties:
        issueAddress:
          format: string
          properties: {}
          type: string
        issueCompanyName:
          format: string
          properties: {}
          type: string
        issueLogo:
          format: string
          properties: {}
          type: string
        issueRegNumber:
          format: string
          properties: {}
          type: string
        issueVatNumber:
          format: string
          properties: {}
          type: string
      type: object
    unibee.api.bean.detail.GatewayCurrencyExchange:
      properties:
        exchange_rate:
          description: >-
            the exchange rate of gateway, set to 0 if using
            https://app.exchangerate-api.com/ instead of fixed exchange rate
          format: float64
          properties: {}
          type: number
        from_currency:
          description: the currency of gateway exchange from
          format: string
          properties: {}
          type: string
        to_currency:
          description: the currency of gateway exchange to
          format: string
          properties: {}
          type: string
      type: object
    unibee.internal.interface.GatewayPaymentType:
      properties:
        autoCharge:
          format: bool
          properties: {}
          type: boolean
        category:
          format: string
          properties: {}
          type: string
        countryName:
          format: string
          properties: {}
          type: string
        name:
          format: string
          properties: {}
          type: string
        paymentType:
          format: string
          properties: {}
          type: string
        supportCurrencies:
          format: '[]string'
          items:
            format: string
            properties: {}
            type: string
          properties: {}
          type: array
      type: object
  securitySchemes:
    Authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````