Akiles API Reference
Akiles API
API Endpoint
https://api.akiles.app/v2
Version: 2.0
Metadata
Most API objects allow you to attach your own, arbitrary key-value metadata in the metadata field. You can use it to store references to primary keys of your database, custom states, etc.
Metadata is visible to anyone with admin or API access to your organization. There is a storage limit of 1024 bytes of metadata per object.
metadata
Key-value metadata
Example
{
"key1": "value1",
"key2": "value2"
}
Organizations
Everything in Akiles APIs belongs to an Organization. An organization represents one Akiles customer and can handle multiple sites, gadgets, etc.. Access tokens are tied to organizations too, and they give access only to the objects belonging to the organization.
organization
|
id
string (organization_id) |
Unique identifier. |
|
name
string |
Name. |
|
is_deleted
boolean |
Indicates if the object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"id": "org_3merk33gt1v9ypgfzrp1",
"name": "SkyCowork",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Get organization
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
Response Example (200 OK)
{
"id": "org_3merk33gt1v9ypgfzrp1",
"name": "SkyCowork",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Edit organization
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
metadata
metadata |
Key-value metadata |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "org_3merk33gt1v9ypgfzrp1",
"name": "SkyCowork",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Sites
A site is a physical place where Akiles gadgets are installed. For example, it can be a building, a floor... Gadgets belong to a particular site.
End users will see one "card" in their app's home screen per site. The site information (email, contact, etc) is displayed in that card.
location
|
lat
number (float) |
Latitude in degrees |
|
lng
number (float) |
Longitude |
Example
{
"lat": 41.290485,
"lng": 2.1829076
}
site_geo
|
location
location |
|
|
radius
integer |
Radius in meters |
Example
{
"location": {
"lat": 41.290485,
"lng": 2.1829076
},
"radius": 100
}
site_map
|
location
location |
|
|
place_id
string |
place_id from Google Maps Places API |
|
address
string |
Human-readable address |
|
image_url
string |
Map image URL, displayed in the site's header in the app. |
Example
{
"location": {
"lat": 41.290485,
"lng": 2.1829076
},
"place_id": "string",
"address": "string",
"image_url": "string"
}
site
Supported expands: organization, tags.
|
id
string (site_id) |
site ID |
|
name
string |
Site name |
|
organization_id
string (organization_id) |
organization ID |
|
geo
|
Geofence configuration. Null if the site has no geofence configured. |
|
map
|
Map configuration. Null if the site has no map configured. |
|
phone
string |
Phone number. Shown in the site info in the app. |
|
email
string |
Email. Shown in the site info in the app. |
|
info
string |
Free-form extra information. Shown in the site info in the app. |
|
timezone
string (timezone) |
Local time zone of the site. |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Example
{
"id": "site_3merk33gt21kym11een1",
"name": "string",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"geo": {
"location": {
"lat": 41.290485,
"lng": 2.1829076
},
"radius": 100
},
"map": {
"location": {
"lat": 41.290485,
"lng": 2.1829076
},
"place_id": "string",
"address": "string",
"image_url": "string"
},
"phone": "string",
"email": "string",
"info": "string",
"timezone": "Europe/Madrid",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
List sites
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by name.
Return only items that have the given tag.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
site |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "site_3merk33gt21kym11een1",
"name": "string",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"geo": {
"location": {
"lat": 41.290485,
"lng": 2.1829076
},
"radius": 100
},
"map": {
"location": {
"lat": 41.290485,
"lng": 2.1829076
},
"place_id": "string",
"address": "string",
"image_url": "string"
},
"phone": "string",
"email": "string",
"info": "string",
"timezone": "Europe/Madrid",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Get site
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
site ID
Response Example (200 OK)
{
"id": "site_3merk33gt21kym11een1",
"name": "string",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"geo": {
"location": {
"lat": 41.290485,
"lng": 2.1829076
},
"radius": 100
},
"map": {
"location": {
"lat": 41.290485,
"lng": 2.1829076
},
"place_id": "string",
"address": "string",
"image_url": "string"
},
"phone": "string",
"email": "string",
"info": "string",
"timezone": "Europe/Madrid",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Edit site
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
site ID
|
metadata
metadata |
Key-value metadata |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Response Example (200 OK)
{
"id": "site_3merk33gt21kym11een1",
"name": "string",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"geo": {
"location": {
"lat": 41.290485,
"lng": 2.1829076
},
"radius": 100
},
"map": {
"location": {
"lat": 41.290485,
"lng": 2.1829076
},
"place_id": "string",
"address": "string",
"image_url": "string"
},
"phone": "string",
"email": "string",
"info": "string",
"timezone": "Europe/Madrid",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Products
product
|
id
string |
product ID |
|
name
string |
Human-friendly product name. Show this to the user instead of the product ID! |
Example
{
"id": "controller_ethernet",
"name": "Controller Ethernet"
}
List products
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
product |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "controller_ethernet",
"name": "Controller Ethernet"
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Get product
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
product ID
Response Example (200 OK)
{
"id": "controller_ethernet",
"name": "Controller Ethernet"
}
Devices
Physical Akiles device installed in the organization.
Each device has a set of capabilities which depend on the product.
The device object also contains an overview of the current device status (online/offline, battery level).
If hardware_id = null, the device is "virtual". It is designed for API testing: it behaves as close as possible to a real
device in API calls but is not backed by a real hardware device. Gadget actions always succeed.
device
Supported expands: organization, site, product, tags.
|
id
string (device_id) |
device ID |
|
created_at
string (date-time) |
Creation time for this object. |
|
name
string |
Device name |
|
organization_id
string (organization_id) |
organization ID |
|
site_id
string (site_id) |
site ID |
|
hardware_id
string (hardware_id) |
Hardware ID. This is the serial number printed in the device's label, as a QR and in some products as text. |
|
metadata
metadata |
Key-value metadata |
|
product_id
string |
Product ID. NOTE: do not show this to the user directly, it's not capitalized properly. Use the |
|
revision_id
string |
Hardware revision ID. |
|
input_rules
device_input_rule |
Input rule array. Input rules configure a device to remotely trigger gadget actions on other devices remotely when the user inputs a PIN or an NFC card. Must be empty if |
|
capabilities
device_capabilities |
Device capabilities. |
|
status
device_status |
Device status. |
|
is_deleted
boolean |
True if this object has been deleted. |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Example
{
"id": "dev_3merk33gt3l525ryhcmh",
"created_at": "2024-03-13T16:56:51.766836837Z",
"name": "string",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"hardware_id": "hw_3merk33gt2a7grgmljhh",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"product_id": "controller_ethernet",
"revision_id": "06",
"input_rules": [
{
"code": "*2",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "open"
}
],
"capabilities": {
"gadgets": "multiple",
"gadget_max_count": 6,
"script": true,
"internet": true,
"ethernet": true,
"wifi": false,
"cellular": false,
"pin": false,
"nfc": false,
"input_rules": false,
"mains": true,
"battery": true,
"battery_rechargeable": true,
"audio": true
},
"status": {
"online": true,
"mains_present": true,
"battery_present": true,
"battery_charging": true,
"battery_percent": 87.2
},
"is_deleted": false,
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
device_capabilities
Device capabilities.
|
gadgets
string none, single, multiple |
What level of gadget support this device has. |
|
gadget_max_count
integer |
Maximum amount of gadgets the device supports. Will always be |
|
script
boolean |
Whether this device supports gadgets with custom scripts. |
|
internet
boolean |
Whether this device supports some form of internet connection, which means it can connect to Akiles Cloud directly instead of through gateways. |
|
ethernet
boolean |
Whether this device supports Ethernet. |
|
wifi
boolean |
Whether this device supports WiFi. |
|
cellular
boolean |
Whether this device supports cellular internet. |
|
pin
boolean |
Whether this device supports PIN entry (i.e. has a keypad). |
|
nfc
boolean |
Whether this device supports NFC (either physical cards, or emulated cards in a phone) |
|
input_rules
boolean |
Whether this device supports input rules. |
|
mains
boolean |
Whether this device supports being powered from mains (either directly or with an AC adapter). |
|
battery
boolean |
Whether this device supports being powered by batteries (rechargeable or not). It is possible for both |
|
battery_rechargeable
boolean |
If true, this device contains a rechargeable battery, and can recharge it from mains power. |
|
audio
boolean |
If true, this device is equipped with a buzzer capable of emitting sounds for interactions and status updates. |
Example
{
"gadgets": "multiple",
"gadget_max_count": 6,
"script": true,
"internet": true,
"ethernet": true,
"wifi": false,
"cellular": false,
"pin": false,
"nfc": false,
"input_rules": false,
"mains": true,
"battery": true,
"battery_rechargeable": true,
"audio": true
}
device_status
Device status.
|
online
boolean |
True if this device is online (meaning it's on and has a working connection to Akiles Cloud, either directly or through gateways). |
|
mains_present
boolean |
True if this device currently has mains power. |
|
battery_present
boolean |
True if this device currently has a battery inserted. |
|
battery_charging
boolean |
True if this device currently is charging the battery from mains power. |
|
battery_percent
number |
Battery percentage, 0-100. |
Example
{
"online": true,
"mains_present": true,
"battery_present": true,
"battery_charging": true,
"battery_percent": 87.2
}
device_input_rule
Input rules allow configuring "codes" that act as prefixes for PINs or cards. This allows a single device to
- Trigger different gadgets (local or remote).
- Trigger different actions in a gadget.
- Mix local and remote gadgets. One input rule can point to a local gadget (in this device), and another to a remote gadget (in another device, will be triggered via AkilesNet).
Example:
"input_rules": [
{
"code": "1",
"gadget_id": "gad_3z4f8pubhdcj2fvfmkxh", // street
"action_id": "open"
},
{
"code": "2",
"gadget_id": "gad_3z4f8s623va4l9nea7u1", // garage door
"action_id": "up"
},
{
"code": "3",
"gadget_id": "gad_3z4f8s623va4l9nea7u1", // garage door
"action_id": "down"
},
{
"code": "4",
"gadget_id": "gad_3z4f8s623va4l9nea7u1", // garage door
"action_id": "stop"
}
]
Typing "1" and your PIN, or typing "1" and tapping your card/phone would open the street door. Same with "2" would move the garage door up, "3" down, etc.
Keypad rule codes accept digits 0-9, hash # and star *.
You can define one keypad rule as the "default" one by setting the code to "". This is the rule that will be triggered if you type a PIN or tap a card directly without typing anything before. A default rule can coexist with other rules at the same time, but then all the other rules can't start with a digit (only with * or #), because it'd otherwise be ambiguous whether the user is typing a rule code or a PIN.
If no input rules are defined (input_rules is an empty array), pins/cards will open the first action of the first gadget in the current device.
|
code
string |
Keypad code prefix. String consisting of digits 0-9, pound ( |
|
gadget_id
string (gadget_id) |
Destination gadget ID. It can be a gadget on this device, or on another device. |
|
action_id
string |
Destination action ID. It must be a valid action in the destination gadget. |
Example
{
"code": "*2",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "open"
}
List devices
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by name.
Filter by site.
Return only items that have the given tag.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Filter by product. Use the special value virtual to return only virtual devices.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
device |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "dev_3merk33gt3l525ryhcmh",
"created_at": "2024-03-13T16:56:51.766836837Z",
"name": "string",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"hardware_id": "hw_3merk33gt2a7grgmljhh",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"product_id": "controller_ethernet",
"revision_id": "06",
"input_rules": [
{
"code": "*2",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "open"
}
],
"capabilities": {
"gadgets": "multiple",
"gadget_max_count": 6,
"script": true,
"internet": true,
"ethernet": true,
"wifi": false,
"cellular": false,
"pin": false,
"nfc": false,
"input_rules": false,
"mains": true,
"battery": true,
"battery_rechargeable": true,
"audio": true
},
"status": {
"online": true,
"mains_present": true,
"battery_present": true,
"battery_charging": true,
"battery_percent": 87.2
},
"is_deleted": false,
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Get device
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
device ID
Response Example (200 OK)
{
"id": "dev_3merk33gt3l525ryhcmh",
"created_at": "2024-03-13T16:56:51.766836837Z",
"name": "string",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"hardware_id": "hw_3merk33gt2a7grgmljhh",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"product_id": "controller_ethernet",
"revision_id": "06",
"input_rules": [
{
"code": "*2",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "open"
}
],
"capabilities": {
"gadgets": "multiple",
"gadget_max_count": 6,
"script": true,
"internet": true,
"ethernet": true,
"wifi": false,
"cellular": false,
"pin": false,
"nfc": false,
"input_rules": false,
"mains": true,
"battery": true,
"battery_rechargeable": true,
"audio": true
},
"status": {
"online": true,
"mains_present": true,
"battery_present": true,
"battery_charging": true,
"battery_percent": 87.2
},
"is_deleted": false,
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Edit device
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
device ID
|
metadata
metadata |
Key-value metadata |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Response Example (200 OK)
{
"id": "dev_3merk33gt3l525ryhcmh",
"created_at": "2024-03-13T16:56:51.766836837Z",
"name": "string",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"hardware_id": "hw_3merk33gt2a7grgmljhh",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"product_id": "controller_ethernet",
"revision_id": "06",
"input_rules": [
{
"code": "*2",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "open"
}
],
"capabilities": {
"gadgets": "multiple",
"gadget_max_count": 6,
"script": true,
"internet": true,
"ethernet": true,
"wifi": false,
"cellular": false,
"pin": false,
"nfc": false,
"input_rules": false,
"mains": true,
"battery": true,
"battery_rechargeable": true,
"audio": true
},
"status": {
"online": true,
"mains_present": true,
"battery_present": true,
"battery_charging": true,
"battery_percent": 87.2
},
"is_deleted": false,
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Gadgets
A gadget is a "thing that can be controlled" by the user. Gadgets can be doors, lights, heating, window blinds...
Gadgets are NOT physical devices. Some devices can have multiple gadgets because they have multiple inputs/outputs so they can control multiple things (Controllers). Others can have only one (the Cylinder and the Roomlock, for example). Others can have none (the Gateway Ethernet, for example.
Gadgets can have multiple actions depending on what they are. For example, a normal
door will just have an open action, but a blind\ncan have raise and lower
actions, and a light can have on and off actions. Actions are identified
by their string ID, and they\nalso have a human-friendly name for display in
the UI.
gadget_action
|
id
string |
action ID |
|
name
string |
Action user-friendly name |
|
i18n_name
string |
Translation key for the action's user-friendly name. Empty if the name is not a known translatable string. |
|
index
integer |
Position of the action within the gadget, used for ordering in the UI. |
|
help
string |
Optional help text describing the action. |
Example
{
"id": "open",
"name": "Open",
"i18n_name": "open",
"index": 0,
"help": ""
}
gadget_state
|
id
string |
state ID |
|
name
string |
State user-friendly name |
|
i18n_name
string |
Translation key for the state's user-friendly name. Empty if the name is not a known translatable string. |
|
index
integer |
Position of the state within the gadget, used for ordering in the UI. |
Example
{
"id": "closed",
"name": "Closed",
"i18n_name": "closed",
"index": 0
}
gadget_signal
|
id
string |
signal ID |
|
name
string |
Signal user-friendly name |
|
i18n_name
string |
Translation key for the signal's user-friendly name. Empty if the name is not a known translatable string. |
|
index
integer |
Position of the signal within the gadget, used for ordering in the UI. |
Example
{
"id": "pressed",
"name": "Pressed",
"i18n_name": "pressed",
"index": 0
}
gadget
Supported expands: organization, site, device, tags.
|
id
string (gadget_id) |
gadget ID |
|
organization_id
string (organization_id) |
organization ID |
|
site_id
string (site_id) |
site ID |
|
device_id
string (device_id) |
device ID |
|
name
string |
Gadget name |
|
actions
gadget_action |
|
|
states
gadget_state |
|
|
signals
gadget_signal |
|
|
state_id
string |
Current state id |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Example
{
"id": "gad_3merk33gt1hnl6pvbu71",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"device_id": "dev_3merk33gt3l525ryhcmh",
"name": "string",
"actions": [
{
"id": "open",
"name": "Open",
"i18n_name": "open",
"index": 0,
"help": ""
}
],
"states": [
{
"id": "closed",
"name": "Closed",
"i18n_name": "closed",
"index": 0
}
],
"signals": [
{
"id": "pressed",
"name": "Pressed",
"i18n_name": "pressed",
"index": 0
}
],
"state_id": "on",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
List gadgets
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by name.
Filter by site.
Return only items that have the given tag.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Filter by device.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
gadget |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "gad_3merk33gt1hnl6pvbu71",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"device_id": "dev_3merk33gt3l525ryhcmh",
"name": "string",
"actions": [
{
"id": "open",
"name": "Open",
"i18n_name": "open",
"index": 0,
"help": ""
}
],
"states": [
{
"id": "closed",
"name": "Closed",
"i18n_name": "closed",
"index": 0
}
],
"signals": [
{
"id": "pressed",
"name": "Pressed",
"i18n_name": "pressed",
"index": 0
}
],
"state_id": "on",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Get gadget
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
gadget ID
Response Example (200 OK)
{
"id": "gad_3merk33gt1hnl6pvbu71",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"device_id": "dev_3merk33gt3l525ryhcmh",
"name": "string",
"actions": [
{
"id": "open",
"name": "Open",
"i18n_name": "open",
"index": 0,
"help": ""
}
],
"states": [
{
"id": "closed",
"name": "Closed",
"i18n_name": "closed",
"index": 0
}
],
"signals": [
{
"id": "pressed",
"name": "Pressed",
"i18n_name": "pressed",
"index": 0
}
],
"state_id": "on",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Edit gadget
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
gadget ID
|
metadata
metadata |
Key-value metadata |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Response Example (200 OK)
{
"id": "gad_3merk33gt1hnl6pvbu71",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"device_id": "dev_3merk33gt3l525ryhcmh",
"name": "string",
"actions": [
{
"id": "open",
"name": "Open",
"i18n_name": "open",
"index": 0,
"help": ""
}
],
"states": [
{
"id": "closed",
"name": "Closed",
"i18n_name": "closed",
"index": 0
}
],
"signals": [
{
"id": "pressed",
"name": "Pressed",
"i18n_name": "pressed",
"index": 0
}
],
"state_id": "on",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Do gadget action
This endpoint triggers an action in a gadget (e.g. opens a door).
Warning: For this endpoint to work, both the user's device (phone, computer, tablet) and the Akiles device must have working internet access. If you're adding door-opening functionality to your own mobile application, we strongly recommend you use the Akiles SDK instead. It can open doors via internet, via Bluetooth and via NFC, which considerably increases reliability.
gadget ID
gadget action ID. The action ID is usually the string "open", but it depends on the gadget's configuration. You can view the available actions in the actions field of the gadget object.
Request Example
{}
Response Example (200 OK)
{}
Gadget Triggers
A gadget trigger is a way to connect state changes or signals from one gadget to actions in another gadget.
A gadget trigger specifices a source gadget and state (or signal), as well as a target gadget and an action to perform on that gadget.
Gadgets specified in a trigger must be in the same site, and have a local path between them on the site.
gadget_trigger
Supported expands: site, source_gadget, target_gadget.
|
id
string (gadget_trigger_id) |
gadget trigger ID |
|
organization_id
string (organization_id) |
organization ID |
|
site_id
string (site_id) |
site ID |
|
source_gadget_id
string (gadget_id) |
source gadget ID |
|
source_state_id
string |
Source state id |
|
source_signal_id
string |
Source signal id |
|
source_type
string state, signal |
Source type |
|
target_gadget_id
string (gadget_id) |
target gadget ID |
|
target_action_id
string |
target gadget action ID |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
Example
{
"id": "string (gadget_trigger_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"source_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"source_state_id": "string",
"source_signal_id": "string",
"source_type": "string",
"target_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"target_action_id": "string",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
List gadget triggers
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by site.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
gadget_trigger |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "string (gadget_trigger_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"source_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"source_state_id": "string",
"source_signal_id": "string",
"source_type": "string",
"target_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"target_action_id": "string",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create gadget trigger
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
source_gadget_id
string (gadget_id) |
source gadget ID |
|
source_type
string state, signal |
Whether the trigger fires on a source gadget state change ( |
|
source_state_id
string |
Source state id. Required when |
|
source_signal_id
string |
Source signal id. Required when |
|
target_gadget_id
string (gadget_id) |
target gadget ID. Must be in the same site as the source gadget. |
|
target_action_id
string |
target gadget action ID |
Request Example
{
"source_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"source_type": "string",
"source_state_id": "string",
"source_signal_id": "string",
"target_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"target_action_id": "string"
}
Response Example (200 OK)
{
"id": "string (gadget_trigger_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"source_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"source_state_id": "string",
"source_signal_id": "string",
"source_type": "string",
"target_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"target_action_id": "string",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Get gadget trigger
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
gadget trigger ID
Response Example (200 OK)
{
"id": "string (gadget_trigger_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"source_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"source_state_id": "string",
"source_signal_id": "string",
"source_type": "string",
"target_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"target_action_id": "string",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Edit gadget trigger
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
gadget trigger ID
|
source_gadget_id
string (gadget_id) |
source gadget ID |
|
source_type
string state, signal |
Whether the trigger fires on a source gadget state change ( |
|
source_state_id
string |
Source state id. Required when |
|
source_signal_id
string |
Source signal id. Required when |
|
target_gadget_id
string (gadget_id) |
target gadget ID. Must be in the same site as the source gadget. |
|
target_action_id
string |
target gadget action ID |
Request Example
{
"source_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"source_type": "string",
"source_state_id": "string",
"source_signal_id": "string",
"target_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"target_action_id": "string"
}
Response Example (200 OK)
{
"id": "string (gadget_trigger_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"source_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"source_state_id": "string",
"source_signal_id": "string",
"source_type": "string",
"target_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"target_action_id": "string",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Delete gadget trigger
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
gadget trigger ID
Response Example (200 OK)
{
"id": "string (gadget_trigger_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"source_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"source_state_id": "string",
"source_signal_id": "string",
"source_type": "string",
"target_gadget_id": "gad_3merk33gt1hnl6pvbu71",
"target_action_id": "string",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Members
member
Supported expands: organization, emails, magic_links, group_associations, pins, cards, tags.
|
id
string (member_id) |
member ID |
|
organization_id
string (organization_id) |
organization ID |
|
name
string |
Member name shown in the admin panel. This is for the organization admins to identify the member, it's never shown to the user. |
|
starts_at
string (date-time) |
Start date of the member's access. If null, the access is valid immediately. |
|
ends_at
string (date-time) |
End date of the member's access. If null, the access is valid forever (ie, until an end date is set or the member is deleted.) |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Example
{
"id": "mem_3merk33gt7ml3tde71f3",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "John Doe",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
member_email
|
id
string (member_email_id) |
member email ID |
|
organization_id
string (organization_id) |
organization ID |
|
member_id
string (member_id) |
member ID |
|
email
string (email) |
Email address |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"id": "me_3rkd7ya2pnjysjqbluj1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"email": "string (email)",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
member_magic_link
|
id
string (member_magic_link_id) |
member magic link ID |
|
organization_id
string (organization_id) |
organization ID |
|
member_id
string (member_id) |
member ID |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"id": "mml_3rkd2f2mv925ptvpgblh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
member_magic_link_revealed
|
link
string (url) |
Magic link for this member. The guest will be able to use Akiles instantly by clicking it. |
|
id
string (member_magic_link_id) |
member magic link ID |
|
organization_id
string (organization_id) |
organization ID |
|
member_id
string (member_id) |
member ID |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"link": "https://link.akiles.app/#ml_8502850982345_f00i1nslz20gkm",
"id": "mml_3rkd2f2mv925ptvpgblh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
member_pin
Supported expands: member.
|
id
string (member_pin_id) |
member pin ID |
|
organization_id
string (organization_id) |
organization ID |
|
member_id
string (member_id) |
member ID |
|
length
integer |
Pin length |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"id": "mp_3rkd2fmgmmdh1dgkvluh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"length": 6,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
member_pin_revealed
|
pin
string |
Pin number. |
|
id
string (member_pin_id) |
member pin ID |
|
organization_id
string (organization_id) |
organization ID |
|
member_id
string (member_id) |
member ID |
|
length
integer |
Pin length |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"pin": "123456",
"id": "mp_3rkd2fmgmmdh1dgkvluh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"length": 6,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
member_card
Supported expands: member, card.
|
id
string (member_card_id) |
member card ID |
|
organization_id
string (organization_id) |
organization ID |
|
member_id
string (member_id) |
member ID |
|
card_id
string (card_id) |
card ID |
|
name
string |
Card name in organization. Null if the card has no name. |
|
uid
string |
ISO14443 UID for the card. Always 4, 7 or 10 bytes, encoded in hex. |
|
printed_code
string |
Unique code physically printed on the card. Null if the card has no printed code (e.g. cards registered by UID only). |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"id": "mc_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"card_id": "crd_3ykdnnld7d57x83eqcm1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
member_token
Supported expands: member.
|
id
string (member_token_id) |
member token ID |
|
organization_id
string (organization_id) |
organization ID |
|
member_id
string (member_id) |
member ID |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
member_token_revealed
|
token
string |
The token. |
|
id
string (member_token_id) |
member token ID |
|
organization_id
string (organization_id) |
organization ID |
|
member_id
string (member_id) |
member ID |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"token": "mt_3yd55tbrelfxhjjvkdqh_e39adeac25cdbd99c757124d70acb8b028bb471d8a2eebbc",
"id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
member_group_association
Supported expands: member, member_group.
|
id
string (member_group_association_id) |
member group association ID |
|
organization_id
string (organization_id) |
organization ID |
|
member_id
string (member_id) |
member ID |
|
member_group_id
string (member_group_id) |
member_group ID |
|
starts_at
string (date-time) |
Start date of the member's access. If null, the access is valid immediately. |
|
ends_at
string (date-time) |
End date of the member's access. If null, the access is valid forever (ie, until an end date is set or the member is deleted.) |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"id": "mga_3rkd81x2hc3qluv56pl1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
List members
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by deletion status
Filter by email address
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by name.
Return only items that have the given tag.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Return only members that have the given card.
Return only members that have a card with the given printed code.
Return only members that have a card with the given UID, as a hex string.
Return only members that have the given PIN.
Return only members whose starts_at is at or after the given date.
Return only members whose ends_at is at or before the given date.
Filter by whether the member has a magic link.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
member |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "mem_3merk33gt7ml3tde71f3",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "John Doe",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create member
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
name
string |
Member name shown in the admin panel. This is for the organization admins to identify the member, it's never shown to the user. |
|
starts_at
string (date-time) |
Start date of the member's access. If null, the access is valid immediately. |
|
ends_at
string (date-time) |
End date of the member's access. If null, the access is valid forever (ie, until an end date is set or the member is deleted.) |
|
metadata
metadata |
Key-value metadata |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Request Example
{
"name": "John Doe",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Response Example (200 OK)
{
"id": "mem_3merk33gt7ml3tde71f3",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "John Doe",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Get member
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
Response Example (200 OK)
{
"id": "mem_3merk33gt7ml3tde71f3",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "John Doe",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Edit member
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
name
string |
Member name shown in the admin panel. This is for the organization admins to identify the member, it's never shown to the user. |
|
starts_at
string (date-time) |
Start date of the member's access. If null, the access is valid immediately. |
|
ends_at
string (date-time) |
End date of the member's access. If null, the access is valid forever (ie, until an end date is set or the member is deleted.) |
|
is_deleted
boolean |
True if this object has been deleted. |
|
metadata
metadata |
Key-value metadata |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Request Example
{
"name": "John Doe",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Response Example (200 OK)
{
"id": "mem_3merk33gt7ml3tde71f3",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "John Doe",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Delete member
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
Response Example (200 OK)
{
"id": "mem_3merk33gt7ml3tde71f3",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "John Doe",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
List emails
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Filter by email address.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
data
member_email |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "me_3rkd7ya2pnjysjqbluj1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"email": "string (email)",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create email
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
email
string (email) |
Email address |
|
metadata
metadata |
Key-value metadata |
Request Example
{
"email": "string (email)",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "me_3rkd7ya2pnjysjqbluj1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"email": "string (email)",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Get email
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member email ID
Response Example (200 OK)
{
"id": "me_3rkd7ya2pnjysjqbluj1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"email": "string (email)",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Edit email
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member email ID
|
metadata
metadata |
Key-value metadata |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "me_3rkd7ya2pnjysjqbluj1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"email": "string (email)",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Delete email
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member email ID
Response Example (200 OK)
{
"id": "me_3rkd7ya2pnjysjqbluj1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"email": "string (email)",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
List magic links
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
data
member_magic_link |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "mml_3rkd2f2mv925ptvpgblh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create magic link
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
metadata
metadata |
Key-value metadata |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"link": "https://link.akiles.app/#ml_8502850982345_f00i1nslz20gkm",
"id": "mml_3rkd2f2mv925ptvpgblh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Get magic link
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member magic link ID
Response Example (200 OK)
{
"id": "mml_3rkd2f2mv925ptvpgblh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Edit magic link
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member magic link ID
|
metadata
metadata |
Key-value metadata |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "mml_3rkd2f2mv925ptvpgblh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Delete magic link
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member magic link ID
Response Example (200 OK)
{
"id": "mml_3rkd2f2mv925ptvpgblh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Reveal magic link
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member magic link ID
Request Example
{}
Response Example (200 OK)
{
"link": "https://link.akiles.app/#ml_8502850982345_f00i1nslz20gkm",
"id": "mml_3rkd2f2mv925ptvpgblh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
List pins
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Return only PINs with the given PIN code.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
data
member_pin |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "mp_3rkd2fmgmmdh1dgkvluh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"length": 6,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create pin
When creating a PIN, you can specify it in 3 ways depending on the fields you send in the request:
- No fields: Akiles generates a random PIN, of the length configured in the organization's settings.
lengthonly: Akiles generates a random PIN of the length you specify.pinonly: The PIN is the one you specify.
The generated random PIN is included in the response.
It is not allowed to have two (non-deleted) members with the same PIN in a given organization. For this reason, we recommend you let Akiles generate a random PIN instead of generating one yourself if you can (Akiles generates a PIN that is different to all existing members). If you specify the PIN directly, you have to ensure there's no PIN collisions yourself.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
length
integer |
Pin length. Optional (you can either not specify it, or set it to |
|
pin
string |
Pin number. Optional (you can either not specify it, or set it to |
|
metadata
metadata |
Key-value metadata |
Request Example
{
"length": 6,
"pin": "123456",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"pin": "123456",
"id": "mp_3rkd2fmgmmdh1dgkvluh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"length": 6,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Get pin
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member pin ID
Response Example (200 OK)
{
"id": "mp_3rkd2fmgmmdh1dgkvluh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"length": 6,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Edit pin
NOTE: It is not possible to edit a MemberPin to change a PIN. Instead, delete it and create a new one.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member pin ID
|
metadata
metadata |
Key-value metadata |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "mp_3rkd2fmgmmdh1dgkvluh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"length": 6,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Delete pin
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member pin ID
Response Example (200 OK)
{
"id": "mp_3rkd2fmgmmdh1dgkvluh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"length": 6,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Reveal pin
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member pin ID
Request Example
{}
Response Example (200 OK)
{
"pin": "123456",
"id": "mp_3rkd2fmgmmdh1dgkvluh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"length": 6,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
List cards
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Filter by card.
Return only cards with the given printed code.
Return only cards with the given UID, as a hex string.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
data
member_card |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "mc_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"card_id": "crd_3ykdnnld7d57x83eqcm1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create card
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
card_id
string (card_id) |
Card ID. Optional. One of |
|
printed_code
string |
Unique code physically printed on the card. Optional. One of |
|
uid
string |
ISO14443 UID for the card. Always 4, 7 or 10 bytes, encoded in hex. Optional. One of |
|
metadata
metadata |
Key-value metadata |
Request Example
{
"card_id": "crd_3ykdnnld7d57x83eqcm1",
"printed_code": "WHJSA",
"uid": "041E53F2FF6780",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "mc_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"card_id": "crd_3ykdnnld7d57x83eqcm1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Get card
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member card ID
Response Example (200 OK)
{
"id": "mc_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"card_id": "crd_3ykdnnld7d57x83eqcm1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Edit card
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member card ID
|
metadata
metadata |
Key-value metadata |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "mc_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"card_id": "crd_3ykdnnld7d57x83eqcm1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Delete card
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member card ID
Response Example (200 OK)
{
"id": "mc_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"card_id": "crd_3ykdnnld7d57x83eqcm1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
List tokens
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
data
member_token |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create token
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
metadata
metadata |
Key-value metadata |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"token": "mt_3yd55tbrelfxhjjvkdqh_e39adeac25cdbd99c757124d70acb8b028bb471d8a2eebbc",
"id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Get token
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member token ID
Response Example (200 OK)
{
"id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Edit token
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member token ID
|
metadata
metadata |
Key-value metadata |
Request Example
{
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Delete token
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member token ID
Response Example (200 OK)
{
"id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Reveal token
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member token ID
Request Example
{}
Response Example (200 OK)
{
"token": "mt_3yd55tbrelfxhjjvkdqh_e39adeac25cdbd99c757124d70acb8b028bb471d8a2eebbc",
"id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
List group associations
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
data
member_group_association |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "mga_3rkd81x2hc3qluv56pl1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create group association
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
|
member_group_id
string (member_group_id) |
member_group ID |
|
starts_at
string (date-time) |
Start date of the member's access. If null, the access is valid immediately. |
|
ends_at
string (date-time) |
End date of the member's access. If null, the access is valid forever (ie, until an end date is set or the member is deleted.) |
|
metadata
metadata |
Key-value metadata |
Request Example
{
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "mga_3rkd81x2hc3qluv56pl1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Get group association
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member group association ID
Response Example (200 OK)
{
"id": "mga_3rkd81x2hc3qluv56pl1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Edit group association
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member group association ID
|
starts_at
string (date-time) |
Start date of the member's access. If null, the access is valid immediately. |
|
ends_at
string (date-time) |
End date of the member's access. If null, the access is valid forever (ie, until an end date is set or the member is deleted.) |
|
metadata
metadata |
Key-value metadata |
Request Example
{
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "mga_3rkd81x2hc3qluv56pl1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Delete group association
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member ID
member group association ID
Response Example (200 OK)
{
"id": "mga_3rkd81x2hc3qluv56pl1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"starts_at": "2024-03-13T16:56:51.766836837Z",
"ends_at": "2024-03-13T16:56:51.766836837Z",
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Member groups
member_group
Supported expands: organization, tags.
|
id
string (member_group_id) |
member_group ID |
|
organization_id
string (organization_id) |
organization ID |
|
name
string |
Group name |
|
permissions
member_group_permission_rule |
Permission rules granted to members of this group. A member can have multiple groups, and the permissions are the union of all the groups. Access is granted if at least one rule matches. |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"id": "mg_3merk33gt1692dk2p2m1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"permissions": [
{
"site_id": "site_3merk33gt21kym11een1",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "string",
"schedule_id": "sch_3merk33gt21kyz1f3z1",
"presence": "string",
"access_methods": {
"online": "boolean",
"bluetooth": "boolean",
"mobile_nfc": "boolean",
"pin": "boolean",
"card": "boolean"
}
}
],
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
member_group_permission_rule
Rule granting permissions to a member group. Examples:
{}matches all gadgets in all sites{"site_id": "site_3merk33gt21kym11een1"}matches all gadgets in that site.{"gadget_id": "gad_3merk33gt1hnl6pvbu71"}matches that gadget only.
It is not allowed to set site_id and gadget_id at the same time.
|
site_id
string (site_id) |
Site ID. If set, the rule only matches gadgets in this site. |
|
gadget_id
string (gadget_id) |
Gadget ID. If set, the rule only matches this gadget. |
|
action_id
string |
Action ID. If set, the rule only matches this particular action within the gadget. Only one action can be chosen. If you want to allow multiple actions in the same gadget, create one permission rule for each action. If you set this, |
|
schedule_id
string (schedule_id) |
Schedule ID. If set, the rule only matches if the current time is within the schedule. |
|
presence
string none, gps |
Presence check performed.
Actions via PINs, cards and Bluetooth are always allowed and not affected by this setting. |
|
access_methods
object |
Allowed access methods.
|
Example
{
"site_id": "site_3merk33gt21kym11een1",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "string",
"schedule_id": "sch_3merk33gt21kyz1f3z1",
"presence": "string",
"access_methods": {
"online": "boolean",
"bluetooth": "boolean",
"mobile_nfc": "boolean",
"pin": "boolean",
"card": "boolean"
}
}
List member groups
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by name.
Return only items that have the given tag.
Filter by a metadata key. For example, metadata.user=usr123 returns items whose user metadata key equals usr123.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
member_group |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "mg_3merk33gt1692dk2p2m1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"permissions": [
{
"site_id": "site_3merk33gt21kym11een1",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "string",
"schedule_id": "sch_3merk33gt21kyz1f3z1",
"presence": "string",
"access_methods": {
"online": "boolean",
"bluetooth": "boolean",
"mobile_nfc": "boolean",
"pin": "boolean",
"card": "boolean"
}
}
],
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create member group
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
name
string |
Group name |
|
permissions
member_group_permission_rule |
Permission rules granted to members of this group. A member can have multiple groups, and the permissions are the union of all the groups. Access is granted if at least one rule matches. |
|
metadata
metadata |
Key-value metadata |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Request Example
{
"name": "string",
"permissions": [
{
"site_id": "site_3merk33gt21kym11een1",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "string",
"schedule_id": "sch_3merk33gt21kyz1f3z1",
"presence": "string",
"access_methods": {
"online": "boolean",
"bluetooth": "boolean",
"mobile_nfc": "boolean",
"pin": "boolean",
"card": "boolean"
}
}
],
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Response Example (200 OK)
{
"id": "mg_3merk33gt1692dk2p2m1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"permissions": [
{
"site_id": "site_3merk33gt21kym11een1",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "string",
"schedule_id": "sch_3merk33gt21kyz1f3z1",
"presence": "string",
"access_methods": {
"online": "boolean",
"bluetooth": "boolean",
"mobile_nfc": "boolean",
"pin": "boolean",
"card": "boolean"
}
}
],
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Get member group
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member_group ID
Response Example (200 OK)
{
"id": "mg_3merk33gt1692dk2p2m1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"permissions": [
{
"site_id": "site_3merk33gt21kym11een1",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "string",
"schedule_id": "sch_3merk33gt21kyz1f3z1",
"presence": "string",
"access_methods": {
"online": "boolean",
"bluetooth": "boolean",
"mobile_nfc": "boolean",
"pin": "boolean",
"card": "boolean"
}
}
],
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Edit member group
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member_group ID
|
name
string |
Group name |
|
permissions
member_group_permission_rule |
Permission rules granted to members of this group. A member can have multiple groups, and the permissions are the union of all the groups. Access is granted if at least one rule matches. |
|
metadata
metadata |
Key-value metadata |
|
tag_ids
tag_ids |
IDs of the tags applied to this object. A tag can only be added here if its corresponding |
Request Example
{
"name": "string",
"permissions": [
{
"site_id": "site_3merk33gt21kym11een1",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "string",
"schedule_id": "sch_3merk33gt21kyz1f3z1",
"presence": "string",
"access_methods": {
"online": "boolean",
"bluetooth": "boolean",
"mobile_nfc": "boolean",
"pin": "boolean",
"card": "boolean"
}
}
],
"metadata": {
"key1": "value1",
"key2": "value2"
},
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
]
}
Response Example (200 OK)
{
"id": "mg_3merk33gt1692dk2p2m1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"permissions": [
{
"site_id": "site_3merk33gt21kym11een1",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "string",
"schedule_id": "sch_3merk33gt21kyz1f3z1",
"presence": "string",
"access_methods": {
"online": "boolean",
"bluetooth": "boolean",
"mobile_nfc": "boolean",
"pin": "boolean",
"card": "boolean"
}
}
],
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Delete member group
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
member_group ID
Response Example (200 OK)
{
"id": "mg_3merk33gt1692dk2p2m1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"permissions": [
{
"site_id": "site_3merk33gt21kym11een1",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"action_id": "string",
"schedule_id": "sch_3merk33gt21kyz1f3z1",
"presence": "string",
"access_methods": {
"online": "boolean",
"bluetooth": "boolean",
"mobile_nfc": "boolean",
"pin": "boolean",
"card": "boolean"
}
}
],
"tag_ids": [
"tag_3merk33gt1hnl6pvbu71"
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Tags
A tag is a label you can attach to members, member groups, sites, devices and gadgets to organize and filter them.
Each tag declares which object types it can be applied to via its applies_to_* flags. A tag can only be added to the
tag_ids of an object whose type the tag applies to. Most list endpoints accept a tag_id query parameter to filter by tag.
tag_ids
IDs of the tags applied to this object. A tag can only be added here if its corresponding applies_to_* flag
matches this object's type. When a tag is deleted, it is automatically removed from this array.
Example
[
"tag_3merk33gt1hnl6pvbu71"
]
tag
Supported expands: organization.
|
id
string (tag_id) |
tag ID |
|
organization_id
string (organization_id) |
organization ID |
|
name
string |
Tag name. |
|
color
string |
Tag color, as a hex color string like |
|
applies_to_member
boolean |
Whether this tag can be applied to members. |
|
applies_to_member_group
boolean |
Whether this tag can be applied to member groups. |
|
applies_to_site
boolean |
Whether this tag can be applied to sites. |
|
applies_to_device
boolean |
Whether this tag can be applied to devices. |
|
applies_to_gadget
boolean |
Whether this tag can be applied to gadgets. |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
Example
{
"id": "string (tag_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "VIP",
"color": "#ff0000",
"applies_to_member": true,
"applies_to_member_group": false,
"applies_to_site": false,
"applies_to_device": false,
"applies_to_gadget": false,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
List tags
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by name
Filter by whether the tag applies to members.
Filter by whether the tag applies to member groups.
Filter by whether the tag applies to sites.
Filter by whether the tag applies to devices.
Filter by whether the tag applies to gadgets.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
tag |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "string (tag_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "VIP",
"color": "#ff0000",
"applies_to_member": true,
"applies_to_member_group": false,
"applies_to_site": false,
"applies_to_device": false,
"applies_to_gadget": false,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create tag
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
name
string |
Tag name. |
|
color
string |
Tag color, as a hex color string like |
|
applies_to_member
boolean |
Whether this tag can be applied to members. |
|
applies_to_member_group
boolean |
Whether this tag can be applied to member groups. |
|
applies_to_site
boolean |
Whether this tag can be applied to sites. |
|
applies_to_device
boolean |
Whether this tag can be applied to devices. |
|
applies_to_gadget
boolean |
Whether this tag can be applied to gadgets. |
Request Example
{
"name": "VIP",
"color": "#ff0000",
"applies_to_member": true,
"applies_to_member_group": false,
"applies_to_site": false,
"applies_to_device": false,
"applies_to_gadget": false
}
Response Example (200 OK)
{
"id": "string (tag_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "VIP",
"color": "#ff0000",
"applies_to_member": true,
"applies_to_member_group": false,
"applies_to_site": false,
"applies_to_device": false,
"applies_to_gadget": false,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Get tag
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
tag ID
Response Example (200 OK)
{
"id": "string (tag_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "VIP",
"color": "#ff0000",
"applies_to_member": true,
"applies_to_member_group": false,
"applies_to_site": false,
"applies_to_device": false,
"applies_to_gadget": false,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Edit tag
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
tag ID
|
name
string |
Tag name. |
|
color
string |
Tag color, as a hex color string like |
|
applies_to_member
boolean |
Whether this tag can be applied to members. |
|
applies_to_member_group
boolean |
Whether this tag can be applied to member groups. |
|
applies_to_site
boolean |
Whether this tag can be applied to sites. |
|
applies_to_device
boolean |
Whether this tag can be applied to devices. |
|
applies_to_gadget
boolean |
Whether this tag can be applied to gadgets. |
Request Example
{
"name": "VIP",
"color": "#ff0000",
"applies_to_member": "boolean",
"applies_to_member_group": "boolean",
"applies_to_site": "boolean",
"applies_to_device": "boolean",
"applies_to_gadget": "boolean"
}
Response Example (200 OK)
{
"id": "string (tag_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "VIP",
"color": "#ff0000",
"applies_to_member": true,
"applies_to_member_group": false,
"applies_to_site": false,
"applies_to_device": false,
"applies_to_gadget": false,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Delete tag
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
tag ID
Response Example (200 OK)
{
"id": "string (tag_id)",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "VIP",
"color": "#ff0000",
"applies_to_member": true,
"applies_to_member_group": false,
"applies_to_site": false,
"applies_to_device": false,
"applies_to_gadget": false,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Schedules
schedule
Supported expands: organization.
|
id
string (schedule_id) |
schedule ID |
|
organization_id
string (organization_id) |
organization ID |
|
name
string |
Name |
|
weekdays
object[] |
Array of length 7 containing the time ranges for each weekday. Week starts on Monday, i.e. index 0 is Monday and index 6 is Sunday. User is granted access according to the schedule if the current time (in the site's local time zone) falls within one of the specified ranges. Range start and end are specified in number of seconds starting from 00:00. Start and end must be between 0 and 86400. End must be greater than start. Ranges within a single day must not overlap. |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
|
metadata
metadata |
Key-value metadata |
Example
{
"id": "sch_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "Mon-Fri 9AM-6PM",
"weekdays": [
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": []
},
{
"ranges": []
}
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
List schedules
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by name.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
schedule |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "sch_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "Mon-Fri 9AM-6PM",
"weekdays": [
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": []
},
{
"ranges": []
}
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create schedule
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
name
string |
Name |
|
weekdays
object[] |
Array of length 7 containing the time ranges for each weekday. Week starts on Monday, i.e. index 0 is Monday and index 6 is Sunday. User is granted access according to the schedule if the current time (in the site's local time zone) falls within one of the specified ranges. Range start and end are specified in number of seconds starting from 00:00. Start and end must be between 0 and 86400. End must be greater than start. Ranges within a single day must not overlap. |
|
metadata
metadata |
Key-value metadata |
Request Example
{
"name": "string",
"weekdays": [
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": []
},
{
"ranges": []
}
],
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "sch_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "Mon-Fri 9AM-6PM",
"weekdays": [
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": []
},
{
"ranges": []
}
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Get schedule
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
schedule ID
Response Example (200 OK)
{
"id": "sch_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "Mon-Fri 9AM-6PM",
"weekdays": [
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": []
},
{
"ranges": []
}
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Edit schedule
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
schedule ID
|
name
string |
Name |
|
weekdays
object[] |
Array of length 7 containing the time ranges for each weekday. Week starts on Monday, i.e. index 0 is Monday and index 6 is Sunday. User is granted access according to the schedule if the current time (in the site's local time zone) falls within one of the specified ranges. Range start and end are specified in number of seconds starting from 00:00. Start and end must be between 0 and 86400. End must be greater than start. Ranges within a single day must not overlap. |
|
metadata
metadata |
Key-value metadata |
Request Example
{
"name": "string",
"weekdays": [
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": []
},
{
"ranges": []
}
],
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "sch_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "Mon-Fri 9AM-6PM",
"weekdays": [
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": []
},
{
"ranges": []
}
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Delete schedule
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
schedule ID
Response Example (200 OK)
{
"id": "sch_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "Mon-Fri 9AM-6PM",
"weekdays": [
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": [
{
"start": 32400,
"end": 64800
}
]
},
{
"ranges": []
},
{
"ranges": []
}
],
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Cards
Cards configured for a particular organization
card
|
id
string (card_id) |
card ID |
|
organization_id
string (organization_id) |
organization ID |
|
name
string |
Card name in organization. Null if the card has no name. |
|
uid
string |
ISO14443 UID for the card. Always 4, 7 or 10 bytes, encoded in hex. |
|
printed_code
string |
Unique code physically printed on the card. Null if the card has no printed code (e.g. cards registered by UID only). |
|
metadata
metadata |
Key-value metadata |
Example
{
"id": "crd_3ykdnnld7d57x83eqcm1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
List cards
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by name.
Filter by card UID, as a hex string.
Filter by printed code.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
card |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "crd_3ykdnnld7d57x83eqcm1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create card
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
id
string (card_id) |
Card ID. Optional. One of |
|
printed_code
string |
Unique code physically printed on the card. Optional. One of |
|
uid
string |
ISO14443 UID for the card. Always 4, 7 or 10 bytes, encoded in hex. Optional. One of |
|
name
string |
Card name. Optional. |
|
metadata
metadata |
Key-value metadata |
Request Example
{
"id": "crd_3ykdnnld7d57x83eqcm1",
"printed_code": "WHJSA",
"uid": "041E53F2FF6780",
"name": "string",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "crd_3ykdnnld7d57x83eqcm1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Get cards
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
card ID
Response Example (200 OK)
{
"id": "crd_3ykdnnld7d57x83eqcm1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Edit card
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
card ID
|
name
string |
Card name |
|
metadata
metadata |
Key-value metadata |
Request Example
{
"name": "string",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Response Example (200 OK)
{
"id": "crd_3ykdnnld7d57x83eqcm1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Delete card
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
card ID
Response Example (200 OK)
{
"id": "crd_3ykdnnld7d57x83eqcm1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"name": "string",
"uid": "041E53F2FF6780",
"printed_code": "WHJSA",
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
Events
Everything that happens in an Akiles organization is logged as an Event.
Events are structured in "subject - verb - object" form:
- Subject: who did the action. It can be a member, an administrator, an OAuth application...
- Verb: what action was done on the object. Create, edit, delete, use...
- Object: what object the action was done on. A member, a gadget...
For example:
- gadget action events (i.e. someone opening a door) are reported with the member in the subject,
useas verb, and the gadget action as object. - Member editions are reported with the admin user who did the action in the subject,
editas the verb, and the member as the object.
See the events guide for the ways to receive events (polling and webhooks)
and for the created_at / occurred_at timestamp semantics
(events buffered by offline devices are reported late).
event
Supported expands: subject_member, object_gadget, object_member, object_member_group, object_organization, object_site.
|
id
string (event_id) |
event ID |
|
subject
event_subject |
|
|
verb
string create, edit, delete, use, reveal |
|
|
object
event_object |
|
|
created_at
string (date-time) |
Time the event was recorded by the server. Events are ordered by it. |
|
occurred_at
string (date-time) |
Time the event actually happened. It equals |
Example
{
"id": "evt_3merk33gt21kym11een1",
"subject": {
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_email_id": "me_3rkd7ya2pnjysjqbluj1",
"member_magic_link_id": "mml_3rkd2f2mv925ptvpgblh",
"member_pin_id": "mp_3rkd2fmgmmdh1dgkvluh",
"member_card_id": "mc_3yd55tbrelfxhjjvkdqh",
"member_token_id": "mt_3yd55tbrelfxhjjvkdqh",
"client": {
"device_type": "phone",
"user_agent": null,
"os": "Android",
"os_version": "16",
"device_manufacturer": "Google",
"device_model": "Pixel 8",
"app_package_name": "app.akiles",
"app_name": "Akiles",
"app_version": "4.3.0",
"app_version_code": "6994",
"browser": null,
"browser_version": null,
"sdk_version": "2.1.0",
"sdk_commit": "0238582770b6533e"
},
"ip_address": "1.2.3.4",
"access_method": "online"
},
"verb": "use",
"object": {
"type": "gadget_action",
"device_id": "dev_3merk33gt3l525ryhcmh",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"gadget_action_id": "open",
"gadget_state_id": "closed",
"gadget_signal_id": "pressed",
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_email_id": "me_3rkd7ya2pnjysjqbluj1",
"member_magic_link_id": "mml_3rkd2f2mv925ptvpgblh",
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"member_group_association_id": "mga_3rkd81x2hc3qluv56pl1",
"member_pin_id": "mp_3rkd2fmgmmdh1dgkvluh",
"member_card_id": "mc_3yd55tbrelfxhjjvkdqh",
"member_token_id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"webhook_id": "wh_3merk33gt21kyz1f3z1",
"hardware_id": "hw_3merk33gt2a7grgmljhh",
"card_id": "crd_3ykdnnld7d57x83eqcm1"
},
"created_at": "2024-03-13T16:56:51.766836837Z",
"occurred_at": "2024-03-13T16:56:51.766836837Z"
}
event_subject
|
member_id
string (member_id) |
member ID |
|
member_email_id
string (member_email_id) |
member_email ID |
|
member_magic_link_id
string (member_magic_link_id) |
member_magic_link ID |
|
member_pin_id
string (member_pin_id) |
member_pin ID |
|
member_card_id
string (member_card_id) |
member_card ID |
|
member_token_id
string (member_token_id) |
member_token ID |
|
client
client_info |
|
|
ip_address
string |
|
|
access_method
string online, bluetooth, mobile_nfc, pin, card |
Example
{
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_email_id": "me_3rkd7ya2pnjysjqbluj1",
"member_magic_link_id": "mml_3rkd2f2mv925ptvpgblh",
"member_pin_id": "mp_3rkd2fmgmmdh1dgkvluh",
"member_card_id": "mc_3yd55tbrelfxhjjvkdqh",
"member_token_id": "mt_3yd55tbrelfxhjjvkdqh",
"client": {
"device_type": "phone",
"user_agent": null,
"os": "Android",
"os_version": "16",
"device_manufacturer": "Google",
"device_model": "Pixel 8",
"app_package_name": "app.akiles",
"app_name": "Akiles",
"app_version": "4.3.0",
"app_version_code": "6994",
"browser": null,
"browser_version": null,
"sdk_version": "2.1.0",
"sdk_commit": "0238582770b6533e"
},
"ip_address": "1.2.3.4",
"access_method": "online"
}
event_object
|
type
string device, gadget, gadget_action, gadget_state, gadget_signal, member, member_email, member_magic_link, member_group, member_group_association, member_pin, member_card, member_token, organization, site, webhook, hardware, card |
|
|
device_id
string (device_id) |
device ID |
|
gadget_id
string (gadget_id) |
gadget ID |
|
gadget_action_id
string |
gadget_action ID |
|
gadget_state_id
string |
gadget_state ID |
|
gadget_signal_id
string |
gadget_signal ID |
|
member_id
string (member_id) |
member ID |
|
member_email_id
string (member_email_id) |
member_email ID |
|
member_magic_link_id
string (member_magic_link_id) |
member_magic_link ID |
|
member_group_id
string (member_group_id) |
member_group ID |
|
member_group_association_id
string (member_group_association_id) |
member_group_association ID |
|
member_pin_id
string (member_pin_id) |
member_pin ID |
|
member_card_id
string (member_card_id) |
member_card ID |
|
member_token_id
string (member_token_id) |
member_token ID |
|
organization_id
string (organization_id) |
organization ID |
|
site_id
string (site_id) |
site ID |
|
webhook_id
string (webhook_id) |
webhook ID |
|
hardware_id
string (hardware_id) |
hardware ID |
|
card_id
string (card_id) |
card ID |
Example
{
"type": "gadget_action",
"device_id": "dev_3merk33gt3l525ryhcmh",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"gadget_action_id": "open",
"gadget_state_id": "closed",
"gadget_signal_id": "pressed",
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_email_id": "me_3rkd7ya2pnjysjqbluj1",
"member_magic_link_id": "mml_3rkd2f2mv925ptvpgblh",
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"member_group_association_id": "mga_3rkd81x2hc3qluv56pl1",
"member_pin_id": "mp_3rkd2fmgmmdh1dgkvluh",
"member_card_id": "mc_3yd55tbrelfxhjjvkdqh",
"member_token_id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"webhook_id": "wh_3merk33gt21kyz1f3z1",
"hardware_id": "hw_3merk33gt2a7grgmljhh",
"card_id": "crd_3ykdnnld7d57x83eqcm1"
}
client_info
|
device_type
string unknown, computer, tablet, phone, console, wearable, tv |
|
|
user_agent
string |
|
|
os
string |
|
|
os_version
string |
|
|
device_manufacturer
string |
|
|
device_model
string |
|
|
app_package_name
string |
|
|
app_name
string |
|
|
app_version
string |
|
|
app_version_code
string |
|
|
browser
string |
|
|
browser_version
string |
|
|
sdk_version
string |
|
|
sdk_commit
string |
Example
{
"device_type": "phone",
"user_agent": null,
"os": "Android",
"os_version": "16",
"device_manufacturer": "Google",
"device_model": "Pixel 8",
"app_package_name": "app.akiles",
"app_name": "Akiles",
"app_version": "4.3.0",
"app_version_code": "6994",
"browser": null,
"browser_version": null,
"sdk_version": "2.1.0",
"sdk_commit": "0238582770b6533e"
}
List events
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Filter by creation date. Must be used with one of the operator suffixes :gt, :ge, :lt or :le. For example, created_at:lt=2024-01-01T00:00:00Z returns items created before that date. Plain equality is not supported.
Filter by event verb, e.g. create, edit, delete, use.
Return only events performed by the given member.
Filter by the type of object the event is about, e.g. member, gadget.
Return only events about the given device.
Return only events about the given gadget.
Return only events about the given gadget action. Use together with object.gadget_id.
Return only events about the given member.
Return only events about the given member group.
Return only events about objects in the given site.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
event |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "evt_3merk33gt21kym11een1",
"subject": {
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_email_id": "me_3rkd7ya2pnjysjqbluj1",
"member_magic_link_id": "mml_3rkd2f2mv925ptvpgblh",
"member_pin_id": "mp_3rkd2fmgmmdh1dgkvluh",
"member_card_id": "mc_3yd55tbrelfxhjjvkdqh",
"member_token_id": "mt_3yd55tbrelfxhjjvkdqh",
"client": {
"device_type": "phone",
"user_agent": null,
"os": "Android",
"os_version": "16",
"device_manufacturer": "Google",
"device_model": "Pixel 8",
"app_package_name": "app.akiles",
"app_name": "Akiles",
"app_version": "4.3.0",
"app_version_code": "6994",
"browser": null,
"browser_version": null,
"sdk_version": "2.1.0",
"sdk_commit": "0238582770b6533e"
},
"ip_address": "1.2.3.4",
"access_method": "online"
},
"verb": "use",
"object": {
"type": "gadget_action",
"device_id": "dev_3merk33gt3l525ryhcmh",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"gadget_action_id": "open",
"gadget_state_id": "closed",
"gadget_signal_id": "pressed",
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_email_id": "me_3rkd7ya2pnjysjqbluj1",
"member_magic_link_id": "mml_3rkd2f2mv925ptvpgblh",
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"member_group_association_id": "mga_3rkd81x2hc3qluv56pl1",
"member_pin_id": "mp_3rkd2fmgmmdh1dgkvluh",
"member_card_id": "mc_3yd55tbrelfxhjjvkdqh",
"member_token_id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"webhook_id": "wh_3merk33gt21kyz1f3z1",
"hardware_id": "hw_3merk33gt2a7grgmljhh",
"card_id": "crd_3ykdnnld7d57x83eqcm1"
},
"created_at": "2024-03-13T16:56:51.766836837Z",
"occurred_at": "2024-03-13T16:56:51.766836837Z"
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Get event
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
event ID
Response Example (200 OK)
{
"id": "evt_3merk33gt21kym11een1",
"subject": {
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_email_id": "me_3rkd7ya2pnjysjqbluj1",
"member_magic_link_id": "mml_3rkd2f2mv925ptvpgblh",
"member_pin_id": "mp_3rkd2fmgmmdh1dgkvluh",
"member_card_id": "mc_3yd55tbrelfxhjjvkdqh",
"member_token_id": "mt_3yd55tbrelfxhjjvkdqh",
"client": {
"device_type": "phone",
"user_agent": null,
"os": "Android",
"os_version": "16",
"device_manufacturer": "Google",
"device_model": "Pixel 8",
"app_package_name": "app.akiles",
"app_name": "Akiles",
"app_version": "4.3.0",
"app_version_code": "6994",
"browser": null,
"browser_version": null,
"sdk_version": "2.1.0",
"sdk_commit": "0238582770b6533e"
},
"ip_address": "1.2.3.4",
"access_method": "online"
},
"verb": "use",
"object": {
"type": "gadget_action",
"device_id": "dev_3merk33gt3l525ryhcmh",
"gadget_id": "gad_3merk33gt1hnl6pvbu71",
"gadget_action_id": "open",
"gadget_state_id": "closed",
"gadget_signal_id": "pressed",
"member_id": "mem_3merk33gt7ml3tde71f3",
"member_email_id": "me_3rkd7ya2pnjysjqbluj1",
"member_magic_link_id": "mml_3rkd2f2mv925ptvpgblh",
"member_group_id": "mg_3merk33gt1692dk2p2m1",
"member_group_association_id": "mga_3rkd81x2hc3qluv56pl1",
"member_pin_id": "mp_3rkd2fmgmmdh1dgkvluh",
"member_card_id": "mc_3yd55tbrelfxhjjvkdqh",
"member_token_id": "mt_3yd55tbrelfxhjjvkdqh",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"site_id": "site_3merk33gt21kym11een1",
"webhook_id": "wh_3merk33gt21kyz1f3z1",
"hardware_id": "hw_3merk33gt2a7grgmljhh",
"card_id": "crd_3ykdnnld7d57x83eqcm1"
},
"created_at": "2024-03-13T16:56:51.766836837Z",
"occurred_at": "2024-03-13T16:56:51.766836837Z"
}
Webhooks
Webhooks allow your server to receive real-time notifications about events happening in the Akiles organization: Akiles sends a POST request to the indicated URL when a matching event occurs. The request body is a JSON-encoded event, same as you would get in the response of the "get event" endpoint.
See the events guide for how webhooks work: filtering, expansion, signature verification, and delivery retries.
webhook_filter_rule
An object mapping filter names to the value to match. The supported filters are exactly
the ones of the "list events" endpoint, with the same names, value formats and operator
suffixes. All values are strings, formatted exactly as you'd pass them in the list query
parameter. The rule matches an event if all its filters match. object.type must always
be specified.
Example
{
"object.type": "member",
"verb": "edit"
}
webhook
Supported expands: organization.
|
id
string (webhook_id) |
webhook ID |
|
organization_id
string (organization_id) |
organization ID |
|
filter
webhook_filter_rule |
Array of event filter rules. An event will be sent to this webhook if it matches at least one rule. If it matches multiple rules, it will only be sent once. If it matches multiple webhook objects, it will be sent once per webhook to its respective URL. |
|
expand
string[] |
Array of expands applied to the event when delivering it, embedding the referenced objects in the payload. Supports the same expands as the event object, including nested expands with dots. Invalid expands are rejected when creating or editing the webhook. |
|
url
string |
URL the events are sent to. |
|
secret
string |
Secret used to sign webhooks. Visible only in the response for the creation API call. |
|
is_enabled
boolean |
True if this webhook is enabled. When false, no webhooks are sent. |
|
is_deleted
boolean |
True if this object has been deleted. |
|
created_at
string (date-time) |
Creation time for this object. |
Example
{
"id": "wh_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"filter": [
{
"object.type": "member",
"verb": "edit"
}
],
"expand": [
"object_member"
],
"url": "https://example.com/hook",
"secret": "f305d484fd10de285b00bb203659e863",
"is_enabled": true,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
List webhooks
Cursor value obtained from a previous request to the same endpoint. If not present, the first page of results is returned.
Items per page.
Sort order. Field name, followed by :asc or :desc. Defaults to created_at:desc if that field exists, otherwise id:desc. Depending on the endpoint, sorting on some fields might not be supported.
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
data
webhook |
|
|
has_next
boolean |
|
|
cursor_next
string (cursor) |
Response Example (200 OK)
{
"data": [
{
"id": "wh_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"filter": [
{
"object.type": "member",
"verb": "edit"
}
],
"expand": [
"object_member"
],
"url": "https://example.com/hook",
"secret": "f305d484fd10de285b00bb203659e863",
"is_enabled": true,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
],
"has_next": true,
"cursor_next": "i9vmCnOgONT2AjUMCn1K1N5cJg=="
}
Create webhook
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
|
filter
webhook_filter_rule |
Array of event filter rules. |
|
expand
string[] |
Array of expands applied to the event when delivering it. Supports the same expands as the event object. |
|
url
string |
URL the events are sent to. |
|
is_enabled
boolean |
True if this webhook is enabled. When false, no webhooks are sent. |
Request Example
{
"filter": [
{
"object.type": "gadget_action",
"verb": "use"
}
],
"expand": [
"object_member"
],
"url": "https://example.com/hook",
"is_enabled": true
}
Response Example (200 OK)
{
"id": "wh_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"filter": [
{
"object.type": "member",
"verb": "edit"
}
],
"expand": [
"object_member"
],
"url": "https://example.com/hook",
"secret": "f305d484fd10de285b00bb203659e863",
"is_enabled": true,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Get webhook
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
webhook ID
Response Example (200 OK)
{
"id": "wh_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"filter": [
{
"object.type": "member",
"verb": "edit"
}
],
"expand": [
"object_member"
],
"url": "https://example.com/hook",
"secret": "f305d484fd10de285b00bb203659e863",
"is_enabled": true,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Edit webhook
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
webhook ID
|
filter
webhook_filter_rule |
Array of event filter rules. |
|
expand
string[] |
Array of expands applied to the event when delivering it. Supports the same expands as the event object. |
|
url
string |
URL the events are sent to. |
|
is_enabled
boolean |
True if this webhook is enabled. When false, no webhooks are sent. |
Request Example
{
"filter": [
{
"object.type": "gadget_action",
"verb": "use"
}
],
"expand": [
"object_member"
],
"url": "https://example.com/hook",
"is_enabled": true
}
Response Example (200 OK)
{
"id": "wh_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"filter": [
{
"object.type": "member",
"verb": "edit"
}
],
"expand": [
"object_member"
],
"url": "https://example.com/hook",
"secret": "f305d484fd10de285b00bb203659e863",
"is_enabled": true,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}
Delete webhook
Comma-separated list of references to expand into full objects in the response, e.g. expand=site,device. Nested expands are supported with dots, e.g. expand=group_associations.member_group. Each object's supported expands are listed in its schema. See Expands for details.
webhook ID
Response Example (200 OK)
{
"id": "wh_3merk33gt21kyz1f3z1",
"organization_id": "org_3merk33gt1v9ypgfzrp1",
"filter": [
{
"object.type": "member",
"verb": "edit"
}
],
"expand": [
"object_member"
],
"url": "https://example.com/hook",
"secret": "f305d484fd10de285b00bb203659e863",
"is_enabled": true,
"is_deleted": false,
"created_at": "2024-03-13T16:56:51.766836837Z"
}