API keys and client certificates
The official API checks two things together.
- API key: the
Authorization: Bearer slzp_…header. It identifies the caller and its scopes. - Client certificate: the certificate presented during the TLS handshake (mTLS). It must be the exact certificate issued with that key.
A leaked key or a leaked certificate alone is not enough. Without a certificate the TLS handshake fails, and a certificate from another key gets 401 CLIENT_CERT_MISMATCH.
Creating a key
Section titled “Creating a key”Vendor admins create keys in the portal under API keys, after the vendor is approved.
-
On the server that will call the API, make a private key and a CSR. Keep the private key on that server.
터미널 창 openssl ecparam -name prime256v1 -genkey -noout -out client.keyopenssl req -new -key client.key -subj "/CN=api-client" -out client.csr -
In the portal, open API keys › New key, choose a name, scopes and a lifetime (90, 180 or 365 days), and paste
client.csr. -
The key value is shown once. Store it in your secret store right away. It cannot be shown again; if you lose it, create a new key.
-
Download the client certificate (
client.crt) and chain and keep them next to the private key.
Using it in requests
Section titled “Using it in requests”curl https://api.pki.solar-on.org/v1/me \--cert client.crt --key client.key \-H "Authorization: Bearer $PKI_API_KEY"The portal sets the client certificate’s CN (api-{key ID}). The CN in your CSR can be anything.
Scopes
Section titled “Scopes”Pick only the scopes you need. Calling an API outside the key’s scopes returns 403 INSUFFICIENT_SCOPE.
| Scope | Allows | API |
|---|---|---|
vendor.read | Profiles your vendor can use | GET /v1/profiles |
devices.read | Read the device registry | GET /v1/devicesGET /v1/devices/{serial} |
devices.write | Register and update devices (ship, activate, return, retire) | POST /v1/devicesPATCH /v1/devices/{serial} |
certs.read | Read certificates, requests and batches; download chains | GET /v1/batches/{id}GET /v1/certificatesGET /v1/certificates/{serial}GET /v1/certificates/{serial}/chainGET /v1/requestsGET /v1/requests/{id} |
certs.issue | Issue, bulk issue and renew | POST /v1/certificatesPOST /v1/certificates/batchPOST /v1/certificates/{serial}/renew |
certs.revoke | Revoke | POST /v1/certificates/{serial}/revoke |
GET /v1/me works with any valid key.
Lifetime and rotation
Section titled “Lifetime and rotation”- A key and its client certificate expire on the same day (365 days at most). After that, calls get
401 API_KEY_EXPIRED. - A vendor can have 20 active keys. Separate keys per factory line or server let you revoke one without stopping the others.
- To rotate: create a new key and deploy it → confirm calls work with it → revoke the old key. Overlapping keys avoid downtime.
Revocation
Section titled “Revocation”Revoking a key in the portal also revokes its client certificate, and the next call gets 401 API_KEY_REVOKED. Revoke immediately if you suspect the key or private key leaked. Solarize may also revoke keys after a security incident or when a contract ends.
Vendor status
Section titled “Vendor status”| Vendor status | Official API |
|---|---|
| Approved | Everything |
| Suspended | Reads and revocations only. Registering, issuing and renewing return 403 VENDOR_SUSPENDED |
| Anything else (in review, rejected) | 403 VENDOR_INACTIVE |
Rate limit and logging
Section titled “Rate limit and logging”- Each key can make 600 calls per minute. Beyond that you get
429 RATE_LIMITEDwithRetry-After(seconds). - Every call is logged with time, key, path, result, IP and client certificate serial. See recent calls in the portal under API keys.