# Creating profiles for users Admin only

To create a profile for a user, use the following endpoint:

POST /api/user/{userID}/profiles/{profileName}

With {userID} being the ID of the user to create the profile for and {profileName} being the name of the profile to create.

The body of the request should be a JSON object with the following format:

{
  "format": "string",
  "allowAuth": false,
  "deviceType": "string",
}

The format field represents the format you'd like the API to return upon successful profile creation. Valid values are (case insensitive):

  • pkcs12
  • pfx
  • pem
  • crt

The allowAuth field says whether the profile should be allowed to authenticate with the API.
The deviceType field is the type of device the profile is for. Valid values are (case sensitive):

  • MacOS
  • iOS
  • iPadOS
  • Android
  • Windows
  • Linux
  • ChromeOS
  • Other

Depending on the format field, the reponse will vary slightly. On success the response will be the default API response with the data being a profile entity in the following format:

{
    "serial": "string",
    "name": "string",
    "revokeReason": 0,
    "revokeTime": "2023-12-15T15:55:18.205Z",
    "creationTime": "2023-12-15T15:55:18.205Z",
    "expirationTime": "2023-12-15T15:55:18.205Z",
    "authable": true,
    "lastLogin": "2023-12-15T15:55:18.205Z",
    "deviceType": "string",
    "owner": "string",
    "data": "string",
    "identity": "string",
    "radiusCN": "string"
}

The data field is the base64 encoded PKCS12 file with an empty password.

{
    "serial": "string",
    "name": "string",
    "revokeReason": 0,
    "revokeTime": "2023-12-15T15:55:18.205Z",
    "creationTime": "2023-12-15T15:55:18.205Z",
    "expirationTime": "2023-12-15T15:55:18.205Z",
    "authable": true,
    "lastLogin": "2023-12-15T15:55:18.205Z",
    "deviceType": "string",
    "owner": "string",
    "certificate": "string",
    "privateKey": "string",
    "identity": "string",
    "radiusCN": "string"
}