Add an item to a kv store
POST
/api/v2/organizations/{organization}/projects/{project}/kv/{store_id}/items
const url = 'https://dashboard.quantcdn.io/api/v2/organizations/test-org/projects/test-project/kv/0000/items';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"key":"user-session-123","value":"example","secret":false}'};
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://dashboard.quantcdn.io/api/v2/organizations/test-org/projects/test-project/kv/0000/items \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "key": "user-session-123", "value": "example", "secret": false }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organization
required
string
Organization identifier
Example
test-orgproject
required
string
Project identifier
Example
test-projectstore_id
required
string
Example
0000Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
key
required
Item key
string
Example
user-session-123value
required
Item value (can be JSON string)
string
secret
Store as secret with KMS encryption. Secrets cannot be retrieved via GET operations (returns [ENCRYPTED]). Ideal for API keys, passwords, and credentials.
boolean
Responses
Section titled “Responses”The request has succeeded.
Media typeapplication/json
object
success
boolean
key
string
value
string
Example
{ "success": true, "key": "user-session-123"}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}Validation error.
Media typeapplication/json
object
message
required
Error message
string
error
required
Error flag
boolean
Example
{ "message": "The requested resource was not found", "error": true}