Skip to content

Create or update custom headers

POST
/api/v2/organizations/{organization}/projects/{project}/custom-headers
curl --request POST \
--url https://dashboard.quantcdn.io/api/v2/organizations/test-org/projects/test-project/custom-headers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "headers": { "X-Custom-Header": "value", "Cache-Control": "max-age=3600" } }'

Replaces the custom headers of the project. On a project that Security > CSP manages, the CSP header names in the request are ignored and their stored values stay; the response header X-Quant-Warning then names them. The status is still 200.

organization
required
string

Organization identifier

Example
test-org
project
required
string

Project identifier

Example
test-project
Media typeapplication/json
object
headers
required

Custom headers

object
key
additional properties
string
Example
{
"X-Custom-Header": "value",
"Cache-Control": "max-age=3600"
}

The request has succeeded. The body is the stored header map. When Security > CSP manages the project, the CSP header names of the request (Content-Security-Policy, Content-Security-Policy-Report-Only, Reporting-Endpoints) are not changed, and the response header X-Quant-Warning names them.

Media typeapplication/json

Custom headers as key-value pairs

object
key
additional properties
string
Example
{
"X-Custom-Header": "value",
"Cache-Control": "max-age=3600"
}

The server could not understand the request due to invalid syntax.

Media typeapplication/json
object
message
required

Error message

string
error
required

Error flag

boolean
Example
{
"message": "The requested resource was not found",
"error": true
}

Access is forbidden.

Media typeapplication/json
object
message
required

Error message

string
error
required

Error flag

boolean
Example
{
"message": "The requested resource was not found",
"error": true
}