> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/reference/frends-platform-api/platform-api-reference/acme-certificate.md).

# Acme Certificate

## GET /api/v1/acme/providers

> List the built-in ACME provider catalog

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"AcmeCertificate"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/acme/providers":{"get":{"tags":["AcmeCertificate"],"summary":"List the built-in ACME provider catalog","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOfListOfAcmeProviderInfo"}}}}}}}},"components":{"schemas":{"ResponseOfListOfAcmeProviderInfo":{"required":["data"],"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/AcmeProviderInfo"},"description":"Response data"}}},"AcmeProviderInfo":{"required":["name","directoryUrl","requiresExternalAccountBinding"],"type":"object","properties":{"name":{"type":"string","description":"Provider name"},"directoryUrl":{"type":"string","description":"ACME directory URL"},"requiresExternalAccountBinding":{"type":"boolean","description":"Whether this provider requires external account binding (EAB)"},"issuerDomainName":{"type":["null","string"],"description":"Issuer domain name for the dns-persist-01 challenge's TXT record value; null when this provider doesn't offer the challenge type"}}}}}}
```

## GET /api/v1/acme/accounts

> List ACME accounts

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"AcmeCertificate"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/acme/accounts":{"get":{"tags":["AcmeCertificate"],"summary":"List ACME accounts","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOfListOfDtoAcmeAccountGet"}}}}}}}},"components":{"schemas":{"ResponseOfListOfDtoAcmeAccountGet":{"required":["data"],"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/DtoAcmeAccountGet"},"description":"Response data"}}},"DtoAcmeAccountGet":{"required":["accountGuid","provider","acmeDirectoryUrl","email","accountUri","hasExternalAccountBinding","managedByFrends","createdUtc"],"type":"object","properties":{"accountGuid":{"type":"string","description":"Account unique identifier","format":"uuid"},"provider":{"type":"string","description":"Provider name"},"acmeDirectoryUrl":{"type":"string","description":"ACME directory URL"},"email":{"type":["null","string"],"description":"Optional contact email for the ACME account"},"accountUri":{"type":["null","string"],"description":"ACME account URI as returned by the ACME server"},"hasExternalAccountBinding":{"type":"boolean","description":"Whether this account was created with external account binding (EAB)"},"managedByFrends":{"type":"boolean","description":"Whether the account is managed by Frends operations (only the FrendsOps role can create or delete it)"},"createdUtc":{"type":"string","description":"Creation timestamp (UTC)","format":"date-time"}}}}}}
```

## POST /api/v1/acme/accounts

> Create an ACME account

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"AcmeCertificate"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/acme/accounts":{"post":{"tags":["AcmeCertificate"],"summary":"Create an ACME account","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAcmeAccountRequest"}}},"required":true},"responses":{"201":{"description":"Created","headers":{"Location":{"description":"Location of the created ACME account","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOfDtoAcmeAccountGet"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden"}}}}},"components":{"schemas":{"CreateAcmeAccountRequest":{"required":["provider"],"type":"object","properties":{"provider":{"type":"string","description":"Provider name (LetsEncrypt, LetsEncryptStaging, ZeroSSL, or Custom)"},"email":{"type":["null","string"],"description":"Optional contact email for the ACME account; a repeated request with the same provider, directory URL and email reuses the account"},"customDirectoryUrl":{"type":["null","string"],"description":"Custom ACME directory URL (required when Provider is Custom)"},"eabKeyId":{"type":["null","string"],"description":"External account binding key identifier (required for providers that require EAB, e.g. ZeroSSL)"},"eabHmacKey":{"type":["null","string"],"description":"External account binding HMAC key (required for providers that require EAB, e.g. ZeroSSL)"},"managedByFrends":{"type":"boolean","description":"Marks the account as managed by Frends operations (requires the FrendsOps role); such accounts back the ACME orders of Frends-operated agent groups","default":false}}},"ResponseOfDtoAcmeAccountGet":{"required":["data"],"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"description":"Response data","$ref":"#/components/schemas/DtoAcmeAccountGet"}]}}},"DtoAcmeAccountGet":{"required":["accountGuid","provider","acmeDirectoryUrl","email","accountUri","hasExternalAccountBinding","managedByFrends","createdUtc"],"type":"object","properties":{"accountGuid":{"type":"string","description":"Account unique identifier","format":"uuid"},"provider":{"type":"string","description":"Provider name"},"acmeDirectoryUrl":{"type":"string","description":"ACME directory URL"},"email":{"type":["null","string"],"description":"Optional contact email for the ACME account"},"accountUri":{"type":["null","string"],"description":"ACME account URI as returned by the ACME server"},"hasExternalAccountBinding":{"type":"boolean","description":"Whether this account was created with external account binding (EAB)"},"managedByFrends":{"type":"boolean","description":"Whether the account is managed by Frends operations (only the FrendsOps role can create or delete it)"},"createdUtc":{"type":"string","description":"Creation timestamp (UTC)","format":"date-time"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## GET /api/v1/acme/accounts/{accountGuid}

> Get a single ACME account

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"AcmeCertificate"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/acme/accounts/{accountGuid}":{"get":{"tags":["AcmeCertificate"],"summary":"Get a single ACME account","operationId":"GetAcmeAccountByGuid","parameters":[{"name":"accountGuid","in":"path","description":"ACME account unique identifier","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOfDtoAcmeAccountGet"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ResponseOfDtoAcmeAccountGet":{"required":["data"],"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"description":"Response data","$ref":"#/components/schemas/DtoAcmeAccountGet"}]}}},"DtoAcmeAccountGet":{"required":["accountGuid","provider","acmeDirectoryUrl","email","accountUri","hasExternalAccountBinding","managedByFrends","createdUtc"],"type":"object","properties":{"accountGuid":{"type":"string","description":"Account unique identifier","format":"uuid"},"provider":{"type":"string","description":"Provider name"},"acmeDirectoryUrl":{"type":"string","description":"ACME directory URL"},"email":{"type":["null","string"],"description":"Optional contact email for the ACME account"},"accountUri":{"type":["null","string"],"description":"ACME account URI as returned by the ACME server"},"hasExternalAccountBinding":{"type":"boolean","description":"Whether this account was created with external account binding (EAB)"},"managedByFrends":{"type":"boolean","description":"Whether the account is managed by Frends operations (only the FrendsOps role can create or delete it)"},"createdUtc":{"type":"string","description":"Creation timestamp (UTC)","format":"date-time"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## Delete an ACME account

> Also deactivates the account at the certificate authority. The local delete succeeds even if that fails.

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"AcmeCertificate"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/acme/accounts/{accountGuid}":{"delete":{"tags":["AcmeCertificate"],"summary":"Delete an ACME account","description":"Also deactivates the account at the certificate authority. The local delete succeeds even if that fails.","parameters":[{"name":"accountGuid","in":"path","description":"ACME account unique identifier","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"},"403":{"description":"Forbidden"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## GET /api/v1/acme/orders

> List ACME orders

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"AcmeCertificate"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/acme/orders":{"get":{"tags":["AcmeCertificate"],"summary":"List ACME orders","parameters":[{"name":"status","in":"query","description":"Optional order status filter (case-insensitive; pending/ready/processing/valid/invalid/revoked)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOfListOfDtoAcmeOrderGet"}}}}}}}},"components":{"schemas":{"ResponseOfListOfDtoAcmeOrderGet":{"required":["data"],"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/DtoAcmeOrderGet"},"description":"Response data"}}},"DtoAcmeOrderGet":{"required":["orderGuid","domain","certificateName","challengeType","status","dnsTxtRecordName","dnsTxtValue","lastError","agentGroupName","managedByFrends","certificateGuid","createdUtc","expiresUtc","completedUtc"],"type":"object","properties":{"orderGuid":{"type":"string","description":"Order unique identifier","format":"uuid"},"domain":{"type":"string","description":"Domain name the order is for"},"certificateName":{"type":"string","description":"Name of the certificate the order issues; renewals reuse it"},"challengeType":{"type":"string","description":"Challenge type used for this order"},"status":{"type":"string","description":"Order status, normalized to RFC 8555 lowercase (pending/ready/processing/valid/invalid), or revoked once the issued certificate has been revoked at the CA"},"dnsTxtRecordName":{"type":["null","string"],"description":"DNS TXT record name to create for the dns-01 or dns-persist-01 challenge; null for http-01"},"dnsTxtValue":{"type":["null","string"],"description":"DNS TXT record value to create for the dns-01 or dns-persist-01 challenge; null for http-01"},"lastError":{"type":["null","string"],"description":"Last error encountered while processing the order, if any"},"agentGroupName":{"type":"string","description":"Agent group name the order belongs to"},"managedByFrends":{"type":"boolean","description":"True when the agent group is operated by Frends: only the FrendsOps role can create, validate or finalize the order"},"certificateGuid":{"type":["null","string"],"description":"Certificate unique identifier, set once the order has been finalized","format":"uuid"},"createdUtc":{"type":"string","description":"Creation timestamp (UTC)","format":"date-time"},"expiresUtc":{"type":["null","string"],"description":"Order expiry timestamp (UTC), if known","format":"date-time"},"completedUtc":{"type":["null","string"],"description":"Completion timestamp (UTC), set once finalized","format":"date-time"},"revokedUtc":{"type":["null","string"],"description":"Revocation timestamp (UTC), set once the issued certificate has been revoked at the CA","format":"date-time"},"revocationReason":{"type":["null","string"],"description":"Revocation reason given to the CA, set together with RevokedUtc"}}}}}}
```

## Create an ACME order (dns-01, http-01, or dns-persist-01)

> For dns-persist-01, the DNS TXT record is created once per domain and reused by every subsequent order (including automatic renewals) for that domain. A wildcard domain (\*.example.com) requires dns-01 or dns-persist-01.

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"AcmeCertificate"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/acme/orders":{"post":{"tags":["AcmeCertificate"],"summary":"Create an ACME order (dns-01, http-01, or dns-persist-01)","description":"For dns-persist-01, the DNS TXT record is created once per domain and reused by every subsequent order (including automatic renewals) for that domain. A wildcard domain (*.example.com) requires dns-01 or dns-persist-01.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAcmeOrderRequest"}}},"required":true},"responses":{"201":{"description":"Created","headers":{"Location":{"description":"Location of the created ACME order","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOfDtoAcmeOrderGet"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"CreateAcmeOrderRequest":{"required":["accountGuid","agentGroupName","domain","challengeType"],"type":"object","properties":{"accountGuid":{"type":"string","description":"ACME account unique identifier to order the certificate under","format":"uuid"},"agentGroupName":{"type":"string","description":"Agent group name that will host the resulting certificate"},"domain":{"type":"string","description":"Domain name to request a certificate for"},"challengeType":{"type":"string","description":"Challenge type to use (dns-01, http-01 or dns-persist-01)"},"certificateName":{"type":["null","string"],"description":"Name of the certificate the order issues (referenced by processes as #cert.<name>; renewals reuse it). Letters, digits, underscores and å/ä/ö, not starting with a digit. Defaults to the domain with every other character replaced by '_'"},"issuerDomainName":{"type":["null","string"],"description":"Issuer domain name for dns-persist-01, overriding the account's provider catalog value (required when the provider has none, e.g. a custom-directory account); ignored for other challenge types"}}},"ResponseOfDtoAcmeOrderGet":{"required":["data"],"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"description":"Response data","$ref":"#/components/schemas/DtoAcmeOrderGet"}]}}},"DtoAcmeOrderGet":{"required":["orderGuid","domain","certificateName","challengeType","status","dnsTxtRecordName","dnsTxtValue","lastError","agentGroupName","managedByFrends","certificateGuid","createdUtc","expiresUtc","completedUtc"],"type":"object","properties":{"orderGuid":{"type":"string","description":"Order unique identifier","format":"uuid"},"domain":{"type":"string","description":"Domain name the order is for"},"certificateName":{"type":"string","description":"Name of the certificate the order issues; renewals reuse it"},"challengeType":{"type":"string","description":"Challenge type used for this order"},"status":{"type":"string","description":"Order status, normalized to RFC 8555 lowercase (pending/ready/processing/valid/invalid), or revoked once the issued certificate has been revoked at the CA"},"dnsTxtRecordName":{"type":["null","string"],"description":"DNS TXT record name to create for the dns-01 or dns-persist-01 challenge; null for http-01"},"dnsTxtValue":{"type":["null","string"],"description":"DNS TXT record value to create for the dns-01 or dns-persist-01 challenge; null for http-01"},"lastError":{"type":["null","string"],"description":"Last error encountered while processing the order, if any"},"agentGroupName":{"type":"string","description":"Agent group name the order belongs to"},"managedByFrends":{"type":"boolean","description":"True when the agent group is operated by Frends: only the FrendsOps role can create, validate or finalize the order"},"certificateGuid":{"type":["null","string"],"description":"Certificate unique identifier, set once the order has been finalized","format":"uuid"},"createdUtc":{"type":"string","description":"Creation timestamp (UTC)","format":"date-time"},"expiresUtc":{"type":["null","string"],"description":"Order expiry timestamp (UTC), if known","format":"date-time"},"completedUtc":{"type":["null","string"],"description":"Completion timestamp (UTC), set once finalized","format":"date-time"},"revokedUtc":{"type":["null","string"],"description":"Revocation timestamp (UTC), set once the issued certificate has been revoked at the CA","format":"date-time"},"revocationReason":{"type":["null","string"],"description":"Revocation reason given to the CA, set together with RevokedUtc"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## GET /api/v1/acme/orders/{orderGuid}

> Get a single ACME order

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"AcmeCertificate"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/acme/orders/{orderGuid}":{"get":{"tags":["AcmeCertificate"],"summary":"Get a single ACME order","operationId":"GetAcmeOrderByGuid","parameters":[{"name":"orderGuid","in":"path","description":"ACME order unique identifier","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOfDtoAcmeOrderGet"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ResponseOfDtoAcmeOrderGet":{"required":["data"],"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"description":"Response data","$ref":"#/components/schemas/DtoAcmeOrderGet"}]}}},"DtoAcmeOrderGet":{"required":["orderGuid","domain","certificateName","challengeType","status","dnsTxtRecordName","dnsTxtValue","lastError","agentGroupName","managedByFrends","certificateGuid","createdUtc","expiresUtc","completedUtc"],"type":"object","properties":{"orderGuid":{"type":"string","description":"Order unique identifier","format":"uuid"},"domain":{"type":"string","description":"Domain name the order is for"},"certificateName":{"type":"string","description":"Name of the certificate the order issues; renewals reuse it"},"challengeType":{"type":"string","description":"Challenge type used for this order"},"status":{"type":"string","description":"Order status, normalized to RFC 8555 lowercase (pending/ready/processing/valid/invalid), or revoked once the issued certificate has been revoked at the CA"},"dnsTxtRecordName":{"type":["null","string"],"description":"DNS TXT record name to create for the dns-01 or dns-persist-01 challenge; null for http-01"},"dnsTxtValue":{"type":["null","string"],"description":"DNS TXT record value to create for the dns-01 or dns-persist-01 challenge; null for http-01"},"lastError":{"type":["null","string"],"description":"Last error encountered while processing the order, if any"},"agentGroupName":{"type":"string","description":"Agent group name the order belongs to"},"managedByFrends":{"type":"boolean","description":"True when the agent group is operated by Frends: only the FrendsOps role can create, validate or finalize the order"},"certificateGuid":{"type":["null","string"],"description":"Certificate unique identifier, set once the order has been finalized","format":"uuid"},"createdUtc":{"type":"string","description":"Creation timestamp (UTC)","format":"date-time"},"expiresUtc":{"type":["null","string"],"description":"Order expiry timestamp (UTC), if known","format":"date-time"},"completedUtc":{"type":["null","string"],"description":"Completion timestamp (UTC), set once finalized","format":"date-time"},"revokedUtc":{"type":["null","string"],"description":"Revocation timestamp (UTC), set once the issued certificate has been revoked at the CA","format":"date-time"},"revocationReason":{"type":["null","string"],"description":"Revocation reason given to the CA, set together with RevokedUtc"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## POST /api/v1/acme/orders/{orderGuid}/validate

> Drive an ACME order's challenge (dns-01 or http-01) to completion

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"AcmeCertificate"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/acme/orders/{orderGuid}/validate":{"post":{"tags":["AcmeCertificate"],"summary":"Drive an ACME order's challenge (dns-01 or http-01) to completion","parameters":[{"name":"orderGuid","in":"path","description":"ACME order unique identifier","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOfDtoAcmeOrderGet"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ResponseOfDtoAcmeOrderGet":{"required":["data"],"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"description":"Response data","$ref":"#/components/schemas/DtoAcmeOrderGet"}]}}},"DtoAcmeOrderGet":{"required":["orderGuid","domain","certificateName","challengeType","status","dnsTxtRecordName","dnsTxtValue","lastError","agentGroupName","managedByFrends","certificateGuid","createdUtc","expiresUtc","completedUtc"],"type":"object","properties":{"orderGuid":{"type":"string","description":"Order unique identifier","format":"uuid"},"domain":{"type":"string","description":"Domain name the order is for"},"certificateName":{"type":"string","description":"Name of the certificate the order issues; renewals reuse it"},"challengeType":{"type":"string","description":"Challenge type used for this order"},"status":{"type":"string","description":"Order status, normalized to RFC 8555 lowercase (pending/ready/processing/valid/invalid), or revoked once the issued certificate has been revoked at the CA"},"dnsTxtRecordName":{"type":["null","string"],"description":"DNS TXT record name to create for the dns-01 or dns-persist-01 challenge; null for http-01"},"dnsTxtValue":{"type":["null","string"],"description":"DNS TXT record value to create for the dns-01 or dns-persist-01 challenge; null for http-01"},"lastError":{"type":["null","string"],"description":"Last error encountered while processing the order, if any"},"agentGroupName":{"type":"string","description":"Agent group name the order belongs to"},"managedByFrends":{"type":"boolean","description":"True when the agent group is operated by Frends: only the FrendsOps role can create, validate or finalize the order"},"certificateGuid":{"type":["null","string"],"description":"Certificate unique identifier, set once the order has been finalized","format":"uuid"},"createdUtc":{"type":"string","description":"Creation timestamp (UTC)","format":"date-time"},"expiresUtc":{"type":["null","string"],"description":"Order expiry timestamp (UTC), if known","format":"date-time"},"completedUtc":{"type":["null","string"],"description":"Completion timestamp (UTC), set once finalized","format":"date-time"},"revokedUtc":{"type":["null","string"],"description":"Revocation timestamp (UTC), set once the issued certificate has been revoked at the CA","format":"date-time"},"revocationReason":{"type":["null","string"],"description":"Revocation reason given to the CA, set together with RevokedUtc"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## POST /api/v1/acme/orders/{orderGuid}/finalize

> Finalize an ACME order into a certificate

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"AcmeCertificate"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/acme/orders/{orderGuid}/finalize":{"post":{"tags":["AcmeCertificate"],"summary":"Finalize an ACME order into a certificate","parameters":[{"name":"orderGuid","in":"path","description":"ACME order unique identifier","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOfDtoAcmeOrderGet"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ResponseOfDtoAcmeOrderGet":{"required":["data"],"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"description":"Response data","$ref":"#/components/schemas/DtoAcmeOrderGet"}]}}},"DtoAcmeOrderGet":{"required":["orderGuid","domain","certificateName","challengeType","status","dnsTxtRecordName","dnsTxtValue","lastError","agentGroupName","managedByFrends","certificateGuid","createdUtc","expiresUtc","completedUtc"],"type":"object","properties":{"orderGuid":{"type":"string","description":"Order unique identifier","format":"uuid"},"domain":{"type":"string","description":"Domain name the order is for"},"certificateName":{"type":"string","description":"Name of the certificate the order issues; renewals reuse it"},"challengeType":{"type":"string","description":"Challenge type used for this order"},"status":{"type":"string","description":"Order status, normalized to RFC 8555 lowercase (pending/ready/processing/valid/invalid), or revoked once the issued certificate has been revoked at the CA"},"dnsTxtRecordName":{"type":["null","string"],"description":"DNS TXT record name to create for the dns-01 or dns-persist-01 challenge; null for http-01"},"dnsTxtValue":{"type":["null","string"],"description":"DNS TXT record value to create for the dns-01 or dns-persist-01 challenge; null for http-01"},"lastError":{"type":["null","string"],"description":"Last error encountered while processing the order, if any"},"agentGroupName":{"type":"string","description":"Agent group name the order belongs to"},"managedByFrends":{"type":"boolean","description":"True when the agent group is operated by Frends: only the FrendsOps role can create, validate or finalize the order"},"certificateGuid":{"type":["null","string"],"description":"Certificate unique identifier, set once the order has been finalized","format":"uuid"},"createdUtc":{"type":"string","description":"Creation timestamp (UTC)","format":"date-time"},"expiresUtc":{"type":["null","string"],"description":"Order expiry timestamp (UTC), if known","format":"date-time"},"completedUtc":{"type":["null","string"],"description":"Completion timestamp (UTC), set once finalized","format":"date-time"},"revokedUtc":{"type":["null","string"],"description":"Revocation timestamp (UTC), set once the issued certificate has been revoked at the CA","format":"date-time"},"revocationReason":{"type":["null","string"],"description":"Revocation reason given to the CA, set together with RevokedUtc"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.frends.com/reference/frends-platform-api/platform-api-reference/acme-certificate.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
