PUT/api/orgs/{org_id}/identities/{identity_id}/model-access/models

Add or remove models on a group's list

allowed: true adds the aliases to the group's list, false removes them; the mode is unchanged. Adds must name aliases the org may use; removes may clear stale ones. changed counts the rows that flipped. Org admin or the provisioning key.

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

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

  • identity_idstringrequired

    Identity id.

Request body

  • alias_idsarray<string>required
  • allowedbooleanrequired

    True adds the aliases to the list; false removes them.

Responses

  • 200

    How many of total rows changed.

    Response
    • allowedbooleanrequired
    • changedintegerrequired

      Rows that flipped.

    • totalintegerrequired

      Distinct aliases in the request.

  • 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 not a provisioning key (inference keys are refused, reads included), or it is a customer-plan 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).

  • 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).

  • 422

    The body or query failed validation.

    Response
    • detailarray<object>required
      detail
      • typestring
      • locarray<string | integer>
      • msgstring

Request

curl -X PUT 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/identities/acme-support/model-access/models' \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "alias_ids": [
    "model-4b6d8f0a-2c4e-4a6c-8e0a-2c4e6a8c0e25"
  ],
  "allowed": true
}'

Response

{
  "allowed": true,
  "changed": 1,
  "total": 1
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/identities/acme-support/model-access/models