/v1/certificatesCreate certificate
Create a new certificate. Supports two types: - **ACME**: Automatically issues a certificate using DNS-01 challenge. Supports multi-domain and wildcard certificates. After creation, configure the DNS CNAME records as specified in the response, then call the validate endpoint. - **Uploaded**: Upload your own certificate, private key, and optional chain.
Header Parameters
X-Region
stringrequiredheader
Region code to query resources from. Required for all resource operations.
Example: "sao1"
Request Body
requiredContent-Type: application/json
name
stringrequiredName of the certificate
type
stringrequiredEnum: "acme", "uploaded"
domains
arrayoptionalList of domains for ACME certificate (supports multi-domain and wildcard certs)
certificate
stringoptionalPEM-encoded certificate (required when type is 'uploaded')
private_key
stringoptionalPEM-encoded private key (required when type is 'uploaded')
chain
stringoptionalPEM-encoded certificate chain (optional for uploaded certificates)
Responses
Certificate created
Content-Type: application/json
certificate
objectoptionalInvalid request parameters
Content-Type: application/json
error
objectrequiredAuthentication required or token invalid
Content-Type: application/json
error
objectrequiredInsufficient permissions
Content-Type: application/json
error
objectrequiredCertificate with this name already exists
Content-Type: application/json
error
objectrequiredInternal server error
Content-Type: application/json
error
objectrequiredcurl -X POST "https://api.spo1.mycloud.com/v1/certificates" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-H "Content-Type: application/json" \-d '{"name": "my-certificate","type": "acme","domains": ["example.com","*.example.com"],"certificate": "-----BEGIN CERTIFICATE-----\n...","private_key": "-----BEGIN PRIVATE KEY-----\n...","chain": "-----BEGIN CERTIFICATE-----\n..."}'
Response
Certificate created
{"certificate": {"id": "550e8400-e29b-41d4-a716-446655440000","crn": "crn:sao1:certificate:certificate:550e8400-e29b-41d4-a716-446655440000","name": "my-certificate","type": "acme","domains": ["example.com","*.example.com"],"status": "active","expires_at": "2024-01-15T10:30:00Z","renew_after": "2024-01-15T10:30:00Z","error_message": "string","created_at": "2024-01-15T10:30:00Z","updated_at": "2024-01-15T10:30:00Z","dns_setup": {"records": [{"record_name": "_acme-challenge.example.com","record_type": "CNAME","record_value": "example.com.acme.bycloud.io"}],"instructions": "Create the following CNAME records to validate domain ownership"},"bindings": [{"id": "550e8400-e29b-41d4-a716-446655440000","crn": "crn:sao1:certificate:binding:550e8400-e29b-41d4-a716-446655440000","certificate_id": "550e8400-e29b-41d4-a716-446655440001","resource_type": "octavia:listener","resource_id": "550e8400-e29b-41d4-a716-446655440002","options": {"sni": false},"status": "active","error_message": "string","created_at": "2024-01-15T10:30:00Z","updated_at": "2024-01-15T10:30:00Z"}]}}