> For the complete documentation index, see [llms.txt](https://help.recart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.recart.com/developers/public-api/subscriber/update-subscribers-custom-attributes.md).

# Update subscriber's custom attributes

Update the custom attributes of an SMS subscriber identified by phone number. Only the custom attributes included in the request are modified; attributes that are not provided remain unchanged.

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"tags":[{"name":"Subscriber","description":"Subscribers"}],"servers":[{"url":"https://api.recart.com/app-integrations/2023-12","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Recart-API-Key","description":"It can be obtained in Recart account after contacting Support"}},"schemas":{"PatchSubscriber":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["subscribers"]},"attributes":{"type":"object","description":"Attributes of the subscriber to update","required":["customAttributes"],"properties":{"customAttributes":{"type":"object","description":"Merchant-defined custom attributes as key/value pairs. PATCH/merge semantics: keys included in the request are set or overwritten; a key with a `null` value is deleted; keys not included are left unchanged.\n\nLimits: maximum 30 attributes per subscriber; the entire `customAttributes` object must not exceed 16 KB (enforced by the API server). Keys must match `^(?!recart_)[A-Za-z][A-Za-z0-9_]{0,63}$` (start with a letter, alphanumeric or underscore, max 64 characters, no spaces; the `recart_` prefix is reserved). Values must be a string (max 1024 characters), number, boolean, an array of up to 100 strings (each max 255 characters), or `null` to delete the attribute. Nested objects are not allowed.\n","maxProperties":30,"propertyNames":{"pattern":"^(?!recart_)[A-Za-z][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"oneOf":[{"type":"string","maxLength":1024},{"type":"number"},{"type":"boolean"},{"type":"array","maxItems":100,"items":{"type":"string","maxLength":255}},{"type":"null"}]}}}}}},"HttpErrorBody":{"type":"object","required":["errors"],"properties":{"errors":{"type":"array","items":{"type":"object","required":["id","code","title","detail"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"}}}}}}},"responses":{"HttpError":{"description":"HTTP Error response","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/HttpErrorBody"}}}}}},"paths":{"/subscribers":{"patch":{"summary":"Update subscriber's custom attributes","tags":["Subscriber"],"operationId":"patchSubscriber","description":"Update the custom attributes of an SMS subscriber identified by phone number. Only the custom attributes included in the request are modified; attributes that are not provided remain unchanged.\n","parameters":[{"name":"phoneNumber","in":"query","required":true,"description":"Phone number of the subscriber","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PatchSubscriber"}}}}}},"responses":{"204":{"description":"No content"},"4XX":{"$ref":"#/components/responses/HttpError"},"5XX":{"$ref":"#/components/responses/HttpError"}}}}}}
```


---

# 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, and the optional `goal` query parameter:

```
GET https://help.recart.com/developers/public-api/subscriber/update-subscribers-custom-attributes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
