POST

/user

x-api-key*
curl --request POST \
  --url https://api.sandbox.metriport.com/user \
  --header 'x-api-key: <x-api-key>'

Query Params

appUserIdrequired
string

The user ID you identify this user with in your app.

Response

userIdrequired
string

The Metriport user ID to be used in subsequent requests for this user.

{
  "userId": "66d4f01f-6ebe-44f8-8bbc-15a65adbe8c2"
}
import { MetriportDevicesApi } from "@metriport/api-sdk";

const metriportClient = new MetriportDevicesApi("YOUR_API_KEY");

const metriportUserId = await metriportClient.getMetriportUserId("your-app-user-id");