---
metadata:
  - name: generator
    content: Diplodoc Platform v5.66.0
alternate:
  - https://yandex.ru/dev/dialogs/smart-home/doc/en/reference/unlink-jrpc.md
  - https://yandex.ru/dev/dialogs/smart-home/doc/ru/reference/unlink-jrpc.md
  - href: https://yandex.ru/dev/dialogs/smart-home/doc/en/reference/unlink-jrpc.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/dev/dialogs/smart-home/doc/en/llms.txt?revision=r21995741
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/dialogs/smart-home/doc/en/llms.txt?revision=r21995741

# Notification of unlinked accounts

Notifies you that the user's provider account and [Yandex account](https://yandex.com/support/id/auth.html) were unlinked (the link between them was deleted by the user). For example, if the user [logged out from all accounts](https://yandex.com/support/id/troubleshooting/logout-all-devices.html).

If the user has unlinked the accounts, the user token is revoked regardless of whether the request response is valid.

## Smart home platform request format {#input}

```bash translate=no
POST https://functions.yandexcloud.net/<function_id>?integration=raw
```

<!-- <section id="headers">
                <title>Заголовки запроса</title>
                <table>
                    <tgroup cols="3">
                        <colspec colname="1"/>
                        <colspec colname="2"/>
                        <colspec colname="3"/>
                        <thead>
                            <row>
                                <entry>Заголовок</entry>
                                <entry>Описание</entry>
                                <entry>Обязательный</entry>
                            </row>
                        </thead>
                        <tbody>
                            <row conref="struct-table-protocol.dita#struct-table-protocol/content-type-row">
                                <entry></entry>
                            </row>
                        </tbody>
                    </tgroup>
                </table>
            </section> -->


#### Request body format {#structure-in}

```json translate=no
{
  "headers": {
    "request_id": String,
    "authorization": String
  },
  "request_type": String,
  "api_version": Float
}
```

<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/unlink-input.md -->
<!-- Unlink query -->


#|
||
**Parameter**
|
**Type**
|
**Description**
|
**Required**
||

||
headers
|
[Object](*object)
|
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/headers-ph.md -->
Object with additional request fields.
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/headers-ph.md -->
|
Yes
||

||
request_type
|
[String](*string)
|
Request type. Acceptable values:

- unlink: Notification that accounts were unlinked
|
Yes
||

||
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/api_version-row-col-1.md -->
api_version
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/api_version-row-col-1.md -->
|
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/api_version-row-col-2.md -->
[Float](*float)
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/api_version-row-col-2.md -->
|
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/api_version-row-col-3.md -->
The protocol version of Yandex Smart Home.
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/api_version-row-col-3.md -->
|
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/api_version-row-col-4.md -->
Yes
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/api_version-row-col-4.md -->
||
|#

<br>

<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/headers-tgroup.md -->
**`headers` object**

#|
||
**Parameter**
|
**Type**
|
**Description**
|
**Required**
||

||
request_id
|
[String](*string)
|
Request ID. Should be logged on the provider's side for investigating incidents and problems.
|
Yes
||

||
authorization
|
[String](*string)
|
User's authorization token.
|
Yes
||
|#
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/headers-tgroup.md -->
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/unlink-input.md -->



## Provider response format {#output-structure}

The provider must use the correct format to respond to the request received from the smart home platform.

{% list tabs %}

- Response successful


  ```json translate=no
  HTTP/1.1 200 OK

  {
    "request_id": String
  }
  ```

  <!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/unlink.md -->
  <!-- Unlink -->


  #|
  ||
  **Parameter**
  |
  **Type**
  |
  **Description**
  |
  **Required**
  ||

  ||
  <!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/request_id-col-1.md -->
  request_id
  <!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/request_id-col-1.md -->
  |
  <!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/request_id-col-2.md -->
  [String](*string)
  <!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/request_id-col-2.md -->
  |
  <!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/request_id-col-3.md -->
  Request ID.
  <!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/request_id-col-3.md -->
  |
  <!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/request_id-col-4.md -->
  Yes
  <!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/request_id-col-4.md -->
  ||
  |#
  <!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/unlink.md -->



- Response with error


  <!-- source: en/_includes/reference/check-jrpc/id-output-structure/cloud.md -->
  For more information about returning status codes other than `200 OK`, see the [documentation](https://yandex.cloud/en/docs/functions/concepts/function-invoke#response).
  <!-- endsource: en/_includes/reference/check-jrpc/id-output-structure/cloud.md -->


  ```json translate=no
  HTTP/1.1 404 Not Found
  ```

  [ Global codes](https://yandex.ru/dev/dialogs/smart-home/doc/en/concepts/response-codes.md#enq-with-error-codes)

{% endlist %}


## Example {#example-JSON}

> {% list tabs %}
>
> - Request
>
>
>   ```bash translate=no
>   curl -i POST https://functions.yandexcloud.net/<function_id>?integration=raw \
>   -H 'Content-Type: application/json' \
>   -d '{
>         "headers": {
>           "request_id": "1111-aaaa-2222-bbbb",
>           "authorization": "Bearer 123qwe456a..."
>         },
>         "request_type": "unlink",
>         "api_version": 1.0
>   }'
>   ```
>
>
> - Response successful
>
>
>   ```json translate=no
>   HTTP/1.1 200 OK
>
>   {
>     "request_id": "1111-aaaa-2222-bbbb"
>   }
>   ```
>
>
> - Response with error
>
>
>   ```json translate=no
>   HTTP/1.1 500 Internal Server Error
>   ```
>
> {% endlist %}


<!-- {% include [support-support-button](../_includes/about/id-support/support-button.md) %}-->

[*float]:
  Floating-point number with a precision of 6-9 decimal digits.

[*object]:
  List of `"key": value` pairs separated by commas. The list is enclosed in curly brackets `{}`.

```json translate=no
{
  "name": "John",
  "surname": "Smith"
}
```

[*string]:
  String enclosed in quotation marks, for example: `"Hello, world"`.