/api/v1/home-assistant/link-requests/{id}/approve
POST
/api/v1/home-assistant/link-requests/{id}/approve
const url = 'https://example.com/api/v1/home-assistant/link-requests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approve';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"scope":"read","locationIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"confirmCrossLocation":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/home-assistant/link-requests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approve \ --header 'Content-Type: application/json' \ --data '{ "scope": "read", "locationIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "confirmCrossLocation": true }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
scope
required
string
locationIds
required
Array<string>
confirmCrossLocation
boolean
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
warning
required
string
Example
{ "warning": "cross_location_write"}Default Response
Media typeapplication/json
object
state
required
string
Example
{ "state": "approved"}