---
title: "POST /v1/{+parent}/certificates"
method: POST
path: "/v1/{+parent}/certificates"
tags: ["projects"]
---

# POST /v1/{+parent}/certificates

`POST /v1/{+parent}/certificates`

Creates a new Certificate in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `certificateId` string

## Request body

- Certificate — Defines TLS certificate.
  - `sanDnsnames` string[] — Output only. The list of Subject Alternative Names of dnsName type defined in the certificate (see RFC 5280 4.2.1.6). Managed certificates that haven't been provisioned yet have this field populated with a value of the managed.domains field.
  - `expireTime` string, google-datetime — Output only. The expiry timestamp of a Certificate.
  - `labels` object — Optional. Set of labels associated with a Certificate.
  - `managed` ManagedCertificate — Configuration and state of a Managed Certificate. Certificate Manager provisions and renews Managed Certificates automatically, for as long as it's authorized to do so.
    - `provisioningIssue` ProvisioningIssue — Information about issues with provisioning a Managed Certificate.
      - `reason` 'REASON_UNSPECIFIED' | 'AUTHORIZATION_ISSUE' | 'RATE_LIMITED' — Output only. Reason for provisioning failures.
      - `details` string — Output only. Human readable explanation about the issue. Provided to help address the configuration issues. Not guaranteed to be stable. For programmatic access use Reason enum.
    - `dnsAuthorizations` string[] — Optional. Immutable. Authorizations that will be used for performing domain authorization.
    - `domains` string[] — Optional. Immutable. The domains for which a managed SSL certificate will be generated. Wildcard domains are only supported with DNS challenge resolution.
    - `state` 'STATE_UNSPECIFIED' | 'PROVISIONING' | 'FAILED' | 'ACTIVE' — Output only. State of the managed certificate resource.
    - `authorizationAttemptInfo` AuthorizationAttemptInfo[] — Output only. Detailed state of the latest authorization attempt for each domain specified for managed certificate resource.
      - `details` string — Output only. Human readable explanation for reaching the state. Provided to help address the configuration issues. Not guaranteed to be stable. For programmatic access use FailureReason enum.
      - `attemptTime` string, google-datetime — Output only. The timestamp, when the authorization attempt was made.
      - `troubleshooting` Troubleshooting — Troubleshooting information for the authorization attempt.
        - `issues` string[] — Output only. The list of issues discovered during the authorization attempt.
        - `cname` CNAME — CNAME troubleshooting information.
          - `expectedData` string — Output only. The expected value of the CNAME record for the domain, equals to `dns_resource_record.data` in the corresponding `DnsAuthorization`.
          - `name` string — Output only. The name of the CNAME record for the domain, equals to `dns_resource_record.name` in the corresponding `DnsAuthorization`.
          - `resolvedData` string[] — Output only. The resolved CNAME chain. Empty list if the CNAME record for `CNAME.name` is not found. Otherwise the first item is the value of the CNAME record for `CNAME.name`. If the CNAME chain is longer, the second item is the value of the CNAME record for the first item, and so on.
        - `ips` IPs — IPs troubleshooting information.
          - `servingOnAltPorts` string[] — Output only. The list of IP addresses, where the certificate is attached, but port 443 is not open.
          - `serving` string[] — Output only. The list of IP addresses, where the certificate is attached and port 443 is open.
          - `resolved` string[] — Output only. The list of IP addresses resolved from the domain's A/AAAA records. Can contain both ipv4 and ipv6 addresses.
      - `domain` string — Output only. Domain name of the authorization attempt.
      - `state` 'STATE_UNSPECIFIED' | 'AUTHORIZING' | 'AUTHORIZED' | 'FAILED' — Output only. State of the domain for managed certificate issuance.
      - `failureReason` 'FAILURE_REASON_UNSPECIFIED' | 'CONFIG' | 'CAA' | 'RATE_LIMITED' — Output only. Reason for failure of the authorization attempt for the domain.
    - `issuanceConfig` string — Optional. Immutable. The resource name for a CertificateIssuanceConfig used to configure private PKI certificates in the format `projects/*/locations/*/certificateIssuanceConfigs/*`. If this field is not set, the certificates will instead be publicly signed as documented at https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa.
  - `selfManaged` SelfManagedCertificate — Certificate data for a SelfManaged Certificate. SelfManaged Certificates are uploaded by the user. Updating such certificates before they expire remains the user's responsibility.
    - `pemCertificate` string — Optional. Input only. The PEM-encoded certificate chain. Leaf certificate comes first, followed by intermediate ones if any.
    - `pemPrivateKey` string — Optional. Input only. The PEM-encoded private key of the leaf certificate.
  - `createTime` string, google-datetime — Output only. The creation timestamp of a Certificate.
  - `updateTime` string, google-datetime — Output only. The last update timestamp of a Certificate.
  - `usedBy` UsedBy[] — Output only. The list of resources that use this Certificate.
    - `name` string — Output only. Full name of the resource https://google.aip.dev/122#full-resource-names, e.g. `//certificatemanager.googleapis.com/projects/*/locations/*/certificateMaps/*/certificateMapEntries/*` or `//compute.googleapis.com/projects/*/locations/*/targetHttpsProxies/*`.
  - `pemCertificate` string — Output only. The PEM-encoded certificate chain.
  - `scope` 'DEFAULT' | 'EDGE_CACHE' | 'ALL_REGIONS' | 'CLIENT_AUTH' — Optional. Immutable. The scope of the certificate.
  - `description` string — Optional. One or more paragraphs of text description of a certificate.
  - `tags` object — Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
  - `managedIdentity` ManagedIdentityCertificate — Configuration and state of a Managed Identity Certificate. Certificate Manager provisions and renews Managed Identity Certificates automatically, for as long as it's authorized to do so.
    - `identity` string — Required. Immutable. SPIFFE ID of the Managed Identity used for this certificate.
    - `provisioningIssue` ProvisioningIssue — Information about issues with provisioning a Managed Certificate.
      - `reason` 'REASON_UNSPECIFIED' | 'AUTHORIZATION_ISSUE' | 'RATE_LIMITED' — Output only. Reason for provisioning failures.
      - `details` string — Output only. Human readable explanation about the issue. Provided to help address the configuration issues. Not guaranteed to be stable. For programmatic access use Reason enum.
    - `state` 'STATE_UNSPECIFIED' | 'PROVISIONING' | 'FAILED' | 'ACTIVE' — Output only. State of the managed certificate resource.
  - `name` string — Identifier. A user-defined name of the certificate. Certificate names must be unique globally and match pattern `projects/*/locations/*/certificates/*`.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/certificatemanager.md) · [All operations](https://skmtc.net/google/apis/certificatemanager/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/certificatemanager/versions/2a5bf0361fcc/schema)
