Skip to main content

Get User

This endpoint gets or creates a new user.

GET/api/user
Example Request
curl --location --request GET 'https://api.mintlify.com/api/user' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
    "user_group_id": "example_1",
    "name": "Example 1",
    "mapping": {"40": "213", "134": "386"},
    "properties": {"filterValue": "value"}
}'
Response
{
  "success": 1,
  "new_user_group": true,
  "user_group": {
    "team_id": 3,
    "token": "<user_group_token_to_auth_dashboard>",
    "name": "Example 1",
    "provided_id": "example_1"
  }
}

Body

namestring

This is the name of the user group.

user_group_idstring

This is the ID you use to identify this user group in your database.

mappingobject

This is a JSON mapping of schema id to either the data source that this user group should be associated with or id of the datasource you provided when creating it.

propertiesobject

This is a JSON object for properties assigned to this user group. These will be accessible through variables in the dashboards and SQL editor

Response

successnumber

Indicates whether the call was successful. 1 if successful, 0 if not.

new_user_groupboolean

Indicates whether a new user group was created.

user_groupobject

The contents of the user group

ShowHide Toggle object
team_idnumber

This is the internal ID for this user group. You don’t need to record this information, since you will not need to use it.

tokenstring

This is the user group token (userGroupToken or USER_GROUP_TOKEN) that will be used to identify which user group is viewing the dashboard. You should save this on your end to use when rendering an embedded dashboard.

namestring

This is the name of the user group provided in the request body.

provided_idstring

This is the user_group_id provided in the request body.

propertiesJSON or null

This is the properties object if it was provided in the request body