The following example registers a CA certificate and creates an AI CA Certificate entity:
To create an AI CA Certificate, call the Konnect AI Gateway API’s /ca-certificates endpoint.
curl -X POST https://{region}.api.konghq.com/v1/ai-gateways/{AIGatewayId}/ca-certificates \
--header "accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $KONNECT_TOKEN" \
--data '
{
"name": "my-root-ca",
"cert": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n"
}
'
Make sure to replace the following placeholders with your own values:
-
region: Geographic region where your Kong Konnect is hosted and operates.
-
KONNECT_TOKEN: Your Personal Access Token (PAT) associated with your Konnect account.
-
AIGatewayId: The id of the AI Gateway.
See the Konnect AI Gateway API reference to learn about region-specific URLs and personal access tokens.