# Creating guest accounts Admin only

To create a guest account, use the following endpoint:

POST /api/guest-accounts/{name}

The {name} parameter is the name of the guest account to create and should be defined by the user.

The request body must include a JSON object with the following optional fields:

{
    "validDays": 31,
    "note": "string" | null,
    "profileLimit": 0 | null
}

The validDays field represents the number of days the guest account will be valid for. It must be a positive integer that is larger than 0 and smaller than or equal to 31.

The note field is an optional note that can be associated with the guest account.

The profileLimit field is an optional limit on the number of profiles that can be created for this guest account. It must be a positive integer. If not provided, there will be no limit on the number of profiles that can be created for this guest account.

On success the response will be the default API response with the data being a guest account entity in the following format:

{
    "id": "string",
    "name": "string",
    "creationDate": "2023-12-15T15:30:52.768Z",
    "expirationDate": "2023-12-15T15:30:52.768Z",
    "note": "string" | null,
    "profileLimit": 0 | null,
    "revoked": false,
    "activeProfileCount": 0
}