Knox Docs Sign in

API reference

Test mode. Use your secret key on your server; live processing is currently disabled.

https://api.knoxapi.com

Send form-encoded requests with Authorization: Bearer sk_test_....

Complete OpenAPI specification · Integration guide

Operations and schemas are based on the pinned Stripe OpenAPI specification (MIT). Nested object definitions and enums are available in the complete specification.

GET /v1/entitlements/active_entitlements

List all active entitlements

Retrieve a list of active entitlements for a customer

Request parameters

ParameterLocationTypeDescription
customerquerystringThe ID of the customer.
ending_beforequerystringA cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
expandqueryarray of stringSpecifies which fields in the response should be expanded.
limitqueryintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterquerystringA cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
data requiredarray of entitlements.active_entitlement
has_more requiredbooleanTrue if this list has another page of items after this one that can be fetched.
object requiredstringString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
url requiredstringThe URL where this list can be accessed.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/entitlements/features

List all features

Retrieve a list of features

Request parameters

ParameterLocationTypeDescription
archivedquerybooleanIf set, filter results to only include features with the given archive status.
ending_beforequerystringA cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
expandqueryarray of stringSpecifies which fields in the response should be expanded.
limitqueryintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
lookup_keyquerystringIf set, filter results to only include features with the given lookup_key.
starting_afterquerystringA cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
data requiredarray of entitlements.feature
has_more requiredbooleanTrue if this list has another page of items after this one that can be fetched.
object requiredstringString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
url requiredstringThe URL where this list can be accessed.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/entitlements/features

Create a feature

Creates a feature

Request parameters

FieldTypeDescription
expandarray of stringSpecifies which fields in the response should be expanded.
lookup_key requiredstringA unique key you provide as your own system identifier. This may be up to 80 characters.
metadataobjectSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
name requiredstringThe feature's name, for your own purpose, not meant to be displayable to the customer.

Responses

HTTP 200: Successful response.
FieldTypeDescription
active requiredbooleanInactive features cannot be attached to new products and will not be returned from the features list endpoint.
id requiredstringUnique identifier for the object.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
lookup_key requiredstringA unique key you provide as your own system identifier. This may be up to 80 characters.
metadata requiredobjectSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
name requiredstringThe feature's name, for your own purpose, not meant to be displayable to the customer.
object requiredstringString representing the object's type. Objects of the same type share the same value.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/entitlements/active_entitlements/{id}

Retrieve an active entitlement

Retrieve an active entitlement

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.
idpathstringThe ID of the entitlement.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
feature requiredone of multiple schemasThe [Feature](https://docs.stripe.com/api/entitlements/feature) that the customer is entitled to.
id requiredstringUnique identifier for the object.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
lookup_key requiredstringA unique key you provide as your own system identifier. This may be up to 80 characters.
object requiredstringString representing the object's type. Objects of the same type share the same value.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/entitlements/features/{id}

Retrieve a feature

Retrieves a feature

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.
idpathstringThe ID of the feature.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
active requiredbooleanInactive features cannot be attached to new products and will not be returned from the features list endpoint.
id requiredstringUnique identifier for the object.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
lookup_key requiredstringA unique key you provide as your own system identifier. This may be up to 80 characters.
metadata requiredobjectSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
name requiredstringThe feature's name, for your own purpose, not meant to be displayable to the customer.
object requiredstringString representing the object's type. Objects of the same type share the same value.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/entitlements/features/{id}

Updates a feature

Update a feature’s metadata or permanently deactivate it.

Request parameters

ParameterLocationTypeDescription
idpathstring
FieldTypeDescription
activebooleanInactive features cannot be attached to new products and will not be returned from the features list endpoint.
expandarray of stringSpecifies which fields in the response should be expanded.
metadataone of multiple schemasSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
namestringThe feature's name, for your own purpose, not meant to be displayable to the customer.

Responses

HTTP 200: Successful response.
FieldTypeDescription
active requiredbooleanInactive features cannot be attached to new products and will not be returned from the features list endpoint.
id requiredstringUnique identifier for the object.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
lookup_key requiredstringA unique key you provide as your own system identifier. This may be up to 80 characters.
metadata requiredobjectSet of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
name requiredstringThe feature's name, for your own purpose, not meant to be displayable to the customer.
object requiredstringString representing the object's type. Objects of the same type share the same value.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors