---
title: "Create a new MTLS-auth credential associated with a Consumer"
method: POST
path: "/{workspace}/consumers/{ConsumerIdForNestedEntities}/mtls-auth"
tags: ["MTLS-auth credentials"]
---

# Create a new MTLS-auth credential associated with a Consumer

`POST /{workspace}/consumers/{ConsumerIdForNestedEntities}/mtls-auth`

Create a new MTLS-auth credential associated with a Consumer

## Path parameters

- `ConsumerIdForNestedEntities` string, required
- `workspace` string, required

## Request body

- MTLSAuthWithoutParents
  - `ca_certificate` object
    - `id` string
  - `consumer` object, nullable
    - `id` string
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `subject_name` string, required
  - `tags` string[], nullable — A set of strings representing tags.

## Response `201`

Successfully created MTLS-auth credential

- MTLSAuth
  - `ca_certificate` object
    - `id` string
  - `consumer` object, nullable
    - `id` string
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `subject_name` string, required
  - `tags` string[], nullable — A set of strings representing tags.

## Changes

> 11 revisions in range; 1 not diffed.

- **2025-10-09** `740b73588ef4` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/kong/apis/kong-enterprise-admin-api/changes/:workspace/consumers/:ConsumerIdForNestedEntities/mtls-auth/post.md)

---

[API](https://skmtc.dev/kong/apis/kong-enterprise-admin-api.md) · [All operations](https://skmtc.dev/kong/apis/kong-enterprise-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kong/kong-enterprise-admin-api/revisions/28b1f8a59cdc/schema)
