---
title: "Add custom certificate for a website"
method: POST
path: "/v1/hosting/websites/{website_id}/certificate/custom"
tags: ["Certificate"]
---

# Add custom certificate for a website

`POST /v1/hosting/websites/{website_id}/certificate/custom`

## Request

- Base URL: `https://api.10web.io`
- URL: `https://api.10web.io/v1/hosting/websites/{website_id}/certificate/custom`
- Auth: none declared. Required headers: `x-api-key`
- TypeScript: <https://skmtc.dev/10web/apis/10web-api-v1/docs/v1/hosting/websites/:website_id/certificate/custom/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `website_id` integer, required

## Headers

- `x-api-key` string, required

## Request body

- GenerateCustomCertificateRequest
  - `key_file_content` string, required: The content of the key file
  - `cert_file_content` string, required: The content of the certificate file, recommended to append the ca file content after it
  - `ca_file_content` string: The content of the ca file
  - `redirect_http` 0 | 1: Redirect HTTP to HTTPS

## Response `200`

Custom certificate generated successfully

- object
  - `status` 'ok' | 'error'

## Other responses

- `400`: Bad request
- `403`: Unauthorized access
- `429`: Too many requests
- `500`: Something went wrong

---

[API](https://skmtc.dev/10web/apis/10web-api-v1.md) - [All operations](https://skmtc.dev/10web/apis/10web-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/10web/apis/10web-api-v1/revisions/01afc9651dfc?raw)
