Upload certificate
POST/organization/certificates
Upload a certificate to the organization. This does not automatically activate the certificate.
Organizations can upload up to 50 certificates.
Body ParametersJSON
content: string
The certificate content in PEM format
name: optional string
An optional name for the certificate
Returns
id: string
The identifier, which can be referenced in API endpoints
created_at: number
The Unix timestamp (in seconds) of when the certificate was uploaded.
name: string
The name of the certificate.
active: optional boolean
Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate.
Upload certificate
curl -X POST https://api.openai.com/v1/organization/certificates \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My Example Certificate",
"certificate": "-----BEGIN CERTIFICATE-----\\nMIIDeT...\\n-----END CERTIFICATE-----"
}'
{
"object": "certificate",
"id": "cert_abc",
"name": "My Example Certificate",
"created_at": 1234567,
"certificate_details": {
"valid_at": 12345667,
"expires_at": 12345678
}
}
Returns Examples
{
"object": "certificate",
"id": "cert_abc",
"name": "My Example Certificate",
"created_at": 1234567,
"certificate_details": {
"valid_at": 12345667,
"expires_at": 12345678
}
}