# Suspend User Account

`Released in Symphony 20.7.`&#x20;

## PUT /v1/admin/user/{userId}/suspension/update

> Update the status of suspension of a particular user

```json
{"openapi":"3.1.1","info":{"title":"Pod API","version":"20.17.1"},"servers":[{"url":"http://yourpodURL.symphony.com/pod"}],"paths":{"/v1/admin/user/{userId}/suspension/update":{"put":{"summary":"Update the status of suspension of a particular user","parameters":[{"schema":{"type":"string"},"name":"sessionToken","description":"Session authentication token","in":"header","required":true},{"schema":{"type":"integer","format":"int64"},"name":"userId","description":"User ID as a decimal integer","in":"path","required":true}],"tags":["User"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"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"}}}},"403":{"description":"Forbidden: Caller lacks necessary entitlement.","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/UserSuspension"}}},"required":true}}}},"components":{"schemas":{"SuccessResponse":{"type":"object","properties":{"format":{"type":"string","enum":["TEXT","XML"]},"message":{"type":"string"}}},"Error":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}},"UserSuspension":{"type":"object","properties":{"suspended":{"type":"boolean"},"suspendedUntil":{"type":"integer","format":"int64"},"suspensionReason":{"type":"string"}}}}}}
```

{% hint style="info" %}
`The value of the suspendedUntil` field should be provided in milliseconds
{% endhint %}

### Request Examples

```bash
curl -X PUT \
 'https://devx1.symphony.com/pod/v1/admin/user/12987981107250/suspension/update' \
-H 'sessionToken: SESSION_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
      "suspended": true,
      "suspensionReason": "The user will be OOO due to a mandatory leave",
      "suspendedUntil": 1601546400000
    }'
```

```bash
curl -X PUT \
 'https://devx1.symphony.com/pod/v1/admin/user/suspension/update' \
-H 'sessionToken: SESSION_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
      "suspended": false
    }'
```

> #### 📘 Required Fields
>
> When suspending a user account, `suspended=true`, all three body parameters are required.\
> When activating a user account, `suspended=false`, the other two remaining body parameters are not required.

> #### 🚧 Required Permissions
>
> Calling this endpoint requires a service account with the User Provisioning role.\
> See [Bot Permissions](https://docs.developers.symphony.com/building-bots-on-symphony/configuration/bot-permissions) for a list of roles and their associated privileges.
