> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/api/references/protect/custom-maskings.md).

# Custom Maskings

Manage custom maskings.

## List custom maskings

> Lists all custom maskings.

```json
{"openapi":"3.0.3","info":{"title":"Collibra Protect API","version":"1.0.0"},"tags":[{"name":"Custom Maskings","description":"Manage custom maskings."}],"servers":[{"url":"/rest/protect/v1"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"Collibra REST API authentication using Basic Authentication."},"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Collibra REST API authentication using JSON Web Token."}},"parameters":{"Limit":{"name":"limit","in":"query","description":"This is the maximum number of results that may be returned. Fewer may be returned than the value of <code>limit</code>.\n\nDo not depend on the number of results being fewer than the <code>limit</code> value\nto indicate that your query reached the end of the list of data, use the absence of <code>after</code> (see Cursors) instead.\nFor example, if you set <code>limit</code> to 10 and 9 results are returned, there may be more data available.\n\nIf not set, the default limit (limit = <code>25</code>) will be used. The maximum value for this parameter is <code>500</code>.\n","schema":{"type":"integer","default":25,"minimum":1,"maximum":500}},"After":{"name":"after","in":"query","description":"This is the cursor that points to the end of the page of data that has been returned.","schema":{"type":"string","nullable":true}}},"responses":{"ListCustomMaskings200":{"description":"The list of custom maskings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedCustomMaskings"}}}},"InvalidRequest400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest401":{"description":"The client is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest403":{"description":"The user lacks permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest500":{"description":"An unexpected error has occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}},"schemas":{"PagedCustomMaskings":{"description":"A page of custom maskings.","type":"object","properties":{"cursors":{"$ref":"#/components/schemas/Cursors"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CustomMasking"}}},"required":["cursors","results"]},"Cursors":{"description":"A cursor refers to a random string of characters which marks a specific item in a list of data.\nThe cursor will always point to the item, however it will be invalidated if the item is deleted or removed.\nTherefore, your app shouldn't store cursors or assume that they will be valid in the future.\n","type":"object","properties":{"after":{"description":"This is the cursor that points to the end of the page of data that has been returned.","type":"string"}}},"CustomMasking":{"allOf":[{"$ref":"#/components/schemas/EditableCustomMasking"},{"type":"object","properties":{"id":{"description":"The ID of the masking.","type":"string","format":"uuid"},"createdBy":{"description":"ID of the Collibra user who created this custom mapping.","type":"string","format":"uuid"},"createdOn":{"description":"The timestamp of when this custom mapping was created","type":"integer","format":"int64"},"lastModifiedBy":{"description":"ID of the Collibra user who last updated this custom mapping.","type":"string","format":"uuid"},"lastModifiedOn":{"description":"The timestamp of when this custom mapping was last updated.","type":"integer","format":"int64"}},"required":["id","createdBy","createdOn","lastModifiedBy","lastModifiedOn"]}]},"EditableCustomMasking":{"type":"object","properties":{"name":{"description":"The name of the custom masking.","type":"string"},"mappings":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ProviderMaskingMappings"}}},"required":["name","mappings"]},"ProviderMaskingMappings":{"description":"This dictionary describes a list of mappings of data types and the function name used to provide custom mapping for one provider (Snowflake, GoogleBigQuery, or AWSLakeFormation).","type":"object","properties":{"provider":{"$ref":"#/components/schemas/Provider"},"mappings":{"type":"array","items":{"$ref":"#/components/schemas/MaskingMapping"}}},"required":["provider","mappings"]},"Provider":{"type":"string","description":"Value must be \"Snowflake\", \"GoogleBigQuery, or \"AWSLakeFormation\""},"MaskingMapping":{"description":"a mapping of the data type and function name used to provide the custom mapping.","properties":{"dataType":{"type":"string","description":"The name of the data type (String, Number, Date ...). Data types name depend on the provider, a list of compatible types per provider is available in the documentation."},"functionName":{"type":"string","description":"The name of the function that will be used on the provider to provide the custom masking."}},"required":["dataType","functionName"]},"StandardErrorResponse":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP response code"},"titleMessage":{"type":"string","description":"The title of the error message."},"helpMessage":{"type":"string","description":"A message containing actions you can take regarding the error."},"userMessage":{"type":"string","description":"A user friendly error message."},"errorCode":{"type":"string","description":"An error code identifier."}},"required":["statusCode","userMessage"]}}},"paths":{"/customMaskings":{"get":{"tags":["Custom Maskings"],"summary":"List custom maskings","description":"Lists all custom maskings.","operationId":"listCustomMaskings","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"$ref":"#/components/responses/ListCustomMaskings200"},"400":{"$ref":"#/components/responses/InvalidRequest400"},"401":{"$ref":"#/components/responses/InvalidRequest401"},"403":{"$ref":"#/components/responses/InvalidRequest403"},"500":{"$ref":"#/components/responses/InvalidRequest500"}}}}}}
```

## Add a new custom masking

> Adds a new custom masking.

```json
{"openapi":"3.0.3","info":{"title":"Collibra Protect API","version":"1.0.0"},"tags":[{"name":"Custom Maskings","description":"Manage custom maskings."}],"servers":[{"url":"/rest/protect/v1"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"Collibra REST API authentication using Basic Authentication."},"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Collibra REST API authentication using JSON Web Token."}},"schemas":{"AddCustomMaskingRequest":{"allOf":[{"$ref":"#/components/schemas/EditableCustomMasking"}]},"EditableCustomMasking":{"type":"object","properties":{"name":{"description":"The name of the custom masking.","type":"string"},"mappings":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ProviderMaskingMappings"}}},"required":["name","mappings"]},"ProviderMaskingMappings":{"description":"This dictionary describes a list of mappings of data types and the function name used to provide custom mapping for one provider (Snowflake, GoogleBigQuery, or AWSLakeFormation).","type":"object","properties":{"provider":{"$ref":"#/components/schemas/Provider"},"mappings":{"type":"array","items":{"$ref":"#/components/schemas/MaskingMapping"}}},"required":["provider","mappings"]},"Provider":{"type":"string","description":"Value must be \"Snowflake\", \"GoogleBigQuery, or \"AWSLakeFormation\""},"MaskingMapping":{"description":"a mapping of the data type and function name used to provide the custom mapping.","properties":{"dataType":{"type":"string","description":"The name of the data type (String, Number, Date ...). Data types name depend on the provider, a list of compatible types per provider is available in the documentation."},"functionName":{"type":"string","description":"The name of the function that will be used on the provider to provide the custom masking."}},"required":["dataType","functionName"]},"CustomMasking":{"allOf":[{"$ref":"#/components/schemas/EditableCustomMasking"},{"type":"object","properties":{"id":{"description":"The ID of the masking.","type":"string","format":"uuid"},"createdBy":{"description":"ID of the Collibra user who created this custom mapping.","type":"string","format":"uuid"},"createdOn":{"description":"The timestamp of when this custom mapping was created","type":"integer","format":"int64"},"lastModifiedBy":{"description":"ID of the Collibra user who last updated this custom mapping.","type":"string","format":"uuid"},"lastModifiedOn":{"description":"The timestamp of when this custom mapping was last updated.","type":"integer","format":"int64"}},"required":["id","createdBy","createdOn","lastModifiedBy","lastModifiedOn"]}]},"StandardErrorResponse":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP response code"},"titleMessage":{"type":"string","description":"The title of the error message."},"helpMessage":{"type":"string","description":"A message containing actions you can take regarding the error."},"userMessage":{"type":"string","description":"A user friendly error message."},"errorCode":{"type":"string","description":"An error code identifier."}},"required":["statusCode","userMessage"]}},"responses":{"InvalidRequest400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest401":{"description":"The client is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest403":{"description":"The user lacks permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest409":{"description":"Conflicts found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest500":{"description":"An unexpected error has occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}},"paths":{"/customMaskings":{"post":{"tags":["Custom Maskings"],"summary":"Add a new custom masking","description":"Adds a new custom masking.","operationId":"addCustomMasking","requestBody":{"description":"The new custom masking you want to add.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCustomMaskingRequest"}}}},"responses":{"201":{"description":"The custom masking has been added.","headers":{"Location":{"description":"The URL of the newly added custom masking.","schema":{"type":"string","format":"uri"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomMasking"}}}},"400":{"$ref":"#/components/responses/InvalidRequest400"},"401":{"$ref":"#/components/responses/InvalidRequest401"},"403":{"$ref":"#/components/responses/InvalidRequest403"},"409":{"$ref":"#/components/responses/InvalidRequest409"},"500":{"$ref":"#/components/responses/InvalidRequest500"}}}}}}
```

## Retrieve a custom masking

> Returns information about the custom masking with the specified ID.

```json
{"openapi":"3.0.3","info":{"title":"Collibra Protect API","version":"1.0.0"},"tags":[{"name":"Custom Maskings","description":"Manage custom maskings."}],"servers":[{"url":"/rest/protect/v1"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"Collibra REST API authentication using Basic Authentication."},"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Collibra REST API authentication using JSON Web Token."}},"schemas":{"CustomMasking":{"allOf":[{"$ref":"#/components/schemas/EditableCustomMasking"},{"type":"object","properties":{"id":{"description":"The ID of the masking.","type":"string","format":"uuid"},"createdBy":{"description":"ID of the Collibra user who created this custom mapping.","type":"string","format":"uuid"},"createdOn":{"description":"The timestamp of when this custom mapping was created","type":"integer","format":"int64"},"lastModifiedBy":{"description":"ID of the Collibra user who last updated this custom mapping.","type":"string","format":"uuid"},"lastModifiedOn":{"description":"The timestamp of when this custom mapping was last updated.","type":"integer","format":"int64"}},"required":["id","createdBy","createdOn","lastModifiedBy","lastModifiedOn"]}]},"EditableCustomMasking":{"type":"object","properties":{"name":{"description":"The name of the custom masking.","type":"string"},"mappings":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ProviderMaskingMappings"}}},"required":["name","mappings"]},"ProviderMaskingMappings":{"description":"This dictionary describes a list of mappings of data types and the function name used to provide custom mapping for one provider (Snowflake, GoogleBigQuery, or AWSLakeFormation).","type":"object","properties":{"provider":{"$ref":"#/components/schemas/Provider"},"mappings":{"type":"array","items":{"$ref":"#/components/schemas/MaskingMapping"}}},"required":["provider","mappings"]},"Provider":{"type":"string","description":"Value must be \"Snowflake\", \"GoogleBigQuery, or \"AWSLakeFormation\""},"MaskingMapping":{"description":"a mapping of the data type and function name used to provide the custom mapping.","properties":{"dataType":{"type":"string","description":"The name of the data type (String, Number, Date ...). Data types name depend on the provider, a list of compatible types per provider is available in the documentation."},"functionName":{"type":"string","description":"The name of the function that will be used on the provider to provide the custom masking."}},"required":["dataType","functionName"]},"StandardErrorResponse":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP response code"},"titleMessage":{"type":"string","description":"The title of the error message."},"helpMessage":{"type":"string","description":"A message containing actions you can take regarding the error."},"userMessage":{"type":"string","description":"A user friendly error message."},"errorCode":{"type":"string","description":"An error code identifier."}},"required":["statusCode","userMessage"]}},"responses":{"InvalidRequest400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest401":{"description":"The client is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest403":{"description":"The user lacks permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest500":{"description":"An unexpected error has occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}},"paths":{"/customMaskings/{id}":{"get":{"tags":["Custom Maskings"],"summary":"Retrieve a custom masking","description":"Returns information about the custom masking with the specified ID.","operationId":"getCustomMasking","parameters":[{"in":"path","description":"The universally unique identifier (UUID) of the custom masking.","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The custom masking with the specified ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomMasking"}}}},"400":{"$ref":"#/components/responses/InvalidRequest400"},"401":{"$ref":"#/components/responses/InvalidRequest401"},"403":{"$ref":"#/components/responses/InvalidRequest403"},"404":{"$ref":"#/components/responses/InvalidRequest404"},"500":{"$ref":"#/components/responses/InvalidRequest500"}}}}}}
```

## Delete a custom masking

> Deletes the custom masking with the specified ID.

```json
{"openapi":"3.0.3","info":{"title":"Collibra Protect API","version":"1.0.0"},"tags":[{"name":"Custom Maskings","description":"Manage custom maskings."}],"servers":[{"url":"/rest/protect/v1"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"Collibra REST API authentication using Basic Authentication."},"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Collibra REST API authentication using JSON Web Token."}},"responses":{"InvalidRequest400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest401":{"description":"The client is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest403":{"description":"The user lacks permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest500":{"description":"An unexpected error has occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}},"schemas":{"StandardErrorResponse":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP response code"},"titleMessage":{"type":"string","description":"The title of the error message."},"helpMessage":{"type":"string","description":"A message containing actions you can take regarding the error."},"userMessage":{"type":"string","description":"A user friendly error message."},"errorCode":{"type":"string","description":"An error code identifier."}},"required":["statusCode","userMessage"]}}},"paths":{"/customMaskings/{id}":{"delete":{"tags":["Custom Maskings"],"summary":"Delete a custom masking","description":"Deletes the custom masking with the specified ID.","operationId":"deleteCustomMasking","parameters":[{"in":"path","description":"The universally unique identifier (UUID) of the custom masking.","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"The custom masking has been deleted."},"400":{"$ref":"#/components/responses/InvalidRequest400"},"401":{"$ref":"#/components/responses/InvalidRequest401"},"403":{"$ref":"#/components/responses/InvalidRequest403"},"404":{"$ref":"#/components/responses/InvalidRequest404"},"500":{"$ref":"#/components/responses/InvalidRequest500"}}}}}}
```

## Update a custom masking

> Updates the custom masking with the specified ID.

```json
{"openapi":"3.0.3","info":{"title":"Collibra Protect API","version":"1.0.0"},"tags":[{"name":"Custom Maskings","description":"Manage custom maskings."}],"servers":[{"url":"/rest/protect/v1"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"Collibra REST API authentication using Basic Authentication."},"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Collibra REST API authentication using JSON Web Token."}},"schemas":{"ChangeCustomMaskingRequest":{"type":"object","properties":{"name":{"description":"The name of the custom masking.","type":"string"},"mappings":{"type":"array","items":{"$ref":"#/components/schemas/ProviderMaskingMappings"}}}},"ProviderMaskingMappings":{"description":"This dictionary describes a list of mappings of data types and the function name used to provide custom mapping for one provider (Snowflake, GoogleBigQuery, or AWSLakeFormation).","type":"object","properties":{"provider":{"$ref":"#/components/schemas/Provider"},"mappings":{"type":"array","items":{"$ref":"#/components/schemas/MaskingMapping"}}},"required":["provider","mappings"]},"Provider":{"type":"string","description":"Value must be \"Snowflake\", \"GoogleBigQuery, or \"AWSLakeFormation\""},"MaskingMapping":{"description":"a mapping of the data type and function name used to provide the custom mapping.","properties":{"dataType":{"type":"string","description":"The name of the data type (String, Number, Date ...). Data types name depend on the provider, a list of compatible types per provider is available in the documentation."},"functionName":{"type":"string","description":"The name of the function that will be used on the provider to provide the custom masking."}},"required":["dataType","functionName"]},"CustomMasking":{"allOf":[{"$ref":"#/components/schemas/EditableCustomMasking"},{"type":"object","properties":{"id":{"description":"The ID of the masking.","type":"string","format":"uuid"},"createdBy":{"description":"ID of the Collibra user who created this custom mapping.","type":"string","format":"uuid"},"createdOn":{"description":"The timestamp of when this custom mapping was created","type":"integer","format":"int64"},"lastModifiedBy":{"description":"ID of the Collibra user who last updated this custom mapping.","type":"string","format":"uuid"},"lastModifiedOn":{"description":"The timestamp of when this custom mapping was last updated.","type":"integer","format":"int64"}},"required":["id","createdBy","createdOn","lastModifiedBy","lastModifiedOn"]}]},"EditableCustomMasking":{"type":"object","properties":{"name":{"description":"The name of the custom masking.","type":"string"},"mappings":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ProviderMaskingMappings"}}},"required":["name","mappings"]},"StandardErrorResponse":{"type":"object","properties":{"statusCode":{"type":"integer","description":"HTTP response code"},"titleMessage":{"type":"string","description":"The title of the error message."},"helpMessage":{"type":"string","description":"A message containing actions you can take regarding the error."},"userMessage":{"type":"string","description":"A user friendly error message."},"errorCode":{"type":"string","description":"An error code identifier."}},"required":["statusCode","userMessage"]}},"responses":{"InvalidRequest400":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest401":{"description":"The client is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest403":{"description":"The user lacks permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest409":{"description":"Conflicts found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InvalidRequest500":{"description":"An unexpected error has occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}},"paths":{"/customMaskings/{id}":{"patch":{"tags":["Custom Maskings"],"summary":"Update a custom masking","description":"Updates the custom masking with the specified ID.","operationId":"patchCustomMasking","parameters":[{"in":"path","description":"The universally unique identifier (UUID) of the custom masking.","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The changes that need to be applied to the custom masking.","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeCustomMaskingRequest"}}}},"responses":{"200":{"description":"The custom masking has been updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomMasking"}}}},"400":{"$ref":"#/components/responses/InvalidRequest400"},"401":{"$ref":"#/components/responses/InvalidRequest401"},"403":{"$ref":"#/components/responses/InvalidRequest403"},"404":{"$ref":"#/components/responses/InvalidRequest404"},"409":{"$ref":"#/components/responses/InvalidRequest409"},"500":{"$ref":"#/components/responses/InvalidRequest500"}}}}}}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.collibra.com/api/references/protect/custom-maskings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
