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/webhook_endpoints

List all webhook endpoints

Returns a list of your webhook endpoints.

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.
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 webhook_endpoint
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/webhook_endpoints

Create a webhook endpoint

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.

Request parameters

FieldTypeDescription
api_versionstringEvents sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.
connectbooleanWhether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.
descriptionone of multiple schemasAn optional description of what the webhook is used for.
enabled_events requiredarray of stringThe list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
expandarray of stringSpecifies which fields in the response should be expanded.
metadataone of multiple schemasSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
url requiredstringThe URL of the webhook endpoint.

Responses

HTTP 200: Successful response.
FieldTypeDescription
api_versionstringThe API version events are rendered as for this webhook endpoint.
applicationstringThe ID of the associated Connect application.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
descriptionstringAn optional description of what the webhook is used for.
enabled_events requiredarray of stringThe list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.
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`.
metadata requiredobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
object requiredstringString representing the object's type. Objects of the same type share the same value.
secretstringThe endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.
status requiredstringThe status of the webhook. It can be `enabled` or `disabled`.
url requiredstringThe URL of the webhook endpoint.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
DELETE /v1/webhook_endpoints/{webhook_endpoint}

Delete a webhook endpoint

You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.

Request parameters

ParameterLocationTypeDescription
webhook_endpointpathstring

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
deleted requiredbooleanAlways true for a deleted object
id requiredstringUnique identifier for the object.
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/webhook_endpoints/{webhook_endpoint}

Retrieve a webhook endpoint

Retrieves the webhook endpoint with the given ID.

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.
webhook_endpointpathstring

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
api_versionstringThe API version events are rendered as for this webhook endpoint.
applicationstringThe ID of the associated Connect application.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
descriptionstringAn optional description of what the webhook is used for.
enabled_events requiredarray of stringThe list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.
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`.
metadata requiredobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
object requiredstringString representing the object's type. Objects of the same type share the same value.
secretstringThe endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.
status requiredstringThe status of the webhook. It can be `enabled` or `disabled`.
url requiredstringThe URL of the webhook endpoint.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/webhook_endpoints/{webhook_endpoint}

Update a webhook endpoint

Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.

Request parameters

ParameterLocationTypeDescription
webhook_endpointpathstring
FieldTypeDescription
descriptionone of multiple schemasAn optional description of what the webhook is used for.
disabledbooleanDisable the webhook endpoint if set to true.
enabled_eventsarray of stringThe list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
expandarray of stringSpecifies which fields in the response should be expanded.
metadataone of multiple schemasSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
urlstringThe URL of the webhook endpoint.

Responses

HTTP 200: Successful response.
FieldTypeDescription
api_versionstringThe API version events are rendered as for this webhook endpoint.
applicationstringThe ID of the associated Connect application.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
descriptionstringAn optional description of what the webhook is used for.
enabled_events requiredarray of stringThe list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.
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`.
metadata requiredobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
object requiredstringString representing the object's type. Objects of the same type share the same value.
secretstringThe endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.
status requiredstringThe status of the webhook. It can be `enabled` or `disabled`.
url requiredstringThe URL of the webhook endpoint.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors