SetKeyValueItem
Creates or updates a key-value pair. If an existing key is passed, the method returns the existing item and changes the value if needed. The keys should be unique within a Voximplant application.
Allowed roles: Owner, Admin, Developer.
Example request: SetKeyValueItem example.
Authentication
Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the Authorization header as a Bearer value:
Authorization: Bearer $VOXIMPLANT_TOKEN
See Authorization for ready-to-copy snippets in bash, Python, Node.js and Go that turn your credentials.json into a token.
Query parameters
Key, up to 200 characters. A key can contain a namespace that is written before the ':' symbol, for example, test:1234. Thus, namespace 'test' can be used as a pattern in the GetKeyValueItems and GetKeyValueKeys methods to find the keys with the same namespace.
The key should match the following regular expression: ^[a-zA-Z0-9а-яА-ЯёЁ_\-:;.#+]*$
Key expiry time in seconds. The value is in range of 0..7,776,000 (90 days), the default value is 30 days (2,592,000 seconds). The TTL is converted to an expires_at Unix timestamp field as part of the storage object. Note that one of the two parameters (ttl or expires_at) must be set
Expiration date based on ttl (timestamp without milliseconds). Note that one of the two parameters (ttl or expires_at) must be set
Response
The key-value item