> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.kuudo.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.kuudo.com/_mcp/server.

# Introspect API key

POST https://app.kuudo.com/api/auth/introspect
Content-Type: application/json

For gateways validating raw API keys; this does not introspect JWT or OAuth access tokens. Invalid/missing keys return 200 with active: false. An internal fault returns 503 with error: service_unavailable and Retry-After, never active: false, so retry rather than reject the key. Accepts JSON or form-encoded token. Limits are 120 requests/minute independently per trusted client IP and matched API key.

Reference: https://docs.kuudo.com/api-reference/authentication/introspect-api-key

## Request

### Body (application/json)

This endpoint expects an IntrospectionRequest.

- `token` (string, required) — Raw sk_live_* or sk_test_* API key, not an exchanged JWT.

## Response

### 200

Success

- `active` (boolean, required)
- `client_id` (string, optional, nullable)
- `token_type` (enum, optional)
  - Allowed values: `bearer`
- `scope` (string, optional)
- `org_id` (string, optional)
- `user_id` (string, optional, nullable)
- `api_key_id` (integer, optional)
- `error` (string, optional)

## Errors

### 429 Too Many Requests Error

Throttled; active: false and error: rate_limited.

- `active` (boolean, required)
- `client_id` (string, optional, nullable)
- `token_type` (enum, optional)
  - Allowed values: `bearer`
- `scope` (string, optional)
- `org_id` (string, optional)
- `user_id` (string, optional, nullable)
- `api_key_id` (integer, optional)
- `error` (string, optional)

### 503 Service Unavailable Error

Dependency unavailable or application maintenance.

- `error` (ErrorError, required)
- `code` (string, optional)
- `details` (any, optional) — Endpoint-specific validation or failure details; shape varies.
- `requiredScopes` (list of string, optional)
- `errorCode` (string, optional)
- `message` (string, optional)
- `remediation` (string, optional)

## Types

### ErrorError

- string
- ErrorError1

### ErrorError1

- `code` (string, required)
- `message` (string, required)

## Examples

**Request**

```json
{
  "token": "string"
}
```

**Response**

```json
{
  "active": false
}
```

**SDK Code**

```python Authentication_introspectApiKey_example
import requests

url = "https://app.kuudo.com/api/auth/introspect"

payload = { "token": "string" }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Authentication_introspectApiKey_example
const url = 'https://app.kuudo.com/api/auth/introspect';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"token":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Authentication_introspectApiKey_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.kuudo.com/api/auth/introspect"

	payload := strings.NewReader("{\n  \"token\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Authentication_introspectApiKey_example
require 'uri'
require 'net/http'

url = URI("https://app.kuudo.com/api/auth/introspect")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"token\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java Authentication_introspectApiKey_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.kuudo.com/api/auth/introspect")
  .header("Content-Type", "application/json")
  .body("{\n  \"token\": \"string\"\n}")
  .asString();
```

```php Authentication_introspectApiKey_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.kuudo.com/api/auth/introspect', [
  'body' => '{
  "token": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Authentication_introspectApiKey_example
using RestSharp;

var client = new RestClient("https://app.kuudo.com/api/auth/introspect");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"token\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Authentication_introspectApiKey_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["token": "string"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.kuudo.com/api/auth/introspect")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```