# Managing guest profiles

Guest profiles are user profiles that are created under guest accounts. Each guest account can have multiple profiles, which can be used to authenticate devices for temporary access.

# Getting guest profiles Admin only Paginated

To get the profiles associated with a specific guest account, use one of the following endpoints:

GET /api/guest-accounts/{guestAccountId}/profiles
POST /api/guest-accounts/{guestAccountId}/profiles

With {guestAccountId} being the ID of the guest account whose profiles you want to retrieve

On success the response will be the default API response with the data being a data array of profiles associated with the specified guest account. The profile entities will be in the following format:

[
    {
        "serial": "string",
        "deviceType": "string",
        "creationDate": "2023-12-15T15:30:52.768Z",
        "revokeDate": "2023-12-15T15:30:52.768Z" | null,
        "revokeReason": 0 | null,
        "lastOcsp": "2023-12-15T15:30:52.768Z" | null,
        "accountId": "string"
    }
]

The search parameter for this paginated endpoint is a string that will be used to search for profiles with a serial that contains the search string. The following keys are supported for the sort parameter:

Key Description
serial Sort by the serial of the profile
creationdate Sort by the creation date of the profile

The following keys are supported for the filter parameter:

Key Description Example Value
invalid Filter by whether the profile is revoked/expired or not "true"
minCreateTime Filter by the minimum creation date of the profile "2023-12-15T18:48:28.775Z"
maxCreateTime Filter by the maximum creation date of the profile "2023-12-15T18:48:28.775Z"

# Revoking a guest profile Admin only

Under some circumstances, you may want to revoke a specific guest profile before its expiration date. To revoke a guest profile by its serial, use the following endpoint:

DELETE /api/guest-profile/{profileSerial}

With {profileSerial} being the serial of the guest profile to revoke. On success the response will be the default API response with the data being true.