API reference
Test mode. Use your secret key on your server; live processing is currently disabled.
https://api.knoxapi.comSend 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
| Parameter | Location | Type | Description |
|---|---|---|---|
ending_before | query | string | A 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. |
expand | query | array of string | Specifies which fields in the response should be expanded. |
limit | query | integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. |
scope | query | object | Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. |
starting_after | query | string | A 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.
| Field | Type | Description |
|---|---|---|
data required | array of apps.secret | |
has_more required | boolean | True if this list has another page of items after this one that can be fetched. |
object required | string | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. |
url required | string | The URL where this list can be accessed. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
POST /v1/apps/secrets
Set a Secret
Create or replace a secret in the secret store.
Request parameters
| Field | Type | Description |
|---|---|---|
expand | array of string | Specifies which fields in the response should be expanded. |
expires_at | integer | The Unix timestamp for the expiry time of the secret, after which the secret deletes. |
name required | string | A name for the secret that's unique within the scope. |
payload required | string | The plaintext secret value to be stored. |
scope required | object | Specifies 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.
| Field | Type | Description |
|---|---|---|
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
deleted | boolean | If true, indicates that this secret has been deleted |
expires_at | integer | The Unix timestamp for the expiry time of the secret, after which the secret deletes. |
id required | string | Unique identifier for the object. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
name required | string | A name for the secret that's unique within the scope. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
payload | string | The plaintext secret value to be stored. |
scope required | secret_service_resource_scope |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
POST /v1/apps/secrets/delete
Delete a Secret
Deletes a secret from the secret store by name and scope.
Request parameters
| Field | Type | Description |
|---|---|---|
expand | array of string | Specifies which fields in the response should be expanded. |
name required | string | A name for the secret that's unique within the scope. |
scope required | object | Specifies 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.
| Field | Type | Description |
|---|---|---|
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
deleted | boolean | If true, indicates that this secret has been deleted |
expires_at | integer | The Unix timestamp for the expiry time of the secret, after which the secret deletes. |
id required | string | Unique identifier for the object. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
name required | string | A name for the secret that's unique within the scope. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
payload | string | The plaintext secret value to be stored. |
scope required | secret_service_resource_scope |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
GET /v1/apps/secrets/find
Find a Secret
Finds a secret in the secret store by name and scope.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
expand | query | array of string | Specifies which fields in the response should be expanded. |
name | query | string | A name for the secret that's unique within the scope. |
scope | query | object | Specifies 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.
| Field | Type | Description |
|---|---|---|
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
deleted | boolean | If true, indicates that this secret has been deleted |
expires_at | integer | The Unix timestamp for the expiry time of the secret, after which the secret deletes. |
id required | string | Unique identifier for the object. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
name required | string | A name for the secret that's unique within the scope. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
payload | string | The plaintext secret value to be stored. |
scope required | secret_service_resource_scope |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |