> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/credebl/platform/llms.txt
> Use this file to discover all available pages before exploring further.

# Credential issuance

> Issue verifiable credentials to holders via connection-based offers, out-of-band offers, email delivery, and bulk CSV issuance.

Credential issuance is the process of an issuer creating and delivering a verifiable credential to a holder. CREDEBL supports several issuance flows:

* **Connection-based offer** — issue a credential directly to a holder over an established DIDComm connection.
* **Out-of-band (OOB) offer** — generate a credential offer that can be accepted without a prior connection, delivered as a URL or QR code.
* **OOB via email** — send OOB credential offers to one or more holders by email.
* **Bulk CSV issuance** — upload a CSV file to issue credentials to many holders simultaneously.

Both AnonCreds (Indy) and W3C JSON-LD credential types are supported. Specify the type using the `credentialType` query parameter (`INDY` or `JSONLD`).

## Base path

All endpoints are rooted at `/orgs/:orgId/credentials`.

## Authentication

Every endpoint requires a JWT bearer token.

```http theme={null}
Authorization: Bearer <your-jwt-token>
```

## Role-based access

| Operation                     | Required roles                                             |
| ----------------------------- | ---------------------------------------------------------- |
| Issue credentials, OOB offers | `owner`, `admin`, `issuer`                                 |
| Read issued credentials       | `owner`, `admin`, `issuer`, `verifier`, `member`, `holder` |
| Delete issuance records       | `owner`                                                    |
| Bulk upload templates         | `owner`, `admin`, `issuer`, `verifier`                     |

## Endpoints

<CardGroup cols={2}>
  <Card title="Issue credential (connection)" icon="paper-plane" href="/api-reference/credentials/issuance#issue-credential-connection-based">
    `POST /orgs/:orgId/credentials/offer` — Issue to a connected holder.
  </Card>

  <Card title="Issue credential (OOB)" icon="share" href="/api-reference/credentials/issuance#create-out-of-band-credential-offer">
    `POST /orgs/:orgId/credentials/oob/offer` — Create an OOB credential offer.
  </Card>

  <Card title="Issue via email (OOB)" icon="envelope" href="/api-reference/credentials/issuance#issue-credential-via-email">
    `POST /orgs/:orgId/credentials/oob/email` — Send OOB offers via email.
  </Card>

  <Card title="List credentials" icon="list" href="/api-reference/credentials/issuance#list-issued-credentials">
    `GET /orgs/:orgId/credentials` — Retrieve all issued credential records.
  </Card>

  <Card title="Get credential" icon="magnifying-glass" href="/api-reference/credentials/issuance#get-credential-by-record-id">
    `GET /orgs/:orgId/credentials/:credentialRecordId` — Get a specific credential record.
  </Card>

  <Card title="Bulk templates" icon="table" href="/api-reference/credentials/issuance#bulk-issuance">
    `GET /orgs/:orgId/credentials/bulk/template` — List or download a CSV template for bulk issuance.
  </Card>

  <Card title="Upload CSV" icon="upload" href="/api-reference/credentials/issuance#upload-csv-for-bulk-issuance">
    `POST /orgs/:orgId/bulk/upload` — Upload a filled CSV file for bulk issuance.
  </Card>

  <Card title="Execute bulk issuance" icon="bolt" href="/api-reference/credentials/issuance#execute-bulk-issuance">
    `POST /orgs/:orgId/:requestId/bulk` — Trigger bulk credential issuance for an uploaded file.
  </Card>

  <Card title="Delete issuance records" icon="trash" href="/api-reference/credentials/issuance#delete-issuance-records">
    `DELETE /orgs/:orgId/issuance-records` — Delete all issuance records for an organization.
  </Card>
</CardGroup>

***

## Issue credential (connection-based)

`POST /orgs/:orgId/credentials/offer`

Issue one or more verifiable credentials to holders over established DIDComm connections.

**Required roles:** `owner`, `admin`, `issuer`

### Path parameters

<ParamField path="orgId" type="string" required>
  UUID of the issuing organization.
</ParamField>

### Query parameters

<ParamField query="credentialType" type="string" required>
  Credential format. Enum: `INDY` (default) or `JSONLD`.
</ParamField>

<ParamField query="isValidateSchema" type="boolean">
  Validate credential attributes against the schema before issuing. Defaults to `true`.
</ParamField>

### Request body

<ParamField body="credentialDefinitionId" type="string">
  The ledger credential definition ID. Required when `credentialType` is `INDY`. Example: `"WgWxqztrNooG92RXvxSTWv:3:CL:123:default"`.
</ParamField>

<ParamField body="comment" type="string">
  Optional human-readable comment attached to the credential offer.
</ParamField>

<ParamField body="protocolVersion" type="string">
  DIDComm protocol version. Example: `"v1"` or `"v2"`.
</ParamField>

<ParamField body="autoAcceptCredential" type="string">
  Auto-acceptance mode. Enum: `always`, `contentApproved`, `never`.
</ParamField>

<ParamField body="goalCode" type="string">
  A goal code for the credential offer thread.
</ParamField>

<ParamField body="parentThreadId" type="string">
  Parent thread ID to attach this offer to an existing thread.
</ParamField>

<ParamField body="willConfirm" type="boolean">
  Whether the issuer confirms receipt of the presentation.
</ParamField>

<ParamField body="label" type="string">
  Label for the credential offer message.
</ParamField>

<ParamField body="imageUrl" type="string">
  Image URL to include with the credential offer.
</ParamField>

<ParamField body="reuseConnection" type="boolean">
  Reuse an existing connection if available. Defaults to `true`.
</ParamField>

<ParamField body="isShortenUrl" type="boolean">
  Shorten the OOB URL in the response.
</ParamField>

<ParamField body="credentialData" type="object[]" required>
  Array of credential offers. Each element targets a specific connection.

  <Expandable title="credentialData item">
    <ParamField body="connectionId" type="string" required>
      UUID of the established connection to issue the credential over.
    </ParamField>

    <ParamField body="attributes" type="object[]">
      Array of credential attribute values. Required for `INDY` type. Each attribute must include:

      * `name` (string, required) — Attribute name matching the schema.
      * `value` (string, required) — Attribute value.
      * `isRequired` (boolean, optional, default `false`) — Whether the attribute is required.
    </ParamField>

    <ParamField body="credential" type="object">
      W3C Verifiable Credential object. Required for `JSONLD` type. Must include `@context`, `type`, `issuer`, `issuanceDate`, and `credentialSubject`.
    </ParamField>

    <ParamField body="options" type="object">
      Linked Data proof options. Required for `JSONLD` type. Must include `proofType` and `proofPurpose`.
    </ParamField>
  </Expandable>
</ParamField>

### Examples

<CodeGroup>
  ```bash AnonCreds (Indy) — single connection theme={null}
  curl --request POST \
    --url "http://localhost:5000/v1/orgs/3fa85f64-5717-4562-b3fc-2c963f66afa6/credentials/offer?credentialType=INDY" \
    --header "Authorization: Bearer <your-jwt-token>" \
    --header "Content-Type: application/json" \
    --data '{
      "credentialDefinitionId": "WgWxqztrNooG92RXvxSTWv:3:CL:123:default",
      "comment": "Welcome to Acme Corp",
      "autoAcceptCredential": "always",
      "credentialData": [
        {
          "connectionId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
          "attributes": [
            { "name": "firstName", "value": "Alice" },
            { "name": "lastName", "value": "Smith" },
            { "name": "employeeId", "value": "EMP-1042" },
            { "name": "department", "value": "Engineering" },
            { "name": "startDate", "value": "2024-01-15" }
          ]
        }
      ]
    }'
  ```

  ```bash W3C JSON-LD — single connection theme={null}
  curl --request POST \
    --url "http://localhost:5000/v1/orgs/3fa85f64-5717-4562-b3fc-2c963f66afa6/credentials/offer?credentialType=JSONLD" \
    --header "Authorization: Bearer <your-jwt-token>" \
    --header "Content-Type: application/json" \
    --data '{
      "credentialData": [
        {
          "connectionId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
          "credential": {
            "@context": [
              "https://www.w3.org/2018/credentials/v1",
              "https://www.w3.org/2018/credentials/examples/v1"
            ],
            "type": ["VerifiableCredential", "UniversityDegreeCredential"],
            "issuer": {
              "id": "did:key:z6Mkn72LVp3mq1fWSefkSMh5V7qrmGfCV4KH3K6SoTM21ouM"
            },
            "issuanceDate": "2024-01-15T10:00:00.000Z",
            "credentialSubject": {
              "id": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjkzzddaiTegS97hqhFYGrwZPU",
              "degree": {
                "type": "BachelorDegree",
                "name": "Bachelor of Science and Arts"
              }
            }
          },
          "options": {
            "proofType": "Ed25519Signature2018",
            "proofPurpose": "assertionMethod"
          }
        }
      ]
    }'
  ```

  ```bash multiple connections theme={null}
  curl --request POST \
    --url "http://localhost:5000/v1/orgs/3fa85f64-5717-4562-b3fc-2c963f66afa6/credentials/offer?credentialType=INDY" \
    --header "Authorization: Bearer <your-jwt-token>" \
    --header "Content-Type: application/json" \
    --data '{
      "credentialDefinitionId": "WgWxqztrNooG92RXvxSTWv:3:CL:123:default",
      "credentialData": [
        {
          "connectionId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
          "attributes": [
            { "name": "firstName", "value": "Alice" },
            { "name": "lastName", "value": "Smith" },
            { "name": "employeeId", "value": "EMP-1042" }
          ]
        },
        {
          "connectionId": "a1b2c3d4-1234-5678-90ab-cdef12345678",
          "attributes": [
            { "name": "firstName", "value": "Bob" },
            { "name": "lastName", "value": "Jones" },
            { "name": "employeeId", "value": "EMP-1043" }
          ]
        }
      ]
    }'
  ```
</CodeGroup>

```json 201 response theme={null}
{
  "statusCode": 201,
  "message": "Credential offer sent successfully",
  "data": [
    {
      "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "state": "offer-sent",
      "connectionId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "credentialDefinitionId": "WgWxqztrNooG92RXvxSTWv:3:CL:123:default",
      "schemaId": "WgWxqztrNooG92RXvxSTWv:2:EmployeeCredential:1.0",
      "threadId": "b0f49aa6-1516-4b21-9190-b13e92c0c865",
      "protocolVersion": "v1",
      "createdAt": "2024-01-15T11:00:00.000Z"
    }
  ]
}
```

| Status             | Description                                                                                   |
| ------------------ | --------------------------------------------------------------------------------------------- |
| `400 Bad Request`  | Missing `credentialDefinitionId` for INDY type, or missing `credential`/`options` for JSONLD. |
| `401 Unauthorized` | Missing or invalid bearer token.                                                              |
| `403 Forbidden`    | User lacks the required role.                                                                 |
| `404 Not Found`    | Invalid `credentialType` value.                                                               |

***

## Create out-of-band credential offer

`POST /orgs/:orgId/credentials/oob/offer`

Create an out-of-band credential offer that can be accepted by a holder without a pre-existing connection. The response contains an invitation URL.

**Required roles:** `owner`, `admin`, `issuer`

### Path parameters

<ParamField path="orgId" type="string" required>
  UUID of the issuing organization.
</ParamField>

### Query parameters

<ParamField query="credentialType" type="string" required>
  Credential format. Enum: `INDY` (default) or `JSONLD`.
</ParamField>

<ParamField query="isValidateSchema" type="boolean">
  Validate attributes against the schema. Defaults to `true`.
</ParamField>

### Request body

<ParamField body="credentialDefinitionId" type="string">
  Ledger credential definition ID. Required for `INDY` type.
</ParamField>

<ParamField body="comment" type="string">
  Optional comment attached to the credential offer.
</ParamField>

<ParamField body="protocolVersion" type="string">
  DIDComm protocol version.
</ParamField>

<ParamField body="autoAcceptCredential" type="string">
  Auto-acceptance mode. Enum: `always`, `contentApproved`, `never`.
</ParamField>

<ParamField body="isShortenUrl" type="boolean">
  Whether to return a shortened invitation URL.
</ParamField>

<ParamField body="reuseConnection" type="boolean">
  Attempt to reuse an existing connection.
</ParamField>

<ParamField body="attributes" type="object[]">
  Credential attribute name/value pairs. Required for `INDY` type.

  <Expandable title="attribute object">
    <ParamField body="name" type="string" required>
      Attribute name matching the schema.
    </ParamField>

    <ParamField body="value" type="string" required>
      Attribute value.
    </ParamField>

    <ParamField body="isRequired" type="boolean">
      Defaults to `false`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="credential" type="object">
  W3C Verifiable Credential object. Required for `JSONLD` type.
</ParamField>

<ParamField body="options" type="object">
  Linked Data proof options. Required for `JSONLD` type.
</ParamField>

### Examples

<CodeGroup>
  ```bash AnonCreds OOB offer theme={null}
  curl --request POST \
    --url "http://localhost:5000/v1/orgs/3fa85f64-5717-4562-b3fc-2c963f66afa6/credentials/oob/offer?credentialType=INDY" \
    --header "Authorization: Bearer <your-jwt-token>" \
    --header "Content-Type: application/json" \
    --data '{
      "credentialDefinitionId": "WgWxqztrNooG92RXvxSTWv:3:CL:123:default",
      "comment": "Your employee credential from Acme Corp",
      "autoAcceptCredential": "always",
      "attributes": [
        { "name": "firstName", "value": "Alice" },
        { "name": "lastName", "value": "Smith" },
        { "name": "employeeId", "value": "EMP-1042" },
        { "name": "department", "value": "Engineering" },
        { "name": "startDate", "value": "2024-01-15" }
      ]
    }'
  ```
</CodeGroup>

```json 201 response theme={null}
{
  "statusCode": 201,
  "message": "Credential offer created successfully",
  "data": {
    "invitationUrl": "http://agent.example.com?oob=eyJAdHlwZSI6...",
    "credentialOffer": {
      "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "state": "offer-sent",
      "credentialDefinitionId": "WgWxqztrNooG92RXvxSTWv:3:CL:123:default",
      "createdAt": "2024-01-15T11:00:00.000Z"
    }
  }
}
```

***

## Issue credential via email

`POST /orgs/:orgId/credentials/oob/email`

Create OOB credential offers and deliver them to holders by email. Each element in `credentialOffer` targets a specific email address.

**Required roles:** `owner`, `admin`, `issuer`

### Path parameters

<ParamField path="orgId" type="string" required>
  UUID of the issuing organization.
</ParamField>

### Query parameters

<ParamField query="credentialType" type="string" required>
  Credential format. Enum: `INDY` (default) or `JSONLD`.
</ParamField>

<ParamField query="isValidateSchema" type="boolean">
  Validate attributes against the schema. Defaults to `true`.
</ParamField>

### Request body

<ParamField body="credentialDefinitionId" type="string">
  Ledger credential definition ID. Required for `INDY` type.
</ParamField>

<ParamField body="comment" type="string">
  Optional comment for all offers in this batch.
</ParamField>

<ParamField body="protocolVersion" type="string">
  DIDComm protocol version.
</ParamField>

<ParamField body="isReuseConnection" type="boolean">
  Attempt to reuse an existing connection with each recipient.
</ParamField>

<ParamField body="credentialOffer" type="object[]" required>
  Array of per-recipient credential offers. The maximum number of entries is controlled by the `OOB_BATCH_SIZE` environment variable.

  <Expandable title="credentialOffer item">
    <ParamField body="emailId" type="string" required>
      Recipient's email address. Max 256 characters.
    </ParamField>

    <ParamField body="attributes" type="object[]">
      Credential attribute name/value pairs for this recipient. Required for `INDY` type.

      * `name` (string, required)
      * `value` (string, required)
    </ParamField>

    <ParamField body="credential" type="object">
      W3C Verifiable Credential object. Required for `JSONLD` type.
    </ParamField>

    <ParamField body="options" type="object">
      Linked Data proof options. Required for `JSONLD` type.
    </ParamField>
  </Expandable>
</ParamField>

### Examples

<CodeGroup>
  ```bash send to multiple recipients theme={null}
  curl --request POST \
    --url "http://localhost:5000/v1/orgs/3fa85f64-5717-4562-b3fc-2c963f66afa6/credentials/oob/email?credentialType=INDY" \
    --header "Authorization: Bearer <your-jwt-token>" \
    --header "Content-Type: application/json" \
    --data '{
      "credentialDefinitionId": "WgWxqztrNooG92RXvxSTWv:3:CL:123:default",
      "comment": "Your Acme Corp employee credential is ready",
      "credentialOffer": [
        {
          "emailId": "alice@example.com",
          "attributes": [
            { "name": "firstName", "value": "Alice" },
            { "name": "lastName", "value": "Smith" },
            { "name": "employeeId", "value": "EMP-1042" },
            { "name": "department", "value": "Engineering" },
            { "name": "startDate", "value": "2024-01-15" }
          ]
        },
        {
          "emailId": "bob@example.com",
          "attributes": [
            { "name": "firstName", "value": "Bob" },
            { "name": "lastName", "value": "Jones" },
            { "name": "employeeId", "value": "EMP-1043" },
            { "name": "department", "value": "Finance" },
            { "name": "startDate", "value": "2024-02-01" }
          ]
        }
      ]
    }'
  ```
</CodeGroup>

```json 201 response theme={null}
{
  "statusCode": 201,
  "message": "OOB credential offer created successfully",
  "data": [
    {
      "emailId": "alice@example.com",
      "invitationUrl": "http://agent.example.com?oob=eyJAdHlwZSI6...",
      "credentialOfferId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    },
    {
      "emailId": "bob@example.com",
      "invitationUrl": "http://agent.example.com?oob=eyJAdHlwZSI6...",
      "credentialOfferId": "a1b2c3d4-1234-5678-90ab-cdef12345678"
    }
  ]
}
```

***

## List issued credentials

`GET /orgs/:orgId/credentials`

Retrieve all issued credential records for an organization. Supports pagination, search, and sorting.

**Required roles:** `owner`, `admin`, `issuer`, `verifier`, `member`, `holder`

### Path parameters

<ParamField path="orgId" type="string" required>
  UUID of the organization.
</ParamField>

### Query parameters

<ParamField query="pageNumber" type="number">
  Page to retrieve. Min `1`. Defaults to `1`.
</ParamField>

<ParamField query="pageSize" type="number">
  Records per page. Min `1`, max `100`. Defaults to `10`.
</ParamField>

<ParamField query="search" type="string">
  Free-text search across credential records.
</ParamField>

<ParamField query="sortField" type="string">
  Field to sort by. Enum: `createDateTime` (default).
</ParamField>

<ParamField query="sortBy" type="string">
  Sort direction. `ASC` or `DESC` (default).
</ParamField>

### Examples

<CodeGroup>
  ```bash curl theme={null}
  curl --request GET \
    --url "http://localhost:5000/v1/orgs/3fa85f64-5717-4562-b3fc-2c963f66afa6/credentials?pageNumber=1&pageSize=10&sortBy=DESC" \
    --header "Authorization: Bearer <your-jwt-token>"
  ```
</CodeGroup>

```json 200 response theme={null}
{
  "statusCode": 200,
  "message": "Credentials fetched successfully",
  "data": {
    "totalItems": 3,
    "hasNextPage": false,
    "data": [
      {
        "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "state": "done",
        "connectionId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "credentialDefinitionId": "WgWxqztrNooG92RXvxSTWv:3:CL:123:default",
        "schemaId": "WgWxqztrNooG92RXvxSTWv:2:EmployeeCredential:1.0",
        "threadId": "b0f49aa6-1516-4b21-9190-b13e92c0c865",
        "protocolVersion": "v1",
        "createdAt": "2024-01-15T11:00:00.000Z",
        "updatedAt": "2024-01-15T11:00:30.000Z"
      }
    ]
  }
}
```

***

## Get credential by record ID

`GET /orgs/:orgId/credentials/:credentialRecordId`

Retrieve the details of a single credential issuance record.

**Required roles:** `owner`, `admin`, `issuer`, `verifier`, `member`, `holder`

### Path parameters

<ParamField path="orgId" type="string" required>
  UUID of the organization.
</ParamField>

<ParamField path="credentialRecordId" type="string" required>
  UUID of the credential record to retrieve.
</ParamField>

### Examples

<CodeGroup>
  ```bash curl theme={null}
  curl --request GET \
    --url "http://localhost:5000/v1/orgs/3fa85f64-5717-4562-b3fc-2c963f66afa6/credentials/f47ac10b-58cc-4372-a567-0e02b2c3d479" \
    --header "Authorization: Bearer <your-jwt-token>"
  ```
</CodeGroup>

```json 200 response theme={null}
{
  "statusCode": 200,
  "message": "Credential fetched successfully",
  "data": {
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "state": "done",
    "connectionId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "credentialDefinitionId": "WgWxqztrNooG92RXvxSTWv:3:CL:123:default",
    "schemaId": "WgWxqztrNooG92RXvxSTWv:2:EmployeeCredential:1.0",
    "credentialAttributes": [
      { "name": "firstName", "value": "Alice" },
      { "name": "lastName", "value": "Smith" },
      { "name": "employeeId", "value": "EMP-1042" }
    ],
    "autoAcceptCredential": "always",
    "threadId": "b0f49aa6-1516-4b21-9190-b13e92c0c865",
    "protocolVersion": "v1",
    "outOfBandId": null,
    "createdAt": "2024-01-15T11:00:00.000Z",
    "updatedAt": "2024-01-15T11:00:30.000Z"
  }
}
```

| Status            | Description                               |
| ----------------- | ----------------------------------------- |
| `400 Bad Request` | `credentialRecordId` is not a valid UUID. |
| `404 Not Found`   | No credential record found with that ID.  |

***

## Bulk issuance

CREDEBL supports issuing credentials to large numbers of holders by uploading a filled CSV file. The bulk issuance flow has three steps:

<Steps>
  <Step title="Download a CSV template">
    Use `GET /orgs/:orgId/credentials/bulk/template` to list available templates, or `POST /orgs/:orgId/credentials/bulk/template` to download a CSV template file pre-filled with the correct column headers for a specific credential definition.
  </Step>

  <Step title="Upload the filled CSV">
    Fill in the CSV with one row per holder and upload it via `POST /orgs/:orgId/bulk/upload`. The server returns a `requestId`.
  </Step>

  <Step title="Trigger issuance">
    Call `POST /orgs/:orgId/:requestId/bulk` to start the issuance process for all rows in the uploaded file.
  </Step>
</Steps>

### Download CSV template

`POST /orgs/:orgId/credentials/bulk/template`

Download a CSV template with column headers derived from a credential definition's schema.

**Required roles:** `owner`, `admin`, `issuer`, `verifier`

#### Request body

<ParamField body="templateId" type="string" required>
  The ledger credential definition ID to use as a template. Example: `"WgWxqztrNooG92RXvxSTWv:3:CL:123:default"`.
</ParamField>

<ParamField body="schemaType" type="string" required>
  Schema type. Enum: `INDY` or `W3C`.
</ParamField>

#### Examples

<CodeGroup>
  ```bash curl theme={null}
  curl --request POST \
    --url "http://localhost:5000/v1/orgs/3fa85f64-5717-4562-b3fc-2c963f66afa6/credentials/bulk/template" \
    --header "Authorization: Bearer <your-jwt-token>" \
    --header "Content-Type: application/json" \
    --output template.csv \
    --data '{
      "templateId": "WgWxqztrNooG92RXvxSTWv:3:CL:123:default",
      "schemaType": "INDY"
    }'
  ```
</CodeGroup>

### Upload CSV for bulk issuance

`POST /orgs/:orgId/bulk/upload`

Upload a filled CSV file for bulk issuance. The file is uploaded as `multipart/form-data`.

**Required roles:** `owner`, `admin`, `issuer`, `verifier`

#### Path parameters

<ParamField path="orgId" type="string" required>
  UUID of the organization.
</ParamField>

#### Query parameters

<ParamField query="schemaType" type="string" required>
  Schema type of the CSV data. Enum: `INDY` or `W3C`.
</ParamField>

<ParamField query="templateId" type="string" required>
  The credential definition ID used as the template.
</ParamField>

<ParamField query="isValidateSchema" type="boolean">
  Validate rows against the schema on upload. Defaults to `true`.
</ParamField>

#### Request body

Upload a `file` field as `multipart/form-data` containing the CSV binary. Optionally include a `fileName` field.

#### Examples

<CodeGroup>
  ```bash curl theme={null}
  curl --request POST \
    --url "http://localhost:5000/v1/orgs/3fa85f64-5717-4562-b3fc-2c963f66afa6/bulk/upload?schemaType=INDY&templateId=WgWxqztrNooG92RXvxSTWv:3:CL:123:default" \
    --header "Authorization: Bearer <your-jwt-token>" \
    --form "file=@employees.csv" \
    --form "fileName=employees.csv"
  ```
</CodeGroup>

```json 201 response theme={null}
{
  "statusCode": 201,
  "message": "CSV imported successfully",
  "data": {
    "requestId": "c2e43f80-9f3a-4b12-835d-ecb9e4f12abc",
    "fileName": "employees.csv",
    "totalRecords": 50,
    "status": "PROCESS_STARTED"
  }
}
```

### Execute bulk issuance

`POST /orgs/:orgId/:requestId/bulk`

Start the bulk credential issuance process for a previously uploaded CSV file.

**Required roles:** `owner`, `admin`, `issuer`, `verifier`

#### Path parameters

<ParamField path="orgId" type="string" required>
  UUID of the organization.
</ParamField>

<ParamField path="requestId" type="string" required>
  The `requestId` returned when the CSV was uploaded.
</ParamField>

#### Query parameters

<ParamField query="isValidateSchema" type="boolean">
  Validate rows against the schema before issuing. Defaults to `true`.
</ParamField>

<ParamField query="credDefId" type="string">
  Override the credential definition ID for this issuance run.
</ParamField>

#### Request body

<ParamField body="clientId" type="string">
  Client identifier for tracking the bulk job.
</ParamField>

<ParamField body="fileName" type="string">
  Name of the CSV file being processed.
</ParamField>

<ParamField body="isSelectiveIssuance" type="boolean">
  When `true`, allows selective issuance for specific rows.
</ParamField>

<ParamField body="organizationLogoUrl" type="string">
  URL of the organization's logo to include in credential emails.
</ParamField>

<ParamField body="platformName" type="string">
  Platform name to include in credential emails.
</ParamField>

***

## Delete issuance records

`DELETE /orgs/:orgId/issuance-records`

Delete all issuance records for an organization. This action is irreversible.

**Required roles:** `owner`

### Path parameters

<ParamField path="orgId" type="string" required>
  UUID of the organization.
</ParamField>

### Examples

<CodeGroup>
  ```bash curl theme={null}
  curl --request DELETE \
    --url "http://localhost:5000/v1/orgs/3fa85f64-5717-4562-b3fc-2c963f66afa6/issuance-records" \
    --header "Authorization: Bearer <your-jwt-token>"
  ```
</CodeGroup>

```json 200 response theme={null}
{
  "statusCode": 200,
  "message": "Issuance records deleted successfully"
}
```

| Status             | Description                          |
| ------------------ | ------------------------------------ |
| `400 Bad Request`  | `orgId` is not a valid UUID.         |
| `401 Unauthorized` | Missing or invalid bearer token.     |
| `403 Forbidden`    | User does not have the `owner` role. |
