---
title: "Revoke consent"
method: PUT
path: "/consents/{consent_id}/revoke"
tags: ["Consents"]
---

# Revoke consent

`PUT /consents/{consent_id}/revoke`

Allows you to revoke a consent for a connection or a customer.

## Path parameters

- `consent_id` string, required — the `id` of the consent

## Query parameters

- `connection_id` string — the `id` of the connection containing the consent, required unless `customer_id` parameter is sent
- `customer_id` string — the `id` of the customer containing the consents, required unless `connection_id` parameter is sent.

## Response `200`

OK

- ConsentResponse
  - `data` Consent
    - `id` string, required — the `id` of the consent
    - `connection_id` string, required — the `id` of the [connection](#connections)
    - `customer_id` string, required — the `id` of the [customer](#customers)
    - `scopes` string[], required — data that is allowed to be fetched.
    - `period_days` integer, required — the period the consent will be valid for
    - `expires_at` string, date-time, required — the date when the consent will expire
    - `from_date` string, date, required — the date from which the data has been allowed to be fetched
    - `to_date` string, date, required — the date until which the data has been allowed to be fetched
    - `status` 'active' | 'expired' | 'revoked', required — consent status.
    - `collected_by` 'client' | 'saltedge', required — entity who collected the consent.
    - `revoked_at` string, date-time, required — the date when consent was revoked
    - `revoke_reason` 'expired' | 'client' | 'provider' | 'saltedge', required — revoke reason.
    - `created_at` string, date-time, required — when the consent was created
    - `updated_at` string, date-time, required — when the consent was updated

## Other responses

- `404` — A consent with such an `id` does not exist
- `406` — The consent has already been revoked

---

[API](https://skmtc.net/saltedge/apis/salt-edge-account-information-api.md) · [All operations](https://skmtc.net/saltedge/apis/salt-edge-account-information-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/saltedge/salt-edge-account-information-api/versions/f18f4f36d0b3/schema)
