# Creating profiles

To create a profile, use the following endpoint:

POST /api/profile/{name}

The {name} parameter is the name of the profile to create an should be defined by the user.

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

{
    "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"
}