> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiveth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Consent Managers

> Let people give and withdraw consent through a registered Consent Manager, and keep it in step with Aiveth.

Under the DPDP Act, 2023 (Section 6(7) to 6(9)) and Rule 4, a person can give, manage and withdraw consent through a Consent Manager registered with the Data Protection Board of India.

Aiveth by Gooclaim works with registered Consent Managers. Aiveth is not a Consent Manager itself. When you link one:

* it sends Aiveth signed consent artefacts, and Aiveth records them as the person's answers
* Aiveth sends it signed alerts when a person's consent changes somewhere else

> [!NOTE]
>
> This page describes what Aiveth does. It is not legal advice.

## Link a Consent Manager

You need a role that can manage security, and a published [consent notice](https://docs.aiveth.com/privacy/consent.md).

**1. Open Privacy**

In the console, go to **Privacy** → **Consent Managers** and select **Add a Consent Manager**.

**2. Fill in its details**

* **Name**
* **Board registration number** (optional)
* **Issuer**: the `iss` its artefacts carry
* **Its public keys**: its JWKS address
* **Where to tell it of changes** (optional): the address Aiveth sends alerts to

**3. Give them the artefacts address**

After you add it, the card shows the address to **Give them**. The Consent Manager sends artefacts there, and uses the same address as the artefact's `aud`.

The JWKS address and the alerts address must be HTTPS addresses on public hosts. You can link up to 10 Consent Managers. To stop working with one, select **Remove**.

## Signed artefacts

The Consent Manager sends each artefact to its address:

```bash theme={null}
curl -X POST https://accounts.aiveth.com/v1/consent-manager/{id}/artefacts \
  -H "Content-Type: application/json" \
  -d '{ "artefact": "eyJhbGciOiJFUzI1NiIs..." }'
```

No session or API key is used. The signature is the proof.

The artefact is a JWS signed with RS256, PS256 or ES256. Its claims are:

| Claim | Value |
| - | - |
| `iss` | The issuer you entered. |
| `aud` | This link's artefacts address. |
| `jti` | The artefact's own id. Each one is accepted once. |
| `exp` | When it expires. Required. |
| `email` | The person's email address in your organization. |
| `notice_version` | The version of your notice the person agreed to. |
| `consents` | `{purpose: true \| false}` |

Aiveth checks the signature against the Consent Manager's JWKS, then records the answer for the person with that email, the same way as an answer on Aiveth's own screen. The response is `{ "consents": { ... } }` with the person's answers now.

When an artefact is recorded:

* your apps get `consent.given` or `consent.withdrawn`
* a withdrawal can open an [erasure task](https://docs.aiveth.com/privacy/erasure.md)
* the activity log names the Consent Manager and the artefact id

### Errors

| Status | Meaning |
| - | - |
| `401` | The artefact isn't valid: wrong algorithm, signature, issuer, audience, or it expired. |
| `404` | No such Consent Manager, or no active person with that email in your organization. |
| `409` | This artefact (`jti`) was already used. |
| `422` | The artefact lacks `email`, `notice_version` or `consents`, or the answers don't fit the current notice. |
| `429` | Too many artefacts this minute. |

## Alerts to the Consent Manager

When a person's consent changes anywhere else (Aiveth's screen, their account page, your app, or another Consent Manager), Aiveth sends a signed alert to each linked Consent Manager that has an alerts address:

```json theme={null}
{ "alert": "eyJ0eXAiOiJjb25zZW50LWFsZXJ0K2p3dCIs..." }
```

The alert is a JWT signed with Aiveth's key, with `typ` `consent-alert+jwt`. Check it against Aiveth's JWKS. Its claims:

| Claim | Value |
| - | - |
| `iss` | `https://accounts.aiveth.com` |
| `aud` | The Consent Manager's issuer. |
| `iat` | When it was made. |
| `organization` | Your organization's name. |
| `email` | The person. |
| `purpose` | The purpose that changed. |
| `granted` | `true` or `false`. |
| `notice_version` | The notice version. |

A Consent Manager is never alerted about a change it sent itself.

## Related

* [Consent](https://docs.aiveth.com/privacy/consent.md)
* [Erasure](https://docs.aiveth.com/privacy/erasure.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.