Skip to content

Create declaration with attachment

POST
/api/v1/projects/{projectId}/policies/{projectPolicyId}/controls/{projectPolicyControlId}/declarations/with-file
curl --request POST \
--url https://localhost:10001/api/v1/projects/example/policies/example/controls/example/declarations/with-file \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: multipart/form-data' \
--form declaration=example

Create a declaration on a control with file attachment(s) and return the declaration with stored attachments

projectId
required
string

Project ID or UUID

projectPolicyId
required
string

Project Policy ID or slug:

projectPolicyControlId
required
string

Project Policy Control ID or code:

declaration
required
string

Declaration JSON string

files
file

Attachment files

description
string

Attachment description

isPublic
string

Whether the file is public

retentionPeriod
string

Retention policy

Created declaration with attachments

Media type application/json
object
key
additional properties
any
Example generated
{}

Bad request - Invalid IDs or declaration data

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Unauthorized - Authentication required

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Forbidden - Insufficient permissions to create declarations

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Not found - Unknown or mismatched identifier

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Internal server error

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}