---
title: "List of consents"
method: GET
path: "/consents"
tags: ["Consents"]
---

# List of consents

`GET /consents`

Returns all the consents accessible to your application for a certain customer or a connection.

## Query parameters

- `from_id` string — the `id` from which the next page of consents starts
- `connection_id` string — the `id` of the connection containing the consents
- `customer_id` string — the `id` of the customer containing the consents, required unless `connection_id` parameter is sent.

## Response `200`

OK

- ConsentsResponse
  - `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
  - `meta` MetaObject — Metaobject that contains information about pagination.
    - `next_id` string
    - `next_page` string

## Other responses

- `404` — A customer with such `customer_id` could not be found

---

[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)
