Undocumented basic-auths admin API endpoint

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:

              "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), 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?


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.

1 Like

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ