Create declaration on a control
const url = 'https://localhost:10001/api/v1/projects/example/policies/example/controls/example/declarations';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"extra":{"additionalProperty":"example"},"isReadyForReview":true,"statement":"example","subjectLine":"example","submittedBy":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://localhost:10001/api/v1/projects/example/policies/example/controls/example/declarations \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "extra": { "additionalProperty": "example" }, "isReadyForReview": true, "statement": "example", "subjectLine": "example", "submittedBy": "example" }'Create a declaration for a specific control and return the persisted record
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Project ID, UUID (urn:uuid optional), or slug:my-project
Applied policy ID, slug:my-policy, or urn:cid:bafy…
Applied policy control ID, code:AC-1, or urn:cid:bafy…
Request Body
Section titled “Request Body ”Declaration data
object
Hashed into the CID; not stored
object
Needs submit_controls_for_review
Defaults to the caller identity
Example generated
{ "extra": { "additionalProperty": "example" }, "isReadyForReview": true, "statement": "example", "subjectLine": "example", "submittedBy": "example"}Responses
Section titled “ Responses ”Created declaration
A submitted claim that a control has been implemented, optionally attested by a CID
object
Taken from the path on create
Derived from the uploaded bytes; not stored
Assigned by the integrity service
Hashed into the CID; not stored
object
Upload via the with-file endpoint
A file stored against a declaration or review, with its CID and retention window
object
Verifiable actor; uploadedBy is the label
True for indicator-generated only
Needs submit_controls_for_review
Defaults to the caller identity
Verifiable actor; submittedBy is the label
Example generated
{ "extra": { "additionalProperty": "example" }, "isReadyForReview": true, "statement": "example", "subjectLine": "example", "submittedBy": "example"}Bad request - Invalid IDs or request body
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Unauthorized - Authentication required
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Forbidden - Insufficient permissions to create declarations
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Not found - Unknown or mismatched identifier
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Internal server error
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}