---
title: "POST /api/v1/enroll"
method: POST
path: "/api/v1/enroll"
tags: ["fabric-ca-server"]
---

# POST /api/v1/enroll

`POST /api/v1/enroll`

Enroll a new identity and return an enrollment certificate.

## Query parameters

- `ca` string

## Request body

- object
  - `certificate_request` string, required — A PEM-encoded string containing the CSR (Certificate Signing Request) based on PKCS #10.
  - `profile` string — The name of the signing profile to use when issuing the certificate.
  - `label` string — The label used in HSM operations
  - `caname` string — Name of the CA to direct traffic to within server.
  - `attr_reqs` object[] — An array of attribute requests to be placed into the enrollment certificate
    - `name` string, required — The name of the attribute being requested to put into the enrollment certificate.
    - `optional` boolean — Boolean indicating whether the attribute is optional. An error is returned if the attribute is required but not found. The default value is false.

## Response `201`

Successfully enrolled a new identity

- ResponseBase
  - `result` unknown, required
  - `success` boolean, required — Boolean indicating if the request was successful.
  - `errors` object[], required — An array of error messages (code and message)
    - `code` integer, required — Integer code denoting the type of error.
    - `message` string, required — An error message
  - `messages` object[], required — An array of information messages (code and message)
    - `code` integer, required — Integer code denoting the type of message.
    - `message` string, required — A more specific message.

## Changes

- **2022-07-07** `caceed60027b` — 1 breaking, 1 info
  - removed the required property `result/ServerInfo/RevocationPublicKey` from the response with the `201` status
  - added the required property `result/ServerInfo/IssuerRevocationPublicKey` to the response with the `201` status
- **2022-06-20** `f5334c38d4d9` — 1 breaking, 1 info
  - removed the required property `result/ServerInfo/IssuerRevocationPublicKey` from the response with the `201` status
  - added the required property `result/ServerInfo/RevocationPublicKey` to the response with the `201` status

[Change history](https://skmtc.dev/hyperledger/apis/fabric-ca-server-api/changes/api/v1/enroll/post.md)

---

[API](https://skmtc.dev/hyperledger/apis/fabric-ca-server-api.md) · [All operations](https://skmtc.dev/hyperledger/apis/fabric-ca-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hyperledger/fabric-ca-server-api/revisions/f1cf3d665f0e/schema)
