# POST /v4/key-value-stores/self

_Merkl API_

Create a key-value store you own (allowlisted users, X-API-Key). `key` is a suffix; the response returns the canonical, owner-namespaced key used for entry writes, update and delete.

## Request body

**`application/json`**
```json
{
  "type": "object",
  "properties": {
    "key": {
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[a-zA-Z0-9_-]+$",
      "description": "Unique human-readable key (alphanumeric, hyphens, underscores). Server-namespaced per owner.",
      "type": "string"
    },
    "description": {
      "maxLength": 512,
      "type": "string"
    },
    "type": {
      "description": "Semantic type — determines the required JSON shape of entry values",
      "anyOf": [
        {
          "const": "WHITELIST",
          "type": "string"
        },
        {
          "const": "BLACKLIST",
          "type": "string"
        },
        {
          "const": "BOOST",
          "type": "string"
        },
        {
          "const": "REFERRER",
          "type": "string"
        },
        {
          "const": "FORWARDER",
          "type": "string"
        },
        {
          "const": "APR",
          "type": "string"
        }
      ]
    },
    "sizeLimit": {
      "minimum": 1,
      "maximum": 1000000,
      "description": "Capped at the caller's quota",
      "type": "number"
    },
    "publicRead": {
      "default": true,
      "type": "boolean"
    }
  },
  "required": [
    "key",
    "type"
  ]
}
```
**`application/x-www-form-urlencoded`**
```json
{
  "type": "object",
  "properties": {
    "key": {
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[a-zA-Z0-9_-]+$",
      "description": "Unique human-readable key (alphanumeric, hyphens, underscores). Server-namespaced per owner.",
      "type": "string"
    },
    "description": {
      "maxLength": 512,
      "type": "string"
    },
    "type": {
      "description": "Semantic type — determines the required JSON shape of entry values",
      "anyOf": [
        {
          "const": "WHITELIST",
          "type": "string"
        },
        {
          "const": "BLACKLIST",
          "type": "string"
        },
        {
          "const": "BOOST",
          "type": "string"
        },
        {
          "const": "REFERRER",
          "type": "string"
        },
        {
          "const": "FORWARDER",
          "type": "string"
        },
        {
          "const": "APR",
          "type": "string"
        }
      ]
    },
    "sizeLimit": {
      "minimum": 1,
      "maximum": 1000000,
      "description": "Capped at the caller's quota",
      "type": "number"
    },
    "publicRead": {
      "default": true,
      "type": "boolean"
    }
  },
  "required": [
    "key",
    "type"
  ]
}
```
**`multipart/form-data`**
```json
{
  "type": "object",
  "properties": {
    "key": {
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[a-zA-Z0-9_-]+$",
      "description": "Unique human-readable key (alphanumeric, hyphens, underscores). Server-namespaced per owner.",
      "type": "string"
    },
    "description": {
      "maxLength": 512,
      "type": "string"
    },
    "type": {
      "description": "Semantic type — determines the required JSON shape of entry values",
      "anyOf": [
        {
          "const": "WHITELIST",
          "type": "string"
        },
        {
          "const": "BLACKLIST",
          "type": "string"
        },
        {
          "const": "BOOST",
          "type": "string"
        },
        {
          "const": "REFERRER",
          "type": "string"
        },
        {
          "const": "FORWARDER",
          "type": "string"
        },
        {
          "const": "APR",
          "type": "string"
        }
      ]
    },
    "sizeLimit": {
      "minimum": 1,
      "maximum": 1000000,
      "description": "Capped at the caller's quota",
      "type": "number"
    },
    "publicRead": {
      "default": true,
      "type": "boolean"
    }
  },
  "required": [
    "key",
    "type"
  ]
}
```

## Responses

- **200** Response for status 200

## Example request

```bash
curl -X POST "https://api.merkl.xyz//v4/key-value-stores/self" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
```