---
title: "Add Application KV Record"
method: POST
path: "/applications/{applicationIdentifier}/storage/kv/records"
tags: ["Applications"]
---

# Add Application KV Record

`POST /applications/{applicationIdentifier}/storage/kv/records`

## Request

- Base URL: `https://api.crowdin.com/api/v2`
- URL: `https://api.crowdin.com/api/v2/applications/{applicationIdentifier}/storage/kv/records`
- Auth: none declared
- TypeScript: <https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/docs/applications/:applicationIdentifier/storage/kv/records/post.ts> (a function with typed inputs; its response is checked against the schema)

**Required scopes:** `application.storage` (Read and Write).

Adds a new KV record to the application installation's storage. If the key already exists, the request returns `409` - use [Edit Application KV Record](#operation/api.applications.storage.kv.records.patch) to change an existing record.

__Note:__ Requires the application's own access token - personal access tokens are not supported

## Path parameters

- `applicationIdentifier` string, required

## Request body

- ApplicationKvRecordCreateForm
  - `key` string, required: Key of the record. 1-500 characters from `a-z`, `A-Z`, `0-9`, `:`, `.`, `_`, `-`. Unique within the installation, case-sensitive and immutable. Keys with no reserved prefix are shared with everyone who can access the application. Reserved prefixes narrow visibility: * `user:{userId}:` - the user's own private records * `module:{moduleKey}:` - visible only to users with access to that module (`{moduleKey}` is a module key from the application manifest)
  - `value` union, required: Any JSON value except `null` - a string, number, boolean, array or object. Up to 245760 bytes (240 KiB) when serialized
    - string
    - number
    - boolean
    - object
    - unknown[]
      - unknown
  - `secret` boolean: If `true`, the value is encrypted at rest. Immutable - to change it, delete the record and create a new one. Default is `false`
  - `ttl` integer, nullable: Time to live in seconds (60-31536000, inclusive). Omit for a permanent record

## Response `201`

Application KV Record was successfully created

- ApplicationKvRecordResource: Base schema of resource container. Container is a wrapper object that contains payload in required `data` property and provides space for adding any other metadata.
  - `data` ApplicationKvRecord, required: A key-value record in the storage of an installed application
    - `key` string: Key of the record - unique within the installation, case-sensitive
    - `value` union: Any JSON value except `null` - a string, number, boolean, array or object. Up to 245760 bytes (240 KiB) when serialized
      - string
      - number
      - boolean
      - object
      - unknown[]
        - unknown
    - `secret` boolean: If `true`, the value is encrypted at rest
    - `createdAt` string, date-time: Date the record was created, in ISO 8601 format
    - `updatedAt` string, date-time: Date the record was last updated, in ISO 8601 format
    - `expiresAt` string, date-time, nullable: Date the record expires, in ISO 8601 format. `null` for permanent records

## Other responses

- `400`: Invalid Request Parameters
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: A KV record for this key already exists

---

[API](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2.md) - [All operations](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/revisions/dc68744c5384?raw)
