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
12345forhttps://web.kisi.io/places/12345/dashboard - Add the request type, in this case
POST - Add the API endpoint URL, in this case
https://api.kisi.io/locks - Add the
Authorizationheader, and set its value toKISI-LOGINand your API key - Add the
Content-Typeheader, and set its value toapplication/json - Under
data, add thelockobject 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 Kisi API. Now you know the basics and are ready to dive into more advanced integrations. Check out the integration guides for user provisioning, cloud unlocks, access links, and user unlock.