igloo
Docs / igloohome / API Reference / Access

Access API Reference

API endpoints for managing access.

AlgoPIN

Create a Daily AlgoPIN

POSThttps://api.igloohome.co/home/devices/{deviceId}/algopin/daily

Returns a duration (Daily) AlgoPIN code.

Allowable Range: 29 to 367 days (in days only, 29.5 days not allowed)

Path Parameters

Parameter Type Required
deviceId string Yes

Body Parameters

Content-Type:application/json
  • variance integer required
    • Allowed values: 1, 2, 3
  • startDate string<date-time> required
    Date and time when the permission starts. Must be in format YYYY-MM-DDTHH:00:00+hh:mm (hour resolution only). Note: The hour ('hh') on startDate and the hour ('hh') on endDate must match
    • Example: 2022-01-01T12:00:00+08:00
  • endDate string<date-time> required
    Date and time when the permission ends. Must be in format YYYY-MM-DDTHH:00:00+hh:mm (hour resolution only). Note: The hour ('hh') on startDate and the hour ('hh') on endDate must match
    • Example: 2022-05-01T12:00:00+08:00
  • accessName string required
    Name or short description of the access
    • Example: Maintenance guy

Request Example

curl -X POST "https://api.igloohome.co/home/devices/{deviceId}/algopin/daily" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "accessName": "value",
    "endDate": "value",
    "startDate": "value",
    "variance": "value"
  }'
const res = await fetch("https://api.igloohome.co/home/devices/{deviceId}/algopin/daily", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "accessName": "value",
    "endDate": "value",
    "startDate": "value",
    "variance": "value"
  })
});

const data = await res.json();
console.log(data);
import requests

url = "https://api.igloohome.co/home/devices/{deviceId}/algopin/daily"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json"
}
payload = {
    "accessName": "value",
    "endDate": "value",
    "startDate": "value",
    "variance": "value"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.igloohome.co/home/devices/{deviceId}/algopin/daily"
	payload := []byte(`{
		"accessName": "value",
		"endDate": "value",
		"startDate": "value",
		"variance": "value"
	}`)

	req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
	req.Header.Set("Accept", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.igloohome.co/home/devices/{deviceId}/algopin/daily",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Accept: application/json",
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "accessName" => "value",
        "endDate" => "value",
        "startDate" => "value",
        "variance" => "value"
    ])
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
val client = OkHttpClient()

val mediaType = "application/json".toMediaType()
val body = """
    {
        "accessName": "value",
        "endDate": "value",
        "startDate": "value",
        "variance": "value"
    }
""".trimIndent().toRequestBody(mediaType)

val request = Request.Builder()
    .url("https://api.igloohome.co/home/devices/{deviceId}/algopin/daily")
    .method("POST", body)
    .addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN")
    .addHeader("Accept", "application/json")
    .addHeader("Content-Type", "application/json")
    .build()

val response = client.newCall(request).execute()
println(response.body?.string())
import Foundation

var request = URLRequest(url: URL(string: "https://api.igloohome.co/home/devices/{deviceId}/algopin/daily")!)
request.httpMethod = "POST"
request.setValue("Bearer YOUR_ACCESS_TOKEN", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
    "accessName": "value",
    "endDate": "value",
    "startDate": "value",
    "variance": "value"
]
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()

Responses

200400401402403404409415418500

OK

Create an Hourly AlgoPIN

POSThttps://api.igloohome.co/home/devices/{deviceId}/algopin/hourly

Returns a duration (Hourly) AlgoPIN code.

Allowable Range: 1 to 672 hours

Path Parameters

Parameter Type Required
deviceId string Yes

Body Parameters

Content-Type:application/json
  • variance integer required
    • Allowed values: 1, 2, 3
  • startDate string<date-time> required
    Date and time when the permission starts. Must be in format YYYY-MM-DDTHH:00:00+hh:mm (hour resolution only). May be up to 1 hour in the past.
    • Example: 2022-01-01T14:00:00+08:00
  • endDate string<date-time> required
    Date and time when the permission ends. Must be in format YYYY-MM-DDTHH:00:00+hh:mm (hour resolution only). Maximum Value: startDate + 672 hours
    • Example: 2022-01-02T12:00:00+08:00
  • accessName string required
    Name or short description of the access
    • Example: Maintenance guy

Request Example

curl -X POST "https://api.igloohome.co/home/devices/{deviceId}/algopin/hourly" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "accessName": "value",
    "endDate": "value",
    "startDate": "value",
    "variance": "value"
  }'
const res = await fetch("https://api.igloohome.co/home/devices/{deviceId}/algopin/hourly", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "accessName": "value",
    "endDate": "value",
    "startDate": "value",
    "variance": "value"
  })
});

const data = await res.json();
console.log(data);
import requests

url = "https://api.igloohome.co/home/devices/{deviceId}/algopin/hourly"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json"
}
payload = {
    "accessName": "value",
    "endDate": "value",
    "startDate": "value",
    "variance": "value"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.igloohome.co/home/devices/{deviceId}/algopin/hourly"
	payload := []byte(`{
		"accessName": "value",
		"endDate": "value",
		"startDate": "value",
		"variance": "value"
	}`)

	req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
	req.Header.Set("Accept", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.igloohome.co/home/devices/{deviceId}/algopin/hourly",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Accept: application/json",
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "accessName" => "value",
        "endDate" => "value",
        "startDate" => "value",
        "variance" => "value"
    ])
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
val client = OkHttpClient()

val mediaType = "application/json".toMediaType()
val body = """
    {
        "accessName": "value",
        "endDate": "value",
        "startDate": "value",
        "variance": "value"
    }
""".trimIndent().toRequestBody(mediaType)

val request = Request.Builder()
    .url("https://api.igloohome.co/home/devices/{deviceId}/algopin/hourly")
    .method("POST", body)
    .addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN")
    .addHeader("Accept", "application/json")
    .addHeader("Content-Type", "application/json")
    .build()

val response = client.newCall(request).execute()
println(response.body?.string())
import Foundation

var request = URLRequest(url: URL(string: "https://api.igloohome.co/home/devices/{deviceId}/algopin/hourly")!)
request.httpMethod = "POST"
request.setValue("Bearer YOUR_ACCESS_TOKEN", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
    "accessName": "value",
    "endDate": "value",
    "startDate": "value",
    "variance": "value"
]
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()

Responses

200400401402403404409415418500

OK

Create a One-Time AlgoPIN

POSThttps://api.igloohome.co/home/devices/{deviceId}/algopin/onetime

Returns a one-time AlgoPIN code (OTP).

Path Parameters

Parameter Type Required
deviceId string Yes

Body Parameters

Content-Type:application/json
  • variance integer required
    1–10. Values 6–10 require newer lock firmware; some older locks support them after a firmware update, otherwise they accept 1–5.
  • startDate string<date-time> required
    Must be in format YYYY-MM-DDTHH:00:00+hh:mm (hour resolution only) and now or later.
    • Example: 2022-01-01T00:00:00+08:00
  • accessName string required
    • Example: Maintenance guy

Request Example

curl -X POST "https://api.igloohome.co/home/devices/{deviceId}/algopin/onetime" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "accessName": "value",
    "startDate": "value",
    "variance": "value"
  }'
const res = await fetch("https://api.igloohome.co/home/devices/{deviceId}/algopin/onetime", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "accessName": "value",
    "startDate": "value",
    "variance": "value"
  })
});

const data = await res.json();
console.log(data);
import requests

url = "https://api.igloohome.co/home/devices/{deviceId}/algopin/onetime"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json"
}
payload = {
    "accessName": "value",
    "startDate": "value",
    "variance": "value"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.igloohome.co/home/devices/{deviceId}/algopin/onetime"
	payload := []byte(`{
		"accessName": "value",
		"startDate": "value",
		"variance": "value"
	}`)

	req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
	req.Header.Set("Accept", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.igloohome.co/home/devices/{deviceId}/algopin/onetime",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Accept: application/json",
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "accessName" => "value",
        "startDate" => "value",
        "variance" => "value"
    ])
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
val client = OkHttpClient()

val mediaType = "application/json".toMediaType()
val body = """
    {
        "accessName": "value",
        "startDate": "value",
        "variance": "value"
    }
""".trimIndent().toRequestBody(mediaType)

val request = Request.Builder()
    .url("https://api.igloohome.co/home/devices/{deviceId}/algopin/onetime")
    .method("POST", body)
    .addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN")
    .addHeader("Accept", "application/json")
    .addHeader("Content-Type", "application/json")
    .build()

val response = client.newCall(request).execute()
println(response.body?.string())
import Foundation

var request = URLRequest(url: URL(string: "https://api.igloohome.co/home/devices/{deviceId}/algopin/onetime")!)
request.httpMethod = "POST"
request.setValue("Bearer YOUR_ACCESS_TOKEN", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
    "accessName": "value",
    "startDate": "value",
    "variance": "value"
]
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()

Responses

200400401402403404409415418500

OK

Create a Passage AlgoPIN

POSThttps://api.igloohome.co/home/devices/{deviceId}/algopin/passage

Allows unlock with AlgoPIN and keeps the lock unlocked for the duration given in the request body. Supports newer devices with the latest firmware only.

Path Parameters

Parameter Type Required
deviceId string Yes

Body Parameters

Content-Type:application/json
  • variance integer required
    • Allowed values: 1
  • startDate string<date-time> required
    Date and time when the permission starts. Must be in format YYYY-MM-DDTHH:00:00+hh:mm (hour resolution only). The PIN is valid from startDate for durationHours hours.
    • Example: 2022-01-01T12:00:00+08:00
  • durationHours integer required
    Must be between 1 and 12 hours
  • accessName string required
    Name or short description of the access
    • Example: Maintenance guy

Request Example

curl -X POST "https://api.igloohome.co/home/devices/{deviceId}/algopin/passage" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "accessName": "value",
    "durationHours": "value",
    "startDate": "value",
    "variance": "value"
  }'
const res = await fetch("https://api.igloohome.co/home/devices/{deviceId}/algopin/passage", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "accessName": "value",
    "durationHours": "value",
    "startDate": "value",
    "variance": "value"
  })
});

const data = await res.json();
console.log(data);
import requests

url = "https://api.igloohome.co/home/devices/{deviceId}/algopin/passage"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json"
}
payload = {
    "accessName": "value",
    "durationHours": "value",
    "startDate": "value",
    "variance": "value"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.igloohome.co/home/devices/{deviceId}/algopin/passage"
	payload := []byte(`{
		"accessName": "value",
		"durationHours": "value",
		"startDate": "value",
		"variance": "value"
	}`)

	req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
	req.Header.Set("Accept", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.igloohome.co/home/devices/{deviceId}/algopin/passage",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Accept: application/json",
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "accessName" => "value",
        "durationHours" => "value",
        "startDate" => "value",
        "variance" => "value"
    ])
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
val client = OkHttpClient()

val mediaType = "application/json".toMediaType()
val body = """
    {
        "accessName": "value",
        "durationHours": "value",
        "startDate": "value",
        "variance": "value"
    }
""".trimIndent().toRequestBody(mediaType)

val request = Request.Builder()
    .url("https://api.igloohome.co/home/devices/{deviceId}/algopin/passage")
    .method("POST", body)
    .addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN")
    .addHeader("Accept", "application/json")
    .addHeader("Content-Type", "application/json")
    .build()

val response = client.newCall(request).execute()
println(response.body?.string())
import Foundation

var request = URLRequest(url: URL(string: "https://api.igloohome.co/home/devices/{deviceId}/algopin/passage")!)
request.httpMethod = "POST"
request.setValue("Bearer YOUR_ACCESS_TOKEN", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
    "accessName": "value",
    "durationHours": "value",
    "startDate": "value",
    "variance": "value"
]
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()

Responses

200400401402404409415422500

OK

Create a Permanent AlgoPIN

POSThttps://api.igloohome.co/home/devices/{deviceId}/algopin/permanent

Returns a permanent AlgoPIN code.

Path Parameters

Parameter Type Required
deviceId string Yes

Body Parameters

Content-Type:application/json
  • variance integer required
    1–10. Values 6–10 require newer lock firmware; some older locks support them after a firmware update, otherwise they accept 1–5.
  • startDate string<date-time> required
    Must be in format YYYY-MM-DDTHH:00:00+hh:mm (hour resolution only) and now or later.
    • Example: 2022-01-01T00:00:00+08:00
  • accessName string required
    • Example: Maintenance guy

Request Example

curl -X POST "https://api.igloohome.co/home/devices/{deviceId}/algopin/permanent" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "accessName": "value",
    "startDate": "value",
    "variance": "value"
  }'
const res = await fetch("https://api.igloohome.co/home/devices/{deviceId}/algopin/permanent", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "accessName": "value",
    "startDate": "value",
    "variance": "value"
  })
});

const data = await res.json();
console.log(data);
import requests

url = "https://api.igloohome.co/home/devices/{deviceId}/algopin/permanent"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json"
}
payload = {
    "accessName": "value",
    "startDate": "value",
    "variance": "value"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.igloohome.co/home/devices/{deviceId}/algopin/permanent"
	payload := []byte(`{
		"accessName": "value",
		"startDate": "value",
		"variance": "value"
	}`)

	req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
	req.Header.Set("Accept", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.igloohome.co/home/devices/{deviceId}/algopin/permanent",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Accept: application/json",
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "accessName" => "value",
        "startDate" => "value",
        "variance" => "value"
    ])
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
val client = OkHttpClient()

val mediaType = "application/json".toMediaType()
val body = """
    {
        "accessName": "value",
        "startDate": "value",
        "variance": "value"
    }
""".trimIndent().toRequestBody(mediaType)

val request = Request.Builder()
    .url("https://api.igloohome.co/home/devices/{deviceId}/algopin/permanent")
    .method("POST", body)
    .addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN")
    .addHeader("Accept", "application/json")
    .addHeader("Content-Type", "application/json")
    .build()

val response = client.newCall(request).execute()
println(response.body?.string())
import Foundation

var request = URLRequest(url: URL(string: "https://api.igloohome.co/home/devices/{deviceId}/algopin/permanent")!)
request.httpMethod = "POST"
request.setValue("Bearer YOUR_ACCESS_TOKEN", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
    "accessName": "value",
    "startDate": "value",
    "variance": "value"
]
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()

Responses

200400401402403404409415418500

OK

eKey

Generate eKey

POSThttps://api.igloohome.co/home/devices/{deviceId}/ekey

Create an eKey.

Path Parameters

Parameter Type Required
deviceId string Yes

Body Parameters

Content-Type:application/json
  • startDate string<date-time> required
    User is able to control the lock starting this date. Seconds must be :00 (minute resolution).
    • Example: 2021-01-03T12:00:00+08:00
  • endDate string<date-time> required
    User is unable to control the lock starting this date. Seconds must be :00 (minute resolution), and must be after startDate.
    • Example: 2021-11-03T12:00:00+08:00
  • permissions array of string required
    List of permissions to grant on this eKey. Required. There is no default, although the field can look optional.
    • Example: ["UNLOCK"]

Request Example

curl -X POST "https://api.igloohome.co/home/devices/{deviceId}/ekey" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "endDate": "value",
    "permissions": "value",
    "startDate": "value"
  }'
const res = await fetch("https://api.igloohome.co/home/devices/{deviceId}/ekey", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "endDate": "value",
    "permissions": "value",
    "startDate": "value"
  })
});

const data = await res.json();
console.log(data);
import requests

url = "https://api.igloohome.co/home/devices/{deviceId}/ekey"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json"
}
payload = {
    "endDate": "value",
    "permissions": "value",
    "startDate": "value"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.igloohome.co/home/devices/{deviceId}/ekey"
	payload := []byte(`{
		"endDate": "value",
		"permissions": "value",
		"startDate": "value"
	}`)

	req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
	req.Header.Set("Accept", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.igloohome.co/home/devices/{deviceId}/ekey",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Accept: application/json",
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "endDate" => "value",
        "permissions" => "value",
        "startDate" => "value"
    ])
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
val client = OkHttpClient()

val mediaType = "application/json".toMediaType()
val body = """
    {
        "endDate": "value",
        "permissions": "value",
        "startDate": "value"
    }
""".trimIndent().toRequestBody(mediaType)

val request = Request.Builder()
    .url("https://api.igloohome.co/home/devices/{deviceId}/ekey")
    .method("POST", body)
    .addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN")
    .addHeader("Accept", "application/json")
    .addHeader("Content-Type", "application/json")
    .build()

val response = client.newCall(request).execute()
println(response.body?.string())
import Foundation

var request = URLRequest(url: URL(string: "https://api.igloohome.co/home/devices/{deviceId}/ekey")!)
request.httpMethod = "POST"
request.setValue("Bearer YOUR_ACCESS_TOKEN", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
    "endDate": "value",
    "permissions": "value",
    "startDate": "value"
]
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()

Responses

200400401402403404409415500

OK

iglooKey

Create iglooKey Token

POSThttps://api.igloohome.co/home/pass

Creates a shareable iglooKey access token that supports both online and offline unlock for one or more devices.

Body Parameters

Content-Type:application/json
  • deviceIds array of string required
  • label string required
  • endsAt string<date-time> required
    Must be in the future
  • startsAt string<date-time>
    Must be on or before endsAt
  • activationWindowSeconds integer
    If set, the token must be activated within this many seconds of startsAt (or now); the resulting deadline must not exceed endsAt.
  • offlineAccessSeconds integer
    Grants offline access validity, in seconds (max 24 hours)

Request Example

curl -X POST "https://api.igloohome.co/home/pass" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "activationWindowSeconds": "value",
    "deviceIds": "value",
    "endsAt": "value",
    "label": "value",
    "offlineAccessSeconds": "value",
    "startsAt": "value"
  }'
const res = await fetch("https://api.igloohome.co/home/pass", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "activationWindowSeconds": "value",
    "deviceIds": "value",
    "endsAt": "value",
    "label": "value",
    "offlineAccessSeconds": "value",
    "startsAt": "value"
  })
});

const data = await res.json();
console.log(data);
import requests

url = "https://api.igloohome.co/home/pass"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json"
}
payload = {
    "activationWindowSeconds": "value",
    "deviceIds": "value",
    "endsAt": "value",
    "label": "value",
    "offlineAccessSeconds": "value",
    "startsAt": "value"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.igloohome.co/home/pass"
	payload := []byte(`{
		"activationWindowSeconds": "value",
		"deviceIds": "value",
		"endsAt": "value",
		"label": "value",
		"offlineAccessSeconds": "value",
		"startsAt": "value"
	}`)

	req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
	req.Header.Set("Accept", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.igloohome.co/home/pass",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Accept: application/json",
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "activationWindowSeconds" => "value",
        "deviceIds" => "value",
        "endsAt" => "value",
        "label" => "value",
        "offlineAccessSeconds" => "value",
        "startsAt" => "value"
    ])
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
val client = OkHttpClient()

val mediaType = "application/json".toMediaType()
val body = """
    {
        "activationWindowSeconds": "value",
        "deviceIds": "value",
        "endsAt": "value",
        "label": "value",
        "offlineAccessSeconds": "value",
        "startsAt": "value"
    }
""".trimIndent().toRequestBody(mediaType)

val request = Request.Builder()
    .url("https://api.igloohome.co/home/pass")
    .method("POST", body)
    .addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN")
    .addHeader("Accept", "application/json")
    .addHeader("Content-Type", "application/json")
    .build()

val response = client.newCall(request).execute()
println(response.body?.string())
import Foundation

var request = URLRequest(url: URL(string: "https://api.igloohome.co/home/pass")!)
request.httpMethod = "POST"
request.setValue("Bearer YOUR_ACCESS_TOKEN", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
    "activationWindowSeconds": "value",
    "deviceIds": "value",
    "endsAt": "value",
    "label": "value",
    "offlineAccessSeconds": "value",
    "startsAt": "value"
]
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()

Responses

201400401402403404415422500502503

Created

Update iglooKey Token

PATCHhttps://api.igloohome.co/home/pass/{id}

Updates the validity window (startsAt/endsAt) of an existing iglooKey token.

Path Parameters

Parameter Type Required
id string Yes

Body Parameters

Content-Type:application/json
  • startsAt string<date-time>
    Must be in the future
  • endsAt string<date-time>
    Must be in the future and after startsAt

Request Example

curl -X PATCH "https://api.igloohome.co/home/pass/{id}" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "endsAt": "value",
    "startsAt": "value"
  }'
const res = await fetch("https://api.igloohome.co/home/pass/{id}", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "endsAt": "value",
    "startsAt": "value"
  })
});

const data = await res.json();
console.log(data);
import requests

url = "https://api.igloohome.co/home/pass/{id}"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json"
}
payload = {
    "endsAt": "value",
    "startsAt": "value"
}
response = requests.patch(url, headers=headers, json=payload)
print(response.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.igloohome.co/home/pass/{id}"
	payload := []byte(`{
		"endsAt": "value",
		"startsAt": "value"
	}`)

	req, _ := http.NewRequest("PATCH", url, bytes.NewBuffer(payload))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
	req.Header.Set("Accept", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.igloohome.co/home/pass/{id}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "PATCH",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Accept: application/json",
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "endsAt" => "value",
        "startsAt" => "value"
    ])
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
val client = OkHttpClient()

val mediaType = "application/json".toMediaType()
val body = """
    {
        "endsAt": "value",
        "startsAt": "value"
    }
""".trimIndent().toRequestBody(mediaType)

val request = Request.Builder()
    .url("https://api.igloohome.co/home/pass/{id}")
    .method("PATCH", body)
    .addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN")
    .addHeader("Accept", "application/json")
    .addHeader("Content-Type", "application/json")
    .build()

val response = client.newCall(request).execute()
println(response.body?.string())
import Foundation

var request = URLRequest(url: URL(string: "https://api.igloohome.co/home/pass/{id}")!)
request.httpMethod = "PATCH"
request.setValue("Bearer YOUR_ACCESS_TOKEN", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
    "endsAt": "value",
    "startsAt": "value"
]
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()

Responses

200400401402403404415500502503

OK

Revoke iglooKey Token

DELETEhttps://api.igloohome.co/home/pass/{id}

Revokes an existing iglooKey token. No request body.

Path Parameters

Parameter Type Required
id string Yes

Request Example

curl -X DELETE "https://api.igloohome.co/home/pass/{id}" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/json"
const res = await fetch("https://api.igloohome.co/home/pass/{id}", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json"
  }
});

const data = await res.json();
console.log(data);
import requests

url = "https://api.igloohome.co/home/pass/{id}"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Accept": "application/json"
}
response = requests.delete(url, headers=headers)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	url := "https://api.igloohome.co/home/pass/{id}"
	req, _ := http.NewRequest("DELETE", url, nil)
	req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
	req.Header.Set("Accept", "application/json")

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.igloohome.co/home/pass/{id}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Accept: application/json"
    ]
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
val client = OkHttpClient()

val request = Request.Builder()
    .url("https://api.igloohome.co/home/pass/{id}")
    .method("DELETE", null)
    .addHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN")
    .addHeader("Accept", "application/json")
    .build()

val response = client.newCall(request).execute()
println(response.body?.string())
import Foundation

var request = URLRequest(url: URL(string: "https://api.igloohome.co/home/pass/{id}")!)
request.httpMethod = "DELETE"
request.setValue("Bearer YOUR_ACCESS_TOKEN", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Accept")

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()

Responses

204400401402403404500502503

No Content