> ## Documentation Index
> Fetch the complete documentation index at: https://docs.korve.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create

> Provision an isolated TLS cache and issue its connection string once.



## OpenAPI

````yaml /openapi.json post /v1/orgs/{orgId}/projects/{projectId}/caches
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/caches:
    post:
      tags:
        - caches
      summary: Create
      description: Provision an isolated TLS cache and issue its connection string once.
      operationId: caches.create
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
        - name: environment
          in: query
          required: false
          schema:
            type: string
            pattern: ^[a-z][a-z0-9-]{0,38}$
          description: >-
            Environment slug to scope this operation to. Defaults to
            "production". An environment that does not exist on the project
            answers 404. The cache is created in the addressed environment.
      requestBody:
        required: true
        x-korve-max-bytes: 1048576
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  pattern: ^[a-z][a-z0-9-]{1,61}$
                sku:
                  type: string
                  enum:
                    - cache-n1
                    - cache-s1
                    - cache-s2
                region:
                  type: string
                persistence:
                  type: string
                  enum:
                    - none
                    - aof
                evictionPolicy:
                  type: string
                  enum:
                    - allkeys-lru
                    - allkeys-lfu
                    - volatile-lru
                    - noeviction
              required:
                - name
                - sku
                - region
              additionalProperties: false
      responses:
        '201':
          description: Cache provisioned and credentials issued.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  status:
                    type: string
                    enum:
                      - provisioning
                      - ready
                      - failed
                  connectionString:
                    type: string
                    description: >-
                      A rediss:// URL shown exactly once. Rotate credentials to
                      issue another.
                required:
                  - id
                  - name
                  - status
                  - connectionString
                additionalProperties: false
        '409':
          description: The cache name already exists.
        '422':
          description: Invalid cache configuration.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````