---
title: "Create or update a Certificate from a raw certificate file"
method: POST
path: "/apiops/projects/{projectName}/certificates/import-file/"
tags: ["ApiProxy"]
---

# Create or update a Certificate from a raw certificate file

`POST /apiops/projects/{projectName}/certificates/import-file/`

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/projects/{projectName}/certificates/import-file/`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/projects/:projectName/certificates/import-file/post.ts> (a function with typed inputs; its response is checked against the schema)

Uploads certificate material as a file and writes it to the environments you name. A single PEM/DER file goes to every environment in environmentList; the ZIP produced by the export endpoint restores each environment from its own entry. Unlike create/update, an environment that already carries this certificate is REPLACED rather than duplicated, and an environment this upload does not name keeps what it had.

## Path parameters

- `projectName` string, required

## Query parameters

- `certificateName` string, required
- `alias` string, required
- `environmentList` string
- `certificateDescription` string

## Request body `multipart/form-data`

- object
  - `certificateFile` string, binary, required: Raw certificate file (PEM/DER), or the ZIP produced by the export endpoint
  - `environmentMapping` string: Optional JSON: environment name in the package -> environment name in this installation. An empty value means that environment is deliberately not transferred. Only meaningful when a ZIP is uploaded.

## Response `200`

successful operation!

- ApiOpsResponseSuccess
  - `status` 'SUCCESS' | 'FAILURE'
  - `resultMessage` string
  - `resultList` string[]
  - `resultCount` integer
  - `deploymentResult` DeploymentResult
    - `envName` string
    - `podName` string
    - `podIp` string
    - `success` boolean
    - `detail` string
    - `responseTime` integer
    - `detailList` unknown[]
      - unknown
    - `firstFromApiResultList` unknown
  - `unresolvedReferences` string[]
  - `advisories` ApiOpsAdvisoryDTO[]
    - `level` string
    - `key` string
    - `params` object

## Other responses

- `400`: bad request!
- `401`: not authorized for this operation!
- `500`: internal error!

## Changes

- **2026-08-11** `9ae232e55479`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/apinizer/apis/apinizer-management-apis/changes/apiops/projects/:projectName/certificates/import-file/post.md)

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
