Skip to content

Grievances

Grievance tickets represent formal privacy rights requests submitted by data principals — for example, requests for data access, correction, or deletion. Each ticket is assigned a unique human-readable identifier in the format GRV-XXXXXXXX and progresses through a status lifecycle that you manage via the update endpoint.

All three endpoints authenticate with X-API-Key.


List grievances for a user

GET /grievance/user/{user_id}

Retrieve all grievance tickets filed by a specific user, ordered by creation date descending.

Path parameters

ParameterTypeRequiredDescription
user_idstringYesThe client_user_id of the user whose tickets you want to retrieve

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour tenant API key

Response

200 OK — an array of GrievanceTicket objects ordered by created_at descending. Returns an empty array if the user has no tickets.

FieldTypeDescription
idstringInternal UUID of the ticket record
ticket_idstringHuman-readable ticket identifier (for example, "GRV-ABC12345")
client_user_idstringYour application’s identifier for the user who filed the ticket
user_idstring or nullInternal user identifier, if mapped
subjectstringBrief summary of the rights request
descriptionstringFull description of the request
categorystringCategory (for example, "data_access" or "erasure")
statusstringCurrent ticket status (for example, "open", "in_progress", or "resolved")
attachment_urlstring or nullURL of any file attached to the ticket
created_atstringISO 8601 timestamp when the ticket was created
updated_atstringISO 8601 timestamp of the most recent update
Terminal window
curl --request GET \
--url https://api.truConsent.io/grievance/user/usr_abc123 \
--header "X-API-Key: YOUR_API_KEY"
[
{
"id": "c3d4e5f6-a7b8-9012-cdef-234567890123",
"ticket_id": "GRV-A1B2C3D4",
"client_user_id": "usr_abc123",
"user_id": null,
"subject": "Request to delete my account data",
"description": "I would like all personal data associated with my account to be permanently deleted.",
"category": "erasure",
"status": "open",
"attachment_url": null,
"created_at": "2024-10-15T09:30:00",
"updated_at": "2024-10-15T09:30:00"
}
]

Create a grievance ticket

POST /grievance

Submit a new privacy rights request on behalf of a data principal. The API automatically generates a unique ticket_id and sets the initial status to "open".

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour tenant API key

Body

FieldTypeRequiredDescription
client_user_idstringYesYour application’s identifier for the user filing the request
subjectstringYesBrief summary of the rights request
descriptionstringYesFull description of the request
categorystringYesCategory (for example, "data_access", "rectification", or "erasure")
attachment_urlstringNoOptional URL pointing to a supporting document

Response

201 Created — the newly created GrievanceTicket. The ticket_id is auto-generated. status is always "open" on creation.

Terminal window
curl --request POST \
--url https://api.truConsent.io/grievance \
--header "X-API-Key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"client_user_id": "usr_abc123",
"subject": "Request to delete my account data",
"description": "I would like all personal data associated with my account to be permanently deleted.",
"category": "erasure"
}'
{
"id": "c3d4e5f6-a7b8-9012-cdef-234567890123",
"ticket_id": "GRV-A1B2C3D4",
"client_user_id": "usr_abc123",
"user_id": null,
"subject": "Request to delete my account data",
"description": "I would like all personal data associated with my account to be permanently deleted.",
"category": "erasure",
"status": "open",
"attachment_url": null,
"created_at": "2024-10-15T09:30:00",
"updated_at": "2024-10-15T09:30:00"
}

Update a grievance ticket

PUT /grievance/{ticket_id}

Update the status or attachment_url of an existing ticket. At least one field must be provided. The ticket is identified by its human-readable ticket_id.

Path parameters

ParameterTypeRequiredDescription
ticket_idstringYesThe human-readable ticket identifier (for example, "GRV-A1B2C3D4"), not the internal UUID

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour tenant API key

Body

At least one of the following fields is required. Omitted fields are not modified.

FieldTypeDescription
statusstringNew status (for example, "in_progress" or "resolved")
attachment_urlstringUpdated URL for the supporting document

Response

200 OK — the full updated GrievanceTicket object.

Terminal window
curl --request PUT \
--url https://api.truConsent.io/grievance/GRV-A1B2C3D4 \
--header "X-API-Key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "status": "in_progress" }'
{
"id": "c3d4e5f6-a7b8-9012-cdef-234567890123",
"ticket_id": "GRV-A1B2C3D4",
"client_user_id": "usr_abc123",
"user_id": null,
"subject": "Request to delete my account data",
"description": "I would like all personal data associated with my account to be permanently deleted.",
"category": "erasure",
"status": "in_progress",
"attachment_url": null,
"created_at": "2024-10-15T09:30:00",
"updated_at": "2024-10-15T10:05:00"
}

Errors

StatusDescription
400Request body failed validation, or no updatable fields were provided
404No ticket with the given ticket_id exists (PUT only)
500Unexpected server error