Skip to main content

Make your first API call

Now that you have your API key, the endpoint, and the headers, all that's left is to compose and make the request. In this example, you'll build a cURL request that will create a new door (i.e. lock) in your Kisi place.

Create a lock

  1. Identify your place ID by navigating to the URL of the place in the web UI. For example, the place ID is 13175 for https://web.kisi.io/places/13175/dashboard
  2. Add the request type, in this case POST
  3. Add the API endpoint URL, in this case https://api.kisi.io/locks
  4. Add the Authorization header, and set its value to KISI-LOGIN and your API key
  5. Add the Content-Type header, and set its value to application/json
  6. Under data, add the lock object together with the parameters required for this call. See example below.

Example

curl --request POST \
--url https://api.kisi.io/locks \
--header 'Authorization: KISI-LOGIN <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"lock": {
"name": "Main entrance door",
"place_id": 0
}
}'
  • name - the name of your newly created door
  • place_id - the ID of the place where this door should be created

Response

If your request was successful, you'll receive a 200 OK response, along the created lock object. It contains, among other things, the following parameters:

{
"id": 0,
"name": "Main entrance door"
}
  • id: the ID of your newly created door

You made it!

Congratulations, you just made your first call to the Kis API. Now you know the basics and are ready now to dive into more advanced integrations and use cases under the How-to guides.