# Create an end user

Create a MindCloud end user from your backend and save the returned user ID.

Create one MindCloud end user for a customer in your product. Call this endpoint from your server with an API key.

```http
POST https://connect.mindcloud.co/v1/users
Authorization: Bearer <MINDCLOUD_API_KEY>
Content-Type: application/json
```

```json
{
  "externalId": "customer-123",
  "name": "Jane Doe",
  "email": "jane@example.com"
}
```

A successful request returns HTTP 201:

```json
{
  "success": true,
  "data": {
    "userId": "enduser_..."
  }
}
```

`externalId`, `name`, and `email` are optional. `externalId` can hold your own stable user ID. Save the returned `userId`; this endpoint creates a new record on each call and does not look up an existing `externalId` for you. Use the saved MindCloud ID for [Embedded MCP](/docs/embedded/embedded-mcp/quickstart), SDK tokens, and later API calls.

If your [credential exchange](/docs/embedded/embedded-sdk/set-up-credential-exchange) URL uses per-user host variables, you can send validated `metadata` when you create the end user. Only send values your exchange route expects.