Get Or Create Holder

Get Or Create a holder for your organization. Holder wallets can be created for your customers with an external id of your choice.


PUTapi.metal.build/holder/:userId

Get Or Create a Holder

This endpoint allows you to Get Or Create a holder with an external id of your choice.


Required attributes

  • Name
    userId
    Type
    string
    Description

    The external id for your holder (e.g., "1234567890").

Request

PUT
api.metal.build/holder/:userId
const response = await fetch(`https://api.metal.build/holder/${userId}`, {
method: 'PUT',
headers: {
  'Content-Type': 'application/json',
  'x-api-key': 'YOUR-API-KEY',
  },
})

const holder = await response.json()

Response

{
  "success": true,
  "id": "1234567890",
  "address": "0x38A7ff01f9A2318feA8AafBa379a6c2c18b5d1dc",
  "totalValue": 0,
  "tokens": []
}

Was this page helpful?