Skip to content
Console
On this page

Publish a legal document

Publishes an immutable revision with its configured effective time.

Publishes an immutable revision with its configured effective time.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/legal_documents/legal-document:publish
  • Scope auth:write
  • Effect write — a successful call changes state.
  • Collection legal_documents

Request

FieldTypeWhat it is
namestringCanonical name of the legal revision. Required.

Response

FieldTypeWhat it is
namestringCanonical Resource name.
uidstringServer-assigned immutable ID. Output only.
metaResourceMetaResource metadata.
specLegalDocumentSpecThe immutable agreement text and publication policy. Required.
statusLegalDocumentStatusComputed hash and publication state. Output only.

ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

LegalDocumentSpec

FieldTypeWhat it is
doc_slugstringA stable agreement kind, e.g. terms, privacy, dpa, eula. Required.
versionstringAn opaque immutable version label, not used for ordering. Required.
canonical_textstringExact plain UTF-8 text shown to the user. Auth never normalizes it. Required.
document_urlstringAn external HTTPS reference. Auth's canonical text, not this link, is evidence. Required.
change_summarystringUser-facing summary of the changes. Required.
major_reconsent_requiredboolWhether previously accepted versions become insufficient.
effective_timetimestampWhen a published revision takes effect. Required.

LegalDocumentStatus

FieldTypeWhat it is
observed_generationint64The spec generation observed by Auth. Output only.
conditionsCondition[]Observed conditions. Output only.
document_sha256stringLowercase hex SHA-256 of the exact UTF-8 bytes of canonical_text. Output only.
publish_timetimestampUnset for drafts. No field can change after publication. Output only.

Condition

FieldTypeWhat it is
typestringThe condition type, for example Ready.
statusConditionStatusWhether the condition holds. One of true, false, unknown.
observed_generationint64The generation this observation was made against.
reasonstringA machine-readable UpperCamelCase reason.
messagestringA customer-safe human-readable message.
severitySeverityHow severe a FALSE condition is. One of info, warning, error.
transition_timetimestampWhen status last changed.

Errors

Every error arrives in the body Errors describes.

Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/legal_documents/legal-document:publish" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'