Skip to main content
Signatures

Create consent record with signature

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

Saves a consent record that the individual signed, in one step. Get the draft with "Create draft consent record", sign it, and send the record and the signature. The record is saved with optIn: true and the state signed.

The server verifies signature.signature (a compact JWS, ES256) with the public key in signature.verificationSignedBy (an EC P-256 JWK as a JSON string). The new revision of the record takes verificationPayload and verificationPayloadHash from the signature as its snapshot and hash.

Authorizations

  • Authorizationstringheaderrequired

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

    Scope:consent-records:create

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"

Body

application/json
  • consentRecordobjectrequired

    The draft consent record. The server reads only the members below.

  • signatureobjectrequired

    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.

Response

application/json

The new consent record, its first revision and the saved 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.

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

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