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

# Activates user consent



## OpenAPI

````yaml openapi/consent-v1.json POST /v1/UserConsents/activate
openapi: 3.0.4
info:
  title: Consent API
  version: v1
servers:
  - url: https://{host}/consent
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - oauth2: []
paths:
  /v1/UserConsents/activate:
    post:
      tags:
        - Service2Service
      summary: Activates user consent
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/ConsentApi.Dto.Service2Service.ActivateUserConsentDto
      responses:
        '200':
          description: Activation succeeded
        '400':
          description: ConsentId is invalid or not existing
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
components:
  schemas:
    ConsentApi.Dto.Service2Service.ActivateUserConsentDto:
      required:
        - consentId
        - userId
      type: object
      properties:
        consentId:
          minLength: 1
          type: string
          description: Consent identifier
        userId:
          minLength: 1
          type: string
          description: User identifier
        acceptedBy:
          type: string
          description: >-
            When submitted by user - user ID

            When submitted by customer support worker - ID of customer support
            worker
          nullable: true
        activationSource:
          type: string
          description: Source of media used for activating consent
          nullable: true
          example: |2-

                        WEB
                        
        timestamp:
          type: string
          description: |-
            Defines time when consent was accepted
            Used for data migration needs
          format: date-time
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Metadata for user consent
          nullable: true
      additionalProperties: false
      description: DTO for activating a user consent
    LoopFoundation.Commons.Contracts.WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
  securitySchemes:
    oauth2:
      type: apiKey
      name: Authorization
      in: header

````