# Opt out (https://docs.loybox.com.ar/en/api-reference/mi-cuenta/darme-de-baja)



<Endpoint method="DELETE" path="/v1/me/subscription" auth="user-token" />

Unsubscribes the user from the commerce's program.

<Callout title="The points are not lost">
  The accumulated points stay where they are: if the user
  [joins again](https://docs.loybox.com.ar/api-reference/mi-cuenta/adherirme), they are still there.

  It is worth saying so on the confirmation screen: it is the difference between
  opting out and being deleted, and knowing it makes opting out less frightening.
</Callout>

## Headers
<Fields>
  <Field name="X-Commerce-Id" type="integer" location="header" required="true">
    Id of the commerce integrating the API. Every response is scoped to this
    commerce.
  </Field>
</Fields>

It carries no body.

## Response
`200 OK`. The response has no defined shape: looking at the status code is enough.

```bash
curl -X DELETE https://loybox-public-api-752998171300.southamerica-west1.run.app/v1/me/subscription \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "X-Commerce-Id: 87"
```

After opting out, [`GET /v1/me`](https://docs.loybox.com.ar/api-reference/mi-cuenta/obtener) returns
`subscribed: false`.

## Errors
| Code  | When                                                                     |
| ----- | ------------------------------------------------------------------------ |
| `401` | The access token is missing, expired, or does not belong to an end user. |
| `404` | The commerce does not exist, or the user was not subscribed.             |
| `422` | The `X-Commerce-Id` header is missing.                                   |

The `404` also covers a repeated opt-out: if the user was no longer subscribed,
there is nothing to unsubscribe.
