# Assign Client Tag to User

## Create client tag mapping

> Create a mapping between client tags and clients

```json
{"openapi":"3.0.3","info":{"title":"Manta OpenAPI","version":"0.318.0"},"tags":[{"name":"ClientTags","description":"Client tags management and mapping"}],"servers":[{"url":"https://mantago.cc/api","description":"MantaGo Openapi host url"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token for API authentication"}},"schemas":{"ClientTagMappingRequest":{"type":"object","properties":{"secret":{"type":"string","description":"Secret key for API authentication"},"tagId":{"type":"string","description":"The client tag ID"},"clientId":{"type":"string","description":"The client ID (required if platform + platformClientId not provided)"},"platform":{"type":"string","enum":["line","facebook","instagram","liveChat","whatsapp"],"description":"Platform type (required if platformClientId provided)"},"platformClientId":{"type":"string","description":"Platform-specific client ID (required if clientId not provided)"}},"required":["secret","tagId"],"description":"Client identification rules:\n- Either provide 'clientId' OR both 'platform' and 'platformClientId'\n"},"BasicSuccessResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean"},"errResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"},"botId":{"type":"string"}},"required":["message","code"]}},"required":["success","errResponse"]}},"responses":{"TokenError":{"description":"JWT token is invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimitError":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/openapi/clientTagMapping":{"post":{"tags":["ClientTags"],"summary":"Create client tag mapping","description":"Create a mapping between client tags and clients","parameters":[{"name":"botId","in":"query","required":true,"schema":{"type":"string"},"description":"The bot ID for the API request"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTagMappingRequest"}}}},"responses":{"200":{"description":"Client tag mapping created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicSuccessResponse"}}}},"401":{"$ref":"#/components/responses/TokenError"},"403":{"description":"Permission denied or client tag mapping creation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"OpenAPI configuration not found, client not found, or missing required fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# 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://doc.mantago.cc/mantago-en/client-tags/assign-client-tag-to-user.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.
