Autional Autional
API Reference GitHub autional.com →

POST /admin/compliance/gdpr/consent

Create a data processing consent record for a specified user

Compliance Management - Consent `bearerAuth` application/json

Request Body

Schema: dto.CreateConsentRequest

FieldTypeRequiredExampleConstraintsDescription
granted boolean Yes True Consent given
purpose string Yes marketing_communication Purpose
service string Yes newsletter Service
user_id string Yes usr_abc123 User ID
consent_method string No explicit Consent method

Responses

StatusDescriptionSchema
201createddto.ConsentItemResponse
400bad requestdto.ErrorResponse

Referenced Schemas

dto.ConsentItem

User consent record

FieldTypeRequiredExampleConstraintsDescription
consent_method string No explicit Consent method
expired_at string No 2026-04-16T14:00:00Z Expiration time
granted boolean No True Consent given
granted_at string No 2026-04-15T10:00:00Z Consent time
id string No consent_001 Consent record ID
purpose string No marketing_communication Processing purpose
service string No newsletter Service name
user_id string No usr_abc123 User ID

dto.ConsentItemResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.ConsentItem No
message string No
timestamp string No

dto.ErrorResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No 400
message string No invalid request