# Profiles API

## POST /profile

> Update a users profile

```json
{"openapi":"3.0.0","info":{"title":"Integration API","version":"1.0.0"},"servers":[{"url":"https://integration-api.userflux.co"}],"security":[{"WriteOnlyBearerAuth":[]}],"components":{"securitySchemes":{"WriteOnlyBearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Your Integration API Write Only API Key. Note: You must use the Write Only API Key, not the Read + Write API Key when using this key in a public website or app for frontend analytics tracking."}}},"paths":{"/profile":{"post":{"summary":"Update a users profile","responses":{"204":{"description":"Successful Response"}},"parameters":[{"name":"locationEnrichment","in":"query","required":false,"schema":{"type":"boolean"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"anonymousId":{"type":"string"},"properties":{"type":"object"}}}}}}}}}}
```

## GET /profile/{userId}

> Get a users profile

```json
{"openapi":"3.0.0","info":{"title":"Integration API","version":"1.0.0"},"servers":[{"url":"https://integration-api.userflux.co"}],"security":[{"ReadWriteOnlyBearerAuth":[]}],"components":{"securitySchemes":{"ReadWriteOnlyBearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Your Integration API Read + Write API Key. Note: You must use the Read + Write API Key, not the Write Only API Key."}},"responses":{"getProfile200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The users id","type":"string"},"anonymousIds":{"description":"Any linked anonymous ids to the user","type":"array"},"properties":{"description":"All the properties you have inserted for the user","type":"object"},"computedProperties":{"description":"All the extended properties of the user generated by the platform","type":"object"},"segments":{"description":"All the keys of segments the user belongs to","type":"array"},"locationData":{"description":"All location information associated with the user","type":"object"},"deviceData":{"description":"All device information associated with the user","type":"object"},"lastUpdatedAt":{"description":"A timestamp (in epoch milliseconds) of when the users profile was last updated","type":"number"},"createdAt":{"description":"A timestamp (in epoch milliseconds) of when the users profile was first inserted","type":"number"}}}}}}}},"paths":{"/profile/{userId}":{"get":{"summary":"Get a users profile","description":"","parameters":[{"name":"userId","in":"path","description":"ID of the user to fetch","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getProfile200"}}}}}}
```


---

# 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://userflux.gitbook.io/userflux-docs/apis/profiles-api.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.
