Skip to main content

Ingest Tokens

Ingest tokens are used to authenticate telemetry data sent from your MCP servers via the Shinzo SDKs. These tokens have write-only access to telemetry ingestion endpoints.

Generate Ingest Token

Create a new ingest token for telemetry data ingestion.

Endpoint

POST /auth/generate_ingest_token

Authentication

Requires JWT token authentication.

Example Request

curl -X POST https://api.app.shinzo.ai/auth/generate_ingest_token \
  -H "Authorization: Bearer <jwt_token>"

Response

{
  "uuid": "itk_abc123def456",
  "token": "abc123-def456-ghi789-...",
  "created_at": "2025-01-15T10:00:00Z",
  "status": "active"
}
The token value is only displayed once at creation. Store it securely as it cannot be retrieved later.

Response Fields

FieldTypeDescription
uuidstringUnique identifier for the token
tokenstringThe token value (shown only once)
created_atstringCreation timestamp (ISO 8601)
statusstringToken status (active)

List Ingest Tokens

Retrieve all ingest tokens associated with your account.

Endpoint

GET /auth/fetch_ingest_tokens

Authentication

Requires JWT token authentication.

Example Request

curl -X GET https://api.app.shinzo.ai/auth/fetch_ingest_tokens \
  -H "Authorization: Bearer <jwt_token>"

Response

{
  "tokens": [
    {
      "uuid": "itk_abc123def456",
      "created_at": "2025-01-15T10:00:00Z",
      "last_used_at": "2025-01-20T14:30:00Z",
      "status": "active"
    },
    {
      "uuid": "itk_xyz789uvw012",
      "created_at": "2025-01-10T08:00:00Z",
      "last_used_at": "2025-01-18T09:15:00Z",
      "status": "active"
    }
  ]
}
Token values are not returned when listing tokens. Only metadata is shown.

Revoke Ingest Token

Revoke an existing ingest token. Revoked tokens can no longer be used for telemetry ingestion.

Endpoint

POST /auth/revoke_ingest_token/:tokenUuid

Authentication

Requires JWT token authentication.

Path Parameters

ParameterTypeRequiredDescription
tokenUuidstringYesThe UUID of the token to revoke

Example Request

curl -X POST https://api.app.shinzo.ai/auth/revoke_ingest_token/itk_abc123def456 \
  -H "Authorization: Bearer <jwt_token>"

Response

{
  "message": "Token revoked successfully",
  "uuid": "itk_abc123def456",
  "revoked_at": "2025-01-20T16:00:00Z"
}

Status Codes

CodeDescription
200Token revoked successfully
401Invalid or missing JWT token
404Token not found

Using Ingest Tokens

Ingest tokens are used with the Shinzo SDKs for telemetry ingestion:
import { instrumentServer } from "@shinzolabs/otel-mcp-server"

const telemetry = instrumentServer(server, {
  serverName: "my-mcp-server",
  serverVersion: "1.0.0",
  exporterEndpoint: "https://api.app.shinzo.ai/telemetry/ingest_http",
  exporterAuth: {
    type: "bearer",
    token: process.env.SHINZO_INGEST_TOKEN
  }
})
For direct API usage:
curl -X POST https://api.app.shinzo.ai/telemetry/ingest_http \
  -H "Authorization: <ingest_token>" \
  -H "Content-Type: application/json" \
  -d '{"resourceSpans": [...]}'