# Register a client certificate

Canonical page: https://docs.ovok.com/api/signals/register-a-client-certificate

`POST /v1/signals/certs`

Registers a client certificate for your current project. Calls into Signals may then present it, and must once `SIGNALS_MTLS_ENABLED` is on.

**Auth:** A client credential cannot register a certificate for itself.
**Scope:** the caller's project (from the token).

## Behaviour

- Send the certificate as PEM in `certificate`. Only its first certificate is read. Never send the private key: it stays with your client.
- The certificate must be valid now, not a CA certificate, for client authentication (or have no extended key usage), and issued by a CA your Ovok environment trusts. Otherwise 422 `CERTIFICATE_NOT_ACCEPTED`, with the reason.
- An environment with no CA set up for client certificates answers 501 `FEATURE_NOT_CONFIGURED`.
- The same certificate twice answers 409 `CERTIFICATE_ALREADY_REGISTERED`; a third certificate 409 `CERTIFICATE_LIMIT_REACHED`.
- The answer is 201 with the registered certificate, and `Location` names it.
- At 00:00 UTC, 14 days before the certificate expires, Ovok notifies the project's admins in the Console and mails them and its parent project's admins. A certificate registered closer to its expiry is mailed about at once; a removed one is not.
- To rotate: register the new certificate, move your clients to it, then remove the old one.

## Example

```bash
curl -X POST 'https://api.sandbox.ovok.com/v1/signals/certs' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \
  -H 'Content-Type: application/json' \
  -d "{ \"certificate\": $(jq -Rs . < client.crt) }"
```

**Who can call it:** a project admin. See [roles](/access-policies#who-can-call-a-route).