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
- Identify your place ID by navigating to the URL of the place in the web UI. For example, the place ID is
13175
forhttps://web.kisi.io/places/13175/dashboard
- Add the request type, in this case
POST
- Add the API endpoint URL, in this case
https://api.kisi.io/locks
- Add the
Authorization
header, and set its value toKISI-LOGIN
and your API key - Add the
Content-Type
header, and set its value toapplication/json
- Under
data
, add thelock
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 doorplace_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.