Skip to content

Create declaration on a control

POST
/api/v1/projects/{projectId}/policies/{appliedPolicyId}/controls/{appliedPolicyControlId}/declarations
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

projectId
required
string

Project ID, UUID (urn:uuid optional), or slug:my-project

appliedPolicyId
required
string

Applied policy ID, slug:my-policy, or urn:cid:bafy…

appliedPolicyControlId
required
string

Applied policy control ID, code:AC-1, or urn:cid:bafy…

Declaration data

Media type application/json
object
extra

Hashed into the CID; not stored

object
key
additional properties
string
isReadyForReview

Needs submit_controls_for_review

boolean
statement
required
string
subjectLine
required
string
submittedBy

Defaults to the caller identity

string
Example generated
{
"extra": {
"additionalProperty": "example"
},
"isReadyForReview": true,
"statement": "example",
"subjectLine": "example",
"submittedBy": "example"
}

Created declaration

Media type application/json

A submitted claim that a control has been implemented, optionally attested by a CID

object
appliedPolicyControlId

Taken from the path on create

integer
attachmentCid

Derived from the uploaded bytes; not stored

Array<string>
cid

Assigned by the integrity service

string
createdAt
string format: date-time
extra

Hashed into the CID; not stored

object
key
additional properties
string
fileAttachments

Upload via the with-file endpoint

Array<object>

A file stored against a declaration or review, with its CID and retention window

object
cid
string
contentType
string
declarationId
integer
description
string
fileName
string
id
integer
isPublic
boolean
retentionExpires
string format: date-time
reviewId
integer
sizeBytes
integer
storagePath
string
uploadedAt
string format: date-time
uploadedBy
string
uploadedByDid

Verifiable actor; uploadedBy is the label

string
id
integer
isAutomated

True for indicator-generated only

boolean
isReadyForReview

Needs submit_controls_for_review

boolean
statement
string
subjectLine
string
submittedAt
string format: date-time
submittedBy

Defaults to the caller identity

string
submittedByDid

Verifiable actor; submittedBy is the label

string
updatedAt
string format: date-time
Example generated
{
"extra": {
"additionalProperty": "example"
},
"isReadyForReview": true,
"statement": "example",
"subjectLine": "example",
"submittedBy": "example"
}

Bad request - Invalid IDs or request body

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Unauthorized - Authentication required

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Forbidden - Insufficient permissions to create declarations

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Not found - Unknown or mismatched identifier

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}

Internal server error

Media type application/json

Error body returned by the governance endpoints; the message is human-readable and not a stable identifier

object
error
string
Example
{
"error": "Invalid request body"
}