---
title: 'Managing user accounts'
description: 'This recipe explains how to create or update user accounts via the Snag API.'
keywords: ["manage user accounts", "user account API", "account management Web3", "user lifecycle"]
---

> **For AI agents:** the complete documentation index is at [llms.txt](https://docs.snagsolutions.io/llms.txt). Append `.md` to any page URL for its markdown version.

## Overview

The [`POST /api/users/metadatas`](https://docs.snagsolutions.io/api-reference/identity/create-user-metadata) allows you to create or update user objects in Snag's system which can then be used to migrate users from your existing system. This also allows you to attach useful metadata to new and existing users, such as their social network handle, which can be used for a more seamless user experience in-app and for use in the loyalty program.

## Steps to create or update a user

### Example use-case

For the case where you are migrating your users from an existing system to Snag, you would loop over each of your users and, for each, hit the [`POST /api/users/metadatas`](https://docs.snagsolutions.io/api-reference/identity/create-user-metadata) endpoint with their wallet address and any metadata you wish to attach. Below is an example request which creates a user account for the given wallet address and attaches various social network handles.

### Example Request

```
{
  "walletAddress": "0x1...",
  "discordUser": "discord-user",
  "twitterUser": "twitter-user",
  "emailAddress": "email-address",
  "telegramUsername": "telegram-user",
  "displayName": "profile-name",
  "logoUrl": "https://...png"
}
```

- Note: only the `walletAddress` property is required as this is the identifier for the user being created.

### Example Response

```
{
  "id": "your-user-id",
  "walletAddress": "0x1...",
  "discordUser": "discord-user",
  "twitterUser": "twitter-user",
  "emailAddress": "email-address",
  "telegramUsername": "telegram-user",
  "displayName": "profile-name",
  "logoUrl": "https://...png"
}
```
