---
title: "Update certificate"
method: PUT
path: "/certificates/{certificate_token}"
tags: ["certificates"]
---

# Update certificate

`PUT /certificates/{certificate_token}`

Update an existing SSL certificate record with the signed certificate value (in PEM format).

## Request body

- UpdateCertificate
  - `certificate` object
    - `pem` string — The signed certificate in PEM format. This value will be empty on initial certificate generation.

## Response `200`

Successful

- CreateCertificateResponse
  - `certificate` object
    - `token` string — A unique string generated by Spreedly to identify the certificate.
    - `algorithm` string — The encryption algorithm to use when creating the key pair. Currently, the only supported options are ec-prime256v1 representing the X9.62/SECG curve over a 256 bit prime field, or rsa-2048, which uses a 2048-bit RSA key.
    - `cn` string — The certificate common name
    - `o` string — The organization
    - `ou` string — The organization unit
    - `c` string — The country
    - `st` string — The state
    - `l` string — The locality or city
    - `email_address` string — The email address
    - `public_key` string — PEM-formatted public key of the certificate
    - `public_key_hash` string — The base64 encoded, SHA256 hash, of the public key
    - `csr` string — PEM formatted certificate signing request (CSR)
    - `pem` string — The signed certificate in PEM format. This value will be empty on initial certificate generation.
    - `created_at` string — The time the certificate was created
    - `updated_at` string — The time the certificate was last updated

## Other responses

- `422` — Request not processed

---

[API](https://skmtc.dev/spreedly/apis/spreedly-api-v1.md) · [All operations](https://skmtc.dev/spreedly/apis/spreedly-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/spreedly/spreedly-api-v1/revisions/72ba4e23e65c/schema)
