> For the complete documentation index, see [llms.txt](https://userflux.gitbook.io/userflux-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://userflux.gitbook.io/userflux-docs/apis/profiles-api.md).

# 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"}}}}}}
```
