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

# Hashtags

Hashtag related APIs

## Knowledge Base Auto Hashtag Feedback (Classification)

> This API allows you to approve or decline auto-classification hashtags for documents.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.\
> \
> \## Request Body\
> \
> \- autoHashtagFeedbacks (array\[object], required): A list of feedback objects, each containing:\
> &#x20; \- id (string, required): The ID of the auto hashtag to update.\
> &#x20; \- state (string, required): The state to set. Must be one of \`accepted\`, \`declined\`, or \`suggested\`.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"Hashtags","description":"Hashtag related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/kb_auto_hashtag_feedback":{"post":{"tags":["Hashtags"],"operationId":"kbAutoHashtagFeedback","summary":"Knowledge Base Auto Hashtag Feedback (Classification)","description":"This API allows you to approve or decline auto-classification hashtags for documents.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n\n## Request Body\n\n- autoHashtagFeedbacks (array[object], required): A list of feedback objects, each containing:\n  - id (string, required): The ID of the auto hashtag to update.\n  - state (string, required): The state to set. Must be one of `accepted`, `declined`, or `suggested`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoHashtagFeedbacks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the hashtag to update"},"state":{"type":"string","description":"The state to set for the hashtag. Can be one of 'accepted', 'declined', 'suggested'"}}}}}}}}},"responses":{"200":{"description":"Auto hashtag feedback submitted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the hashtag that was updated"},"state":{"type":"string","description":"The hashtag's new state. Will be one of \"suggested\", \"approved\", \"declined\""}}}}}}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Get All Hashtags

> This API allows you to retrieve all hashtags from both Q\&As and Knowledge Bases with their usage counts.\
> \
> \## Headers\
> \
> \- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\
> \- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\
> \- USER-EMAIL (string, optional): The email address to associate with the user.\
> \- OWN-USER-ID (string, optional): The user ID to identify or create a user.<br>

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"Hashtags","description":"Hashtag related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/hashtags":{"get":{"tags":["Hashtags"],"operationId":"getHashtags","summary":"Get All Hashtags","description":"This API allows you to retrieve all hashtags from both Q&As and Knowledge Bases with their usage counts.\n\n## Headers\n\n- API-KEY (string, required): Your assigned API key. You can find it in the Settings menu of the dashboard.\n- AGENT-EMAIL (string, optional): The email address of the agent performing the API call.\n- USER-EMAIL (string, optional): The email address to associate with the user.\n- OWN-USER-ID (string, optional): The user ID to identify or create a user.\n","responses":{"200":{"description":"Successfully retrieved hashtags","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","additionalProperties":{"type":"integer"},"description":"A mapping of hashtag names to their count of uses"}}}}}},"400":{"description":"Invalid request parameters."},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```

## Knowledge Base Auto Hashtag (Classification)

> This API lets you get the hashtag list with classification keywords for the documents

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"Hashtags","description":"Hashtag related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"},{"url":"https://backend-ja.alli.ai","description":"JA"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}}},"paths":{"/webapi/kb_auto_hashtag":{"post":{"tags":["Hashtags"],"operationId":"kbAutoHashtag","summary":"Knowledge Base Auto Hashtag (Classification)","description":"This API lets you get the hashtag list with classification keywords for the documents","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","description":"The document ids you want to retrieve auto hashtags for"}}}}}},"responses":{"200":{"description":"Auto hashtags retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"updated":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the Document to which the hashtags correspond"},"autoHashtags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the hashtag"},"state":{"type":"string","description":"Status of hashtag, one of \"SUGGESTED\", \"APPROVED\", \"DECLINED\""},"bestConfidence":{"type":"number","description":"Numerical confidence of this auto-generated hashtag from 0 to 1"},"autoHashtag":{"type":"object","properties":{"hashtag":{"type":"string","description":"String value of hashtag (displayed in Dashboard)"}}}}}}}}}}},"errors":{"type":"object","nullable":true}}}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Authentication failed. The API-KEY header is missing or invalid."},"403":{"description":"Access denied. The project is inactive or the request IP is not allowed."},"500":{"description":"Internal server error."}},"parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}]}}}}
```
