Skip to main content

Store or update a key-value pair

Store or update a key-value pair in the specified entity namespace.

  • entity: Entity namespace (user or event)
  • key: Key identifier (alphanumeric with dashes/underscores, max 256 chars)
  • value: The value to store (JSON, text, or binary)
  • ttl: Optional expiration time in seconds (60 to 31536000)
  • content_type: Content type (can be in header or body)
  • metadata: Optional metadata with schema hints

Returns information about the stored value including whether it was created or updated.

Path Parameters
entity KVEntity REQUIRED

Possible values: [user, event]

Entity namespace types for KV storage

key Key REQUIRED
Header Parameters
Content-Type Content-Type
Request Body REQUIRED
data object REQUIRED

Payload for store value request (from request body)

value Value REQUIRED
ttl Ttl
metadata
content_type Content Type
Responses
200

Successful Response

Schema OPTIONAL
ok Ok OPTIONAL

Indicates if the request was successful or not.

data object

Response data for store operation

entity KVEntity

Possible values: [user, event]

Entity namespace types for KV storage

key Key
created Created
expires_at Expires At
content_type Content Type
size_bytes Size Bytes
default

Default Response

Schema OPTIONAL
ok Ok OPTIONAL

Indicates if the request was successful or not.

errors object[]

List of errors

type uri

Possible values: 1 ≤ length ≤ 2083

A string containing a URI reference that identifies the problem type.

status Status

Possible values: 399 < value < 600

A number indicating the HTTP status code.

title Title

Possible values: 5 ≤ length

A string containing a short, human-readable summary of the problem type.

detail Detail

Possible values: 5 ≤ length

A string containing a human-readable explanation specific to this occurrence of the problem.

instance Instance

Possible values: 1 ≤ length

A string containing a URI reference that identifies the specific occurrence of the problem.

error_code Error Code

A Number that indicates the error type that occurred.