PATCH/api/orgs/{org_id}/score-configs/{config_id}

Edit a score config

Rename, describe or archive a config. The type and bounds are fixed once scores use it (config_in_use).

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

    Your organization id (uuid). GET /api/whoami returns it.

  • config_idstringrequired

    The config id.

Request body

  • namestring

    1 to 64 characters.

  • data_typeenum
    "numeric""boolean""categorical"
  • minnumber | null

    Numeric lower bound.

  • maxnumber | null

    Numeric upper bound.

  • categoriesarray | null

    Categorical values, at most 32.

  • descriptionstring | null

    At most 500 characters.

  • archivedboolean

Responses

  • 200

    The config.

    Response
    • idstring
    • namestring

      1 to 64 characters.

    • data_typeenum
      "numeric""boolean""categorical"
    • minnumber | null

      Numeric lower bound.

    • maxnumber | null

      Numeric upper bound.

    • categoriesarray | null

      Categorical values, at most 32.

    • descriptionstring | null

      At most 500 characters.

    • archivedboolean
  • 401

    Missing, unknown or revoked API key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 403

    The key is valid but may not perform this action (for example an inference key on a provisioning-key route, or a feature outside your plan).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 404

    The resource does not exist or belongs to another organization.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 409

    Scores already use this type (config_in_use).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 422

    The change is invalid.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

Request

curl -X PATCH 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/score-configs/5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a' \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "archived": true
}'

Response

{
  "id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
  "name": "helpful",
  "data_type": "numeric",
  "min": 0,
  "max": 1,
  "categories": null,
  "description": "How helpful the answer was.",
  "archived": false
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/score-configs/5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a