API7 Docs

Delete a consumer credential

DELETE /apisix/admin/consumers/{username}/credentials/{credential_id}

DELETE /apisix/admin/consumers/{username}/credentials/{credential_id}

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

username*string

The unique identifier of the consumer.

Match^[a-zA-Z0-9_\-]+$
Length1 <= length <= 512
credential_id*string

The unique identifier of the consumer credential.

Match^[a-zA-Z0-9-_.]+$
Length1 <= length <= 256

Query Parameters

gateway_group_id*string

Gateway group ID. Optional when using the gateway group admin key to authenticate.

Length1 <= length

Response Body

application/json

application/json

application/json

curl -X DELETE "$API_BASE_URL/apisix/admin/consumers/johndoe/credentials/bd58fce2-b6cc-4d2d-a53c-6ce11b19c101?gateway_group_id=86fb9981-d9d2-4555-9df8-91ae92129335"

Operation completed successfully with no response body.

""
Complete operation details and schema variants

DELETE /apisix/admin/consumers/{username}/credentials/{credential_id}

Delete a consumer credential

IAM Action: gateway:DeleteConsumerCredential, Resource: arn:api7:gateway:gatewaygroup/%s/consumer/%s

Parameters

  • username (path, string, required): The unique identifier of the consumer.
  • credential_id (path, string, required): The unique identifier of the consumer credential.
  • gateway_group_id (query, string, required): Gateway group ID. Optional when using the gateway group admin key to authenticate.

Responses

  • 200: Operation completed successfully with no response body.
  • 401: Unauthorized — Authentication is required. Provide a valid API key via the X-API-KEY header or use Basic Auth credentials.
  • value (object, optional): The specific resource.
  • error_msg (string, optional): The error message.
  • 404: Not Found — The requested resource does not exist or has been deleted. Response fields (application/json): identical to DELETE /apisix/admin/consumers/{username}/credentials/{credential_id}, response 401 above.

cURL

curl -X DELETE '$API_BASE_URL/apisix/admin/consumers/{username}/credentials/{credential_id}'