ReferenceFlightcontrol APICustom DomainsCreate Domain Certificate Group

Create Certificate Domain Group

API Description

Full Endpoint URL: https://api.flightcontrol.dev/v1/services/{serviceId}/domain-certificate-groups

MethodPath
POST/v1/services/{serviceId}/domain-certificate-groups
Headers
AuthorizationBearer [API key]

Path Parameters

ParameterTypeDescription
serviceIdstringThe service unique CUID. Can be found in Flightcontrol’s dashboard.

Request

Body
ParameterRequiredTypeDescription
nameYes if useDefaultCloudfront = falsestringThe name of the domain group. Not applicable to the default cloudfront group.
domainsYesstring[]List of domains to be included in the group.
useDefaultCloudfrontNobooleanWhether to use the default CloudFront from the service. Setting to false creates a new CloudFront distribution.

Example:

Using default cloudfront:

{
  "domains": ["app.example.com", "www.example.com"],
  "useDefaultCloudfront": true
}

Creating a new cloudfront:

{
  "name": "New Domain Group",
  "domains": ["app.example.com", "www.example.com"],
  "useDefaultCloudfront": false
}

Response Example

{
  "id": "cm7lm3g0h0002127peb5n54k0",
  "name": "New Domain Group",
  "status": "DRAFT",
  "isDefaultCertificateGroup": false,
  "cloudfrontDistributionId": null,
  "certificate": null
}