---
title: "Enroll an identity via one-time-token with a pre-exchanged client certificate"
method: POST
path: "/enroll/ottca"
tags: ["Enroll"]
---

# Enroll an identity via one-time-token with a pre-exchanged client certificate

`POST /enroll/ottca`

## Request

- Base URL: `https://demo.ziti.dev/edge/client/v1`
- URL: `https://demo.ziti.dev/edge/client/v1/enroll/ottca`
- Auth: none declared
- TypeScript: <https://skmtc.dev/openziti/apis/ziti-edge-client/docs/enroll/ottca/post.ts> (a function with typed inputs; its response is checked against the schema)

Enroll an identity via a one-time-token that also requires a pre-exchanged client certificate to match a
Certificate Authority that has been added and verified (See POST /cas and POST /cas{id}/verify). The client
must present a client certificate signed by CA associated with the enrollment. This enrollment is similar to
CA auto enrollment except that is required the identity to be pre-created.

As the client certificate has been pre-exchanged there is no CSR input to this enrollment method.

## Request body

- OttEnrollmentRequest
  - `clientCsr` string
  - `token` string

## Response `200`

A response to a successful enrollment that carries no certificates, only common enrollment data such as the list of controllers

- EnrollmentResponseEnvelope
  - `data` EnrollmentResponse: Common data returned on any successful enrollment, regardless of method. The controllers field carries the set of controllers in the cluster the enrolling client may connect to.
    - `controllers` ControllerDetail[]: An array of controller resources
      - `_links` object, required: A map of named links
      - `createdAt` string, date-time, required
      - `id` string, required
      - `tags` Tags
      - `updatedAt` string, date-time, required
      - `apiAddresses` ApiAddressList
      - `certPem` string, required
      - `ctrlAddress` string, nullable
      - `fingerprint` string, required
      - `isOnline` boolean, required
      - `isPreferredLeader` boolean
      - `lastJoinedAt` string, date-time, required
      - `name` string, required
  - `meta` Meta
    - `apiEnrollmentVersion` string
    - `apiVersion` string
    - `filterableFields` string[]
    - `pagination` Pagination
      - `limit` number, required
      - `offset` number, required
      - `totalCount` number, required

## Other responses

- `400`: The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information
- `429`: The resource requested is rate limited and the rate limit has been exceeded
- `503`: The request could not be completed due to the server being busy or in a temporarily bad state

## Changes

- **2026-10-14** `f7b51eaafbbb`: 2 breaking, 1 info
  - the response property `data` became optional for the status `200`
  - the response property `meta` became optional for the status `200`
  - added the optional property `data/controllers` to the response with the `200` status
- **2025-03-17** `058711718149`: 1 info
  - added the non-success response with the status `400`
- **2025-01-24** `19dfd92f02a2`: 1 info
  - added the non-success response with the status `503`
- **2024-06-07** `26670d8bbc37`: 1 breaking, 1 warning
  - added required request body
  - deleted the `query` request parameter `token`
- **2024-05-29** `cce2800c1357`: 2 breaking, 2 warning, 2 info
  - added the new required `query` request parameter `token`
  - removed the request body
  - the optional response header `WWW-Authenticate` removed for the status `200`
  - the optional response header `WWW-Authenticate` removed for the status `429`
  - …2 more

[Operation history](https://skmtc.dev/openziti/apis/ziti-edge-client/changes/enroll/ottca/post.md)

---

[API](https://skmtc.dev/openziti/apis/ziti-edge-client.md) - [All operations](https://skmtc.dev/openziti/apis/ziti-edge-client/llms.txt) - [OpenAPI document](https://skmtc.dev/openziti/apis/ziti-edge-client/revisions/f7b51eaafbbb?raw)
