> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Set an entitlement

`PUT /api/web/v4/tenants/{tenantid}/entitlements`

Set the entitlement for the specified tenant. Caller requires the SPENTITLEMENTS:EDIT permission from a service provider role.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| tenantid | path | Yes | string | The UUID of the tenant whose entitlement is to be set. |

## Request Body

Required.

### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "additionalFeatures": {
      "type": "object",
      "properties": {
        "enhancedGeoLocation": {
          "type": "boolean",
          "description": "Enhanced geo location additional feature.",
          "example": true
        }
      },
      "description": "Additional feature",
      "title": "AdditionalFeature"
    },
    "contractMode": {
      "type": "string",
      "description": "The contract mode of a tenant (required during creation), allowable values = 'PRODUCTION', 'TRIAL'.",
      "example": "TRIAL",
      "enum": [
        "PRODUCTION",
        "TRIAL",
        "UNKNOWN"
      ]
    },
    "contractNumber": {
      "type": "string",
      "description": "The contract number."
    },
    "customerId": {
      "type": "string",
      "description": "The customer ID."
    },
    "endDate": {
      "type": "string",
      "description": "The date this entitlement will end.  The value must be after the start date. If not specified, this value defaults to the end date of the service provider's entitlement.",
      "format": "date-time",
      "example": "2019-02-19T13:15:27Z"
    },
    "entitlementId": {
      "type": "string",
      "description": "The entitlement ID."
    },
    "flashPass": {
      "type": "object",
      "properties": {
        "quantity": {
          "type": "integer",
          "description": "The number of FlashPass pass claims allowed during the Trial period.",
          "format": "int32",
          "example": 25,
          "enum": [
            25,
            100
          ]
        }
      },
      "description": "Parameters passed when setting the Issuance entitlements of a tenant.",
      "title": "FlashPassParms"
    },
    "fleetManagement": {
      "type": "object",
      "description": "Parameters passed when setting the fleet management entitlements of a tenant.",
      "title": "FleetManagementParms"
    },
    "issuance": {
      "type": "object",
      "properties": {
        "addOn": {
          "type": "string",
          "description": "Add on column to store printer cert flag"
        },
        "endDate": {
          "type": "string",
          "description": "The date when the Trial period will end.  The value must be after the start date. If specified, this value cannot be more than 30 days after start date.",
          "format": "date-time",
          "example": "2019-02-19T13:15:27Z"
        },
        "quantity": {
          "type": "integer",
          "description": "The number of print jobs allowed during the Trial period (required during creation).",
          "format": "int32",
          "example": 25,
          "enum": [
            25,
            100
          ]
        },
        "serviceBundles": {
          "type": "array",
          "description": "The service bundles supported. At least one bundle must be defined.",
          "items": {
            "required": [
              "bundleType"
            ],
            "type": "object",
            "properties": {
              "bundleType": {
                "type": "string",
                "description": "Identifies the bundle.",
                "example": "ADVANCED",
                "enum": [
                  "ADVANCED",
                  "ESSENTIALS",
                  "PROFESSIONAL",
                  "ENTERPRISE",
                  "API",
                  "STANDARD",
                  "PLUS",
                  "PREMIUM",
                  "CONSUMER"
                ]
              },
              "rank": {
                "type": "integer",
                "description": "A number that allows to sort bundles of the same category by precedence. Read-only currently.",
                "format": "int32",
                "example": 1000
              },
              "usageReportId": {
                "type": "string",
                "description": "An identifier used to report usage for this bundle.",
                "example": "SIG_CTR-474988"
              }
            },
            "description": "A bundle identifies a set of capabilities available to a tenant.",
            "title": "ServiceBundle"
          }
        },
        "startDate": {
          "type": "string",
          "description": "The date when the Trial period starts. This value cannot be in the future. If not specified, it defaults to the current date.",
          "format": "date-time",
          "example": "2019-02-19T13:15:27Z"
        }
      },
      "description": "Parameters passed when setting the Issuance entitlements of a tenant.",
      "title": "IssuanceParms"
    },
    "printer": {
      "type": "object",
      "description": "Parameters passed when setting the Printer entitlements of a tenant.",
      "title": "PrinterParms"
    },
    "quantity": {
      "maximum": 50000000,
      "minimum": 1,
      "type": "integer",
      "description": "The number of entitlements assigned to the tenant (required during creation). The service provider must have enough available entitlements to meet this request.",
      "format": "int32"
    },
    "smartLoginEnabled": {
      "type": "boolean",
      "description": "Whether Smart Card Smart Login is enabled or not."
    },
    "smsVoice": {
      "type": "object",
      "properties": {
        "deleteEntitlement": {
          "type": "boolean",
          "description": "If set to true when updating an SMSVOICE entitlement, the existing entitlement is removed. This attribute is ignored when creating an SMSVOICE entitlement."
        },
        "endDate": {
          "type": "string",
          "description": "The date when the entitlement period will end.  The value must be after the start date. ",
          "format": "date-time",
          "example": "2019-02-19T13:15:27Z"
        },
        "quantity": {
          "type": "integer",
          "description": "The number of SMS/Voice credits allowed during the entitlement period.",
          "format": "int32",
          "example": 1000
        },
        "renewalQuantity": {
          "type": "integer",
          "description": "The number of SMS/Voice credits allowed when the entitlement is renewed.",
          "format": "int32",
          "example": 1000
        },
        "startDate": {
          "type": "string",
          "description": "The date when the entitlement period starts. This value cannot be in the future. If not specified, it defaults to the current date.",
          "format": "date-time",
          "example": "2019-02-19T13:15:27Z"
        }
      },
      "description": "Parameters passed when setting the SMS/Voice entitlements of a tenant.",
      "title": "SmsVoiceParms"
    },
    "startDate": {
      "type": "string",
      "description": "The date this entitlement will start.  If not specified, it defaults to the current date.  This value cannot be in the future.",
      "format": "date-time",
      "example": "2019-02-19T13:15:27Z"
    },
    "status": {
      "type": "string",
      "description": "The status of this entitlement.",
      "enum": [
        "ACTIVE",
        "INACTIVE",
        "TERMINATED"
      ]
    },
    "subscriptionLineId": {
      "type": "string",
      "description": "The subscription line ID."
    },
    "type": {
      "type": "string",
      "description": "The type of entitlement.  Currently this value must be USERS.  If not specified, this value defaults to USERS.",
      "enum": [
        "USERS",
        "TRANSACTIONS"
      ]
    },
    "usageType": {
      "type": "string",
      "description": "[DEPRECATED] The type of entitlement (ignored if type is provided).  Currently this value must be USERS. If not specified, this value defaults to USERS.",
      "deprecated": true,
      "enum": [
        "USERS",
        "TRANSACTIONS"
      ]
    },
    "userBundles": {
      "type": "array",
      "description": "The entitlement bundles that defines the set of features available for authentication accounts.",
      "items": {
        "required": [
          "bundleType"
        ],
        "type": "object",
        "properties": {
          "bundleType": {
            "type": "string",
            "description": "Identifies the bundle.",
            "example": "ADVANCED",
            "enum": [
              "ADVANCED",
              "ESSENTIALS",
              "PROFESSIONAL",
              "ENTERPRISE",
              "API",
              "STANDARD",
              "PLUS",
              "PREMIUM",
              "CONSUMER"
            ]
          },
          "rank": {
            "type": "integer",
            "description": "A number that allows to sort bundles of the same category by precedence. Read-only currently.",
            "format": "int32",
            "example": 1000
          },
          "usageReportId": {
            "type": "string",
            "description": "An identifier used to report usage for this bundle.",
            "example": "SIG_CTR-474988"
          }
        },
        "description": "A bundle identifies a set of capabilities available to a tenant.",
        "title": "ServiceBundle"
      }
    },
    "usersBillingType": {
      "type": "string",
      "description": "The billing type for user entitlements. Defaults to PRE_PAID if not provided.",
      "example": "PRE_PAID",
      "enum": [
        "PRE_PAID",
        "PAY_PER_USE"
      ]
    }
  },
  "description": "Parameters passed when setting the entitlements of a tenant. Entitlements are required.",
  "title": "EntitlementParms"
}
```

## Responses

### 200

Successful

### 400

Bad Request

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 401

Access denied

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 403

Forbidden

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 404

Not Found

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 409

Conflict

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

## Security

Requirements

```json
[
  {
    "AdminAPIAuthentication": [
      "SPENTITLEMENTS:EDIT"
    ]
  }
]
```
