# Create Dictionary

## Create a dictionary

> Creates a dictionary with basic metadata and no content. Only "name" and "type" field is used to create a new dictionary entry.<br>

```json
{"openapi":"3.0.1","info":{"title":"Agent API","version":"25.8.1"},"servers":[{"url":"youragentURL.symphony.com/agent"}],"paths":{"/v1/dlp/dictionaries":{"post":{"tags":["DLP Policies and Dictionary Management"],"summary":"Create a dictionary","description":"Creates a dictionary with basic metadata and no content. Only \"name\" and \"type\" field is used to create a new dictionary entry.\n","parameters":[{"name":"sessionToken","in":"header","description":"Session authentication token.","required":true,"schema":{"type":"string"}},{"name":"keyManagerToken","in":"header","description":"Key Manager authentication token.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1DLPDictionaryMetadataCreateRequest"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1DLPDictionaryMetadataResponse"}}}},"400":{"description":"Client error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized: Session tokens invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden: Caller lacks necessary entitlement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"V1DLPDictionaryMetadataCreateRequest":{"required":["name","type"],"type":"object","properties":{"name":{"type":"string","description":"The name of dictionary\n"},"type":{"type":"string","description":"The type of dictionary, which specify the content is a list of words or a list of regexes.\nBy default set to \"Word\" if not specified. Possible values - Word, Regex\n"}},"description":"Dictionary's metadata (excluding content) to use for dictionary create operations."},"V1DLPDictionaryMetadataResponse":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/V1DLPDictionaryMetadata"}},"description":"Dictionary response containing dictionary metadata."},"V1DLPDictionaryMetadata":{"required":["dictRef","type"],"type":"object","properties":{"creationDate":{"type":"integer","description":"Creation time of the dictionary in milliseconds elapsed as of epoch time.","format":"int64"},"creatorId":{"type":"string","description":"Numeric userId of the creator"},"dictRef":{"$ref":"#/components/schemas/V1DLPDictionaryRef"},"lastUpdatedDate":{"type":"integer","description":"The recent update time of the dictionary in milliseconds","format":"int64"},"type":{"type":"string","description":"The type of dictionary, which specify the content is a list of words or a list of regexes.\nBy default set to \"Word\" if not specified. Possible values - Word, Regex\n"}},"description":"Dictionary's metadata (excluding content)"},"V1DLPDictionaryRef":{"required":["name"],"type":"object","properties":{"dictId":{"type":"string","description":"Unique dictionary id"},"name":{"type":"string","description":"Unique name of a dictionary, max 30 characters, with trimmed leading and trailing blank spaces."},"version":{"type":"string","description":"The version of a dictionary, in format \"major.minor\".\nInitial value will set by backend as \"1.0\" when created.\nWhenever the dictionary version needs to be changed, the minor version by 1 unless minor == 999, then the major version is increased by 1 until it reaches 999.\n"}},"description":"Basic information needed to identify a dictionary"},"Error":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}
```

Call this endpoint to create a new dictionary without any terms, then call [Upload Dictionary Content](/main/dlp-dictionary-and-policy-management/dictionary-management-endpoints/upload-dictionary-content.md) upload an associated dictionary file.

> #### 🚧 Required Permissions
>
> Calling this endpoint requires a Service User Account set with the Expression Filter Policy Management role. For more information about Service User accounts and their roles, see the [Symphony Administration Guide](https://symphony.direct/).
>
> See [Bot Permissions](https://docs.developers.symphony.com/building-bots-on-symphony/configuration/bot-permissions) for a list of roles and associated privileges.


---

# Agent Instructions: 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://rest-api.symphony.com/main/dlp-dictionary-and-policy-management/dictionary-management-endpoints/create-dictionary.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.
