Learn how to create and manage users in Snag using the metadata endpoint, including wallet address requirements and supported wallet types
After getting your API key, the next step is to create users in your Snag system. This guide explains how to use the metadata endpoint to add users and manage their information.
The POST /api/users/metadatas endpoint allows you to create or update user objects in Snag’s system. This is essential for migrating users from your existing system or adding new users to your loyalty program.
Only the walletAddress property is required as this is the unique identifier for the user being created.
A wallet address is required for creating a Snag user. We currently support the following wallet types:
EVM - Ethereum and EVM-compatible chains (Polygon, BSC, etc.)
SVM - Solana Virtual Machine
TON - The Open Network
SUI - Sui blockchain
Cosmos - Cosmos ecosystem chains
The wallet address serves as the unique identifier for each user in the Snag system. If your users don’t have wallet addresses, see our wallet generation guide.
The externalIdentifier field allows you to maintain your own user ID system while using Snag. This is particularly useful when migrating from an existing system:
// Map your internal user ID to Snagconst user = await client.users.createMetadata({ walletAddress: '0x1234567890abcdef1234567890abcdef12345678', externalIdentifier: 'your-internal-user-id-12345',})
Use the external identifier to maintain a mapping between your internal user IDs and Snag user IDs for easier integration.