API ReferenceapiidentityPOST /v1/sessions/verify

POST /v1/sessions/verify

Service: identity · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "minLength": 1,
      "description": "JWT issued by Clerk or WorkOS"
    }
  },
  "required": [
    "token"
  ]
}

Responses

200 Session verified

{
  "type": "object",
  "properties": {
    "subject": {
      "type": "string",
      "description": "Canonical user ID (WorkOS user ID)"
    },
    "type": {
      "type": "string",
      "enum": [
        "user"
      ],
      "description": "Token type"
    },
    "brand_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Brand scope"
    },
    "workos_user_id": {
      "type": "string",
      "description": "WorkOS user ID"
    },
    "clerk_user_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Clerk user ID if legacy token"
    },
    "scope": {
      "type": "string",
      "description": "Space-separated scopes"
    }
  },
  "required": [
    "subject",
    "type",
    "brand_id",
    "workos_user_id",
    "clerk_user_id",
    "scope"
  ]
}

401 Token invalid or expired

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "suspended_until": {
      "type": "string"
    },
    "reason": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

403 Account suspended or banned

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "suspended_until": {
      "type": "string"
    },
    "reason": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://identity.platform.loop.health/v1/sessions/verify \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'