API reference · Enrolment

Submit a public key

POST/v1/enrollments/{invitationId}/keys

Sends the PUBLIC half of a new P-256 key, and receives the challenge to prove you hold the private half.

PermissionNone
AuthenticationEnrolment token
Staff-set limits it counts towardNone
.NET SDKenrollment.SubmitKeyAsync(request)
  • Save the private key before you call this: an invitation takes exactly one key.

Parameters

NameInTypeNotes
invitationIdrequiredpathUUIDA UUID, lower-case with hyphens.

Request

Authorised with Authorization: Enrollment <token>; not signed.

Headers: Accept-Language (optional). The SDKs set all of them for you.

Body: EnrollmentKeyRequest, as JSON.

FieldTypeNotes
publicJwkrequiredPublicJwkThe PUBLIC half of a new P-256 key only. A private member is refused.
notBeforerequiredstring (date-time)Only the length of the window (to expiresAt) is used — kept between 1 day and 2 years by default — and it starts when Anis staff activate the key.
expiresAtrequiredstring (date-time)The end of the validity you ask for. See notBefore.
cidrslist of stringThe networks you will call from, proposed for Anis staff to confirm.

Responses

StatusMeaningBody
200Success.EnrollmentKeyResult
401Refused: not authenticated.Problem
404Refused: not found, or not yours.Problem
409Refused: conflicts with the current state.Problem
422Refused: the request breaks a rule.Problem
429Refused: a limit was reached.Problem
503No decision: a dependency was unavailable.Problem

Every answer is signed by Anis; the SDKs check it before you see it.

Refusals

Every refusal is a signed problem. Branch on its code; each links to what it means and what to do.

ErrorCodeStatus
Invitation invalidinvitation_invalid401
Not foundresource_not_found404
Validation failedvalidation_failed422
Public key invalidkey_proof_invalid422
Invitation already usedkey_duplicate409
Rate limitedrate_limited429
Service unavailabledependency_unavailable503
Request timeoutrequest_timeout504
Internal errorinternal_error500

Types

EnrollmentKeyRequest

FieldTypeNotes
publicJwkrequiredPublicJwkThe PUBLIC half of a new P-256 key only. A private member is refused.
notBeforerequiredstring (date-time)Only the length of the window (to expiresAt) is used — kept between 1 day and 2 years by default — and it starts when Anis staff activate the key.
expiresAtrequiredstring (date-time)The end of the validity you ask for. See notBefore.
cidrslist of stringThe networks you will call from, proposed for Anis staff to confirm.

PublicJwk

FieldTypeNotes
ktyrequiredstringAlways EC. Values: EC
crvrequiredstringAlways P-256. Values: P-256
xrequiredstringThe key’s x coordinate: exactly 32 bytes, base64url without padding.
yrequiredstringThe key’s y coordinate: exactly 32 bytes, base64url without padding.
kidstringIn Anis’s signing keys: the key an answer’s signature names. Treat it as an opaque name. Not sent when you submit your own key.
usestringIntended use, when published.
algstringAlgorithm, when published.

EnrollmentKeyResult

FieldTypeNotes
keyIdalways presentUUIDYour key id: the keyid every signature will carry once the key is active.
thumbprintalways presentstringThe key’s fingerprint. Give it to Anis staff through the channel you agreed; they confirm the key with it.
challengealways presentstringThe challenge your proof answers. It is returned only here: keep it until the proof is accepted.
challengeGenerationintegerWhich challenge this is; a restarted enrolment issues the next one.