> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/data-clean-rooms.md).

# Data Clean Rooms

Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance.

## GET /organisations/{organisation\_id}/clean\_room\_templates

> Find clean room templates

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/organisations/{organisation_id}/clean_room_templates":{"get":{"summary":"Find clean room templates","tags":["Data Clean Rooms"],"description":"","parameters":[{"required":true,"in":"path","name":"organisation_id","description":"Organisation id","schema":{"type":"integer","format":"int64"},"style":"simple","explode":false},{"name":"first_result","description":"Offset from which the search must be performed","schema":{"type":"integer","format":"int32"},"required":false,"style":"form","explode":true,"in":"query"},{"schema":{"type":"integer","format":"int32"},"style":"form","name":"max_results","description":"Number of maximum items that shall be returned by this search","explode":true,"required":false,"in":"query"}],"operationId":"findTemplates","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"max_results":{"type":"integer"},"total":{"type":"integer"},"first_result":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/TemplateResource"}}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"TemplateResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"collaborative_app_name":{"type":"string","readOnly":true},"authorized_presets":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"collaborative_app_id":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"reference_datasets":{"type":"array","items":{"$ref":"#/components/schemas/TemplateReferenceDatasetMatchingMetaData"},"readOnly":false},"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","authorized_presets","collaborative_app_id","id","name","organisation_id","reference_datasets"]},"TemplateReferenceDatasetMatchingMetaData":{"type":"object","properties":{"identifiers_freshness_days":{"type":"integer","format":"int64","default":0,"readOnly":false},"reference_dataset_id":{"type":"string","readOnly":false},"matching_keys":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyType"},"readOnly":false},"custom_identifier_compartment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"custom_identifier_labels":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"refresh_frequency":{"$ref":"#/components/schemas/DatasetsMatchingRefreshFrequency"}},"required":["matching_keys","reference_dataset_id"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetsMatchingRefreshFrequency":{"type":"string","enum":["DAILY","WEEKLY","FORTNIGHTLY","MONTHLY"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /organisations/{organisation\_id}/clean\_room\_templates

> Create clean room template

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/organisations/{organisation_id}/clean_room_templates":{"post":{"tags":["Data Clean Rooms"],"description":"","operationId":"createTemplate","parameters":[{"required":true,"name":"organisation_id","description":"Organisation id","in":"path","schema":{"type":"integer","format":"int64"},"explode":false,"style":"simple"}],"requestBody":{"description":"Infos to create template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateResource"}}},"required":true},"summary":"Create clean room template","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/TemplateResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"TemplateResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"collaborative_app_name":{"type":"string","readOnly":true},"authorized_presets":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"collaborative_app_id":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"reference_datasets":{"type":"array","items":{"$ref":"#/components/schemas/TemplateReferenceDatasetMatchingMetaData"},"readOnly":false},"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","authorized_presets","collaborative_app_id","id","name","organisation_id","reference_datasets"]},"TemplateReferenceDatasetMatchingMetaData":{"type":"object","properties":{"identifiers_freshness_days":{"type":"integer","format":"int64","default":0,"readOnly":false},"reference_dataset_id":{"type":"string","readOnly":false},"matching_keys":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyType"},"readOnly":false},"custom_identifier_compartment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"custom_identifier_labels":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"refresh_frequency":{"$ref":"#/components/schemas/DatasetsMatchingRefreshFrequency"}},"required":["matching_keys","reference_dataset_id"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetsMatchingRefreshFrequency":{"type":"string","enum":["DAILY","WEEKLY","FORTNIGHTLY","MONTHLY"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /bunkers/{bunker\_id}/custom\_identifier\_matching\_keys

> List custom identifier matching keys for bunker

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/bunkers/{bunker_id}/custom_identifier_matching_keys":{"get":{"parameters":[{"style":"simple","name":"bunker_id","in":"path","schema":{"type":"string"},"explode":false,"required":true},{"required":false,"description":"Offset from which the search must be performed","schema":{"type":"integer","format":"int32"},"style":"form","in":"query","name":"first_result","explode":true},{"in":"query","description":"Number of maximum items that shall be return by this search","name":"max_results","explode":true,"style":"form","schema":{"type":"integer","format":"int32"},"required":false}],"summary":"List custom identifier matching keys for bunker","operationId":"findCustomIdentifierMatchingKeys","tags":["Data Clean Rooms"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomIdentifierMatchingKeyResource"}},"count":{"type":"integer"},"first_result":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"},"max_results":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"CustomIdentifierMatchingKeyResource":{"type":"object","properties":{"compartment_id":{"type":"string","readOnly":false},"compartment_name":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":false}},"required":["compartment_id","compartment_name","datamart_id"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /clean\_room\_collaborative\_apps

> List available collaborative apps for clean room

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_room_collaborative_apps":{"get":{"description":"","summary":"List available collaborative apps for clean room","parameters":[{"required":false,"style":"form","name":"first_result","explode":true,"schema":{"type":"integer","format":"int32"},"in":"query","description":"Offset from which the search must be performed"},{"description":"Number of maximum items that shall be returned by this search","name":"max_results","required":false,"in":"query","explode":true,"schema":{"type":"integer","format":"int32"},"style":"form"}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CollaborativeAppResource"}},"status":{"type":"string","enum":["ok"]},"first_result":{"type":"integer"},"total":{"type":"integer"},"max_results":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"findCollaborativeApps","tags":["Data Clean Rooms"]}}},"components":{"schemas":{"CollaborativeAppResource":{"type":"object","properties":{"description":{"type":"string","readOnly":false},"authorized_outputs":{"type":"array","items":{"$ref":"#/components/schemas/AuthorizedOutput"},"readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"name":{"type":"string","readOnly":false},"type":{"$ref":"#/components/schemas/CollaborativeAppType"},"id":{"type":"string","readOnly":true}},"required":["archived","authorized_outputs","id","name","type"]},"AuthorizedOutput":{"type":"string","enum":["INSIGHTS","ACTIVATION","ENRICHMENT"],"readOnly":false},"CollaborativeAppType":{"type":"string","enum":["DATA_SOURCING","MEDIA_AUDIENCE_PORTAL","RETAIL_BRAND_PORTAL","TV_AUDIENCE_PORTAL","CLASSIFIED_ADS_AUDIENCE_PORTAL","CONNECT_ID","COCKPIT"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /clean\_rooms/{clean\_room\_id}/datasets\_matchings/{datasets\_matching\_id}/actions

> Perform an action on datasets matching

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets_matchings/{datasets_matching_id}/actions":{"post":{"tags":["Data Clean Rooms"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatasetsMatchingResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetsMatchingActionResource"}}},"required":true},"description":"","operationId":"performDatasetsMatchingAction","summary":"Perform an action on datasets matching","parameters":[{"explode":false,"in":"path","schema":{"type":"string"},"description":"Clean room Id","required":true,"style":"simple","name":"clean_room_id"},{"description":"Datasets intersection Id","style":"simple","schema":{"type":"string"},"name":"datasets_matching_id","in":"path","explode":false,"required":true}]}}},"components":{"schemas":{"DatasetsMatchingResource":{"type":"object","properties":{"refresh_frequency":{"$ref":"#/components/schemas/DatasetsMatchingRefreshFrequency"},"initiator_org_id":{"type":"string","readOnly":false},"custom_identifier_labels":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"identifiers_freshness_days":{"type":"integer","default":0,"format":"int64","readOnly":false},"name":{"type":"string","readOnly":false},"feeds":{"type":"array","items":{"$ref":"#/components/schemas/AudienceSegmentExternalFeedShortResource"},"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_refresh_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"matched_datasets":{"type":"array","items":{"$ref":"#/components/schemas/DatasetMatchedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetsMatchingStatus"},"datasets_matching_history_key_stats":{"type":"array","items":{"$ref":"#/components/schemas/DatasetsMatchingHistoryKeyStatResource"},"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"count_matched_records":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"segment_id":{"type":"string","readOnly":true},"custom_identifier_compartment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"external_dashboard_url":{"type":"string","readOnly":false},"matching_keys":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyType"},"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false}},"required":["archived","clean_room_id","created_ts","id","initiator_org_id","matched_datasets","matching_keys","name","status"]},"DatasetsMatchingRefreshFrequency":{"type":"string","enum":["DAILY","WEEKLY","FORTNIGHTLY","MONTHLY"],"readOnly":false},"AudienceSegmentExternalFeedShortResource":{"type":"object","properties":{"artifact_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"plugin_id":{"type":"string","readOnly":true},"plugin_version_id":{"type":"string","readOnly":true},"audience_segment_id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["artifact_id","audience_segment_id","id","plugin_id","plugin_version_id"]},"DatasetMatchedResource":{"type":"object","properties":{"dataset":{"$ref":"#/components/schemas/DatasetSharedResource"},"organisation_id":{"type":"string","readOnly":true},"dataset_update_id":{"type":"string","readOnly":true},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"dataset_id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["clean_room_id","created_ts","dataset_id","dataset_update_id","expiration_ts","organisation_id"]},"DatasetSharedResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetSharedResource","SEGMENT":"#/components/schemas/SegmentDatasetSharedResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetSharedResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetSharedResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetSharedResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"type":{"$ref":"#/components/schemas/DatasetType"},"organisation_id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetPropertySharedResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"SegmentDatasetSharedResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"organisation_name":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"organisation_id":{"type":"string","readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"name":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetSharedResource":{"type":"object","properties":{"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"source":{"$ref":"#/components/schemas/DatasetSource"}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"DatasetsMatchingStatus":{"type":"string","enum":["PENDING","ACTIVE","ERROR"],"readOnly":false},"DatasetsMatchingHistoryKeyStatResource":{"type":"object","properties":{"related_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_name":{"type":"string","readOnly":true},"common_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_id":{"type":"string","readOnly":true},"matching_key_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"datasets_matching_history_id":{"type":"string","readOnly":true}},"required":["datasets_matching_history_id","matching_key_type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]},"DatasetsMatchingActionResource":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/DatasetsMatchingAction"},"organisation_id":{"type":"string","readOnly":false}},"required":["action"]},"DatasetsMatchingAction":{"type":"string","enum":["ARCHIVE","REFRESH"],"readOnly":false}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datasets/{dataset\_id}

> Search dataset by Id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets/{dataset_id}":{"get":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatasetResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"getDataset","description":"","tags":["Data Clean Rooms"],"summary":"Search dataset by Id","parameters":[{"explode":false,"style":"simple","in":"path","required":true,"description":"The dataset id","schema":{"type":"string"},"name":"dataset_id"},{"description":"Organisation owning the dataset","name":"organisation_id","schema":{"type":"integer","format":"int64"},"style":"form","explode":true,"in":"query","required":true}]}}},"components":{"schemas":{"DatasetResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetResource","SEGMENT":"#/components/schemas/SegmentDatasetResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetResource"},{"$ref":"#/components/schemas/SegmentDatasetResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetResource":{"type":"object","properties":{"bunker_id":{"type":"string","readOnly":false},"source":{"$ref":"#/components/schemas/DatasetSource"},"status":{"$ref":"#/components/schemas/DatasetStatus"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_by":{"type":"string","readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"description":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"name":{"type":"string","readOnly":false}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetPropertyResource":{"type":"object","properties":{"fill_rate":{"type":"number","format":"float","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"compartment_id":{"type":"string","readOnly":false},"data_sample":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"compartment_name":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"SegmentDatasetResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"created_by":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"segment_id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"bunker_id":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"source":{"$ref":"#/components/schemas/DatasetSource"},"organisation_id":{"type":"string","readOnly":false}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetResource":{"type":"object","properties":{"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"organisation_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"description":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"label_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"type":{"$ref":"#/components/schemas/DatasetType"},"datamart_id":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"bunker_id":{"type":"string","readOnly":false},"status":{"$ref":"#/components/schemas/DatasetStatus"}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","label_ids","name","organisation_id","organisation_name","properties","source","status","type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /datasets/{dataset\_id}

> Modify dataset

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets/{dataset_id}":{"put":{"operationId":"modifyDataset","summary":"Modify dataset","parameters":[{"schema":{"type":"string"},"style":"simple","explode":false,"required":true,"description":"The dataset id","in":"path","name":"dataset_id"}],"requestBody":{"description":"The dataset to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetResource"}}},"required":true},"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatasetResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","tags":["Data Clean Rooms"]}}},"components":{"schemas":{"DatasetResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetResource","SEGMENT":"#/components/schemas/SegmentDatasetResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetResource"},{"$ref":"#/components/schemas/SegmentDatasetResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetResource":{"type":"object","properties":{"bunker_id":{"type":"string","readOnly":false},"source":{"$ref":"#/components/schemas/DatasetSource"},"status":{"$ref":"#/components/schemas/DatasetStatus"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_by":{"type":"string","readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"description":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"name":{"type":"string","readOnly":false}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetPropertyResource":{"type":"object","properties":{"fill_rate":{"type":"number","format":"float","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"compartment_id":{"type":"string","readOnly":false},"data_sample":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"compartment_name":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"SegmentDatasetResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"created_by":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"segment_id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"bunker_id":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"source":{"$ref":"#/components/schemas/DatasetSource"},"organisation_id":{"type":"string","readOnly":false}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetResource":{"type":"object","properties":{"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"organisation_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"description":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"label_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"type":{"$ref":"#/components/schemas/DatasetType"},"datamart_id":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"bunker_id":{"type":"string","readOnly":false},"status":{"$ref":"#/components/schemas/DatasetStatus"}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","label_ids","name","organisation_id","organisation_name","properties","source","status","type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /datasets/{dataset\_id}

> Delete dataset

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets/{dataset_id}":{"delete":{"operationId":"deleteDataset","parameters":[{"required":true,"style":"simple","in":"path","explode":false,"name":"dataset_id","description":"The dataset id","schema":{"type":"string"}}],"description":"","tags":["Data Clean Rooms"],"responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"summary":"Delete dataset"}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```

## GET /organisations/{organisation\_id}/clean\_room\_templates/{template\_id}

> Get a clean room template by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/organisations/{organisation_id}/clean_room_templates/{template_id}":{"get":{"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/TemplateResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"getTemplate","parameters":[{"name":"organisation_id","in":"path","explode":false,"required":true,"description":"Organisation id","schema":{"type":"integer","format":"int64"},"style":"simple"},{"description":"Template id","style":"simple","schema":{"type":"string"},"in":"path","required":true,"name":"template_id","explode":false}],"tags":["Data Clean Rooms"],"summary":"Get a clean room template by id"}}},"components":{"schemas":{"TemplateResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"collaborative_app_name":{"type":"string","readOnly":true},"authorized_presets":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"collaborative_app_id":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"reference_datasets":{"type":"array","items":{"$ref":"#/components/schemas/TemplateReferenceDatasetMatchingMetaData"},"readOnly":false},"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","authorized_presets","collaborative_app_id","id","name","organisation_id","reference_datasets"]},"TemplateReferenceDatasetMatchingMetaData":{"type":"object","properties":{"identifiers_freshness_days":{"type":"integer","format":"int64","default":0,"readOnly":false},"reference_dataset_id":{"type":"string","readOnly":false},"matching_keys":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyType"},"readOnly":false},"custom_identifier_compartment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"custom_identifier_labels":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"refresh_frequency":{"$ref":"#/components/schemas/DatasetsMatchingRefreshFrequency"}},"required":["matching_keys","reference_dataset_id"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetsMatchingRefreshFrequency":{"type":"string","enum":["DAILY","WEEKLY","FORTNIGHTLY","MONTHLY"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /organisations/{organisation\_id}/clean\_room\_templates/{template\_id}

> Update a clean room template

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/organisations/{organisation_id}/clean_room_templates/{template_id}":{"put":{"summary":"Update a clean room template","parameters":[{"required":true,"name":"organisation_id","schema":{"type":"integer","format":"int64"},"description":"Organisation id","in":"path","explode":false,"style":"simple"},{"description":"Template id","in":"path","style":"simple","explode":false,"schema":{"type":"string"},"required":true,"name":"template_id"}],"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/TemplateResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Data Clean Rooms"],"requestBody":{"description":"The template to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateResource"}}},"required":true},"operationId":"updateTemplate"}}},"components":{"schemas":{"TemplateResource":{"type":"object","properties":{"name":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"collaborative_app_name":{"type":"string","readOnly":true},"authorized_presets":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"collaborative_app_id":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"reference_datasets":{"type":"array","items":{"$ref":"#/components/schemas/TemplateReferenceDatasetMatchingMetaData"},"readOnly":false},"description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","authorized_presets","collaborative_app_id","id","name","organisation_id","reference_datasets"]},"TemplateReferenceDatasetMatchingMetaData":{"type":"object","properties":{"identifiers_freshness_days":{"type":"integer","format":"int64","default":0,"readOnly":false},"reference_dataset_id":{"type":"string","readOnly":false},"matching_keys":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyType"},"readOnly":false},"custom_identifier_compartment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"custom_identifier_labels":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"refresh_frequency":{"$ref":"#/components/schemas/DatasetsMatchingRefreshFrequency"}},"required":["matching_keys","reference_dataset_id"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetsMatchingRefreshFrequency":{"type":"string","enum":["DAILY","WEEKLY","FORTNIGHTLY","MONTHLY"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /clean\_rooms/{clean\_room\_id}/datasets

> Find clean room datasets

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets":{"get":{"tags":["Data Clean Rooms"],"operationId":"findDatasetCleanRooms","summary":"Find clean room datasets","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"max_results":{"type":"integer"},"count":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomResource"}},"first_result":{"type":"integer"},"total":{"type":"integer"},"status":{"type":"string","enum":["ok"]}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","parameters":[{"description":"Clean room owning datasets","name":"clean_room_id","in":"path","explode":false,"required":true,"style":"simple","schema":{"type":"string"}},{"description":"Organisation owning datasets","explode":true,"in":"query","required":false,"name":"organisation_id","schema":{"type":"integer","format":"int64"},"style":"form"},{"in":"query","schema":{"type":"boolean"},"name":"archived","description":"If true the result will contain only archived clean rooms","style":"form","explode":true,"required":false},{"style":"form","description":"Types of datasets to include","in":"query","name":"dataset_type","explode":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetType"}},"required":false},{"in":"query","description":"Offset from which the search must be performed","explode":true,"schema":{"type":"integer","format":"int32"},"name":"first_result","style":"form","required":false},{"explode":true,"required":false,"in":"query","description":"Number of maximum items that shall be return by this search","schema":{"type":"integer","format":"int32"},"name":"max_results","style":"form"},{"required":false,"style":"form","in":"query","description":"View the clean room data from this organisation's side. Only honoured when the caller has access to it; ignored otherwise.","name":"as_organisation_id","explode":true,"schema":{"type":"string"}}]}}},"components":{"schemas":{"DatasetCleanRoomResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"dataset_id":{"type":"string","readOnly":false},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":false},"created_by":{"type":"string","readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"dataset":{"$ref":"#/components/schemas/DatasetSharedResource"},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","clean_room_id","created_ts","dataset_id","expiration_ts","organisation_id"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"DatasetSharedResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetSharedResource","SEGMENT":"#/components/schemas/SegmentDatasetSharedResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetSharedResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetSharedResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetSharedResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"type":{"$ref":"#/components/schemas/DatasetType"},"organisation_id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetPropertySharedResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"SegmentDatasetSharedResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"organisation_name":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"organisation_id":{"type":"string","readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"name":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetSharedResource":{"type":"object","properties":{"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"source":{"$ref":"#/components/schemas/DatasetSource"}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /clean\_rooms/{clean\_room\_id}/datasets

> share a dataset in a clean room

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets":{"post":{"summary":"share a dataset in a clean room","description":"","requestBody":{"description":"The dataset to share","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCleanRoomResource"}}},"required":true},"operationId":"shareDatasetInCleanRoom","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatasetCleanRoomResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"parameters":[{"name":"clean_room_id","style":"simple","description":"Clean room owning datasets","required":true,"schema":{"type":"string"},"in":"path","explode":false}],"tags":["Data Clean Rooms"]}}},"components":{"schemas":{"DatasetCleanRoomResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"dataset_id":{"type":"string","readOnly":false},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":false},"created_by":{"type":"string","readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"dataset":{"$ref":"#/components/schemas/DatasetSharedResource"},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","clean_room_id","created_ts","dataset_id","expiration_ts","organisation_id"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"DatasetSharedResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetSharedResource","SEGMENT":"#/components/schemas/SegmentDatasetSharedResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetSharedResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetSharedResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetSharedResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"type":{"$ref":"#/components/schemas/DatasetType"},"organisation_id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetPropertySharedResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"SegmentDatasetSharedResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"organisation_name":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"organisation_id":{"type":"string","readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"name":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetSharedResource":{"type":"object","properties":{"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"source":{"$ref":"#/components/schemas/DatasetSource"}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /clean\_room\_collaborative\_apps/{collaborative\_app\_id}

> Get a collaborative app by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_room_collaborative_apps/{collaborative_app_id}":{"get":{"summary":"Get a collaborative app by id","description":"","operationId":"getCollaborativeApp","tags":["Data Clean Rooms"],"parameters":[{"name":"collaborative_app_id","explode":false,"style":"simple","schema":{"type":"string"},"in":"path","required":true}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/CollaborativeAppResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"CollaborativeAppResource":{"type":"object","properties":{"description":{"type":"string","readOnly":false},"authorized_outputs":{"type":"array","items":{"$ref":"#/components/schemas/AuthorizedOutput"},"readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"name":{"type":"string","readOnly":false},"type":{"$ref":"#/components/schemas/CollaborativeAppType"},"id":{"type":"string","readOnly":true}},"required":["archived","authorized_outputs","id","name","type"]},"AuthorizedOutput":{"type":"string","enum":["INSIGHTS","ACTIVATION","ENRICHMENT"],"readOnly":false},"CollaborativeAppType":{"type":"string","enum":["DATA_SOURCING","MEDIA_AUDIENCE_PORTAL","RETAIL_BRAND_PORTAL","TV_AUDIENCE_PORTAL","CLASSIFIED_ADS_AUDIENCE_PORTAL","CONNECT_ID","COCKPIT"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /clean\_rooms/{clean\_room\_id}/datasets\_matchings/{datasets\_matching\_id}

> Search datasets matching by Id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets_matchings/{datasets_matching_id}":{"get":{"parameters":[{"name":"clean_room_id","required":true,"description":"Clean room Id","explode":false,"schema":{"type":"integer","format":"int64"},"in":"path","style":"simple"},{"required":true,"in":"path","style":"simple","schema":{"type":"integer","format":"int64"},"description":"Datasets intersection Id","name":"datasets_matching_id","explode":false},{"required":false,"description":"View the matching from this organisation's side. Only honoured when the caller has access to it; ignored otherwise.","style":"form","name":"as_organisation_id","in":"query","schema":{"type":"string"},"explode":true}],"tags":["Data Clean Rooms"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatasetsMatchingResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","operationId":"getDatasetsMatchingById","summary":"Search datasets matching by Id"}}},"components":{"schemas":{"DatasetsMatchingResource":{"type":"object","properties":{"refresh_frequency":{"$ref":"#/components/schemas/DatasetsMatchingRefreshFrequency"},"initiator_org_id":{"type":"string","readOnly":false},"custom_identifier_labels":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"identifiers_freshness_days":{"type":"integer","default":0,"format":"int64","readOnly":false},"name":{"type":"string","readOnly":false},"feeds":{"type":"array","items":{"$ref":"#/components/schemas/AudienceSegmentExternalFeedShortResource"},"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_refresh_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"matched_datasets":{"type":"array","items":{"$ref":"#/components/schemas/DatasetMatchedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetsMatchingStatus"},"datasets_matching_history_key_stats":{"type":"array","items":{"$ref":"#/components/schemas/DatasetsMatchingHistoryKeyStatResource"},"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"count_matched_records":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"segment_id":{"type":"string","readOnly":true},"custom_identifier_compartment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"external_dashboard_url":{"type":"string","readOnly":false},"matching_keys":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyType"},"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false}},"required":["archived","clean_room_id","created_ts","id","initiator_org_id","matched_datasets","matching_keys","name","status"]},"DatasetsMatchingRefreshFrequency":{"type":"string","enum":["DAILY","WEEKLY","FORTNIGHTLY","MONTHLY"],"readOnly":false},"AudienceSegmentExternalFeedShortResource":{"type":"object","properties":{"artifact_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"plugin_id":{"type":"string","readOnly":true},"plugin_version_id":{"type":"string","readOnly":true},"audience_segment_id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["artifact_id","audience_segment_id","id","plugin_id","plugin_version_id"]},"DatasetMatchedResource":{"type":"object","properties":{"dataset":{"$ref":"#/components/schemas/DatasetSharedResource"},"organisation_id":{"type":"string","readOnly":true},"dataset_update_id":{"type":"string","readOnly":true},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"dataset_id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["clean_room_id","created_ts","dataset_id","dataset_update_id","expiration_ts","organisation_id"]},"DatasetSharedResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetSharedResource","SEGMENT":"#/components/schemas/SegmentDatasetSharedResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetSharedResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetSharedResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetSharedResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"type":{"$ref":"#/components/schemas/DatasetType"},"organisation_id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetPropertySharedResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"SegmentDatasetSharedResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"organisation_name":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"organisation_id":{"type":"string","readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"name":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetSharedResource":{"type":"object","properties":{"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"source":{"$ref":"#/components/schemas/DatasetSource"}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"DatasetsMatchingStatus":{"type":"string","enum":["PENDING","ACTIVE","ERROR"],"readOnly":false},"DatasetsMatchingHistoryKeyStatResource":{"type":"object","properties":{"related_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_name":{"type":"string","readOnly":true},"common_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_id":{"type":"string","readOnly":true},"matching_key_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"datasets_matching_history_id":{"type":"string","readOnly":true}},"required":["datasets_matching_history_id","matching_key_type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /clean\_rooms/{clean\_room\_id}/datasets\_matchings/{datasets\_matching\_id}

> Update datasets matching

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets_matchings/{datasets_matching_id}":{"put":{"tags":["Data Clean Rooms"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatasetsMatchingResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"requestBody":{"description":"The datasets matching to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetsMatchingResource"}}},"required":true},"description":"","summary":"Update datasets matching","operationId":"updateDatasetsMatching","parameters":[{"schema":{"type":"integer","format":"int64"},"in":"path","name":"clean_room_id","style":"simple","required":true,"description":"Clean room Id","explode":false},{"name":"datasets_matching_id","explode":false,"schema":{"type":"integer","format":"int64"},"required":true,"in":"path","description":"Datasets intersection Id","style":"simple"}]}}},"components":{"schemas":{"DatasetsMatchingResource":{"type":"object","properties":{"refresh_frequency":{"$ref":"#/components/schemas/DatasetsMatchingRefreshFrequency"},"initiator_org_id":{"type":"string","readOnly":false},"custom_identifier_labels":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"identifiers_freshness_days":{"type":"integer","default":0,"format":"int64","readOnly":false},"name":{"type":"string","readOnly":false},"feeds":{"type":"array","items":{"$ref":"#/components/schemas/AudienceSegmentExternalFeedShortResource"},"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_refresh_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"matched_datasets":{"type":"array","items":{"$ref":"#/components/schemas/DatasetMatchedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetsMatchingStatus"},"datasets_matching_history_key_stats":{"type":"array","items":{"$ref":"#/components/schemas/DatasetsMatchingHistoryKeyStatResource"},"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"count_matched_records":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"segment_id":{"type":"string","readOnly":true},"custom_identifier_compartment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"external_dashboard_url":{"type":"string","readOnly":false},"matching_keys":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyType"},"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false}},"required":["archived","clean_room_id","created_ts","id","initiator_org_id","matched_datasets","matching_keys","name","status"]},"DatasetsMatchingRefreshFrequency":{"type":"string","enum":["DAILY","WEEKLY","FORTNIGHTLY","MONTHLY"],"readOnly":false},"AudienceSegmentExternalFeedShortResource":{"type":"object","properties":{"artifact_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"plugin_id":{"type":"string","readOnly":true},"plugin_version_id":{"type":"string","readOnly":true},"audience_segment_id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["artifact_id","audience_segment_id","id","plugin_id","plugin_version_id"]},"DatasetMatchedResource":{"type":"object","properties":{"dataset":{"$ref":"#/components/schemas/DatasetSharedResource"},"organisation_id":{"type":"string","readOnly":true},"dataset_update_id":{"type":"string","readOnly":true},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"dataset_id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["clean_room_id","created_ts","dataset_id","dataset_update_id","expiration_ts","organisation_id"]},"DatasetSharedResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetSharedResource","SEGMENT":"#/components/schemas/SegmentDatasetSharedResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetSharedResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetSharedResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetSharedResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"type":{"$ref":"#/components/schemas/DatasetType"},"organisation_id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetPropertySharedResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"SegmentDatasetSharedResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"organisation_name":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"organisation_id":{"type":"string","readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"name":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetSharedResource":{"type":"object","properties":{"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"source":{"$ref":"#/components/schemas/DatasetSource"}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"DatasetsMatchingStatus":{"type":"string","enum":["PENDING","ACTIVE","ERROR"],"readOnly":false},"DatasetsMatchingHistoryKeyStatResource":{"type":"object","properties":{"related_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_name":{"type":"string","readOnly":true},"common_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_id":{"type":"string","readOnly":true},"matching_key_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"datasets_matching_history_id":{"type":"string","readOnly":true}},"required":["datasets_matching_history_id","matching_key_type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /clean\_rooms

> Find clean rooms

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms":{"get":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"max_results":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CleanRoomPublicResource"}},"total":{"type":"integer"},"first_result":{"type":"integer"},"status":{"type":"string","enum":["ok"]}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"parameters":[{"explode":true,"description":"Organisation owning clean rooms","required":true,"schema":{"type":"integer","format":"int64"},"name":"organisation_id","style":"form","in":"query"},{"schema":{"type":"boolean"},"description":"If true the result will contain only archived clean rooms","style":"form","name":"archived","in":"query","explode":true,"required":false},{"name":"first_result","schema":{"type":"integer","format":"int32"},"description":"Offset from which the search must be performed","required":false,"explode":true,"style":"form","in":"query"},{"description":"Number of maximum items that shall be return by this search","in":"query","style":"form","name":"max_results","required":false,"explode":true,"schema":{"type":"integer","format":"int32"}}],"tags":["Data Clean Rooms"],"description":"","summary":"Find clean rooms","operationId":"findCleanRooms"}}},"components":{"schemas":{"CleanRoomPublicResource":{"type":"object","properties":{"clean_room_organisations":{"type":"array","items":{"$ref":"#/components/schemas/CleanRoomOrganisationResource"},"readOnly":false},"collaborative_app_id":{"type":"string","readOnly":true},"template_id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":true},"clean_room_id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false}},"required":["clean_room_id","clean_room_organisations","name","organisation_id"]},"CleanRoomOrganisationResource":{"type":"object","properties":{"archived":{"type":"boolean","default":false,"readOnly":true},"organisation_name":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":false},"archived_by":{"type":"string","readOnly":true},"owner":{"type":"boolean","default":false,"readOnly":false},"created_by":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/CleanRoomOrganisationStatus"},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"clean_room_id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true}},"required":["archived","clean_room_id","created_by","created_ts","organisation_id","organisation_name","owner","purposes","status"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"CleanRoomOrganisationStatus":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datasets/{dataset\_id}/segment\_taxonomy

> List segment taxonomy entries for a dataset

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets/{dataset_id}/segment_taxonomy":{"get":{"tags":["Data Clean Rooms"],"operationId":"findSegmentTaxonomyEntries","description":"","summary":"List segment taxonomy entries for a dataset","parameters":[{"in":"path","schema":{"type":"string"},"explode":false,"name":"dataset_id","description":"The dataset id","required":true,"style":"simple"},{"schema":{"type":"integer","format":"int32"},"style":"form","explode":true,"description":"Offset from which the search must be performed","required":false,"in":"query","name":"first_result"},{"required":false,"style":"form","description":"Number of maximum items that shall be returned by this search","in":"query","schema":{"type":"integer","format":"int32"},"explode":true,"name":"max_results"}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SegmentTaxonomyEntryResource"}},"total":{"type":"integer"},"count":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"first_result":{"type":"integer"},"max_results":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"SegmentTaxonomyEntryResource":{"type":"object","properties":{"description":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"membership_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"dataset_id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"segment_technical_name":{"type":"string","readOnly":true},"expiration_in_minutes":{"type":"integer","format":"int64","default":0,"readOnly":false},"path":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true}},"required":["created_by","created_ts","dataset_id","name","segment_technical_name"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /datasets/{dataset\_id}/segment\_taxonomy

> Upload (replace) the segment taxonomy dictionary for a dataset

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets/{dataset_id}/segment_taxonomy":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"array","items":{"type":"string","format":"binary"}}}}}}},"operationId":"uploadSegmentTaxonomy","description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/SegmentTaxonomyUploadResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Data Clean Rooms"],"parameters":[{"schema":{"type":"string"},"description":"The dataset id","in":"path","name":"dataset_id","explode":false,"style":"simple","required":true}],"summary":"Upload (replace) the segment taxonomy dictionary for a dataset"}}},"components":{"schemas":{"SegmentTaxonomyUploadResource":{"type":"object","properties":{"entries_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"status":{"$ref":"#/components/schemas/SegmentTaxonomyUploadStatus"},"last_modified_by":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_by":{"type":"string","readOnly":true},"dataset_id":{"type":"string","readOnly":true},"error_log":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"file_path":{"type":"string","readOnly":true}},"required":["created_by","created_ts","dataset_id","id","status"]},"SegmentTaxonomyUploadStatus":{"type":"string","enum":["SUCCESS","ERROR"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datasets/{dataset\_id}/updates

> Find dataset updates from dataset

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets/{dataset_id}/updates":{"get":{"parameters":[{"name":"dataset_id","required":true,"in":"path","explode":false,"description":"The dataset id","style":"simple","schema":{"type":"string"}},{"style":"form","schema":{"type":"integer","format":"int64"},"explode":true,"description":"Organisation owning datasets","in":"query","required":true,"name":"organisation_id"},{"description":"Status of dataset updates","schema":{"$ref":"#/components/schemas/DatasetUpdateStatus"},"in":"query","style":"form","name":"status","explode":true,"required":false},{"name":"archived","description":"If true the result will contain only archived datasets","explode":true,"required":false,"schema":{"type":"boolean"},"style":"form","in":"query"},{"in":"query","description":"Offset from which the search must be performed","required":false,"name":"first_result","schema":{"type":"integer","format":"int32"},"explode":true,"style":"form"},{"explode":true,"required":false,"name":"max_results","description":"Number of maximum items that shall be return by this search","in":"query","style":"form","schema":{"type":"integer","format":"int32"}}],"tags":["Data Clean Rooms"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DatasetUpdateResource"}},"count":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"first_result":{"type":"integer"},"max_results":{"type":"integer"},"total":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"findDatasetUpdates","summary":"Find dataset updates from dataset","description":""}}},"components":{"schemas":{"DatasetUpdateStatus":{"type":"string","enum":["PENDING","RUNNING","ACTIVE","ERROR","ARCHIVED"],"readOnly":false},"DatasetUpdateResource":{"type":"object"},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /bunkers/{bunker\_id}

> Search bunker by Id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/bunkers/{bunker_id}":{"get":{"operationId":"getBunker","summary":"Search bunker by Id","description":"","tags":["Data Clean Rooms"],"parameters":[{"style":"simple","required":true,"schema":{"type":"string"},"description":"The bunker id","explode":false,"name":"bunker_id","in":"path"}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/BunkerResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"BunkerResource":{"oneOf":[{"$ref":"#/components/schemas/BunkerWithDatamartResource"},{"$ref":"#/components/schemas/StandaloneBunkerResource"}]},"BunkerWithDatamartResource":{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":true},"organisation_id":{"type":"string","readOnly":false},"is_initialized":{"type":"boolean","default":false,"readOnly":true},"archived_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":false},"last_state_refresh":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true}},"required":["archived","created_by","created_ts","datamart_id","id","is_initialized","name","organisation_id"]},"StandaloneBunkerResource":{"type":"object","properties":{"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"is_initialized":{"type":"boolean","default":false,"readOnly":true},"created_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true}},"required":["archived","created_by","created_ts","id","is_initialized","name","organisation_id"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /bunkers/{bunker\_id}

> Modify bunker

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/bunkers/{bunker_id}":{"put":{"description":"","summary":"Modify bunker","operationId":"modifyBunker","parameters":[{"schema":{"type":"string"},"in":"path","explode":false,"required":true,"style":"simple","description":"The bunker id","name":"bunker_id"}],"requestBody":{"description":"The bunker to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BunkerResource"}}},"required":true},"tags":["Data Clean Rooms"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/BunkerResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"BunkerResource":{"oneOf":[{"$ref":"#/components/schemas/BunkerWithDatamartResource"},{"$ref":"#/components/schemas/StandaloneBunkerResource"}]},"BunkerWithDatamartResource":{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":true},"organisation_id":{"type":"string","readOnly":false},"is_initialized":{"type":"boolean","default":false,"readOnly":true},"archived_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":false},"last_state_refresh":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true}},"required":["archived","created_by","created_ts","datamart_id","id","is_initialized","name","organisation_id"]},"StandaloneBunkerResource":{"type":"object","properties":{"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"is_initialized":{"type":"boolean","default":false,"readOnly":true},"created_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true}},"required":["archived","created_by","created_ts","id","is_initialized","name","organisation_id"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /clean\_rooms/{clean\_room\_id}/actions

> apply an action on a clean room

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/actions":{"post":{"operationId":"applyActionOnCleanRoom","description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/CleanRoomResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"parameters":[{"in":"path","style":"simple","required":true,"explode":false,"schema":{"type":"string"},"name":"clean_room_id"}],"requestBody":{"description":"The action to apply","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CleanRoomOrganisationStatus"}}},"required":true},"summary":"apply an action on a clean room","tags":["Data Clean Rooms"]}}},"components":{"schemas":{"CleanRoomResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":false},"organisation_id":{"type":"string","readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"template_id":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true}},"required":["archived","created_by","created_ts","id","name","organisation_id"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]},"CleanRoomOrganisationStatus":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED"],"readOnly":false}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datasets/{dataset\_id}/audience\_segments

> List audience segments associated with a dataset

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets/{dataset_id}/audience_segments":{"get":{"summary":"List audience segments associated with a dataset","parameters":[{"description":"The dataset id","style":"simple","name":"dataset_id","in":"path","explode":false,"required":true,"schema":{"type":"string"}},{"required":false,"explode":true,"schema":{"type":"integer","format":"int32"},"style":"form","name":"first_result","in":"query","description":"Offset from which the search must be performed"},{"required":false,"name":"max_results","schema":{"type":"integer","format":"int32"},"explode":true,"description":"Number of maximum items that shall be returned by this search","in":"query","style":"form"},{"required":false,"style":"form","explode":true,"in":"query","schema":{"type":"string"},"name":"keyword","description":"Filter segments by name, short description or id"}],"tags":["Data Clean Rooms"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"max_results":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DatasetAudienceSegmentResource"}},"first_result":{"type":"integer"},"total":{"type":"integer"},"status":{"type":"string","enum":["ok"]}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"getDatasetAudienceSegments","description":""}}},"components":{"schemas":{"DatasetAudienceSegmentResource":{"type":"object","properties":{"segment":{"$ref":"#/components/schemas/AudienceSegmentResource"},"user_segment_stats":{"type":"integer","format":"int64","default":0,"readOnly":false}},"required":["segment"]},"AudienceSegmentResource":{"discriminator":{"propertyName":"type","mapping":{"CLEAN_ROOM":"#/components/schemas/CleanRoomAudienceSegmentResource","USER_LIST":"#/components/schemas/UserListSegmentResource","USER_LOOKALIKE":"#/components/schemas/UserLookalikePartitionBasedSegmentResource","USER_ACTIVATION":"#/components/schemas/UserActivationSegmentResource","USER_QUERY":"#/components/schemas/UserQuerySegmentResource","USER_LOOKALIKE_BY_COHORTS":"#/components/schemas/UserLookalikeCohortBasedSegmentResource","USER_DATA_SUBSCRIPTION":"#/components/schemas/UserDataSubscriptionSegmentResource","USER_PARTITION":"#/components/schemas/UserPartitionSegmentResource"}},"oneOf":[{"$ref":"#/components/schemas/UserDataSubscriptionSegmentResource"},{"$ref":"#/components/schemas/UserActivationSegmentResource"},{"$ref":"#/components/schemas/UserQuerySegmentResource"},{"$ref":"#/components/schemas/UserPartitionSegmentResource"},{"$ref":"#/components/schemas/UserLookalikeCohortBasedSegmentResource"},{"$ref":"#/components/schemas/UserListSegmentResource"},{"$ref":"#/components/schemas/CleanRoomAudienceSegmentResource"},{"$ref":"#/components/schemas/UserLookalikePartitionBasedSegmentResource"}],"properties":{"type":{"type":"string","enum":["USER_DATA_SUBSCRIPTION","USER_ACTIVATION","USER_QUERY","USER_PARTITION","USER_LOOKALIKE_BY_COHORTS","USER_LIST","CLEAN_ROOM","USER_LOOKALIKE"]}},"required":["type"]},"UserDataSubscriptionSegmentResource":{"type":"object","properties":{"user_points_count_on_last_warm_up":{"type":"integer","format":"int32","default":0,"readOnly":true},"provider_name":{"type":"string","readOnly":false},"origin_segment_id":{"type":"integer","format":"int64","default":0,"readOnly":false},"technical_name":{"type":"string","readOnly":false},"default_lifetime":{"type":"integer","format":"int32","default":0,"readOnly":false},"desktop_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"short_description":{"type":"string","readOnly":false},"default_ttl":{"$ref":"#/components/schemas/Duration"},"mobile_ad_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"token":{"type":"string","readOnly":true},"persisted":{"type":"boolean","default":false,"readOnly":false},"user_points_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"emails_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"audience_metrics":{"type":"array","items":{"$ref":"#/components/schemas/AudienceMetricResource"},"readOnly":true},"last_warm_up_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"paused":{"type":"boolean","default":false,"readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"mobile_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":false},"user_accounts_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"auto_description":{"type":"string","readOnly":false},"evaluation_mode":{"$ref":"#/components/schemas/AudienceSegmentEvaluationMode"}},"required":["audience_metrics","auto_description","creation_ts","datamart_id","evaluation_mode","id","last_modified_ts","name","organisation_id","origin_segment_id","paused","persisted","provider_name","short_description","technical_name","token"]},"Duration":{"type":"number","description":"a length of time in milliseconds"},"AudienceMetricResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"display_name":{"type":"string","readOnly":true},"count":{"type":"integer","format":"int64","default":0,"readOnly":true},"count_last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["display_name","id"]},"AudienceSegmentEvaluationMode":{"type":"string","enum":["REAL_TIME","AUTOMATIC","ON_DEMAND","LIVE","PERIODIC"],"readOnly":false},"UserActivationSegmentResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"mobile_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"auto_description":{"type":"string","readOnly":false},"default_lifetime":{"type":"integer","format":"int32","default":0,"readOnly":false},"campaign_id":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"scenario_id":{"type":"string","readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"user_accounts_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"user_points_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"default_ttl":{"$ref":"#/components/schemas/Duration"},"exposed":{"type":"boolean","default":false,"readOnly":false},"desktop_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"technical_name":{"type":"string","readOnly":false},"last_warm_up_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"token":{"type":"string","readOnly":true},"short_description":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":false},"audience_metrics":{"type":"array","items":{"$ref":"#/components/schemas/AudienceMetricResource"},"readOnly":true},"provider_name":{"type":"string","readOnly":false},"emails_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"persisted":{"type":"boolean","default":false,"readOnly":false},"mobile_ad_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"paused":{"type":"boolean","default":false,"readOnly":false},"evaluation_mode":{"$ref":"#/components/schemas/AudienceSegmentEvaluationMode"},"user_points_count_on_last_warm_up":{"type":"integer","format":"int32","default":0,"readOnly":true},"name":{"type":"string","readOnly":true},"clickers":{"type":"boolean","default":false,"readOnly":false}},"required":["audience_metrics","auto_description","campaign_id","clickers","creation_ts","datamart_id","evaluation_mode","exposed","id","last_modified_ts","name","organisation_id","paused","persisted","provider_name","scenario_id","short_description","technical_name","token"]},"UserQuerySegmentResource":{"allOf":[{"$ref":"#/components/schemas/QuerySegmentResource"},{"type":"object","properties":{"audience_metrics":{"type":"array","items":{"$ref":"#/components/schemas/AudienceMetricResource"},"readOnly":true},"name":{"type":"string","readOnly":false},"mobile_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"emails_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"segment_editor":{"$ref":"#/components/schemas/UserQuerySegmentEditor"},"weight":{"type":"integer","format":"int32","default":0,"readOnly":false},"user_points_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"token":{"type":"string","readOnly":true},"short_description":{"type":"string","readOnly":false},"stats_query_precision_override":{"$ref":"#/components/schemas/QueryPrecisionMode1"},"desktop_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"query_id":{"type":"string","readOnly":false},"evaluation_mode":{"$ref":"#/components/schemas/AudienceSegmentEvaluationMode"},"target_metric":{"$ref":"#/components/schemas/ABTestingExperimentTargetMetric"},"subtype":{"$ref":"#/components/schemas/UserQuerySubtype"},"default_lifetime":{"type":"integer","format":"int32","default":0,"readOnly":false},"default_ttl":{"$ref":"#/components/schemas/Duration"},"technical_name":{"type":"string","readOnly":false},"evaluation_period":{"type":"integer","format":"int32","default":0,"readOnly":false},"user_accounts_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"user_points_count_on_last_warm_up":{"type":"integer","format":"int32","default":0,"readOnly":true},"auto_description":{"type":"string","readOnly":false},"provider_name":{"type":"string","readOnly":false},"last_warm_up_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"evaluation_period_unit":{"$ref":"#/components/schemas/UserQueryEvaluationPeriodUnit"},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"control_group_id":{"type":"string","readOnly":false},"mobile_ad_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"persisted":{"type":"boolean","default":false,"readOnly":false},"paused":{"type":"boolean","default":false,"readOnly":false}},"required":["audience_metrics","auto_description","creation_ts","datamart_id","evaluation_mode","evaluation_period","evaluation_period_unit","id","last_modified_ts","name","organisation_id","paused","persisted","provider_name","query_id","segment_editor","short_description","subtype","technical_name","token"]}]},"QuerySegmentResource":{"type":"object"},"UserQuerySegmentEditor":{"type":"string","enum":["ADVANCED_SEGMENT_BUILDER","STANDARD_SEGMENT_BUILDER"],"readOnly":false},"QueryPrecisionMode1":{"type":"string","enum":["LOW_PRECISION","MEDIUM_PRECISION","FULL_PRECISION"],"readOnly":false},"ABTestingExperimentTargetMetric":{"type":"string","enum":["E_COMMERCE_ENGAGEMENT","CHANNEL_ENGAGEMENT"],"readOnly":false},"UserQuerySubtype":{"type":"string","enum":["STANDARD","AB_TESTING_CONTROL_GROUP","AB_TESTING_EXPERIMENT","UPLIFT_CONTROL_GROUP","UPLIFT_EXPERIMENT","EXPERIMENT_GROUP"],"readOnly":false},"UserQueryEvaluationPeriodUnit":{"type":"string","enum":["HOUR","DAY","WEEK","MONTH"],"readOnly":false},"UserPartitionSegmentResource":{"type":"object","properties":{"evaluation_mode":{"$ref":"#/components/schemas/AudienceSegmentEvaluationMode"},"persisted":{"type":"boolean","default":false,"readOnly":false},"organisation_id":{"type":"string","readOnly":false},"emails_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"provider_name":{"type":"string","readOnly":false},"mobile_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"audience_partition_id":{"type":"string","readOnly":false},"auto_description":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":false},"user_points_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"default_lifetime":{"type":"integer","format":"int32","default":0,"readOnly":false},"id":{"type":"string","readOnly":true},"desktop_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"audience_metrics":{"type":"array","items":{"$ref":"#/components/schemas/AudienceMetricResource"},"readOnly":true},"token":{"type":"string","readOnly":true},"user_accounts_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"part_number":{"type":"integer","format":"int32","default":0,"readOnly":false},"short_description":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"user_points_count_on_last_warm_up":{"type":"integer","format":"int32","default":0,"readOnly":true},"technical_name":{"type":"string","readOnly":false},"paused":{"type":"boolean","default":false,"readOnly":false},"last_warm_up_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"default_ttl":{"$ref":"#/components/schemas/Duration"},"mobile_ad_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true}},"required":["audience_metrics","audience_partition_id","auto_description","creation_ts","datamart_id","evaluation_mode","id","last_modified_ts","name","organisation_id","part_number","paused","persisted","provider_name","short_description","technical_name","token"]},"UserLookalikeCohortBasedSegmentResource":{"allOf":[{"$ref":"#/components/schemas/UserLookalikeSegmentResource"},{"type":"object","properties":{"token":{"type":"string","readOnly":true},"last_warm_up_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"source_segment_id":{"type":"string","readOnly":false},"default_lifetime":{"type":"integer","format":"int32","default":0,"readOnly":false},"id":{"type":"string","readOnly":true},"short_description":{"type":"string","readOnly":false},"technical_name":{"type":"string","readOnly":false},"user_accounts_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"default_ttl":{"$ref":"#/components/schemas/Duration"},"user_points_target":{"type":"integer","format":"int32","default":0,"readOnly":false},"mobile_ad_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"persisted":{"type":"boolean","default":false,"readOnly":false},"desktop_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"provider_name":{"type":"string","readOnly":false},"user_points_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"lookalike_algorithm":{"$ref":"#/components/schemas/AudienceLookalikeAlgorithm"},"datamart_id":{"type":"string","readOnly":false},"include_seed_segment":{"type":"boolean","default":false,"readOnly":false},"audience_metrics":{"type":"array","items":{"$ref":"#/components/schemas/AudienceMetricResource"},"readOnly":true},"emails_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"mobile_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"query_id":{"type":"string","readOnly":false},"status":{"$ref":"#/components/schemas/AudienceLookalikeStatus"},"auto_description":{"type":"string","readOnly":false},"user_points_count_on_last_warm_up":{"type":"integer","format":"int32","default":0,"readOnly":true},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"similarity_index":{"type":"number","format":"float","default":0,"readOnly":false},"min_overlap":{"type":"number","format":"float","default":0,"readOnly":false},"paused":{"type":"boolean","default":false,"readOnly":false},"evaluation_mode":{"$ref":"#/components/schemas/AudienceSegmentEvaluationMode"}},"required":["audience_metrics","auto_description","creation_ts","datamart_id","evaluation_mode","id","include_seed_segment","last_modified_ts","lookalike_algorithm","name","organisation_id","paused","persisted","provider_name","query_id","short_description","source_segment_id","status","technical_name","token"]}]},"UserLookalikeSegmentResource":{"allOf":[{"$ref":"#/components/schemas/QuerySegmentResource"},{"type":"object"}]},"AudienceLookalikeAlgorithm":{"type":"string","enum":["CLUSTER_OVERLAP","FIELD_SCORE","MULTI_VARIATE_DISTANCE","COHORT_OVERLAP"],"readOnly":false},"AudienceLookalikeStatus":{"type":"string","enum":["DRAFT","CALIBRATING","CALIBRATION_ERROR","CALIBRATED","DEFINITION_ERROR"],"readOnly":false},"UserListSegmentResource":{"type":"object","properties":{"short_description":{"type":"string","readOnly":false},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"default_lifetime":{"type":"integer","format":"int32","default":0,"readOnly":false},"mobile_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"paused":{"type":"boolean","default":false,"readOnly":false},"audience_metrics":{"type":"array","items":{"$ref":"#/components/schemas/AudienceMetricResource"},"readOnly":true},"desktop_cookie_ids_count":{"default":0,"readOnly":false,"format":"int32","type":"integer"},"name":{"type":"string","readOnly":false},"subtype":{"$ref":"#/components/schemas/UserListSubtype"},"auto_description":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"user_accounts_count":{"format":"int32","readOnly":false,"type":"integer","default":0},"evaluation_mode":{"$ref":"#/components/schemas/AudienceSegmentEvaluationMode"},"emails_count":{"format":"int32","readOnly":false,"type":"integer","default":0},"datamart_id":{"type":"string","readOnly":false},"standard_segment_builder_id":{"type":"string","readOnly":false},"feed_type":{"$ref":"#/components/schemas/UserListFeedType"},"user_points_count_on_last_warm_up":{"type":"integer","format":"int32","default":0,"readOnly":true},"default_ttl":{"$ref":"#/components/schemas/Duration"},"query_id":{"type":"string","readOnly":false},"last_warm_up_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"technical_name":{"type":"string","readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"user_points_count":{"readOnly":false,"default":0,"format":"int32","type":"integer"},"provider_name":{"type":"string","readOnly":false},"persisted":{"type":"boolean","default":false,"readOnly":false},"token":{"type":"string","readOnly":true},"mobile_ad_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true}},"required":["audience_metrics","auto_description","creation_ts","datamart_id","evaluation_mode","feed_type","id","last_modified_ts","name","organisation_id","paused","persisted","provider_name","query_id","short_description","subtype","technical_name","token"]},"UserListSubtype":{"type":"string","enum":["STANDARD","USER_PIXEL","EDGE","EXPERIMENT_GROUP"],"readOnly":false},"UserListFeedType":{"type":"string","enum":["FILE_IMPORT","TAG","SCENARIO","SCENARIO_FEED"],"readOnly":false},"CleanRoomAudienceSegmentResource":{"type":"object","properties":{"from_dataset_id":{"type":"string","readOnly":false},"token":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"short_description":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":false},"datasets_matching_id":{"type":"string","readOnly":false},"technical_name":{"type":"string","readOnly":false},"to_dataset_id":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":false},"datasets_matching_selection":{"$ref":"#/components/schemas/CleanRoomSegmentDatasetsMatchingSelection"},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["clean_room_id","creation_ts","datamart_id","datasets_matching_id","datasets_matching_selection","from_dataset_id","id","last_modified_ts","name","organisation_id","short_description","technical_name","to_dataset_id","token"]},"CleanRoomSegmentDatasetsMatchingSelection":{"type":"string","enum":["COMMON","EXCLUSIVE"],"readOnly":false},"UserLookalikePartitionBasedSegmentResource":{"allOf":[{"$ref":"#/components/schemas/UserLookalikeSegmentResource"},{"type":"object","properties":{"minimum_score":{"type":"number","format":"float","default":0,"readOnly":false},"user_points_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"provider_name":{"type":"string","readOnly":false},"mobile_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":false},"persisted":{"type":"boolean","default":false,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_warm_up_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"creation_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"source_segment_id":{"type":"string","readOnly":false},"query_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"default_ttl":{"$ref":"#/components/schemas/Duration"},"status":{"$ref":"#/components/schemas/AudienceLookalikeStatus"},"emails_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"auto_description":{"type":"string","readOnly":false},"user_accounts_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"user_points_count_on_last_warm_up":{"type":"integer","format":"int32","default":0,"readOnly":true},"short_description":{"type":"string","readOnly":false},"technical_name":{"type":"string","readOnly":false},"default_lifetime":{"type":"integer","format":"int32","default":0,"readOnly":false},"id":{"type":"string","readOnly":true},"lookalike_algorithm":{"$ref":"#/components/schemas/AudienceLookalikeAlgorithm"},"extension_factor":{"type":"number","format":"float","default":0,"readOnly":false},"token":{"type":"string","readOnly":true},"paused":{"type":"boolean","default":false,"readOnly":false},"audience_metrics":{"type":"array","items":{"$ref":"#/components/schemas/AudienceMetricResource"},"readOnly":true},"mobile_ad_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"audience_partition_id":{"type":"string","readOnly":false},"desktop_cookie_ids_count":{"type":"integer","format":"int32","default":0,"readOnly":true},"datamart_id":{"type":"string","readOnly":false},"evaluation_mode":{"$ref":"#/components/schemas/AudienceSegmentEvaluationMode"}},"required":["audience_metrics","audience_partition_id","auto_description","creation_ts","datamart_id","evaluation_mode","id","last_modified_ts","lookalike_algorithm","name","organisation_id","paused","persisted","provider_name","query_id","short_description","source_segment_id","status","technical_name","token"]}]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /clean\_rooms/{clean\_room\_id}

> Search clean room by Id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}":{"get":{"description":"","summary":"Search clean room by Id","parameters":[{"schema":{"type":"string"},"name":"clean_room_id","description":"The clean room id","style":"simple","explode":false,"in":"path","required":true}],"tags":["Data Clean Rooms"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/CleanRoomPublicResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"getCleanRoom"}}},"components":{"schemas":{"CleanRoomPublicResource":{"type":"object","properties":{"clean_room_organisations":{"type":"array","items":{"$ref":"#/components/schemas/CleanRoomOrganisationResource"},"readOnly":false},"collaborative_app_id":{"type":"string","readOnly":true},"template_id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":true},"clean_room_id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false}},"required":["clean_room_id","clean_room_organisations","name","organisation_id"]},"CleanRoomOrganisationResource":{"type":"object","properties":{"archived":{"type":"boolean","default":false,"readOnly":true},"organisation_name":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":false},"archived_by":{"type":"string","readOnly":true},"owner":{"type":"boolean","default":false,"readOnly":false},"created_by":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/CleanRoomOrganisationStatus"},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"clean_room_id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true}},"required":["archived","clean_room_id","created_by","created_ts","organisation_id","organisation_name","owner","purposes","status"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"CleanRoomOrganisationStatus":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datasets

> Find datasets

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets":{"get":{"description":"","operationId":"findDatasets","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"first_result":{"type":"integer"},"max_results":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DatasetResource"}}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"summary":"Find datasets","parameters":[{"explode":true,"schema":{"type":"integer","format":"int64"},"required":true,"description":"Organisation owning datasets","style":"form","name":"organisation_id","in":"query"},{"description":"List of segmentIds used to create dataset","in":"query","style":"form","name":"segment_id","explode":true,"required":false,"schema":{"type":"array","items":{"type":"integer","format":"int64"}}},{"required":false,"in":"query","name":"archived","style":"form","explode":true,"description":"If true the result will contain only archived datasets","schema":{"type":"boolean"}},{"name":"dataset_type","description":"Type of dataset to filter on","in":"query","explode":true,"required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetType"}},"style":"form"},{"required":false,"name":"source","description":"Source of dataset to filter on","explode":true,"in":"query","style":"form","schema":{"$ref":"#/components/schemas/DatasetSource"}},{"explode":true,"required":false,"in":"query","schema":{"type":"string"},"style":"form","name":"keywords"},{"explode":true,"schema":{"type":"integer","format":"int32"},"description":"Offset from which the search must be performed","name":"first_result","in":"query","style":"form","required":false},{"description":"Number of maximum items that shall be return by this search","in":"query","name":"max_results","style":"form","schema":{"type":"integer","format":"int32"},"required":false,"explode":true}],"tags":["Data Clean Rooms"]}}},"components":{"schemas":{"DatasetResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetResource","SEGMENT":"#/components/schemas/SegmentDatasetResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetResource"},{"$ref":"#/components/schemas/SegmentDatasetResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetResource":{"type":"object","properties":{"bunker_id":{"type":"string","readOnly":false},"source":{"$ref":"#/components/schemas/DatasetSource"},"status":{"$ref":"#/components/schemas/DatasetStatus"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_by":{"type":"string","readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"description":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"name":{"type":"string","readOnly":false}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetPropertyResource":{"type":"object","properties":{"fill_rate":{"type":"number","format":"float","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"compartment_id":{"type":"string","readOnly":false},"data_sample":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"compartment_name":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"SegmentDatasetResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"created_by":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"segment_id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"bunker_id":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"source":{"$ref":"#/components/schemas/DatasetSource"},"organisation_id":{"type":"string","readOnly":false}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetResource":{"type":"object","properties":{"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"organisation_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"description":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"label_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"type":{"$ref":"#/components/schemas/DatasetType"},"datamart_id":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"bunker_id":{"type":"string","readOnly":false},"status":{"$ref":"#/components/schemas/DatasetStatus"}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","label_ids","name","organisation_id","organisation_name","properties","source","status","type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /datasets

> Create dataset

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets":{"post":{"tags":["Data Clean Rooms"],"summary":"Create dataset","requestBody":{"description":"Infos to create dataset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreationResource"}}},"required":true},"parameters":[{"required":true,"name":"bunker_id","schema":{"type":"string"},"style":"form","in":"query","description":"Bunker of the dataset","explode":true}],"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatasetResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"createDataset"}}},"components":{"schemas":{"DatasetCreationResource":{"type":"object","properties":{"dataset":{"$ref":"#/components/schemas/DatasetResource"},"share_options":{"type":"array","items":{"$ref":"#/components/schemas/ShareOption"},"readOnly":false}},"required":["dataset"]},"DatasetResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetResource","SEGMENT":"#/components/schemas/SegmentDatasetResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetResource"},{"$ref":"#/components/schemas/SegmentDatasetResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetResource":{"type":"object","properties":{"bunker_id":{"type":"string","readOnly":false},"source":{"$ref":"#/components/schemas/DatasetSource"},"status":{"$ref":"#/components/schemas/DatasetStatus"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_by":{"type":"string","readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"description":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"name":{"type":"string","readOnly":false}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetPropertyResource":{"type":"object","properties":{"fill_rate":{"type":"number","format":"float","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"compartment_id":{"type":"string","readOnly":false},"data_sample":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"compartment_name":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"SegmentDatasetResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"created_by":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"segment_id":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"bunker_id":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"source":{"$ref":"#/components/schemas/DatasetSource"},"organisation_id":{"type":"string","readOnly":false}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetResource":{"type":"object","properties":{"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyResource"},"readOnly":false},"organisation_id":{"type":"string","readOnly":false},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"description":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"label_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"type":{"$ref":"#/components/schemas/DatasetType"},"datamart_id":{"type":"string","readOnly":false},"archived_by":{"type":"string","readOnly":true},"bunker_id":{"type":"string","readOnly":false},"status":{"$ref":"#/components/schemas/DatasetStatus"}},"required":["archived","bunker_id","created_by","created_ts","expiration_ts","id","label_ids","name","organisation_id","organisation_name","properties","source","status","type"]},"ShareOption":{"type":"object","properties":{"clean_room_id":{"type":"string","readOnly":false},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":false},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false}},"required":["clean_room_id","expiration_ts","purposes"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /clean\_rooms/{clean\_room\_id}/datasets\_matchings/{datasets\_matching\_id}/catalog\_overlap

> Search per-segment overlap results of a segment catalog matching

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets_matchings/{datasets_matching_id}/catalog_overlap":{"get":{"parameters":[{"description":"Clean room Id","style":"simple","in":"path","required":true,"explode":false,"schema":{"type":"string"},"name":"clean_room_id"},{"in":"path","style":"simple","description":"Datasets matching Id","required":true,"schema":{"type":"string"},"name":"datasets_matching_id","explode":false},{"name":"first_result","schema":{"type":"integer","format":"int32"},"description":"Offset from which the search must be performed","style":"form","in":"query","required":false,"explode":true},{"explode":true,"description":"Number of maximum items that shall be return by this search","style":"form","in":"query","name":"max_results","schema":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"name","style":"form","required":false,"explode":true,"schema":{"type":"string"},"description":"Case-insensitive substring filter on the segment name"},{"schema":{"type":"array","items":{"type":"string"}},"explode":true,"name":"order_by","in":"query","description":"Fields used to order the result (prefix with '-' for descending). Multiple fields are applied in order. Defaults to '-overlap_percent'. Allowed fields: segment_id, segment_name, overlap_records_count, source_records_count, overlap_percent. An unrecognised field returns a 400.","required":false,"style":"form"}],"operationId":"getDatasetsMatchingCatalogOverlap","summary":"Search per-segment overlap results of a segment catalog matching","tags":["Data Clean Rooms"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogSegmentOverlapResource"}},"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"},"first_result":{"type":"integer"},"max_results":{"type":"integer"},"count":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":""}}},"components":{"schemas":{"CatalogSegmentOverlapResource":{"type":"object","properties":{"source_records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"segment_name":{"type":"string","readOnly":true},"partner_records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"overlap_records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"segment_id":{"type":"string","readOnly":true}},"required":["overlap_records_count","segment_id","segment_name"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datasets/{dataset\_id}/clean\_rooms

> Search clean rooms by dataset id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets/{dataset_id}/clean_rooms":{"get":{"summary":"Search clean rooms by dataset id","parameters":[{"in":"path","name":"dataset_id","required":true,"explode":false,"description":"The dataset id","schema":{"type":"string"},"style":"simple"}],"description":"","tags":["Data Clean Rooms"],"operationId":"getDatasetCleanRooms","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"count":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CleanRoomPublicResource"}},"max_results":{"type":"integer"},"first_result":{"type":"integer"},"total":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"CleanRoomPublicResource":{"type":"object","properties":{"clean_room_organisations":{"type":"array","items":{"$ref":"#/components/schemas/CleanRoomOrganisationResource"},"readOnly":false},"collaborative_app_id":{"type":"string","readOnly":true},"template_id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":true},"clean_room_id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false}},"required":["clean_room_id","clean_room_organisations","name","organisation_id"]},"CleanRoomOrganisationResource":{"type":"object","properties":{"archived":{"type":"boolean","default":false,"readOnly":true},"organisation_name":{"type":"string","readOnly":false},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":false},"archived_by":{"type":"string","readOnly":true},"owner":{"type":"boolean","default":false,"readOnly":false},"created_by":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/CleanRoomOrganisationStatus"},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"clean_room_id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true}},"required":["archived","clean_room_id","created_by","created_ts","organisation_id","organisation_name","owner","purposes","status"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"CleanRoomOrganisationStatus":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /clean\_rooms/{clean\_room\_id}/datasets\_matchings

> Find datasets matchings

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets_matchings":{"get":{"description":"","parameters":[{"name":"clean_room_id","schema":{"type":"integer","format":"int64"},"style":"simple","explode":false,"required":true,"in":"path","description":"Clean room Id"},{"in":"query","explode":true,"style":"form","name":"dataset_id","schema":{"type":"integer","format":"int64"},"description":"Dataset Id","required":false},{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetType"}},"description":"Types of matched datasets to include","in":"query","explode":true,"required":false,"name":"dataset_type","style":"form"},{"in":"query","explode":true,"name":"status","schema":{"$ref":"#/components/schemas/DatasetsMatchingStatus"},"required":false,"description":"Dataset matching status","style":"form"},{"required":false,"style":"form","explode":true,"in":"query","schema":{"type":"integer","format":"int32"},"description":"Offset from which the search must be performed","name":"first_result"},{"description":"Number of maximum items that shall be return by this search","in":"query","name":"max_results","style":"form","schema":{"type":"integer","format":"int32"},"explode":true,"required":false},{"required":false,"in":"query","explode":true,"description":"Filter matchings by name or by the name of any participating dataset (case-insensitive substring match)","schema":{"type":"string"},"style":"form","name":"keywords"},{"required":false,"explode":true,"style":"form","name":"as_organisation_id","description":"View the matchings from this organisation's side. Only honoured when the caller has access to it; ignored otherwise.","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"max_results":{"type":"integer"},"total":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"count":{"type":"integer"},"first_result":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DatasetsMatchingResource"}}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Data Clean Rooms"],"operationId":"findDatasetsMatchings","summary":"Find datasets matchings"}}},"components":{"schemas":{"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"DatasetsMatchingStatus":{"type":"string","enum":["PENDING","ACTIVE","ERROR"],"readOnly":false},"DatasetsMatchingResource":{"type":"object","properties":{"refresh_frequency":{"$ref":"#/components/schemas/DatasetsMatchingRefreshFrequency"},"initiator_org_id":{"type":"string","readOnly":false},"custom_identifier_labels":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"identifiers_freshness_days":{"type":"integer","default":0,"format":"int64","readOnly":false},"name":{"type":"string","readOnly":false},"feeds":{"type":"array","items":{"$ref":"#/components/schemas/AudienceSegmentExternalFeedShortResource"},"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_refresh_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"matched_datasets":{"type":"array","items":{"$ref":"#/components/schemas/DatasetMatchedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetsMatchingStatus"},"datasets_matching_history_key_stats":{"type":"array","items":{"$ref":"#/components/schemas/DatasetsMatchingHistoryKeyStatResource"},"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"count_matched_records":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"segment_id":{"type":"string","readOnly":true},"custom_identifier_compartment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"external_dashboard_url":{"type":"string","readOnly":false},"matching_keys":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyType"},"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false}},"required":["archived","clean_room_id","created_ts","id","initiator_org_id","matched_datasets","matching_keys","name","status"]},"DatasetsMatchingRefreshFrequency":{"type":"string","enum":["DAILY","WEEKLY","FORTNIGHTLY","MONTHLY"],"readOnly":false},"AudienceSegmentExternalFeedShortResource":{"type":"object","properties":{"artifact_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"plugin_id":{"type":"string","readOnly":true},"plugin_version_id":{"type":"string","readOnly":true},"audience_segment_id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["artifact_id","audience_segment_id","id","plugin_id","plugin_version_id"]},"DatasetMatchedResource":{"type":"object","properties":{"dataset":{"$ref":"#/components/schemas/DatasetSharedResource"},"organisation_id":{"type":"string","readOnly":true},"dataset_update_id":{"type":"string","readOnly":true},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"dataset_id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["clean_room_id","created_ts","dataset_id","dataset_update_id","expiration_ts","organisation_id"]},"DatasetSharedResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetSharedResource","SEGMENT":"#/components/schemas/SegmentDatasetSharedResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetSharedResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetSharedResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetSharedResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"type":{"$ref":"#/components/schemas/DatasetType"},"organisation_id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetPropertySharedResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"SegmentDatasetSharedResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"organisation_name":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"organisation_id":{"type":"string","readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"name":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetSharedResource":{"type":"object","properties":{"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"source":{"$ref":"#/components/schemas/DatasetSource"}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"DatasetsMatchingHistoryKeyStatResource":{"type":"object","properties":{"related_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_name":{"type":"string","readOnly":true},"common_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_id":{"type":"string","readOnly":true},"matching_key_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"datasets_matching_history_id":{"type":"string","readOnly":true}},"required":["datasets_matching_history_id","matching_key_type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /clean\_rooms/{clean\_room\_id}/datasets\_matchings

> Create datasets matching

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets_matchings":{"post":{"tags":["Data Clean Rooms"],"operationId":"createDatasetsMatching","summary":"Create datasets matching","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatasetsMatchingResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"requestBody":{"description":"Infos to create datasets matching","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetsMatchingResource"}}},"required":true},"description":"","parameters":[{"style":"simple","description":"Clean room Id","explode":false,"schema":{"type":"integer","format":"int64"},"in":"path","name":"clean_room_id","required":true}]}}},"components":{"schemas":{"DatasetsMatchingResource":{"type":"object","properties":{"refresh_frequency":{"$ref":"#/components/schemas/DatasetsMatchingRefreshFrequency"},"initiator_org_id":{"type":"string","readOnly":false},"custom_identifier_labels":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true},"identifiers_freshness_days":{"type":"integer","default":0,"format":"int64","readOnly":false},"name":{"type":"string","readOnly":false},"feeds":{"type":"array","items":{"$ref":"#/components/schemas/AudienceSegmentExternalFeedShortResource"},"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_refresh_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"matched_datasets":{"type":"array","items":{"$ref":"#/components/schemas/DatasetMatchedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetsMatchingStatus"},"datasets_matching_history_key_stats":{"type":"array","items":{"$ref":"#/components/schemas/DatasetsMatchingHistoryKeyStatResource"},"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"count_matched_records":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"segment_id":{"type":"string","readOnly":true},"custom_identifier_compartment_ids":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"external_dashboard_url":{"type":"string","readOnly":false},"matching_keys":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertyType"},"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":false}},"required":["archived","clean_room_id","created_ts","id","initiator_org_id","matched_datasets","matching_keys","name","status"]},"DatasetsMatchingRefreshFrequency":{"type":"string","enum":["DAILY","WEEKLY","FORTNIGHTLY","MONTHLY"],"readOnly":false},"AudienceSegmentExternalFeedShortResource":{"type":"object","properties":{"artifact_id":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"plugin_id":{"type":"string","readOnly":true},"plugin_version_id":{"type":"string","readOnly":true},"audience_segment_id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["artifact_id","audience_segment_id","id","plugin_id","plugin_version_id"]},"DatasetMatchedResource":{"type":"object","properties":{"dataset":{"$ref":"#/components/schemas/DatasetSharedResource"},"organisation_id":{"type":"string","readOnly":true},"dataset_update_id":{"type":"string","readOnly":true},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"dataset_id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["clean_room_id","created_ts","dataset_id","dataset_update_id","expiration_ts","organisation_id"]},"DatasetSharedResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetSharedResource","SEGMENT":"#/components/schemas/SegmentDatasetSharedResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetSharedResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetSharedResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetSharedResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"type":{"$ref":"#/components/schemas/DatasetType"},"organisation_id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetPropertySharedResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"SegmentDatasetSharedResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"organisation_name":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"organisation_id":{"type":"string","readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"name":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetSharedResource":{"type":"object","properties":{"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"source":{"$ref":"#/components/schemas/DatasetSource"}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"DatasetsMatchingStatus":{"type":"string","enum":["PENDING","ACTIVE","ERROR"],"readOnly":false},"DatasetsMatchingHistoryKeyStatResource":{"type":"object","properties":{"related_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_name":{"type":"string","readOnly":true},"common_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_id":{"type":"string","readOnly":true},"matching_key_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"datasets_matching_history_id":{"type":"string","readOnly":true}},"required":["datasets_matching_history_id","matching_key_type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /datasets/{dataset\_id}/updates.file

> Update dataset from file

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datasets/{dataset_id}/updates.file":{"post":{"summary":"Update dataset from file","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"array","items":{"type":"string","format":"binary"}}}}}}},"tags":["Data Clean Rooms"],"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/FileDatasetUpdateResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"parameters":[{"schema":{"type":"string"},"style":"simple","in":"path","description":"The dataset id","explode":false,"required":true,"name":"dataset_id"}],"operationId":"createFileUpdateDataset"}}},"components":{"schemas":{"FileDatasetUpdateResource":{"allOf":[{"$ref":"#/components/schemas/DatasetUpdateResource"},{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetUpdateStatus"},"file_path":{"type":"string","readOnly":false},"size":{"type":"integer","format":"int64","default":0,"readOnly":false},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"type":{"$ref":"#/components/schemas/FileDatasetUpdateType"},"last_modified_by":{"type":"string","readOnly":true},"dataset_records_count":{"type":"integer","format":"int64","default":0,"readOnly":false},"file_lines_count":{"type":"integer","format":"int64","default":0,"readOnly":false},"id":{"type":"string","readOnly":true},"error_log":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"update_records_count":{"type":"integer","format":"int64","default":0,"readOnly":false}},"required":["created_by","created_ts","dataset_records_count","file_path","id","size","status","type"]}]},"DatasetUpdateResource":{"type":"object"},"DatasetUpdateStatus":{"type":"string","enum":["PENDING","RUNNING","ACTIVE","ERROR","ARCHIVED"],"readOnly":false},"FileDatasetUpdateType":{"type":"string","enum":["FULL","INCREMENTAL"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /clean\_rooms/{clean\_room\_id}/datasets\_matchings/{datasets\_matching\_id}/history

> Search datasets matching histories

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets_matchings/{datasets_matching_id}/history":{"get":{"description":"","summary":"Search datasets matching histories","tags":["Data Clean Rooms"],"operationId":"getDatasetsMatchingHistories","parameters":[{"style":"simple","required":true,"in":"path","schema":{"type":"string"},"name":"clean_room_id","explode":false,"description":"Clean room Id"},{"description":"Datasets intersection Id","explode":false,"required":true,"in":"path","style":"simple","schema":{"type":"string"},"name":"datasets_matching_id"},{"name":"first_result","explode":true,"schema":{"type":"integer","format":"int32"},"style":"form","in":"query","description":"Offset from which the search must be performed","required":false},{"in":"query","style":"form","explode":true,"schema":{"type":"integer","format":"int32"},"name":"max_results","required":false,"description":"Number of maximum items that shall be return by this search"}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"max_results":{"type":"integer"},"total":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DatasetsMatchingHistoryResource"}},"first_result":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"DatasetsMatchingHistoryResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"datasets_matching_id":{"type":"string","readOnly":false},"created_by":{"type":"string","readOnly":true},"dataset_updates":{"type":"array","items":{"$ref":"#/components/schemas/DatasetsMatchingHistoryDatasetUpdateResource"},"readOnly":false},"matched_records":{"type":"integer","format":"int64","default":0,"readOnly":true},"error_message":{"type":"string","readOnly":true},"created_by_organisation_id":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetsMatchingHistoryStatus"},"datasets_matching_history_key_stats":{"type":"array","items":{"$ref":"#/components/schemas/DatasetsMatchingHistoryKeyStatResource"},"readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["created_ts","dataset_updates","datasets_matching_history_key_stats","datasets_matching_id","id","matched_records","status"]},"DatasetsMatchingHistoryDatasetUpdateResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":true},"dataset_records_count":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["id"]},"DatasetsMatchingHistoryStatus":{"type":"string","enum":["RUNNING","SUCCEDED","FAILED"],"readOnly":false},"DatasetsMatchingHistoryKeyStatResource":{"type":"object","properties":{"related_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_name":{"type":"string","readOnly":true},"common_identifiers_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"compartment_id":{"type":"string","readOnly":true},"matching_key_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"datasets_matching_history_id":{"type":"string","readOnly":true}},"required":["datasets_matching_history_id","matching_key_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /bunkers

> Find bunkers

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/bunkers":{"get":{"parameters":[{"description":"Organisation owning bunkers","name":"organisation_id","schema":{"type":"integer","format":"int64"},"explode":true,"style":"form","required":true,"in":"query"},{"in":"query","name":"archived","description":"If true the result will contain only archived bunkers","explode":true,"style":"form","schema":{"type":"boolean"},"required":false},{"description":"Offset from which the search must be performed","style":"form","required":false,"in":"query","schema":{"type":"integer","format":"int32"},"name":"first_result","explode":true},{"required":false,"description":"Number of maximum items that shall be return by this search","style":"form","explode":true,"schema":{"type":"integer","format":"int32"},"name":"max_results","in":"query"}],"summary":"Find bunkers","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"first_result":{"type":"integer"},"total":{"type":"integer"},"count":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/BunkerResource"}},"status":{"type":"string","enum":["ok"]},"max_results":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Data Clean Rooms"],"operationId":"findBunkers","description":""}}},"components":{"schemas":{"BunkerResource":{"oneOf":[{"$ref":"#/components/schemas/BunkerWithDatamartResource"},{"$ref":"#/components/schemas/StandaloneBunkerResource"}]},"BunkerWithDatamartResource":{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":true},"organisation_id":{"type":"string","readOnly":false},"is_initialized":{"type":"boolean","default":false,"readOnly":true},"archived_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":false},"last_state_refresh":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true}},"required":["archived","created_by","created_ts","datamart_id","id","is_initialized","name","organisation_id"]},"StandaloneBunkerResource":{"type":"object","properties":{"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"is_initialized":{"type":"boolean","default":false,"readOnly":true},"created_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true}},"required":["archived","created_by","created_ts","id","is_initialized","name","organisation_id"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /bunkers

> Create bunker

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/bunkers":{"post":{"operationId":"createBunker","summary":"Create bunker","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/BunkerResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","requestBody":{"description":"Infos to create bunker","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BunkerResource"}}},"required":true},"tags":["Data Clean Rooms"]}}},"components":{"schemas":{"BunkerResource":{"oneOf":[{"$ref":"#/components/schemas/BunkerWithDatamartResource"},{"$ref":"#/components/schemas/StandaloneBunkerResource"}]},"BunkerWithDatamartResource":{"type":"object","properties":{"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"name":{"type":"string","readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":true},"organisation_id":{"type":"string","readOnly":false},"is_initialized":{"type":"boolean","default":false,"readOnly":true},"archived_by":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"created_by":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":false},"last_state_refresh":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true}},"required":["archived","created_by","created_ts","datamart_id","id","is_initialized","name","organisation_id"]},"StandaloneBunkerResource":{"type":"object","properties":{"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_by":{"type":"string","readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"id":{"type":"string","readOnly":true},"organisation_id":{"type":"string","readOnly":false},"name":{"type":"string","readOnly":false},"is_initialized":{"type":"boolean","default":false,"readOnly":true},"created_by":{"type":"string","readOnly":true},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"archived":{"type":"boolean","default":false,"readOnly":true}},"required":["archived","created_by","created_ts","id","is_initialized","name","organisation_id"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /clean\_rooms/{clean\_room\_id}/datasets/{dataset\_id}

> Update the purposes of a shared dataset in a clean room

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets/{dataset_id}":{"put":{"requestBody":{"description":"Purposes that should be added to the shared datasets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCleanRoomResource"}}},"required":true},"operationId":"updateDatasetCleanRoom","parameters":[{"description":"Clean room owning datasets","schema":{"type":"string"},"explode":false,"in":"path","name":"clean_room_id","required":true,"style":"simple"},{"explode":false,"in":"path","style":"simple","schema":{"type":"string"},"description":"The dataset id","name":"dataset_id","required":true}],"summary":"Update the purposes of a shared dataset in a clean room","description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/DatasetCleanRoomResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"tags":["Data Clean Rooms"]}}},"components":{"schemas":{"DatasetCleanRoomResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"archived":{"type":"boolean","default":false,"readOnly":false},"dataset_id":{"type":"string","readOnly":false},"purposes":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCleanRoomPurpose"},"readOnly":false},"created_by":{"type":"string","readOnly":true},"clean_room_id":{"type":"string","readOnly":false},"last_modified_by":{"type":"string","readOnly":true},"dataset":{"$ref":"#/components/schemas/DatasetSharedResource"},"archived_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"last_modified_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"archived_by":{"type":"string","readOnly":true},"created_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["archived","clean_room_id","created_ts","dataset_id","expiration_ts","organisation_id"]},"DatasetCleanRoomPurpose":{"type":"string","enum":["ACTIVATION","ENRICHMENT","INSIGHTS"],"readOnly":false},"DatasetSharedResource":{"discriminator":{"propertyName":"type","mapping":{"USER_PROFILE":"#/components/schemas/UserProfileDatasetSharedResource","SEGMENT":"#/components/schemas/SegmentDatasetSharedResource","SEGMENT_CATALOG":"#/components/schemas/SegmentCatalogDatasetSharedResource"}},"oneOf":[{"$ref":"#/components/schemas/UserProfileDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentDatasetSharedResource"},{"$ref":"#/components/schemas/SegmentCatalogDatasetSharedResource"}],"properties":{"type":{"type":"string","enum":["USER_PROFILE","SEGMENT","SEGMENT_CATALOG"]}},"required":["type"]},"UserProfileDatasetSharedResource":{"type":"object","properties":{"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"type":{"$ref":"#/components/schemas/DatasetType"},"organisation_id":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"description":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"DatasetPropertySharedResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"property_type":{"$ref":"#/components/schemas/DatasetPropertyType"},"position":{"type":"integer","format":"int32","default":0,"readOnly":false},"name":{"type":"string","readOnly":false},"matching_key":{"type":"boolean","default":false,"readOnly":false}},"required":["id","matching_key","name","position","property_type"]},"DatasetPropertyType":{"type":"string","enum":["EMAIL","EMAIL_HASH","MOBILE_PHONE_NUMBER","COOKIE_ID","ANDROID_TV_ADVERTISING_ID","APPLE_TV_ADVERTISING_ID","AMAZON_TV_ADVERTISING_ID","TIZEN_TV_ADVERTISING_ID","ANDROID_MOBILE_ADVERTISING_ID","APPLE_MOBILE_ADVERTISING_ID","ID5_UNIVERSAL_ID_DECYPHERED","ID5_UNIVERSAL_ID_CYPHERED","FIRST_ID","CUSTOM_IDENTIFIER","UTIQ_MARTECHPASS","GENDER","DATE_OF_BIRTH","YEAR_OF_BIRTH","AGE","AGE_RANGE","LANGUAGE","HOUSEHOLD_INCOME_RANGE","HOUSEHOLD_INCOME_AMOUNT","SOCIOTYPE","PARENTAL_STATUS","COUNTRY","REGION","DEPARTMENT","POSTCODE","CITY","INTEREST_CATEGORY","INTEREST_SUB_CATEGORY","INTEREST_LABEL","PURCHASE_INTENT_CATEGORY","PURCHASE_INTENT_SUB_CATEGORY","PURCHASE_INTENT_LABEL","FREQUENCY","RECENCY","AMOUNT","RFM_SEGMENTATION","DEVICE","BRAND","AGENT","BROWSER","OS","BOOLEAN","DATE","NUMERIC","STRING","allIdentifiers"],"readOnly":false},"DatasetStatus":{"type":"string","enum":["SYNCHRONIZATION_PENDING","UPDATE_IN_PROGRESS","ACTIVE","ACTIVE_LAST_UPDATE_ERROR","ERROR"],"readOnly":false},"DatasetType":{"type":"string","enum":["SEGMENT","SEGMENT_CATALOG","USER_PROFILE","CAMPAIGN_LOG","TRANSACTION_LOG"],"readOnly":false},"DatasetSource":{"type":"string","enum":["FILE","DATAMART","DATA_WAREHOUSE","CUSTOM","CLEAN_ROOM"],"readOnly":false},"SegmentDatasetSharedResource":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/DatasetType"},"description":{"type":"string","readOnly":true},"id":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"organisation_name":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"organisation_id":{"type":"string","readOnly":true},"source":{"$ref":"#/components/schemas/DatasetSource"},"name":{"type":"string","readOnly":true},"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"SegmentCatalogDatasetSharedResource":{"type":"object","properties":{"records_count":{"type":"integer","format":"int64","default":0,"readOnly":true},"properties":{"type":"array","items":{"$ref":"#/components/schemas/DatasetPropertySharedResource"},"readOnly":true},"description":{"type":"string","readOnly":true},"organisation_name":{"type":"string","readOnly":true},"expiration_ts":{"type":"integer","format":"int64","default":0,"readOnly":true},"organisation_id":{"type":"string","readOnly":true},"status":{"$ref":"#/components/schemas/DatasetStatus"},"id":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/DatasetType"},"source":{"$ref":"#/components/schemas/DatasetSource"}},"required":["expiration_ts","id","name","organisation_id","organisation_name","properties","source","status","type"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /clean\_rooms/{clean\_room\_id}/datasets/{dataset\_id}

> Stop sharing the dataset in the clean room

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Data Clean Rooms","description":"Operations related to Data Clean Rooms, the secure environments for privacy-safe data collaboration and analysis between multiple parties without sharing raw user data. Enables dataset onboarding, overlap analysis, differential privacy-protected insights generation, and activation of matched audiences (common and exclusive users) on authorized platforms while maintaining strict data confidentiality and GDPR compliance."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/clean_rooms/{clean_room_id}/datasets/{dataset_id}":{"delete":{"parameters":[{"style":"simple","explode":false,"schema":{"type":"string"},"in":"path","required":true,"name":"clean_room_id","description":"Clean room owning datasets"},{"style":"simple","name":"dataset_id","required":true,"description":"The dataset id","in":"path","schema":{"type":"string"},"explode":false}],"responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":"","operationId":"stopSharingDataset","summary":"Stop sharing the dataset in the clean room","tags":["Data Clean Rooms"]}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/api-reference/data-clean-rooms.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
