Upload a certificate for the team's domains: the chain and its private key, PEM.
API key access: full.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonUpload a certificate for the team's domains: the chain and its private key, PEM.
API key access: full.
op*"uploadCertificate""uploadCertificate"id*stringA new id you choose: crt_ then 4 to 40 lowercase letters, digits, dashes or underscores.
teamId*stringname*stringcertificate*stringThe certificate chain, PEM.
privateKey*stringIts private key, PEM.
Done. Always ok: true, and some operations add more, such as a new API key or a join command. A warning comes with a change that went through but won't fully take effect yet, such as more replicas than the servers have room for.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/ops' \
-H 'Content-Type: application/json' \
-d '{
"certificate": "-----BEGIN CERTIFICATE-----\n…\n-----END CERTIFICATE-----",
"id": "crt_8kq2x7ad",
"name": "shop.example.com",
"op": "uploadCertificate",
"privateKey": "-----BEGIN PRIVATE KEY-----\n…\n-----END PRIVATE KEY-----",
"teamId": "team_8kq2x7ad"
}'{}