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.

POST /v1/account_sessions

Create an Account Session

Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.

Request parameters

FieldTypeDescription
account requiredstringThe identifier of the account to create an Account Session for.
components requiredobjectEach key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
expandarray of stringSpecifies which fields in the response should be expanded.

Responses

HTTP 200: Successful response.
FieldTypeDescription
account requiredstringThe ID of the account the AccountSession was created for
client_secret requiredstringThe client secret of this AccountSession. Used on the client to set up secure access to the given `account`. The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs to [setup Connect embedded components](https://docs.stripe.com/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled.
components requiredconnect_embedded_account_session_create_components
expires_at requiredintegerThe timestamp at which this AccountSession will expire.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
object requiredstringString representing the object's type. Objects of the same type share the same value.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors