# Set Presence

## POST /v2/user/presence

> Set the presence of the requesting user.

```json
{"openapi":"3.1.1","info":{"title":"Pod API","version":"20.17.1"},"servers":[{"url":"http://yourpodURL.symphony.com/pod"}],"paths":{"/v2/user/presence":{"post":{"summary":"Set the presence of the requesting user.","parameters":[{"schema":{"type":"string"},"name":"sessionToken","description":"Session authentication token.","in":"header","required":true},{"schema":{"type":"boolean"},"name":"soft","description":"If true, the user's current status is taken into consideration. If the user is currently OFFLINE,\nthe user's presence will still be OFFLINE, but the new presence will take effect when the\nuser comes online. If the user is currently online, the user's activity state will be\napplied to the presence if applicable. (e.g. if you are setting their presence to AVAILABLE,\nbut the user is currently idle, their status will be represented as AWAY)\n","in":"query","required":false}],"tags":["Presence"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2Presence"}}}},"400":{"description":"Client error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized: Invalid session token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2PresenceStatus"}}},"required":true}}}},"components":{"schemas":{"V2Presence":{"allOf":[{"$ref":"#/components/schemas/V2UserPresence"},{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64","description":"The time, in milliseconds since Jan 1 1970, when the presence state was set."}}}]},"V2UserPresence":{"allOf":[{"$ref":"#/components/schemas/V2PresenceStatus"},{"type":"object","properties":{"userId":{"type":"integer","format":"int64","description":"The ID of the user to whom the presence state relates."}}}]},"V2PresenceStatus":{"type":"object","properties":{"category":{"type":"string","description":"Presence status. Possible values are:\n  - UNDEFINED\n  - AVAILABLE\n  - BUSY\n  - DO_NOT_DISTURB\n  - ON_THE_PHONE\n  - BE_RIGHT_BACK\n  - IN_A_MEETING\n  - AWAY\n  - OUT_OF_OFFICE\n  - OFF_WORK\n  - OFFLINE\n"}},"required":["category"]},"Error":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}
```

When calling this as an [OBO-enabled endpoint](https://rest-api.symphony.com/main/apps-on-behalf-of-obo), use the [OBO User Authenticate](https://rest-api.symphony.com/main/apps-on-behalf-of-obo/obo-rsa-user-authentication-by-user-id) token for `sessionToken`.

The available online status values (presence categories) for users are are available in [Get Presence](https://rest-api.symphony.com/main/presence/get-presence)

> #### 📘 Idle state
>
> When the end-user is idle on the Symphony clients and either in `AVAILABLE` or `BUSY` categories, the online status of the user is automatically changed to `AWAY`. When the user is active again on the client, then the online status is automatically changed back to the prior category.

> #### 🚧 Roles and Privileges
>
> Calling this endpoint requires the ADMIN\_PRESENCE\_UPDATE privilege.\
> See [Bot Permissions](https://docs.developers.symphony.com/building-bots-on-symphony/configuration/bot-permissions) for a list of roles and associated privileges.
