# KlaviyoAPI::DataPrivacyApi All URIs are relative to *https://a.klaviyo.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**request_profile_deletion**](DataPrivacyApi.md#request_profile_deletion) | **POST** /api/data-privacy-deletion-jobs/ | Request Profile Deletion | ## request_profile_deletion > request_profile_deletion(data_privacy_create_deletion_job_query) Request Profile Deletion Request a deletion for the profiles corresponding to one of the following identifiers: `email`, `phone_number`, or `id`. If multiple identifiers are provided, we will return an error. All profiles that match the provided identifier will be deleted. The deletion occurs asynchronously; however, once it has completed, the deleted profile will appear on the [Deleted Profiles page](https://www.klaviyo.com/account/deleted). For more information on the deletion process, please refer to our [Help Center docs on how to handle GDPR and CCPA deletion requests](https://help.klaviyo.com/hc/en-us/articles/360004217631-How-to-Handle-GDPR-Requests#record-gdpr-and-ccpa%20%20-deletion-requests2).

*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `data-privacy:write` ### Examples ```ruby require 'time' require 'klaviyo-api-sdk' # setup authorization KlaviyoAPI.configure do |config| # Configure API key authorization: Klaviyo-API-Key config.api_key['Klaviyo-API-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['Klaviyo-API-Key'] = 'Bearer' end api_instance = KlaviyoAPI::DataPrivacyApi.new data_privacy_create_deletion_job_query = KlaviyoAPI::DataPrivacyCreateDeletionJobQuery.new({data: KlaviyoAPI::DataPrivacyCreateDeletionJobQueryResourceObject.new({type: KlaviyoAPI::DataPrivacyDeletionJobEnum::DATA_PRIVACY_DELETION_JOB, attributes: KlaviyoAPI::DataPrivacyCreateDeletionJobQueryResourceObjectAttributes.new({profile: KlaviyoAPI::DataPrivacyCreateDeletionJobQueryResourceObjectAttributesProfile.new({data: KlaviyoAPI::DataPrivacyProfileQueryResourceObject.new({type: KlaviyoAPI::ProfileEnum::PROFILE, attributes: KlaviyoAPI::DataPrivacyProfileQueryResourceObjectAttributes.new})})})})}) # DataPrivacyCreateDeletionJobQuery | begin # Request Profile Deletion api_instance.request_profile_deletion(data_privacy_create_deletion_job_query) rescue KlaviyoAPI::ApiError => e puts "Error when calling DataPrivacyApi->request_profile_deletion: #{e}" end ``` #### Using the request_profile_deletion_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. > request_profile_deletion_with_http_info(data_privacy_create_deletion_job_query) ```ruby begin # Request Profile Deletion data, status_code, headers = api_instance.request_profile_deletion_with_http_info(data_privacy_create_deletion_job_query) p status_code # => 2xx p headers # => { ... } p data # => nil rescue KlaviyoAPI::ApiError => e puts "Error when calling DataPrivacyApi->request_profile_deletion_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **data_privacy_create_deletion_job_query** | [**DataPrivacyCreateDeletionJobQuery**](DataPrivacyCreateDeletionJobQuery.md) | | | ### Return type nil (empty response body) ### Authorization [Klaviyo-API-Key](../README.md#Klaviyo-API-Key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json