Skip to content
LakeSharkDocumentation
API REFERENCE / DOCUMENTATION

Configuration sets API

Create named configuration sets by publishing immutable typed versions.

ConfigStore stores configuration sets for the active workspace.

A configuration set is identified by a name such as:

customer-support

Each publish creates a new immutable version under that name.

The model

There is no separate “create configuration set” request.

The first publish to a new name does both:

new name
  + POST /v1/configs/{name}/versions
  = create configuration set
  + create first immutable version
  + make that version active

Publishing again to the same name creates another immutable version and makes the new version active.

customer-support
  ├─ version A
  ├─ version B
  └─ version C  ← active

Version identifiers are opaque. Do not assume they are sequential integers.

Base URL

https://lakeshark.dev/api/config

Authentication

Use a normal LakeShark bearer access token.

  • reads require config.read
  • publishes require config.write

Organization and workspace are taken from the access token.

Quick example

Assume:

export LAKESHARK_ACCESS_TOKEN='your-access-token'

1. Publish a configuration set

curl --fail-with-body \
  -X POST 'https://lakeshark.dev/api/config/v1/configs/customer-support/versions' \
  -H "Authorization: Bearer $LAKESHARK_ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "description": "Customer support application settings",
    "variables": {
      "tone": {
        "type": "text",
        "value": "concise",
        "description": "Preferred response tone"
      },
      "max_retries": {
        "type": "number",
        "value": 1,
        "description": "Application retry budget"
      },
      "allow_external_links": {
        "type": "boolean",
        "value": false,
        "description": "Whether external links are allowed"
      }
    }
  }'

If customer-support does not already exist, this creates it.

Representative response:

{
  "name": "customer-support",
  "version": "f4f0c7b608e64a5090ac43f8823401ca",
  "active": true
}

Save the returned version when you need reproducible reads.

2. Read the active version

curl --fail-with-body \
  'https://lakeshark.dev/api/config/v1/configs/customer-support' \
  -H "Authorization: Bearer $LAKESHARK_ACCESS_TOKEN"

Representative response:

{
  "name": "customer-support",
  "version": "f4f0c7b608e64a5090ac43f8823401ca",
  "active": true,
  "description": "Customer support application settings",
  "created_at": "2026-09-29T14:00:00+00:00",
  "variable_count": 3,
  "variables": {
    "tone": {
      "type": "text",
      "value": "concise",
      "description": "Preferred response tone"
    },
    "max_retries": {
      "type": "number",
      "value": 1,
      "description": "Application retry budget"
    },
    "allow_external_links": {
      "type": "boolean",
      "value": false,
      "description": "Whether external links are allowed"
    }
  }
}

3. Publish a new version

Publish to the same name again:

POST /v1/configs/customer-support/versions

with the complete new variable set.

The new immutable version becomes active immediately.

Existing versions are not modified.

4. List version history

curl --fail-with-body \
  'https://lakeshark.dev/api/config/v1/configs/customer-support/versions' \
  -H "Authorization: Bearer $LAKESHARK_ACCESS_TOKEN"

Representative response:

{
  "name": "customer-support",
  "versions": [
    {
      "version": "712fa8ab0dfd41aca1e7efa462f35dab",
      "active": true,
      "created_at": "2026-09-29T14:10:00+00:00",
      "variable_count": 3
    },
    {
      "version": "f4f0c7b608e64a5090ac43f8823401ca",
      "active": false,
      "created_at": "2026-09-29T14:00:00+00:00",
      "variable_count": 3
    }
  ]
}

This endpoint returns version metadata, not the full variables.

5. Read one immutable version

curl --fail-with-body \
  'https://lakeshark.dev/api/config/v1/configs/customer-support/versions/f4f0c7b608e64a5090ac43f8823401ca' \
  -H "Authorization: Bearer $LAKESHARK_ACCESS_TOKEN"

Use this form when a workload must read the exact configuration version recorded with a previous run or deployment.

Endpoints

Method Path Returns
GET /v1/config-types Supported variable types
GET /v1/configs Configuration-set names
GET /v1/configs/{name} Full active version
GET /v1/configs/{name}/versions Version-history metadata
GET /v1/configs/{name}/versions/{version} Full immutable version
POST /v1/configs/{name}/versions Publish and activate a new immutable version

Variable shape

Every variable has this shape:

{
  "type": "text",
  "value": "concise",
  "description": "Preferred response tone"
}

The description is optional.

Variable types

Type Required JSON value
text String
number Finite JSON number
boolean true or false
list JSON array
json JSON object or array
answer String containing a longer expected/reference answer

You can retrieve this catalog programmatically:

GET /v1/config-types

Naming rules

Configuration-set names:

  • 1 to 120 characters
  • first character must be a letter or number
  • remaining characters may contain letters, numbers, _, -, or .

Variable names:

  • 1 to 200 characters
  • must begin with a letter
  • may contain letters, numbers, _, -, or .

A published set must contain at least one variable and can contain up to 5,000 variables.

List configuration sets

GET /v1/configs

Response:

{
  "configs": [
    "customer-support",
    "checkout-runtime"
  ]
}

This endpoint returns names only.

Read /v1/configs/{name} to retrieve the active variables.

No in-place mutation

Published versions are immutable.

There is no PATCH operation for a version.

To change a setting:

  1. Read the active version if needed.
  2. Build the complete desired variable set.
  3. Publish it to the same configuration-set name.
  4. Store the returned version identifier if reproducibility matters.

Rollback model

ConfigStore does not expose an “activate old version” endpoint.

If you need to restore older values:

  1. Read the old immutable version.
  2. Publish those values again as a new version.

That preserves a complete audit-friendly version history instead of moving an active pointer backward.

Configuration quota

Creating the first version of a new configuration-set name consumes a configuration resource when the organization’s configurations.max quota is limited.

Publishing additional versions under an existing name does not create another configuration-set resource.

Relationship to AnswerSets

Do not use ConfigStore directly to edit normal AnswerSet behavior.

AnswerSets manage their own versioned configuration through the Answers product and API.

Use ConfigStore directly when another application or workload needs LakeShark-hosted, typed, immutable runtime settings.