Developer

Get Started with the API

You can set up the API by following the steps below:

  • Use the menu in the bottom right corner to select Settings.
  • Select the API tab from the list (please note you must be an administrator to access this).
  • Click on the + Add button on the top right to create an App Registration, which is required for use of the Kinabase API.
  • Enter the name and description (optional) of the app
  • You will be able to see the credentials and these will be useful to get a token and execute the API requests.

Making your first request

The base URL for the Kinabase API is: https://app.kinabase.com/api/v1

Authenticating with the API

Before you can start querying the Kinabase account using the API, you need to provide valid authentication, and this is done by requesting an authentication token.

Below are the steps to generate a token that will be valid for 1 hour.

  • Copy the App ID and App secret from the API settings tab after registering for an App.
  • On the system/ application that you would like to make the API requests in, send a POST request to `/api/v1/token` with the following inside the request body: (these should be provided in a JSON format)
    • App ID
    • App Secret
  • The headers of the request are:
    • { ‘Content-Type’: ‘application/json’, ‘Accept’: ‘application/json’}

If the request is successful, it will return status 200 and provide a token. Hold on to the token as it is necessary for all API requests that deals with data on Kinabase.

If the token is invalidated or expires, simply make another request to the same API endpoint and generate a new one and you will be able to continue using the API.

Using the API

After generating the token, you are ready to start using the API!

Here are some rules for all our API endpoints:

  • The request body should always be provided in JSON format
  • You must send the generated token in the Authentication header as a Bearer token
  • Content-Type and Accept must be ‘application/json’ in headers

Example API request

Here's an example of how to use the Kinabase API to get a list of records in a collection:

In JavaScript:

fetch (""https://app.kinabase.com/api/v1/"", {
  method: ‘get’,
  headers: {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization' : `Bearer ${yourTokenHere}`',
  },
});

Below is an example of a successful response from the API request above.

{
  "records": [
    {
      "name": "record1",
      "id": "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "recordId": 1,
      "createdAt": "18/08/2023 12:28:21 +00:00",
      "updatedAt": "18/08/2023 12:28:21 +00:00",
      "updatedBy": ""
    }
  ],
  "totalRecords": 1,
  "pageIndex": 0,
  "pageSize": 10
}

Troubleshooting

Developer APIs can be complex to set up and get running, depending on how you are trying to use the API. We've put together some common issues we've seen below, with suggested solutions in case you run into challenges when querying the API.

  • When providing record data, the field names should be in camelCase. For example, the field “Job Title” would be jobTitle when using the API.
  • The field names are case sensitive - if the expected field is name but you use Name for the data that you are passing into the request, then the request will fail with 400 Bad Request.
  • Some requests require the collection ID as a parameter, for those requests, you can use the collection ID, which you can get them through searching through the collections and returning the ID of the collection of interest, or using the slug of the collection directly (such as 'purchase-orders'). This can be found in the URL of the collection.

For further help or assistance, please contact our support team by emailing support@kinabase.com, or calling us at (+44)1223 626261.