POST /api/v3/applications/{lcuid}/key-value-store¶
Summary¶
POST applications/{id}/key-value-store
Description¶
Create a key value store for the application
Tags: applications
Parameters¶
Header Parameters¶
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization |
string |
✓ Yes | Bearer {AuthToken} |
|
Content-Type |
string |
✓ Yes | application/json |
|
Accept |
string |
✓ Yes | application/json |
|
AppIdV3 |
string |
✓ Yes | LCUID-LAP-********-****-****-****-************ |
Request Body¶
Required: Yes
Content Type: application/json¶
Schema¶
Type: object
Required fields: key, value
Properties:
key_name(string): A friendly name for this key. If not specified, key is used.key(string) (required): The key name. No spaces or special characters Key must contain only letters, numbers, underscores, periods and colons If this key already exists, its value will be updated.value(string) (required): The value for the key.
Responses¶
Response: 201¶
Description: Sample Response
Content Type: application/json¶
Schema¶
Type: object
Properties:
success(boolean)key_value_store(object) Type:object
Properties:
parent_type(string)object_type(string)key_name(string): The key namekey(string): The key namevalue(string): The value for the keycreated_at(string): The created at dateupdated_at(string): The updated at datemacro(string)
Example Response¶
{
"success": true,
"key_value_store": {
"parent_type": "App\\Application",
"object_type": "App\\Application",
"key_name": "Test Key",
"key": "test_key",
"value": "my value",
"created_at": "2026-01-08T23:28:31.000000Z",
"updated_at": "2026-01-08T23:28:31.000000Z",
"macro": "application.store.test_key"
}
}
Example Implementations¶
Bash (cURL)¶
curl --request POST \
"https://api.lucit.app/api/v3/applications/LCUID-LAP-506fc585-77be-11ec-acb9-c2cdb617d190/key-value-store" \
--header "Authorization: Bearer {AuthToken}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "AppIdV3: LCUID-LAP-********-****-****-****-************" \
--data "{
\"key_name\": \"My Cool Key\",
\"key\": \"my_cool_key\",
\"value\": \"my value\"
}"
JavaScript (Fetch API)¶
const url = new URL(
"https://api.lucit.app/api/v3/applications/LCUID-LAP-506fc585-77be-11ec-acb9-c2cdb617d190/key-value-store"
);
const headers = {
"Authorization": "Bearer {AuthToken}",
"Content-Type": "application/json",
"Accept": "application/json",
"AppIdV3": "LCUID-LAP-********-****-****-****-************",
};
let body = {
"key_name": "My Cool Key",
"key": "my_cool_key",
"value": "my value"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
PHP (Guzzle)¶
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.lucit.app/api/v3/applications/LCUID-LAP-506fc585-77be-11ec-acb9-c2cdb617d190/key-value-store',
[
'headers' => [
'Authorization' => 'Bearer {AuthToken}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
],
'json' => [
'key_name' => 'My Cool Key',
'key' => 'my_cool_key',
'value' => 'my value',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Python (Requests)¶
import requests
import json
url = 'https://api.lucit.app/api/v3/applications/LCUID-LAP-506fc585-77be-11ec-acb9-c2cdb617d190/key-value-store'
payload = {
"key_name": "My Cool Key",
"key": "my_cool_key",
"value": "my value"
}
headers = {
'Authorization': 'Bearer {AuthToken}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'AppIdV3': 'LCUID-LAP-********-****-****-****-************'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()