> For the complete documentation index, see [llms.txt](https://user.netmera.com/netmera-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/profile-attributes/get-profile-attributes.md). Agents can also search and read this documentation through its [MCP server](https://user.netmera.com/netmera-developer-guide/~gitbook/mcp).

# Get Profile Attributes

Returns the current profile attributes of a user, identified by `extId` or, when `extId` is not sent, by `deviceToken`.

<details>

<summary>Notes</summary>

* Only attributes that are still defined in the application are returned.
* `extId` in the response repeats the `extId` query parameter.
* When the user is looked up by `deviceToken` only, `extId` is returned as `null`.

</details>

```json
{"openapi":"3.1.0","info":{"title":"Netmera REST API","version":"3.0"},"tags":[{"name":"Profile Attributes","description":"Store information about a user, such as name, city or preferences, and use it for targeting and\npersonalization.\n\n<table data-view=\"cards\"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type=\"content-ref\"></th></tr></thead><tbody><tr><td><strong>Get Profile Attributes</strong></td><td><code>GET</code> Returns the current profile attributes of a user, identified by <code>extId</code> or, when <code>extId</code> is not sent, by <code>deviceToken</code>.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/profile-attributes/get-profile-attributes\">Get Profile Attributes</a></td></tr><tr><td><strong>Set Profile Attributes</strong></td><td><code>POST</code> Sets or updates profile attributes for the given users.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/profile-attributes/set-profile-attributes\">Set Profile Attributes</a></td></tr><tr><td><strong>Unset Profile Attributes</strong></td><td><code>POST</code> Removes attribute keys from a user's profile.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/profile-attributes/unset-profile-attributes\">Unset Profile Attributes</a></td></tr><tr><td><strong>Add Values to Array Attributes</strong></td><td><code>POST</code> Adds values to array-type profile attributes of the given users.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/profile-attributes/add-values-to-array-attributes\">Add Values to Array Attributes</a></td></tr><tr><td><strong>Remove Values from Array Attributes</strong></td><td><code>POST</code> Removes values from array-type profile attributes of the given users.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/profile-attributes/remove-values-from-array-attributes\">Remove Values from Array Attributes</a></td></tr><tr><td><strong>Delete Profile Attribute from All Users</strong></td><td><code>POST</code> Deletes profile attribute keys from all users at once.</td><td><a href=\"https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/profile-attributes/delete-profile-attribute-from-all-users\">Delete Profile Attribute from All Users</a></td></tr></tbody></table>\n"}],"servers":[{"url":"https://restapi.netmera.com","description":"Netmera REST API"}],"security":[{"REST-API-key":[]}],"components":{"securitySchemes":{"REST-API-key":{"type":"apiKey","in":"header","name":"X-netmera-api-key","description":"REST API key. Available in the Netmera Panel under Developers > API.\n"}},"schemas":{"NetmeraError":{"type":"object","description":"Standard Netmera error body.","required":["code","error"],"properties":{"code":{"type":"integer","description":"Netmera error code. See the error table in the API description."},"error":{"type":"string","description":"Human readable error message."}}}},"responses":{"IpNotAllowed":{"description":"The application restricts REST calls to a list of allowed IP addresses and the caller's\nIP is not on it. The check runs after the API key is validated and before the request\nbody and parameters are validated, so a restricted application returns this error even\nfor a malformed request.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}}}},"paths":{"/rest/3.0/getProfileAttributes":{"get":{"operationId":"getProfileAttributes","tags":["Profile Attributes"],"summary":"Get Profile Attributes","description":"Returns the current profile attributes of a user, identified by `extId` or, when `extId` is not\nsent, by `deviceToken`.\n\n<details>\n\n<summary>Notes</summary>\n\n- Only attributes that are still defined in the application are returned.\n- `extId` in the response repeats the `extId` query parameter.\n- When the user is looked up by `deviceToken` only, `extId` is returned as `null`.\n\n</details>\n","parameters":[{"name":"extId","in":"query","required":false,"description":"External user ID whose attributes are fetched. Required unless `deviceToken` is sent;\ntakes precedence when both are sent.\n","schema":{"type":"string"}},{"name":"deviceToken","in":"query","required":false,"description":"Push token of one of the user's devices, used only when `extId` is blank. An unknown token\nreturns HTTP 401, code `5007`.\n","schema":{"type":"string"}},{"name":"additionalParams","in":"query","required":false,"description":"Comma-separated extra fields to add to `profile`: `msisdn`, `email` (exact, case-sensitive, no\nspaces). Each is added only when the user has a non-empty value; unknown items are ignored.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"The user's profile attributes.","content":{"application/json":{"schema":{"type":"object","properties":{"extId":{"type":"string"},"profile":{"type":"object","description":"Key-value map of the user's profile attributes.","additionalProperties":true}}}}}},"400":{"description":"Missing parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}},"401":{"description":"The API key is invalid, or the user with the given `extId` does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetmeraError"}}}},"403":{"$ref":"#/components/responses/IpNotAllowed"}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://user.netmera.com/netmera-developer-guide/api-documentation/api-reference/profile-attributes/get-profile-attributes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
