# \[API\] In the Documentation: Wrong Key in the API Suspend

**URL:** <https://meta.discourse.org/t/api-in-the-documentation-wrong-key-in-the-api-suspend/75082>\
**Category:** Bug\
**Created:** [30 Novembre 2017, 11:18am UTC](https://meta.discourse.org/t/api-in-the-documentation-wrong-key-in-the-api-suspend/75082 "2017-11-30T11:18:15Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Hossam\_Youssef](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hossam_youssef/32/83498_2.png) [@Hossam\_Youssef](https://meta.discourse.org/u/Hossam_Youssef)\
**Post date:** [30 Novembre 2017, 11:18am UTC](https://meta.discourse.org/t/api-in-the-documentation-wrong-key-in-the-api-suspend/75082/1 "2017-11-30T11:18:15Z")

</div>

Hello,

I have found a wrong key which used in the PUT method to suspend an account which is making the suspend action not possible.

in the api documentaion:

> **[Discourse API Docs](https://docs.discourse.org/#tag/Admin%2Fpaths%2F~1admin~1users~1%7Bid%7D~1suspend%2Fput)**

**API Request**

```plaintext
    api_key:{{api_key}}
    api_username:{{api_username}}
    duration:2017-12-04
    reason:Reason Test Here

```

**The expected response**  
Getting the account suspended:

```plaintext
        {
            {
            "suspension": {
                "suspended": true,
                "suspend_reason": "Reason Test Here",
                "suspended_till": "2017-12-04T00:00:00.000Z",
                "suspended_at": "2017-11-30T10:49:51.248Z"
            }
        }

```

**The current response**  
Getting null value in the duration so “It suspend the account till ZERO TIME so it means UNSUPSEND”

```plaintext
    {
        "suspension": {
            "suspended": true,
            "suspend_reason": "Reason Test Here",
            "suspended_till": null,
            "suspended_at": "2017-11-30T10:49:51.248Z"
        }
    }

```

**The Solution**  
Replace the `duration` key to `suspend_until` in the body request and it works fine! like that:

```plaintext
    api_key:{{api_key}}
    api_username:{{api_username}}
    suspend_until:2017-12-04
    reason:Reason Test Here

```

So I will appreciate if you could update this part in the API documentation. it could help others.

 ![48](https://global.discourse-cdn.com/meta/original/3X/5/e/5e6dc467dd60e8902aeece19f10791ec7c5a8d26.png)

Thanks in advance!  
Hossam

---

_[View the full topic](https://meta.discourse.org/t/api-in-the-documentation-wrong-key-in-the-api-suspend/75082)._
