---
metadata:
  - name: generator
    content: Diplodoc Platform v5.66.0
alternate:
  - https://yandex.ru/dev/dialogs/smart-home/doc/en/reference/unlink.md
  - https://yandex.ru/dev/dialogs/smart-home/doc/ru/reference/unlink.md
  - href: https://yandex.ru/dev/dialogs/smart-home/doc/en/reference/unlink.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}

The smart home platform sends a request to the provider's Endpoint URL (https://example.com/).

```
POST https://example.com/v1.0/user/unlink
```


#### Request headers {#headers}

<!-- source: en/_includes/reference/get-devices/input-headers.md -->
#|
||
**Header**
|
**Description**
|
**Required**
||

||
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/auth-row-col-1.md -->
Authorization
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/auth-row-col-1.md -->
|
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/user-auth-row-col-2.md -->
User's authorization token.
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/user-auth-row-col-2.md -->
|
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/auth-row-col-3.md -->
Yes
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/auth-row-col-3.md -->
||

||
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/x-request-id-row-col-1.md -->
X-Request-Id
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/x-request-id-row-col-1.md -->
|
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/x-request-id-row-col-2.md -->
Request ID. Must be logged on the provider's side for investigating incidents and problems.
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/x-request-id-row-col-2.md -->
|
<!-- source: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/x-request-id-row-col-3.md -->
Yes
<!-- endsource: en/_includes/reference/struct-table-protocol/id-struct-table-protocol/x-request-id-row-col-3.md -->
||
|#
<!-- endsource: en/_includes/reference/get-devices/input-headers.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


  ```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 -X POST 'https://example.com/v1.0/user/unlink' \
>   -H 'Authorization: Bearer 123qwe456a...' \
>   -H 'X-Request-Id: ff36a3cc-ec...'
>   ```
>
>
> - Response successful
>
>
>   ```json translate=no
>   HTTP/1.1 200 OK
>
>   {
>     "request_id": "ff36a3cc-ec34-11e6-b1a0-64510650abcf"
>   }
>   ```
>
>
> - 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) %}-->

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