# Create a new consent

Endpoint: POST /api/Consent
Version: v1

## Header parameters:

  - `apiKey` (string, required)

## Request body:

  - `application/json` (unknown)
    The content of the consent to create

## Request fields (application/json):

  - `agreementGroupGuid` (string, required)
    Specifies the guid of the agreementGroup

  - `consentGroupGuid` (string)
    Specifies the guid of the consentGroup

  - `userIp` (string, required)
    Specifies the user ip address
    Example: 127.0.0.1

  - `externalID` (string, required)
    Specifies the external ID
    Example: 2c65cf53-d083-4cab-8f13-402d73b24463

  - `environment` (integer, required)
    Enum: "0", "1"

  - `screenshot` (string, required)

  - `clauses` (array, required)

  - `clauses.tag` (string)
    The tag of the clause
    Example: my_tag

  - `clauses.accepted` (boolean)
    Specifies wether the clause was accepted
    Example: true

  - `fieldCollection` (object, required)

## Response 201:

  - `201` (unknown)
    Created

## Response 201 fields (application/json):

  - `guid` (string)

  - `agreement` (object)

  - `agreement.version` (string)

  - `agreement.enviroment` (integer)
    Enum: "0", "1"

  - `agreement.groupGuid` (string)

  - `agreement.nameOfAgreement` (string)

  - `fieldCollection` (string)

  - `consentDate` (string)

  - `platform` (string)

  - `userIdentifier` (string)

  - `clauses` (array)

  - `clauses.tag` (string)
    The tag of the clause
    Example: my_tag

  - `clauses.accepted` (boolean)
    Specifies wether the clause was accepted
    Example: true

  - `agreementHash` (string)

  - `externalID` (string)

  - `consentGroupGuid` (string)

  - `screenshot` (string)

  - `userIp` (string)

## Response 400:

  - `400` (unknown)
    Bad request: the request is not conforming to the specification provided

## Response 400 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

  - `errors` (object)

## Response 401:

  - `401` (unknown)
    Unauthorized: either missing an apiKey header or an invalid apiKey was provided

## Response 403:

  - `403` (unknown)
    Forbidden: an apiKey header was found and validated but it is forbidden to perform the requested action

## Response 404:

  - `404` (unknown)
    Not found: a resource specified in the request was not found

## Response 500:

  - `500` (unknown)
    Internal server error: the server produced an unexpected error

