Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Alejandrin08/Hackathon-SPEI/llms.txt

Use this file to discover all available pages before exploring further.

Both endpoints require a valid JWT Bearer token. See Login to obtain one.
Consent management aligns with LFPDPPP (Ley Federal de Protección de Datos Personales en Posesión de los Particulares — Mexico’s Personal Data Protection Law). Users can revoke consent at any time.

Endpoints

MethodPathDescription
GET/api/profile/consentRetrieve the user’s current consent records
PUT/api/profile/consentUpdate the user’s consent

GET /api/profile/consent

Returns the current data processing consent records for the authenticated user. The response is an array — one record per consent type.

Response

Returns an array of consent record objects.
id
string
required
UUID of the consent record.
type
string
required
The type of consent this record represents, e.g., "analytics", "accessibility".
granted
boolean
required
Whether the user has granted this consent.
timestamp
string
required
ISO 8601 timestamp of when this consent was last updated.

Example

curl -X GET http://localhost:5000/api/profile/consent \
  -H "Authorization: Bearer <token>"

PUT /api/profile/consent

Updates a consent record for the authenticated user.

Request body

granted
boolean
required
Set to true to grant consent, or false to revoke it.

Response

200 OK

Returns the updated consent record with the same structure as a single item from the GET response array.

Error responses

StatusDescription
400 Bad RequestValidation error — granted field is required.
401 UnauthorizedInvalid or expired token.

Example

curl -X PUT http://localhost:5000/api/profile/consent \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "granted": false
  }'