Get Next Tag Slot

Report which slot a create would take for a field type, and how many are left. Advisory rather than a claim: nothing is reserved, and POST /api/v2/knowledge/{knowledgeBaseId}/tags assigns the same slot when tagSlot is omitted. A workspace API key is rejected with 403; use a personal API key.

GET/api/v2/knowledge/{knowledgeBaseId}/tags/next-slot
X-API-Key<token>

Your Sim API key, personal or workspace-scoped. Generate one under Settings, then API Keys. Operations that reject workspace keys say so in their own description.

In: header

Path Parameters

knowledgeBaseId*string

Unique knowledge base identifier.

Length1 <= length

Query Parameters

workspaceId*string

Workspace that owns the knowledge base.

Length1 <= length <= 128
fieldType*string

Value type stored in the slot; it decides which slots are usable and which filter operators apply. Slot capacity per type: text 7, number 5, date 2, boolean 3.

Value in"text" | "number" | "date" | "boolean"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.sim.ai/api/v2/knowledge/string/tags/next-slot?workspaceId=string&fieldType=text" \  -H "X-API-Key: YOUR_API_KEY"
{
  "data": {
    "nextAvailableSlot": "tag3",
    "fieldType": "string",
    "usedSlots": [
      "string"
    ],
    "totalSlots": 1,
    "availableSlots": 0
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid request"
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "API key required"
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Insufficient workspace permissions",
    "details": {
      "code": "INSUFFICIENT_WORKSPACE_ROLE"
    }
  }
}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Not found"
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "API rate limit exceeded",
    "details": {
      "retryAfter": "2026-01-01T00:00:30.000Z"
    }
  }
}
{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  }
}
{
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "Service temporarily unavailable"
  }
}