{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Products","product_name":"Audience Studio","type":"markdown"},"seo":{"title":"Deleting Profiles From Real Time Segments","description":"Learn how to delete profiles from real-time segments using API workflows, ensuring compliance with privacy regulations like GDPR and CCPA.","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"deleting-profiles-from-real-time-segments","__idx":0},"children":["Deleting Profiles From Real Time Segments"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If required, for business reasons or to comply with privacy laws like GDPR or CCPA, you can delete profiles that are stored in real-time segments. The mechanism for accomplishing this is to create a workflow that calls a profile deletion API with a table of profiles to be deleted. Here are steps for accomplishing this:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a table that contains one or more profiles that you want to delete from a real-time segment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a workflow task that passes the table of profiles to a deletion API that deletes the profiles it contains from the real-time segment"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Consult the Premium Audit Log to confirm the delete operations were successful."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"creating-a-table-of-profiles-to-delete-from-a-real-time-parent-segment","__idx":1},"children":["Creating a Table of Profiles to Delete from a Real-time Parent Segment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can create a table of profiles to delete from the real-time parent segment either manually in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/databases/creating-or-viewing-tables"},"children":["Treasure Console"]}," or by using the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/databases/creating-or-viewing-tables#using-td-toolbelt"},"children":["TD Toolbelt"]},". When using a query to create the table, query the database that was used to create the real-time segment you want to delete from."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"creating-the-workflow-to-delete-profiles-from-a-real-time-parent-segment","__idx":2},"children":["Creating the Workflow to Delete Profiles from a Real-time Parent Segment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After you have created a table of profiles to delete from your real-time parent segment, create a workflow that will call the profile deletion API. You can create the workflow using either the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/workflows/getting-started-with-treasure-workflow"},"children":["Treasure Console"]}," or the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/workflows/getting-started-with-treasure-workflow#using-td-toolbelt"},"children":["TD Toolbelt"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After creating the workflow, here is an example of how to configure it."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+create_rt_profile_delete_internal_db:  \n  td_ddl>:  \n  create_databases: [rt_profile_delete_internal_container]  \n  database: rt_profile_delete_internal_container  \n  \n###  \n### RT PROFILE DELETE INTERNAL  \n###  \n+rt_profile_delete_profile:  \n  td>:  \n  database: rt_profile_delete_internal_container  \n  query: |  \n    SELECT key || ':' || value  \n    FROM profiles_to_be_deleted;  \n  result_url: |  \n    {  \n      \"type\": \"rest\",  \n      \"method\": \"POST\",  \n      \"authorization\": \"${secret:td.apikey}\",  \n      \"endpoint\": \"${reactor_importer_endpoint}/internal/bulk-delete-internal\",  \n      \"headers\": \"{\\\"x-reactor-instance-name\\\": \\\"${reactor_instance}\\\"}\",  \n      \"parallelism\": ${parallelism},  \n      \"page_size\": ${page_size}  \n    }  \n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the example above note the following:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the FROM line you specify the table you created that contains the profiles you want to delete"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the \"endpoint\" line specify the endpoint of the region where your real-time data is stored."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After you have configured the workflow, run it to delete the profiles."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"real-time-parent-segment-delete-endpoints","__idx":3},"children":["Real-time Parent Segment Delete Endpoints"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The profile deletion API cannot be called directly. It must be specified in the workflow configuration you create to delete profiles from a real-time segment. Here are the region-specific endpoints to include in the workflow configuration."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Region"},"children":["Region"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Endpoint"},"children":["Endpoint"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["US (aws)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://bulk-storage-importer-api-production-aws-us-east-1.internal.treasuredata.com/"},"children":["https://bulk-storage-importer-api-production-aws-us-east-1.internal.treasuredata.com"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Japan (aws-tokyo)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://bulk-storage-importer-api-production-aws-tokyo-ap-northeast-1.internal.treasuredata.com/"},"children":["https://bulk-storage-importer-api-production-aws-tokyo-ap-northeast-1.internal.treasuredata.com"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Europe (eu01)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://bulk-storage-importer-api-production-eu01-eu-central-1.internal.treasuredata.com/"},"children":["https://bulk-storage-importer-api-production-eu01-eu-central-1.internal.treasuredata.com"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Asia-Pacific (ap03)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://bulk-storage-importer-api-production-ap03-ap-northeast-1.internal.treasuredata.com/"},"children":["https://bulk-storage-importer-api-production-ap03-ap-northeast-1.internal.treasuredata.com"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"consulting-the-audit-log-to-confirm-profile-deletion-from-real-time-parent-segment","__idx":4},"children":["Consulting the Audit Log to Confirm Profile Deletion from Real-time Parent Segment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After you have successfully run the workflow, you can consult the Premium Audit logs to determine if the profiles contained in your table were deleted."]}]},"headings":[{"value":"Deleting Profiles From Real Time Segments","id":"deleting-profiles-from-real-time-segments","depth":1},{"value":"Creating a Table of Profiles to Delete from a Real-time Parent Segment","id":"creating-a-table-of-profiles-to-delete-from-a-real-time-parent-segment","depth":2},{"value":"Creating the Workflow to Delete Profiles from a Real-time Parent Segment","id":"creating-the-workflow-to-delete-profiles-from-a-real-time-parent-segment","depth":2},{"value":"Real-time Parent Segment Delete Endpoints","id":"real-time-parent-segment-delete-endpoints","depth":3},{"value":"Consulting the Audit Log to Confirm Profile Deletion from Real-time Parent Segment","id":"consulting-the-audit-log-to-confirm-profile-deletion-from-real-time-parent-segment","depth":2}],"frontmatter":{"seo":{"title":"Deleting Profiles From Real Time Segments","description":"Learn how to delete profiles from real-time segments using API workflows, ensuring compliance with privacy regulations like GDPR and CCPA."}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/audience-studio/segment/deleting-profiles-from-real-time-segments","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}