Create organization access link
Creates a new organization access link.
POST https://api.tedee.com/api/v1.33/organization/{organizationId}/accesslink
Warning
We do not recommend to create access links with permanent access.
URI Parameters
Name |
Type |
Description |
---|---|---|
organizationId |
number |
id of the organization |
Body Parameters
Name |
Type |
Description |
---|---|---|
name |
string |
access link name (visible only during management) |
description |
string (optional, multiline) |
access link description for guests |
devicesIds |
int [] |
array of devices included in the access link |
repeatEvent |
Repeat event (optional) |
repeat event of the access link |
Note
Access links requirements:
description must be in range 0-72 characters
deviceIds must contain at least one device
deviceIds must contain distinct device ids
user must be at least organization admin to perform this operation
Note
Dates sent to Tedee API must be in the UTC timezone. The client must convert the date to UTC before sending it to the API.
Responses
Name |
Type |
Description |
---|---|---|
201 Created |
successful operation |
|
400 Bad Request |
request model is not valid |
|
404 Not found |
organization does not exist or user is not allowed to manage it |
Scopes
Name |
Description |
---|---|
AccessLink.ReadWrite |
Grants user possibility to manage organization access links |
Examples
Create organization access link for organization with id 123 with restricted access
Sample request
curl -X POST "https://api.tedee.com/api/v1.33/organization/123/accesslink" -H "accept: application/json" -H "Content-Type: application/json-patch+json" -H "Authorization: Bearer <<access token>>" -d "<<body>>"
Body:
{
"name": "Sample Link",
"description": "Building address: 123 Main St, City, State, 12345",
"deviceIds": [
1,
2
],
"repeatEvent": {
"startDate": "2023-01-01T00:00:00.000Z",
"endDate": "2023-02-01T00:00:00.000Z"
}
}
Sample response
HTTP status code: 201
{
"result": {
"id": 10df36b5-a06e-4bec-9398-786b0231453a,
"url" "https://portal.tedee.com/link/0bbDshXmsgjRdDmU2zwYjR1-iQZOcHJL7TuL9NoXOXgC1iF2zVKVKCquVqbEldmkDSspWJKRlH4JcPk.QMzs4Q__"
}
"success": true,
"errorMessages": [],
"statusCode": 201
}