curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.edi.stateset.com/v1/as2/identity' \
--header "Authorization: Bearer $EDI_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"cert_pem": "string",
"key_pem": "string"
}'
Rotates the AS2 signing/decryption identity without a restart…
With EDI_AS2_PERSIST_IDENTITY=true the rotation is written to the state backend first (all-or-nothing) and every replica converges on it within a minute…
POST
/
v1
/
as2
/
identity
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.edi.stateset.com/v1/as2/identity' \
--header "Authorization: Bearer $EDI_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"cert_pem": "string",
"key_pem": "string"
}'
With
EDI_AS2_PERSIST_IDENTITY=true the rotation is written to the state
backend first (all-or-nothing) and every replica converges on it within a
minute; without it the swap is this-replica-only and lost on restart —
the response’s persisted field says which happened.
Request body
RotateAs2IdentityBody
string
required
X.509 certificate PEM.
string
required
PKCS#8 private key PEM.
Response
No response body. Identity rotated.Status codes
| Code | Meaning |
|---|---|
200 | Identity rotated |
403 | Platform-admin credential required |
422 | Key/certificate invalid, expired or not yet valid |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.edi.stateset.com/v1/as2/identity' \
--header "Authorization: Bearer $EDI_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"cert_pem": "string",
"key_pem": "string"
}'
Last modified on October 20, 2026