---
title: "Show consent"
method: GET
path: "/consents/{consent_id}"
tags: ["Consents"]
---

# Show consent

`GET /consents/{consent_id}`

## Request

- Base URL: `https://www.saltedge.com/api/v5`
- URL: `https://www.saltedge.com/api/v5/consents/{consent_id}`
- Auth: API key in header `App-id` and API key in header `Secret`
- TypeScript: <https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/docs/consents/:consent_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the [consent object](#consents-attributes).

## 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

## Changes

> 17 revisions in range; 1 not diffed.

- **2024-06-07** `41121896cc5e`: 1 info
  - added the required property `data/status` to the response with the `200` status
- **2021-07-29** `9eda9646ec8c`: 3 breaking, 4 info
  - the `request` response's property type changed from `string` to `object` for status `404`
  - removed the required property `error_class` from the response with the `404` status
  - removed the required property `error_message` from the response with the `404` status
  - added the required property `class` to the response with the `404` status
  - …3 more

[Operation history](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/changes/consents/:consent_id/get.md)

---

[API](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api.md) - [All operations](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/llms.txt) - [OpenAPI document](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/revisions/acda2850de69?raw)
