# Insert an identity certificate.

> For the complete documentation index, see [llms.txt](https://bsvblockchain.com/docs/llms.txt).

**POST** `/certificates`

Base URL: `https://{host}/storage/v1`

Insert an identity certificate.

## Body

Content type: `application/json`

- `certificateId` (integer)
- `userId` (integer, required)
- `certifier` (string, required)
- `serialNumber` (string, required)
- `type` (string, required)
- `isDeleted` (boolean, required)
- `fields` (object[])

Example:

```json
{
  "certificateId": 0,
  "userId": 0,
  "certifier": "string",
  "serialNumber": "string",
  "type": "string",
  "isDeleted": true,
  "fields": [
    {}
  ]
}
```

## Responses

### 200

certificateId of the new record.

- `certificateId` (integer)

Example:

```json
{
  "certificateId": 0
}
```

### 401

Authentication required or token invalid.

- `error` (string, required)
- `code` (string)
  Machine-readable error code (see specs/errors.md).

Example:

```json
{
  "error": "string",
  "code": "string"
}
```