Skip to content

API keys and client certificates

The official API checks two things together.

  1. API key: the Authorization: Bearer slzp_… header. It identifies the caller and its scopes.
  2. 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.

Vendor admins create keys in the portal under API keys, after the vendor is approved.

  1. 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.key
    openssl req -new -key client.key -subj "/CN=api-client" -out client.csr
  2. In the portal, open API keys › New key, choose a name, scopes and a lifetime (90, 180 or 365 days), and paste client.csr.

  3. 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.

  4. Download the client certificate (client.crt) and chain and keep them next to the private key.

터미널 창
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.

Pick only the scopes you need. Calling an API outside the key’s scopes returns 403 INSUFFICIENT_SCOPE.

ScopeAllowsAPI
vendor.readProfiles your vendor can use
GET /v1/profiles
devices.readRead the device registry
GET /v1/devices
GET /v1/devices/{serial}
devices.writeRegister and update devices (ship, activate, return, retire)
POST /v1/devices
PATCH /v1/devices/{serial}
certs.readRead certificates, requests and batches; download chains
GET /v1/batches/{id}
GET /v1/certificates
GET /v1/certificates/{serial}
GET /v1/certificates/{serial}/chain
GET /v1/requests
GET /v1/requests/{id}
certs.issueIssue, bulk issue and renew
POST /v1/certificates
POST /v1/certificates/batch
POST /v1/certificates/{serial}/renew
certs.revokeRevoke
POST /v1/certificates/{serial}/revoke

GET /v1/me works with any valid key.

  • 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.

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 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
  • Each key can make 600 calls per minute. Beyond that you get 429 RATE_LIMITED with Retry-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.