Create an ACME binding that lets this machine open ACME accounts on an authority for the specified names and certificate profile.
POST /organizations/{organizationId}/machines/{beingId}/acme_bindings
POST https://zanpki.com/organizations/{organizationId}/machines/{beingId}/acme_bindings
| Operation ID |
organizations.organizationId.machines.beingId.acme_bindings.post
|
|---|---|
| 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
| Name | In | Type | Description | |
|---|---|---|---|---|
organizationId
| Path | Required | string (snowflake) | Organization ID. |
beingId
| Path | Required | string (snowflake) | Being ID. |
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: CreateAcmeBindingBody
| Property | Type | Description | |
|---|---|---|---|
acme_bindings_authority_id
| string (snowflake) | Required | The authority that signs certificates for this binding's ACME orders. |
acme_bindings_names
| string | Required | DNS names (the first label may be a wildcard, such as *.example.com) and IP addresses allowed in ACME orders for this binding, separated by spaces, commas, or new lines. Each name must be permitted by the authority. |
acme_bindings_profile
| one of: 1, 2, 3, 4 | Required | Certificate purpose for this binding. Choose TLS server and client for services that act as both (such as a mesh node). Public authorities issue server certificates only. |
acme_bindings_profile_id
| string (snowflake), or null | Optional | ID of a custom organization profile based on the binding's built-in profile. Each ACME order uses the profile's current settings at issuance time. Null to use the built-in ZanPKI profile directly. |
Responses
| Status | Description | Schema | Content type |
|---|---|---|---|
| 200 | ACME binding created. Returns the key ID, the MAC key (shown only once), and the ACME directory URL for client configuration. | NewAcmeBindingAnswer | 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 ACME binding created. Returns the key ID, the MAC key (shown only once), and the ACME directory URL for client configuration.
| Property | Type | Description | |
|---|---|---|---|
key_id
| string | Required | External Account Binding (EAB) key ID (the binding's ID). Provide this together with the MAC key when registering the ACME client account. |
mac_key
| string | Required, read-only | The External Account Binding MAC key, base64url-encoded. Returned only once. |
directory_url
| string | Required | URL of the authority's ACME directory to configure in the ACME client. |
403 Your roles do not permit this action.
| Property | Type | Description | |
|---|---|---|---|
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.
| Property | Type | Description | |
|---|---|---|---|
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.
| Property | Type | Description | |
|---|---|---|---|
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 POST 'https://zanpki.com/organizations/{organizationId}/machines/{beingId}/acme_bindings' \
-H 'Authorization: Bearer <access token>' \
-H 'Content-Type: application/json' \
-d '{
"acme_bindings_authority_id": "<string (snowflake)>",
"acme_bindings_names": "<string>",
"acme_bindings_profile": "<one of: 1, 2, 3, 4>"
}'