Skip to main content

Assign a Feature to a User

Assign a feature to a user. Note that both the feature being assigned and the user the feature is being assigned to must already exist. Refer to the documentation to create a user and create a feature for help.

caution

This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Create Warrant endpoint instead.

Endpoint
POST /v1/users/:userId/features/:featureId

Parameters

ParameterDescriptionTypeRequired
userIdThe userId of the user you want to assign the feature to.URL paramyes
featureIdThe featureId of the feature you want to assign to a user.URL paramyes

Request

curl "https://api.warrant.dev/v1/users/d89sm4o9723/features/dashboard" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY"

Response

{
"objectType": "feature",
"objectId": "dashboard",
"relation": "member",
"subject": {
"objectType": "user",
"objectId": "d89sm4o9723"
}
}