# API list

All 63 V2 endpoints, grouped by area. Each one is `POST https://open.cli.im/api/v2/rpc/{path}` with a JSON body. This page is generated from [openapi.json](https://cli.im/open-api/en/openapi/v2/overview.md#openapi-json), which holds the request fields of every endpoint.

- **Minimum level** is the lowest [personal API key or OAuth level](https://cli.im/open-api/en/openapi/v2/auth.md#org-policy) that can call the endpoint. The organization's maximum permission and the member's own access still apply.
- **Organization key** shows whether a [legacy organization key](https://cli.im/open-api/en/openapi/v2/auth.md#org-key) can call it.
- Endpoints with a link have their own reference page. Pages marked "Chinese only" have no English version yet.

## Credential and quota

Check which organization and permission level the credential has, and the organization's quota for the day.

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [Current organization, effective permissions and capabilities](https://cli.im/open-api/openapi/v2/reference/auth_get_context.md) (Chinese only) | `auth/getContext` | Read-only | Yes |
| [Organization quota used today for MCP and API](https://cli.im/open-api/openapi/v2/reference/usage_get.md) (Chinese only) | `usage/get` | Read-only | Yes |

## Codes

List codes and read their content and operation panel.

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [Get code content](https://cli.im/open-api/en/openapi/v2/api/qrcodes-get-content.md) | `qrcodes/getContent` | Read-only | Yes |
| [Operation items linked to a code](https://cli.im/open-api/en/openapi/v2/api/qrcodes-get-operation.md) | `qrcodes/getOperation` | Read-only | Yes |
| [List codes](https://cli.im/open-api/openapi/v2/api/qrcodes-list.md) (Chinese only) | `qrcodes/list` | Read-only | Yes |

## Batch templates and sub-codes

Read batch templates and their sub-codes.

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [List batch templates](https://cli.im/open-api/openapi/v2/api/templates/templates-list.md) (Chinese only) | `templates/list` | Read-only | Yes |
| [Get a batch template](https://cli.im/open-api/openapi/v2/api/templates/templates-get.md) (Chinese only) | `templates/get` | Read-only | Yes |
| [List sub-codes of a template](https://cli.im/open-api/openapi/v2/api/templates/templates-list-qrcodes.md) (Chinese only) | `templates/listQrcodes` | Read-only | Yes |
| [Get a sub-code](https://cli.im/open-api/openapi/v2/api/templates/templates-get-subcode.md) (Chinese only) | `templates/getSubcode` | Read-only | Yes |

## Forms and records

Read form structures and records, add records and verify certificates.

Step-by-step: [Query forms and records linked to a QR code](https://cli.im/open-api/en/openapi/v2/scenarios/query-qrcode-records.md), [Submit a record to a form under a QR code](https://cli.im/open-api/en/openapi/v2/scenarios/add-record-by-qrcode.md).

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [Get form structure](https://cli.im/open-api/en/openapi/v2/api/record/forms-get-template.md) | `forms/getTemplate` | Read-only | Yes |
| [Get a record](https://cli.im/open-api/en/openapi/v2/api/record/record-get-record.md) | `record/getRecord` | Read-only | Yes |
| [List records](https://cli.im/open-api/en/openapi/v2/api/record/record-get-records.md) | `record/getRecords` | Read-only | Yes |
| [List forms](https://cli.im/open-api/en/openapi/v2/api/record/record-get-form-list.md) | `record/getFormList` | Read-only | Yes |
| [Add a record](https://cli.im/open-api/en/openapi/v2/api/record/record-add-record.md) | `record/addRecord` | Read/write | Yes |
| [Verify a certificate](https://cli.im/open-api/en/openapi/v2/api/record/certificates-verify.md) | `certificates/verify` | Read/write | Yes |
| [Follow-up activity on a record](https://cli.im/open-api/openapi/v2/reference/record_activities_list.md) (Chinese only) | `record/getActivities` | Read-only | — |
| [Search records for drill-down](https://cli.im/open-api/openapi/v2/api/record/record-search-records.md) (Chinese only) | `record/searchRecords` | Read-only | Yes |

## Projects

List the projects in the organization.

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [List projects](https://cli.im/open-api/openapi/v2/api/projects-list.md) (Chinese only) | `projects/list` | Read-only | Yes |

## Metrics

Read metric definitions and query results by dimension.

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [Business objects and available metrics](https://cli.im/open-api/openapi/v2/api/metrics/metrics-list.md) (Chinese only) | `metrics/list` | Read-only | Yes |
| [Get a metric definition](https://cli.im/open-api/openapi/v2/api/metrics/metrics-get.md) (Chinese only) | `metrics/get` | Read-only | Yes |
| [Query a metric](https://cli.im/open-api/openapi/v2/api/metrics/metrics-query.md) (Chinese only) | `metrics/query` | Read-only | Yes |

## Official templates

Browse the official template library and create one code or a batch from a template.

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [Official template categories](https://cli.im/open-api/openapi/v2/reference/gallery_categories.md) (Chinese only) | `gallery/categories` | Read-only | — |
| [Browse or search official templates](https://cli.im/open-api/openapi/v2/reference/gallery_list.md) (Chinese only) | `gallery/list` | Read-only | — |
| [Get an official template](https://cli.im/open-api/openapi/v2/reference/gallery_get.md) (Chinese only) | `gallery/get` | Read-only | — |
| [Prepare an official-template creation plan](https://cli.im/open-api/openapi/v2/reference/gallery_prepare_creation.md) (Chinese only) | `gallery/prepare-creation` | Read/write | — |
| [Create one code from an official template](https://cli.im/open-api/openapi/v2/reference/gallery_create_qrcode.md) (Chinese only) | `gallery/create-qrcode` | Read/write | — |
| [Run an official-template creation plan](https://cli.im/open-api/openapi/v2/reference/gallery_create_from_plan.md) (Chinese only) | `gallery/create-from-plan` | Read/write | — |

## Code creation and batch tasks

Create standard, redirect, multi-link and static codes. Prevalidate and submit batch creation from a template, then read task progress and per-item results.

Step-by-step: [Create codes in bulk from a template](https://cli.im/open-api/en/openapi/v2/scenarios/batch-create-qrcodes.md).

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [Prevalidate a batch without creating codes](https://cli.im/open-api/openapi/v2/reference/qrcodes_prevalidate.md) (Chinese only) | `qrcodes/prevalidate` | Read/write | — |
| [Submit a batch creation task](https://cli.im/open-api/openapi/v2/reference/qrcodes_create_batch.md) (Chinese only) | `qrcodes/createBatch` | Read/write | — |
| [Get creation task progress](https://cli.im/open-api/openapi/v2/reference/qrcode_tasks_get.md) (Chinese only) | `qrcodeTasks/get` | Read/write | — |
| [Projects and folders you can create in](https://cli.im/open-api/openapi/v2/reference/qrcodes_list_create_targets.md) (Chinese only) | `qrcodes/listCreateTargets` | Read-only | — |
| [Per-item results of a batch task](https://cli.im/open-api/openapi/v2/reference/qrcode_tasks_get_results.md) (Chinese only) | `qrcodeTasks/getResults` | Read/write | — |
| [Create a standard code and link forms](https://cli.im/open-api/openapi/v2/reference/qrcodes_create.md) (Chinese only) | `qrcodes/create` | Read/write | — |
| [Create a redirect code](https://cli.im/open-api/openapi/v2/reference/qrcodes_create_url_jump.md) (Chinese only) | `qrcodes/createUrlJump` | Read/write | — |
| [Create a multi-link code](https://cli.im/open-api/openapi/v2/reference/qrcodes_create_multi_url.md) (Chinese only) | `qrcodes/createMultiUrl` | Read/write | — |
| [Create a static text or URL code](https://cli.im/open-api/openapi/v2/reference/static_qrcodes_create.md) (Chinese only) | `staticQrcodes/create` | Read/write | — |

## Edit and delete

Edit and delete codes and forms. Read the edit state for a version before editing. Deleting takes two calls: preview for a confirmation token, then delete with it.

Step-by-step: [Edit and delete codes and forms](https://cli.im/open-api/en/openapi/v2/scenarios/edit-and-delete.md).

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [Code content, version and editability](https://cli.im/open-api/openapi/v2/reference/qrcodes_get_edit_state.md) (Chinese only) | `qrcodes/getEditState` | Read/write | — |
| [Edit a standard code](https://cli.im/open-api/openapi/v2/reference/qrcodes_edit.md) (Chinese only) | `qrcodes/edit` | Read/write | — |
| [Edit a redirect code](https://cli.im/open-api/openapi/v2/reference/qrcodes_edit_url_jump.md) (Chinese only) | `qrcodes/editUrlJump` | Read/write | — |
| [Edit a multi-link code](https://cli.im/open-api/openapi/v2/reference/qrcodes_edit_multi_url.md) (Chinese only) | `qrcodes/editMultiUrl` | Read/write | — |
| [Edit one sub-code](https://cli.im/open-api/openapi/v2/reference/qrcode_children_edit.md) (Chinese only) | `qrcodeChildren/edit` | Read/write | — |
| [Form fields, version and editability](https://cli.im/open-api/openapi/v2/reference/forms_get_edit_state.md) (Chinese only) | `forms/getEditState` | Read/write | — |
| [Edit a form's name or fields](https://cli.im/open-api/openapi/v2/reference/forms_edit.md) (Chinese only) | `forms/edit` | Read/write | — |
| [Preview code deletion and get a token](https://cli.im/open-api/openapi/v2/reference/qrcodes_preview_delete.md) (Chinese only) | `qrcodes/previewDelete` | Full | — |
| [Delete codes with a confirmation token](https://cli.im/open-api/openapi/v2/reference/qrcodes_delete.md) (Chinese only) | `qrcodes/delete` | Full | — |
| [Preview form deletion and get a token](https://cli.im/open-api/openapi/v2/reference/forms_preview_delete.md) (Chinese only) | `forms/previewDelete` | Full | — |
| [Delete forms with a confirmation token](https://cli.im/open-api/openapi/v2/reference/forms_delete.md) (Chinese only) | `forms/delete` | Full | — |

## Template and form management

Find, create and edit templates, and create forms.

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [Find templates you can create from or edit](https://cli.im/open-api/openapi/v2/reference/templates_list_editable.md) (Chinese only) | `templates/listEditable` | Read-only | — |
| [Template fields and version for writing](https://cli.im/open-api/openapi/v2/reference/templates_get_schema.md) (Chinese only) | `templates/getSchema` | Read-only | — |
| [Create a template](https://cli.im/open-api/openapi/v2/reference/templates_create.md) (Chinese only) | `templates/create` | Read/write | — |
| [Preview a template change and its impact](https://cli.im/open-api/openapi/v2/reference/templates_preview_edit.md) (Chinese only) | `templates/previewEdit` | Read/write | — |
| [Save template changes](https://cli.im/open-api/openapi/v2/reference/templates_edit.md) (Chinese only) | `templates/edit` | Read/write | — |
| [Create a form, optionally with a schedule](https://cli.im/open-api/openapi/v2/reference/forms_create.md) (Chinese only) | `forms/create` | Read/write | — |

## File upload

Request a temporary upload for a local image or file and get the file_key to reference when creating codes.

Step-by-step: [Create codes in bulk from a template](https://cli.im/open-api/en/openapi/v2/scenarios/batch-create-qrcodes.md#upload).

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [Request a temporary upload](https://cli.im/open-api/openapi/v2/reference/assets_request_upload.md) (Chinese only) | `assets/requestUpload` | Read/write | — |
| [Get upload status](https://cli.im/open-api/openapi/v2/reference/assets_get_upload.md) (Chinese only) | `assets/getUpload` | Read/write | — |

## Labels

Read the label style, then preview and export labels for specific codes.

Step-by-step: [Export printable labels](https://cli.im/open-api/en/openapi/v2/scenarios/export-labels.md).

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [Current label style and supported formats](https://cli.im/open-api/openapi/v2/reference/labels_get_config.md) (Chinese only) | `labels/getConfig` | Read-only | — |
| [Preview labels for specific codes](https://cli.im/open-api/openapi/v2/reference/labels_preview.md) (Chinese only) | `labels/preview` | Read-only | — |
| [Create a label export task](https://cli.im/open-api/openapi/v2/reference/label_exports_create.md) (Chinese only) | `labelExports/create` | Read/write | — |
| [Get a label export task and its files](https://cli.im/open-api/openapi/v2/reference/label_exports_get.md) (Chinese only) | `labelExports/get` | Read/write | — |

## Recurring plans

Read recurring plans and how each cycle was completed.

| Endpoint | Path | Minimum level | Organization key |
|---|---|---|---|
| [List recurring plans](https://cli.im/open-api/openapi/v2/reference/cycle_plans_list.md) (Chinese only) | `cyclePlans/list` | Read-only | — |
| [Get a recurring plan](https://cli.im/open-api/openapi/v2/reference/cycle_plans_get.md) (Chinese only) | `cyclePlans/get` | Read-only | — |
| [Per-code completion for a cycle](https://cli.im/open-api/openapi/v2/reference/cycle_tasks_list_qrcodes.md) (Chinese only) | `cycleTasks/listQrcodes` | Read-only | — |
| [Completion of a recurring task](https://cli.im/open-api/openapi/v2/reference/cycle_tasks_get_completion.md) (Chinese only) | `cycleTasks/getCompletion` | Read-only | — |
