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/apps/secrets

List secrets

List all secrets stored on the given scope.

Request parameters

ParameterLocationTypeDescription
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.
scopequeryobjectSpecifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
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 apps.secret
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/apps/secrets

Set a Secret

Create or replace a secret in the secret store.

Request parameters

FieldTypeDescription
expandarray of stringSpecifies which fields in the response should be expanded.
expires_atintegerThe Unix timestamp for the expiry time of the secret, after which the secret deletes.
name requiredstringA name for the secret that's unique within the scope.
payload requiredstringThe plaintext secret value to be stored.
scope requiredobjectSpecifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

Responses

HTTP 200: Successful response.
FieldTypeDescription
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
deletedbooleanIf true, indicates that this secret has been deleted
expires_atintegerThe Unix timestamp for the expiry time of the secret, after which the secret deletes.
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`.
name requiredstringA name for the secret that's unique within the scope.
object requiredstringString representing the object's type. Objects of the same type share the same value.
payloadstringThe plaintext secret value to be stored.
scope requiredsecret_service_resource_scope
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/apps/secrets/delete

Delete a Secret

Deletes a secret from the secret store by name and scope.

Request parameters

FieldTypeDescription
expandarray of stringSpecifies which fields in the response should be expanded.
name requiredstringA name for the secret that's unique within the scope.
scope requiredobjectSpecifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

Responses

HTTP 200: Successful response.
FieldTypeDescription
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
deletedbooleanIf true, indicates that this secret has been deleted
expires_atintegerThe Unix timestamp for the expiry time of the secret, after which the secret deletes.
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`.
name requiredstringA name for the secret that's unique within the scope.
object requiredstringString representing the object's type. Objects of the same type share the same value.
payloadstringThe plaintext secret value to be stored.
scope requiredsecret_service_resource_scope
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/apps/secrets/find

Find a Secret

Finds a secret in the secret store by name and scope.

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.
namequerystringA name for the secret that's unique within the scope.
scopequeryobjectSpecifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
deletedbooleanIf true, indicates that this secret has been deleted
expires_atintegerThe Unix timestamp for the expiry time of the secret, after which the secret deletes.
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`.
name requiredstringA name for the secret that's unique within the scope.
object requiredstringString representing the object's type. Objects of the same type share the same value.
payloadstringThe plaintext secret value to be stored.
scope requiredsecret_service_resource_scope
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors