Skip to main content
Consent records

Create consent record

POST/v4/service/consent/individual/record/data-agreement/{dataAgreementId}

Records that the individual allows a data agreement. The request has no body: the new record has optIn: true and the state unsigned. It refers to the latest revision of the data agreement, or to the revision in revisionId. For a data agreement with data using services, the record has a sector preference for each of their industry sectors, all allowed.

An individual has one consent record for each data agreement: a second create gets 400. To record a refusal, create the record, then update it with {"optIn": false}. The change starts a consent webhook event and a history entry.

Authorizations

  • Authorizationstringheaderrequired

    Your API key with the prefix ApiKey: ApiKey <your-api-key>. Get an API key.

    Scope:consent-records:create

Path parameters

  • dataAgreementIdstringrequired

    Data agreement ID.

    Example:"6af080eb2d6fb7b6ac6efc57"

Query parameters

  • revisionIdstring

    Revision ID. Give it to get the record as it was at that revision. Without it, the server uses the latest revision.

Headers

  • X-ConsentBB-IndividualIdstring

    ID of the individual, or its externalId. Mandatory with an API key: without it the answer is 400 ("IndividualId is not present in request header"), and an unknown individual gets 400 too. With an individual token, leave it out: the server takes the individual from the token. Send it only on the routes that list it: with an API key that has resource scopes (for example consent-records:read), another route answers 400 to a request with this header.

    Example:"6af081b138e8f33dcf799628"

Response

application/json

The new consent record and its first revision.

  • consentRecordobject

    The consent of one individual to one data agreement. An individual has at most one consent record for each data agreement. Each change makes a new revision of the record.

  • revisionobject

    One saved version of a record (a data agreement, a policy, a consent record or a data disclosure agreement). Each change makes a new revision. The revision holds the record as JSON and a SHA-1 hash of the snapshot, and it links to the hash of the revision before it, so that you can detect a changed history. Only successorId changes after the server saves a revision.