> For the complete documentation index, see [llms.txt](https://doc.mantago.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.mantago.cc/wen-jian-shuo-ming-1/hui-yuan-api/bian-ji-hui-yuan-zi-liao.md).

# 編輯會員資料

編輯會員的姓名、Email、生日、電話、地址等

## Update client profile

> Update a client's customer ID and profile fields (name, email, phone, birthday, address).\
> \
> Only fields present in the request body are updated; send \`null\` to clear a field.\
> If none of the fields are provided, nothing is updated and the request still succeeds.\
> \
> Conditional validation rules:\
> \- Either provide 'clientId' OR both 'platform' and 'platformClientId' to identify the client\
> \- customerId, name, email, phone, birthday, address must be a string or null\
> \- 'birthday' must be a parsable date (e.g. "1990-01-31")<br>

```json
{"openapi":"3.0.3","info":{"title":"Manta OpenAPI","version":"0.363.12"},"tags":[{"name":"Core","description":"Core OpenAPI functionality for customer management and broadcasting"}],"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":{"UpdateClientRequest":{"type":"object","properties":{"secret":{"type":"string","description":"Secret key for API authentication"},"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)"},"customerId":{"type":"string","nullable":true,"description":"Customer ID in your own system"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"birthday":{"type":"string","format":"date","nullable":true},"address":{"type":"string","nullable":true}},"required":["secret"],"description":"Client identification rules:\n- Either provide 'clientId' OR both 'platform' and 'platformClientId'\n- Omitted fields are left unchanged; null clears the field\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/client":{"patch":{"tags":["Core"],"summary":"Update client profile","description":"Update a client's customer ID and profile fields (name, email, phone, birthday, address).\n\nOnly fields present in the request body are updated; send `null` to clear a field.\nIf none of the fields are provided, nothing is updated and the request still succeeds.\n\nConditional validation rules:\n- Either provide 'clientId' OR both 'platform' and 'platformClientId' to identify the client\n- customerId, name, email, phone, birthday, address must be a string or null\n- 'birthday' must be a parsable date (e.g. \"1990-01-31\")\n","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/UpdateClientRequest"}}}},"responses":{"200":{"description":"Client updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicSuccessResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"$ref":"#/components/responses/TokenError"},"403":{"description":"Permission denied or update failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## The UpdateClientRequest object

```json
{"openapi":"3.0.3","info":{"title":"Manta OpenAPI","version":"0.363.12"},"components":{"schemas":{"UpdateClientRequest":{"type":"object","properties":{"secret":{"type":"string","description":"Secret key for API authentication"},"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)"},"customerId":{"type":"string","nullable":true,"description":"Customer ID in your own system"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"birthday":{"type":"string","format":"date","nullable":true},"address":{"type":"string","nullable":true}},"required":["secret"],"description":"Client identification rules:\n- Either provide 'clientId' OR both 'platform' and 'platformClientId'\n- Omitted fields are left unchanged; null clears the field\n"}}}}
```

## The BasicSuccessResponse object

```json
{"openapi":"3.0.3","info":{"title":"Manta OpenAPI","version":"0.363.12"},"components":{"schemas":{"BasicSuccessResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.3","info":{"title":"Manta OpenAPI","version":"0.363.12"},"components":{"schemas":{"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"]}}}}
```
