Set up an external issuer for an organization by opening an account, or accept updated terms for an existing account. Requires human approval; automated clients cannot accept terms.

PUT /organizations/{organizationId}/external_issuers/{issuer}

PUT https://zanpki.com/organizations/{organizationId}/external_issuers/{issuer}

Operation ID organizations.organizationId.external_issuers.issuer.put
Access Browser session signed in through ZanAuth, using the access token cookie alongside its ID token and refresh token cookies. Or: An access token issued for this site by its ZanAuth issuer, or a static key.

Parameters

NameInTypeDescription
organizationId Path Required string (snowflake) Organization ID.
issuer Path Required one of: 2, 3, 4 External issuer ID: 2 (Let's Encrypt), 3 (ZeroSSL), or 4 (Google Trust Services).
Idempotency-Key Header Optional string This key identifies one request so that sending it again does not carry it out twice. Use a new random value, such as a UUID, for each new request, and send the same value again only with that same request. If you send the same request again with the same key within 10 minutes of the first response, and the first request was carried out, it is not carried out again. Instead, the server returns the first response, or HTTP 409 if that response was too large to keep. The same request means the same method, path, query, body, and Accept header, sent the same way (both as plain HTTP or both as an AI agent's tool call) by the same signed-in person or program, or from the same IP address if you are not signed in. If the first request was refused or failed, sending it again with the same key runs it again. If the first request is still being processed, the server returns HTTP 409. Wait a few seconds, then send the request again with the same key. If the same caller uses the same key for a different request to the same operation, the server returns HTTP 422. The key must be 1 to 255 printable ASCII characters long. If the server cannot record the key, for example during a database fault, the request is carried out without this check.

Request body

Required, sent as application/x-www-form-urlencoded, application/json.

Schema: SetUpIssuerBody

PropertyTypeDescription
issuer_accounts_terms_url string (https-url) Required URL of the issuer's terms of service (either the version agreed to or the current URL advertised by the issuer's ACME directory).
terms_agreed boolean Optional Confirmation that you accept the issuer's terms of service on behalf of the organization. ZanPKI only creates an issuer account after a user accepts the terms.
eab_key_id string Optional Required for ZeroSSL and Google Trust Services only: the External Account Binding (EAB) key ID from your issuer account.
eab_mac_key string (secret) Optional, write-only Required for ZeroSSL and Google Trust Services only: the matching EAB MAC key. It is used once to register the account and is not stored.

Responses

StatusDescriptionSchemaContent type
200 Show the setup page for an organization's external issuer, including the directory's current terms of service and current account status. IssuerSetUpPage application/json
403 Your roles do not permit this action. Problem application/json
422 The request input was rejected. The errors object lists each validation failure. ValidationProblem application/json
Any other status The request was rejected. The problem type identifies the error, and the detail field provides a human-readable explanation. Problem application/json

200 Show the setup page for an organization's external issuer, including the directory's current terms of service and current account status.

PropertyTypeDescription
pki_organizations_id string (snowflake) Required The organization's ID.
pki_organizations_name string Required Name of the organization (a customer, product, or team that owns authorities, certificates, and machines), up to 100 characters.
pki_agencies_id string (snowflake) Required The agency ID, or for an organization, the ID of its parent agency.
pki_agencies_name string Required Name of your company or agency (up to 100 characters) that owns its organizations.
issuer_accounts_issuer one of: 2, 3, 4 Required The external issuer: 2 Let's Encrypt, 3 ZeroSSL, 4 Google Trust Services.
issuer_label string Required The issuer's name.
offered boolean Required Whether this external issuer is available in ZanPKI.
needs_account_binding boolean Required Whether opening an account requires an External Account Binding (EAB) key ID and MAC key from your issuer account (required by ZeroSSL and Google Trust Services).
issuer_accounts_terms_url string (https-url), or null Required URL of the issuer's terms of service (either the version agreed to or the current URL advertised by the issuer's ACME directory).
set_up boolean Required Whether the organization has an account with this issuer.
agreed boolean Required Whether the issuer's terms of service have been accepted for this account, enabling it to order certificates.
issuer_accounts_terms_agreed_at integer (int64), or null Required When the issuer's terms of service were accepted, in seconds since the Unix epoch, or null if not yet accepted.
issuer_accounts_terms_agreed_by_username string, or null Required Username of the person who accepted the terms, recorded at the time of acceptance.
may_set_up boolean Required Whether the caller can set up this issuer or accept its terms (requires a user with permission to manage the organization's authorities).
issuer_accounts_count integer (int64) Required Number of external issuer accounts the organization currently has.
issuer_accounts_most integer (int64) Required Maximum number of external issuer accounts allowed by the organization's plan.
issuer_accounts_advice one of: 1, 2, 3, 4, 7, 8, 9, 10, 11, 12 Required Guidance on how to raise the issuer account limit, shown on the page when the limit is reached.

403 Your roles do not permit this action.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.

422 The request input was rejected. The errors object lists each validation failure.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.
errors InputErrors Required Validation errors for each rejected value. Parameter errors are returned as a list, and body errors as a tree matching the request body structure.

Any other status: The request was rejected. The problem type identifies the error, and the detail field provides a human-readable explanation.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.

Example

curl -X PUT 'https://zanpki.com/organizations/{organizationId}/external_issuers/{issuer}' \
  -H 'Authorization: Bearer <access token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "issuer_accounts_terms_url": "<string (https-url)>"
}'

All documentation