Create or update a key-value
PUT/users/{userId}/kv/{key}
Base URL: https://api.tinkermode.com
Set the value for the specified key. If the key-value pair does not already exist, it is created.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain the user's API key or a service account token with permission on the user.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
userId | integer | Yes | The unique ID for the specified user. | |
key | string | Yes | A unique key for a key-value pair stored for a user. |
Request body
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
value | string | Yes | The value set to the key. |
Responses
204 Key-value pair has been successfully stored. There is no response body.
401 Authorization is required to access this resource.
403 Request failed because of invalid data or denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
404 The specified user does not exist.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |