# Undocumented basic-auths admin API endpoint

**URL:** <https://discuss.konghq.com/t/undocumented-basic-auths-admin-api-endpoint/8907>\
**Category:** Questions\
**Created:** [August 19, 2021, 9:26am UTC](https://discuss.konghq.com/t/undocumented-basic-auths-admin-api-endpoint/8907 "2021-08-19T09:26:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.espi](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@david.espi](https://discuss.konghq.com/u/david.espi)\
**Post date:** [August 19, 2021, 9:26am UTC](https://discuss.konghq.com/t/undocumented-basic-auths-admin-api-endpoint/8907/1 "2021-08-19T09:26:17Z")

</div>

Hi!  
I’m using the `basic-auths` endpoint in the Kong Admin API to perform a PUT to update or create a credential in an existing consumer.

I haven’t found the way to do this in a single PUT using the `consumers` endpoint, and the PUT on `basic-auths` passing a consumer object (with an embedded id) simply works fine, when you pass a payload like this one:

```auto
            {
              "username": "username",
              "password": "password",
              "consumer": {
                "id": "consumerId"
              },
            }

```

My concern is that the `basic-auths` endpoint is not documented in the Admin API docs ([Admin API - v2.5.x | Kong Docs](https://docs.konghq.com/gateway-oss/2.5.x/admin-api/)), or at least I can’t find that documentation.  
The `basic-auths` endpoint it’s returned by the `endpoints` endpoint.  
My questions are:

- Is it safe to use this endpoint, or it’s something that’s going to be deprecated?
- Will the documentation include this endpoint in the future?

Thanks!

---

<div class="post-metadata">

**Author:** ![joedas](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@joedas](https://discuss.konghq.com/u/joedas)\
**Post date:** [August 30, 2021, 2:00pm UTC](https://discuss.konghq.com/t/undocumented-basic-auths-admin-api-endpoint/8907/2 "2021-08-30T14:00:57Z")

</div>

Hi David,  
It is safe to use the endpoint /consumers//basic-auth to create and update consumers.  
POST to create, PATCH to update should be fine with the payload you described above.
