---
title: Get a Consent
slug: connect/get-a-consent
docTags: 
createdAt: 2023-11-21T06:37:46.050Z
---

:::ApiMethodV2
```json
{
  "name": "consents",
  "method": "GET",
  "url": "https://api-sandbox.klavi.ai/data/v1/consents/{consentId}",
  "description": "Get a consent by its consentId",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "aio0LO6ztlWsZNIOFOXIv",
        "language": "curl",
        "code": "curl --location --globoff 'https://api-sandbox.klavi.ai/data/v1/consents/{consentId}' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "aio0LO6ztlWsZNIOFOXIv"
  },
  "results": {
    "languages": [
      {
        "id": "T1KDAw8ZzZljjAvCHOJqM",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"consentId\": \"ac246093-353b-4310-bd9c-c6ce0b278de8\",\n    \"linkId\": \"85a3af9f-e8ab-4be8-86dd-6138e9f2474c\",\n    \"externalTrackId\": \"113ee41e-1ecf-41b7-b6a9-c24d7f84bdfd\",\n    \"personalTaxId\": \"16109277672\",\n    \"businessTaxId\": \"\",\n    \"institutionCode\": \"001\",\n    \"status\": \"AUTHORISED\",\n    \"permissionsApply\":\n    [\n        \"ACCOUNTS_ALL\",\n        \"CREDIT_CARDS_ALL\",\n        \"CREDIT_OPERATIONS_ALL\",\n        \"REGISTRATION_ALL\",\n        \"INVESTMENTS_ALL\"\n    ],\n    \"permissionsGranted\":\n    [\n        \"ACCOUNTS_ALL\",\n        \"CREDIT_CARDS_ALL\",\n        \"CREDIT_OPERATIONS_ALL\",\n        \"REGISTRATION_ALL\",\n        \"INVESTMENTS_ALL\"\n    ],\n    \"expireAt\": \"2024-12-07T23:59:59.999Z\",\n    \"createdAt\": \"2023-12-08T09:19:19.253Z\",\n    \"updatedAt\": \"2023-12-08T11:29:50.253Z\"\n}"
      }
    ],
    "selectedLanguageId": "T1KDAw8ZzZljjAvCHOJqM"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "Bearer access token, it returned by the /auth",
        "children": []
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "response": [
    {
      "name": "consentId",
      "kind": "optional",
      "type": "string",
      "description": "Consent identify"
    },
    {
      "name": "linkId",
      "kind": "optional",
      "type": "string",
      "description": "Unique Link",
      "children": []
    },
    {
      "name": "externalTrackId",
      "kind": "optional",
      "type": "string",
      "description": "Partners to transfer tracking information",
      "children": []
    },
    {
      "name": "personalTaxId",
      "kind": "optional",
      "type": "string",
      "description": "The CPF of the end-user, for Personal Accounts only",
      "children": []
    },
    {
      "name": "businessTaxId",
      "kind": "optional",
      "type": "string",
      "description": "The CNPJ of the company, for Business Accounts only",
      "children": []
    },
    {
      "name": "institutionCode",
      "kind": "optional",
      "type": "string",
      "description": "Institution code, it returned by the /institutions",
      "children": []
    },
    {
      "name": "status",
      "kind": "optional",
      "type": "string",
      "description": "STARTED - Consent created;\nAWAITING_AUTHORISATION - Waiting for end-user authorization;\nAWAITING_LGPD_AUTHORISATION - Waiting for end-user LGPD acceptance; (required for Financial Data)\nAUTHORISED - Consent authorized by the end-user (valid status to call data endpoints);\nERROR - There was an issue in the consent authorization flow\nREJECTED - End-user rejected the consent authorization\nEXPIRED - Consent expired by timeout (inactive for 30 minutes)\nREVOKED - Consent revoked (can be revoked by the end-user or the application)\nDELETED_BY_USER - End-user requested data deletion",
      "children": []
    },
    {
      "name": "permissionsApply",
      "kind": "optional",
      "type": "string",
      "description": "The permission required by partners for end-user",
      "children": []
    },
    {
      "name": "permissionsGranted",
      "kind": "optional",
      "type": "string",
      "description": "The permissions granted by end-users",
      "children": []
    },
    {
      "name": "expireAt",
      "kind": "optional",
      "type": "string",
      "description": "Consent expire time(UTC time)",
      "children": []
    },
    {
      "name": "createdAt",
      "kind": "optional",
      "type": "string",
      "description": "Create consent time(UTC time)",
      "children": []
    },
    {
      "name": "updatedAt",
      "kind": "optional",
      "type": "string",
      "description": "Update data time(UTC time)",
      "children": []
    }
  ],
  "autoGeneratedAnchorSlug": "consents",
  "legacyHash": "JY7-gr3dXAQzMK6_OdSZh"
}
```
:::

