Skip to main content
POST
/
abdm
/
v1
/
consents
/
approve
cURL
curl --request POST \
  --url https://api.eka.care/abdm/v1/consents/approve \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "consent_artefacts": [
    {
      "access_mode": "view",
      "care_contexts": [
        {
          "display": "<string>",
          "id": "<string>"
        }
      ],
      "duration": {
        "from": "2023-11-07T05:31:56Z",
        "to": "2023-11-07T05:31:56Z"
      },
      "erase_at": "2023-11-07T05:31:56Z",
      "hi_types": [
        "<string>"
      ],
      "hip_id": "<string>"
    }
  ],
  "id": "<string>"
}
'
{
  "code": 123,
  "error": "<string>",
  "source_error": {
    "code": "<string>",
    "message": "<string>"
  }
}

Authorizations

Authorization
string
header
required

The API requires a Bearer token (JWT) for authentication.

Headers

X-Pt-Id
string

Eka User ID (OID)

X-Partner-Pt-Id
string

Partner User ID

X-Hip-Id
string

Partner HIP ID

Query Parameters

oid
string

OID is used to Identify the user. OID is used to Identify the user.

Body

application/json

List of consent artefacts.

id
string
required

Unique identifier of a consent, also called the consent ID.

Response

No Content