Skip to main content
Signatures

Create draft consent record

POST/v4/service/consent/individual/record/consent-record/draft

Gives a draft consent record for the individual and a data agreement, without saving it. Use it when the individual must sign the consent before the server saves it: build the signature from the draft, then send both with "Create consent record with signature".

The draft has no id, optIn: true, and the latest data agreement revision (or the one in revisionId). The signature in the answer is empty. individualId must be the individual of the request.

Authorizations

  • Authorizationstringheaderrequired

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

    Scope:consent-records:create

Query parameters

  • individualIdstringrequired

    Individual ID (the id, not the externalId). It must be the individual of the request.

    Example:"6af0821c38e8f33dcf79962e"

  • dataAgreementIdstringrequired

    Data agreement ID.

    Example:"6af0821c2d6fb7b6ac6efc78"

  • 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 draft consent record and an empty signature.

  • 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.

  • signatureobject

    A signature of a consent record by the individual. For a consent record, the server verifies signature with the public key in verificationSignedBy and stores the other members as you send them. Members that nobody set are empty.