Skip to main content

Management API: Certificate Management

You're reading AI Gateway 2026.10.0. The newest release is 1.2.0. Go to the newest release

Manage custom TLS certificates for HTTPS upstream verification

List all custom certificates​

GET /certificates

Code samples


curl -X GET http://localhost:9090/api/management/v1/certificates \
-u {username}:{password} \
-H 'Accept: application/json'

Retrieve all custom TLS certificates currently loaded in the certificate store. These certificates are used for verifying HTTPS upstream connections.

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `developer`

Example responses

200 Response

{
"certificates": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-custom-ca",
"subject": "CN=My CA,O=My Organization,C=US",
"issuer": "CN=My CA,O=My Organization,C=US",
"notAfter": "2026-11-26 06:07:26",
"count": 1,
"message": "Certificate uploaded and SDS updated successfully",
"status": "success"
}
],
"totalCount": 3,
"totalBytes": 221599,
"status": "success"
}

Responses​

StatusMeaningDescriptionSchema
200OKList of certificatesCertificateListResponse
500Internal Server ErrorInternal server errorErrorResponse

Upload a new certificate​

POST /certificates

Code samples


curl -X POST http://localhost:9090/api/management/v1/certificates \
-u {username}:{password} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Upload a new TLS certificate (PEM format) to the Gateway. The certificate is loaded dynamically without restarting the Gateway.

Payload

{
"name": "my-custom-ca",
"certificate": "-----BEGIN CERTIFICATE-----\nMIIDXTCCAkWgAwIBAgIJAKL0UG+mRKtjMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\n...\n-----END CERTIFICATE-----\n"
}

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`

Parameters​

NameInTypeRequiredDescription
bodybodyCertificateUploadRequesttruenone

Example responses

201 Response

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-custom-ca",
"subject": "CN=My CA,O=My Organization,C=US",
"issuer": "CN=My CA,O=My Organization,C=US",
"notAfter": "2026-11-26 06:07:26",
"count": 1,
"message": "Certificate uploaded and SDS updated successfully",
"status": "success"
}

Responses​

StatusMeaningDescriptionSchema
201CreatedCertificate uploaded successfullyCertificateResponse
400Bad RequestInvalid certificate formatErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Delete a certificate​

DELETE /certificates/{id}

Code samples


curl -X DELETE http://localhost:9090/api/management/v1/certificates/{id} \
-u {username}:{password} \
-H 'Accept: application/json'

Delete a certificate from the Gateway. The change is applied dynamically without restarting the Gateway.

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`

Parameters​

NameInTypeRequiredDescription
idpathstringtrueID of the certificate to delete

Example responses

200 Response

{
"status": "success",
"message": "Certificate deleted and SDS updated successfully",
"id": "550e8400-e29b-41d4-a716-446655440000"
}

Responses​

StatusMeaningDescriptionSchema
200OKCertificate deleted successfullyInline
404Not FoundCertificate not foundErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Response Schema​

Status Code 200

NameTypeRequiredRestrictionsDescription
statusstringfalsenonenone
messagestringfalsenonenone
idstringfalsenonenone

Manually reload certificates​

POST /certificates/reload

Code samples


curl -X POST http://localhost:9090/api/management/v1/certificates/reload \
-u {username}:{password} \
-H 'Accept: application/json'

Manually trigger a reload of all certificates from the filesystem into the Gateway.

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`

Example responses

200 Response

{
"status": "success",
"message": "Certificates reloaded and SDS updated successfully",
"totalBytes": 221599
}

Responses​

StatusMeaningDescriptionSchema
200OKCertificates reloaded successfullyInline
500Internal Server ErrorInternal server errorErrorResponse

Response Schema​

Status Code 200

NameTypeRequiredRestrictionsDescription
statusstringfalsenonenone
messagestringfalsenonenone
totalBytesintegerfalsenoneTotal bytes of all loaded certificates

Was this page helpful?