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

# Set Consent

> Set a specified type of consent on the person.



## OpenAPI

````yaml /openapi/rest/openapi-v3-Person.json put /api/v1/Person/{personId}/Consent/{purpose}
openapi: 3.0.0
info:
  version: v1-REST
  title: SuperOffice REST API v1
  description: SuperOffice REST API - Person
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Person/{personId}/Consent/{purpose}:
    put:
      tags:
        - Person
      summary: Set Consent
      description: Set a specified type of consent on the person.
      operationId: v1PersonEntity_SetConsent
      parameters:
        - name: personId
          in: path
          description: The person id
          required: true
          schema:
            type: integer
            format: int32
        - name: purpose
          in: path
          description: The Key of the purpose this affects. e.g. 'STORE' or 'EMARKETING'.
          required: true
          schema:
            type: string
        - name: source
          in: query
          description: >-
            The Key of the source of this consent. e.g. 'USER', 'WEBFORM' or
            'API'.
          required: true
          schema:
            type: string
        - name: legalBase
          in: query
          description: The Key of the legal base for this consent. e.g. '61A', '61B', '61F'
          required: true
          schema:
            type: string
        - name: comment
          in: query
          description: A comment regarding this consent. May be null or empty.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      responses:
        '204':
          description: No Content
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components: {}

````

## Related topics

- [Set Consent](/en/api/reference/restful/agent/person_agent/set-consent.md)
- [NSConsentPerson](/en/automation/crmscript/reference/CRMScript.NetServer.NSConsentPerson.md)
- [NSConsentPurpose](/en/automation/crmscript/reference/CRMScript.NetServer.NSConsentPurpose.md)
- [NSConsentSource](/en/automation/crmscript/reference/CRMScript.NetServer.NSConsentSource.md)
- [NSConsentInfo](/en/automation/crmscript/reference/CRMScript.NetServer.NSConsentInfo.md)
- [SuperOffice.WebApi.Data.Person SetConsentRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Person_SetConsentRequest.md)
