Skip to main content

delete_data_requests

DELETE /data_requests/:feedback_id​

Anonymizes personal data and segments for the provided feedback (GDPR right to erasure / right to be forgotten).

Behavior​

When this endpoint is called:

  • Client Contact Anonymization: The feedback's dispatch_to_email or dispatch_to_phone_number is set to 'anonymized'. The respondent reference is detached and replaced with an anonymous system client. If the former client has no remaining feedbacks and is not unsubscribed, the client record is deleted.
  • Segment Anonymization: Matching segment values on the feedback are set to 'anonymized'.
    • When calling /api/v1/data_requests/:feedback_id: all segments on the feedback are anonymized.
    • When calling /api/v1/data_requests/:data_subject/:feedback_id: only segments linked to the specified data_subject are anonymized.
  • Cache Invalidation: Cached query results for the feedback are evicted.
  • Logging: The erasure request is logged as a GDPR DataAccessRequest with request_type: 'anonymize'.

Endpoints​

  • DELETE /api/v1/data_requests/:feedback_id: Anonymizes all segments and client contact data for the feedback.
  • DELETE /api/v1/data_requests/:data_subject/:feedback_id: (legacy) Anonymizes segments matching the specified data subject and client contact data.

Examples​

curl -X DELETE 'https://api.diduenjoy.com/api/v1/data_requests/PUT-YOUR-FEEDBACK-ID' \
-u 'PUT-YOUR-API-KEY-HERE:'

Legacy Endpoint with data_subject​

curl -X DELETE 'https://api.diduenjoy.com/api/v1/data_requests/PUT-YOUR-DATA-SUBJECT/PUT-YOUR-FEEDBACK-ID' \
-u 'PUT-YOUR-API-KEY-HERE:'

Possible data_subject values (legacy)​

  • contractor
  • customer
  • employee
  • other
  • prospect
  • suppliers
  • to_be_defined
  • trainee
  • visitor

Status Codes​

statusdescription
200 OKPersonal data and segments anonymized successfully. Returns the anonymized resource in JSON:API format.
401 UnauthorizedMissing or invalid API key.
404 Not FoundFeedback not found or does not belong to the company.
422 Unprocessable ContentMissing feedback_id.