---
title: "Set mock API certificate settings"
method: PUT
path: "/v1/mock-apis/{mockApiId}/settings/certificate"
tags: ["Settings"]
---

# Set mock API certificate settings

`PUT /v1/mock-apis/{mockApiId}/settings/certificate`

Set the certificate settings for a mock API. These settings are used to configure the cryptographic handlebars helpers,
[`sign`](/response-templating/cryptographic-helpers#signing) and [`x509Certificate`](/response-templating/cryptographic-helpers#x-509-certificate).

## Request body

- object
  - `certificate` object
    - `rsa256PublicKey` string, required — RSA public key in PEM format.
    - `rsa256PrivateKey` string, required — RSA private key in PEM format.
    - `x509Certificate` string, required — X.509 certificate in PEM format.
    - `hmacSecret` string, required — A non-empty secret key.

## Response `200`

Settings successfully updated

- object
  - `certificate` object
    - `rsa256PublicKey` string, required — The updated RSA public key.
    - `rsa256PrivateKey` string, required — The updated RSA private key.
    - `x509Certificate` string, required — The updated X.509 certificate.
    - `hmacSecret` string, required — The updated HMAC secret key.

## Other responses

- `400` — 400 Bad Request response
- `401` — 401 Unauthenticated response
- `403` — 403 Unauthorized response
- `404` — 404 Not Found response
- `422` — 422 Bad Entity response

---

[API](https://skmtc.net/wiremock/apis/wiremock-cloud.md) · [All operations](https://skmtc.net/wiremock/apis/wiremock-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wiremock/wiremock-cloud/revisions/93bebefc672f/schema)
