Using the API
Making a request
To request the API, you must first find the HTTP method and the path for the operation you want to use. For example, the client would use the POST
method and the applications.create
path to create an application.
The base URL for the API is https://api.bits.bi
. You can then append the path to the end of the URL to get the full URL for the request. For example, you would use the URL https://api.bits.bi/applications.create
to start an application.
Authenticating using API Credentials
All requests made on our API must be a bearer of a valid access token. The Oauth token is generated from POST /v1/oauth2/token
using the API credentials created in the Bits Technology Dashboard (opens in a new tab).
See Authentication and Authorization on how to generate an access token.
Starting an application using Oauth token
Start an application by posting to the /applications.create
endpoint. The body needs to contain the workflowId
, countryCode
and redirectUrl
properties.
Once the applicant has completed the application, the applicant will be redirected to the redirectUrl
with the applicationId
.
The access token, generated from POST /v1/oauth2/token
, needs to be passed in the Authorization
header with the value Bearer {token}
.
The response from /v1/applications.create
will include a sessionToken
, which shall be passed to Bits no-code frontend to start the application. The sessionToken
can only be used for the application just created.
Request
POST /v1/applications.create HTTP/1.1
Content-Type: application/json
{
"workflowId": "bits:workflow::8abe317f-6d54-4949-8ecd-245efb4fa05d",
"countryCode": "SE",
"redirectUrl": "https://acme.com/onboarding-complete"
}
Response
{
"id": "bits:application::95d0c391-c659-4748-8415-de4f804803a0",
"sessionToken": "<sessionToken>"
}