Skip to main content

Overview

The TierZero API allows you to programmatically ask questions to the TierZero AI agent and receive structured responses. This enables you to integrate TierZero’s intelligent analysis capabilities into your applications, automation workflows, and custom tools. The API uses standard HTTP methods with JSON payloads and requires authentication via organization API keys. All API responses are formatted in JSON and include relevant interaction IDs for tracking and follow-up.

Authentication

All API requests require authentication using an organization API key. Include your API key in the request header:
API keys can be generated from your TierZero dashboard. Each key is associated with a specific organization and has access to that organization’s resources and context.

Resource Identifiers

The TierZero API uses Global IDs to identify resources like digests, alert agents, teams, and notification integrations. Global IDs are opaque string identifiers that you receive in API responses and use in subsequent requests. Example Global IDs:

Endpoints

Alert Agent Management

Create Alert Agent (POST /api/v1/alert-responders)

Create a new alert agent that automatically investigates incoming alerts.
Request
Method: POST Path: /api/v1/alert-responders Content-Type: application/json Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
  • Content-Type: application/json
Request Body: For webhook-based alerts (PagerDuty, OpsGenie, FireHydrant, Rootly):
For Slack alerts:
Note: If runbook or runbook.investigation_prompt is not provided, a default investigation prompt will be used: “Please investigate the issue and explain the root cause to the best of your abilities!” Idempotency: If an alert agent with the same name exists for the organization and team, returns the existing responder instead of creating a duplicate.
Matching Criteria
The matching_criteria field controls which alerts trigger this agent. You can provide either text_matches or match_rules — the API will auto-generate the other format and return both in the response. Option 1: text_matches — Simple wildcard patterns (recommended for Terraform/Pulumi) A flat list of patterns using * as a wildcard. All patterns must match (implicit AND).
Option 2: match_rules — Structured rules with AND/OR logic A tree of conditions supporting AND/OR operators and typed conditions. Max nesting depth of 2. Condition types:
  • contains — substring match (case-insensitive)
  • starts_with — prefix match
  • ends_with — suffix match
  • regex — regular expression match
Nested example (alerts containing “error” AND either “stg/” or “release/”):
Precedence: If both text_matches and match_rules are provided, match_rules takes precedence and text_matches will be regenerated from it.
Response
Status Code: 200 OK

Get Alert Agent (GET /api/v1/alert-responders/{alert_id})

Retrieve detailed information about a specific alert agent.
Request
Method: GET Path: /api/v1/alert-responders/{alert_id} Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
Path Parameters:
  • alert_id (required): Alert agent Global ID
Response
Status Code: 200 OK

List Alert Agents (GET /api/v1/alert-responders)

List all alert agents for your organization, optionally filtered by team.
Request
Method: GET Path: /api/v1/alert-responders Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
Query Parameters:
  • team_name (optional): Filter by team name
Response
Status Code: 200 OK

Update Alert Agent (PUT /api/v1/alert-responders/{alert_id})

Update an existing alert agent’s configuration.
Request
Method: PUT Path: /api/v1/alert-responders/{alert_id} Content-Type: application/json Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
  • Content-Type: application/json
Path Parameters:
  • alert_id (required): Alert agent Global ID
Request Body: For webhook-based alerts:
For Slack alerts:
All fields are optional. Only provided fields will be updated. Note: Cannot mix alert types - don’t specify webhook_sources for Slack alerts or slack_channel_id for webhook-based alerts.
Response
Status Code: 200 OK

Delete Alert Agent (DELETE /api/v1/alert-responders/{alert_id})

Delete an alert agent.
Request
Method: DELETE Path: /api/v1/alert-responders/{alert_id} Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
Path Parameters:
  • alert_id (required): Alert agent Global ID
Response
Status Code: 200 OK
Idempotency: Returns success even if the alert agent is already deleted.

Enable Alert Agent (POST /api/v1/alert-responders/{alert_id}/enable)

Enable a paused alert agent to start processing alerts.
Request
Method: POST Path: /api/v1/alert-responders/{alert_id}/enable Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
Path Parameters:
  • alert_id (required): Alert agent Global ID
Response
Status Code: 200 OK

Disable Alert Agent (POST /api/v1/alert-responders/{alert_id}/disable)

Disable an alert agent to temporarily stop processing alerts.
Request
Method: POST Path: /api/v1/alert-responders/{alert_id}/disable Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
Path Parameters:
  • alert_id (required): Alert agent Global ID
Response
Status Code: 200 OK

List Webhook Subscriptions (GET /api/v1/webhook-subscriptions)

Discover available webhook subscriptions for your organization. Use this endpoint to find valid webhook_sources when creating or updating alert agents.
Request
Method: GET Path: /api/v1/webhook-subscriptions Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
Response
Status Code: 200 OK

List Notification Integrations (GET /api/v1/notification-integrations)

Discover available notification integrations for your organization. Use this endpoint to find valid notification_integration_ids when creating or updating alert agents.
Request
Method: GET Path: /api/v1/notification-integrations Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
Query Parameters:
  • kind (optional): Filter by integration kind. Allowed values:
    • DISCORD_WEBHOOK: Discord webhook integrations
    • SLACK_ALERT: Slack alert integrations (Auto-Detect)
Response
Status Code: 200 OK

Investigation Management

Get Investigation (GET /api/v1/investigations/{investigation_id})

Retrieve details about a completed investigation (alert agent job run).
Request
Method: GET Path: /api/v1/investigations/{investigation_id} Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
Path Parameters:
  • investigation_id (required): Investigation Global ID (GraphQL JobRun ID)
Response
Status Code: 200 OK
Note: The result field contains the investigation analysis with:
  • Source markup (††toolu_...††) replaced with numbered citations ([1], [2], etc.)
  • Timestamp markers (§) removed
  • A “Sources:” section appended at the end with clickable links to data sources
Example Response:

Digest Agent Management

Create Digest Agent (POST /api/v1/digests)

Create a new scheduled digest agent job that periodically generates reports based on configured sections.
Request
Method: POST Path: /api/v1/digests Content-Type: application/json Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
  • Content-Type: application/json
Request Body:
Response
Status Code: 200 OK

Get Digest Agent (GET /api/v1/digests/{digest_id})

Retrieve details about a specific digest agent job.
Request
Method: GET Path: /api/v1/digests/{digest_id} Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
Path Parameters:
  • digest_id (required): Digest Agent ID returned from create/update operations
Response
Status Code: 200 OK

Update Digest Agent (PUT /api/v1/digests/{digest_id})

Update an existing digest agent job’s configuration.
Request
Method: PUT Path: /api/v1/digests/{digest_id} Content-Type: application/json Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
  • Content-Type: application/json
Path Parameters:
  • digest_id (required): Digest Agent ID
Request Body:
All fields are optional. Only provided fields will be updated.
Response
Status Code: 200 OK

Delete Digest Agent (DELETE /api/v1/digests/{digest_id})

Delete a digest agent job.
Request
Method: DELETE Path: /api/v1/digests/{digest_id} Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
Path Parameters:
  • digest_id (required): Digest Agent ID
Response
Status Code: 200 OK

Run Digest Agent (POST /api/v1/digests/{digest_id}/run)

Manually trigger a digest agent job to run immediately or schedule it for later.
Request
Method: POST Path: /api/v1/digests/{digest_id}/run Content-Type: application/json Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
  • Content-Type: application/json
Path Parameters:
  • digest_id (required): Digest Agent ID
Request Body:
Field Descriptions:
  • run_sync (optional): If true, runs synchronously and returns results in the response. Default is false.
  • scheduled_runtime (optional): Unix timestamp in seconds. If provided, schedules the digest agent to run at this time instead of running immediately. Must be in the future.
Note: Notifications are always sent to the configured Slack channels and Discord webhooks for the digest agent.
Response (Immediate Run - Async Mode)
Status Code: 200 OK
Response (Immediate Run - Sync Mode with run_sync: true)
Status Code: 200 OK
Response (Scheduled Run)
Status Code: 200 OK

Cron Expression Reference

Digest Agent schedules use cron expressions with five fields:
Note: Day of week starts at 0 for Monday, which differs from standard cron. Common patterns:
  • Weekdays at 9 AM: 0 9 * * 0-4
  • Daily at 9 AM: 0 9 * * *
  • Every Monday at 10 AM: 0 10 * * 0
  • Every 6 hours: 0 */6 * * *
Special characters: * (any), , (list), - (range), / (step)

Interaction Management

Get Interaction Results (GET /api/v1/interactions/{interaction_id})

Retrieve the results of a previous TierZero interaction using its interaction ID. This endpoint allows you to fetch results later, which is useful for polling scheduled actions or accessing historical interactions. For scheduled actions, this endpoint returns the current status and results when complete.
Request
Method: GET Path: /api/v1/interactions/{interaction_id} Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
  • Accept: application/json
Path Parameters:
  • interaction_id (required): The interaction ID returned from a previous POST /api/v1/interactions call
Response
Status Response (for async interactions in progress)
Status Code: 200 OK
Complete Response (for completed interactions)
Status Code: 200 OK
Status Values:
  • PENDING: Request received and queued for processing
  • IN_PROGRESS: Currently being processed by TierZero
  • COMPLETED: Processing complete, results available
  • FAILED: Processing failed due to an error
Error Responses
401 Unauthorized:
404 Not Found:
500 Internal Server Error:

Create Interaction (POST /api/v1/interactions)

Submit a question to the TierZero AI agent and receive an intelligent response based on your organization’s knowledge catalog and observability data.
Request
Method: POST Path: /api/v1/interactions Content-Type: application/json Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
  • Content-Type: application/json
  • Accept: application/json
Request Body:
Field Descriptions:
  • question (required): The question or prompt you want TierZero to analyze. For scheduled actions, this becomes the prompt that runs at the scheduled time.
  • context (optional): Array of previous interactions to provide conversation context
  • user_id (optional): Identifier for the user making the request, useful for tracking and analytics
  • use_tools (optional): If false, TierZero will respond without using any tools (no data queries, no integrations). Default is true. Set to false for faster responses when you only need analysis based on existing knowledge
  • scheduled_runtimes (optional): List of Unix timestamps (in seconds) for when to execute. Each timestamp must be in the future (max 24 hours). Maximum of 10 timestamps allowed per request. Returns interaction_id and status SCHEDULED for polling via GET endpoint.
    • Legacy Parameter: scheduled_runtime (singular, integer) is still supported for backwards compatibility but deprecated. When using the legacy parameter, the API returns the old response format with top-level interaction_id, scheduled_runtime, url, and status fields instead of the interactions array. New integrations should use scheduled_runtimes (plural, array).
  • notifications (optional): Nested object containing notification configurations:
    • slack (optional): Slack notification settings
      • slack_channel_ids: Array of Slack channel IDs (e.g., ["C01234567"]). Each ID should start with ‘C’ (public) or ‘G’ (private)
    • discord (optional): Discord notification settings
      • discord_webhook_urls: Array of Discord webhook URLs
    • web (optional): Webhook callback settings for async responses
      • callback_url: URL where results will be sent
      • custom_headers (optional): Dictionary of custom HTTP headers for callbacks (e.g., {"Authorization": "Bearer token"}). If not provided, defaults to {"X-TierZero-Org-Api-Key": "your-api-key"}
Execution Modes:
  • Synchronous (default): Returns result immediately in the response. No scheduled_runtimes or notifications.web.callback_url provided. Status: COMPLETED.
  • Asynchronous with callback: Provide notifications.web.callback_url without scheduled_runtimes. Returns interaction_id immediately, executes in background, sends results to callback URL when done. Status: SCHEDULED.
  • Scheduled: Provide scheduled_runtimes (list of future timestamps). Returns interaction_id immediately, executes at specified times. Poll via GET endpoint or use notification channels. Status: SCHEDULED.
Note for Scheduled Actions:
  • A unique name is automatically generated for each scheduled action
  • Scheduled actions are limited to at most 24 hours in the future
  • Maximum of 10 scheduled runtimes allowed per request
  • Notification targets (via notifications object) are optional - you can query results using GET /api/v1/interactions/{interaction_id}
Response
Synchronous Response (no callback_url, no scheduled_runtime)
Status Code: 200 OK
Asynchronous Response (with callback_url, no scheduled_runtimes)
Status Code: 200 OK
Note: When using only callback_url without scheduled_runtimes, the job executes immediately in the background and results are sent to the callback URL. Status is SCHEDULED.
Scheduled Action Response (with scheduled_runtimes)
Status Code: 200 OK
Note: When using scheduled_runtimes, jobs execute at the specified future times. The callback URL (if provided) will receive results when each scheduled job completes.
Legacy Response Format (DEPRECATED - using scheduled_runtime singular parameter)
Status Code: 200 OK
Note: This format is maintained for backwards compatibility when using the deprecated scheduled_runtime (singular) parameter. New integrations should use scheduled_runtimes (plural, array) which returns the interactions array format shown above. Important Behavioral Notes:
  1. One Interaction Per Scheduled Runtime: When using scheduled_runtimes, each timestamp creates a separate interaction with its own unique interaction_id. This is a 1:1 mapping - one timestamp = one job = one interaction.
  2. Tracking Individual Executions:
    • Poll each interaction independently: GET /api/v1/interactions/{interaction_id}
    • Each interaction has its own lifecycle and status
    • Store ALL returned interaction_ids if you need to track completion
  3. Callback Behavior (when using callback_url):
    • You will receive multiple callbacks - one per scheduled runtime
    • Each callback includes the specific interaction_id for that execution
    • Callback payload structure:
  4. Client Implementation Requirements:
    • MUST store all interaction_ids from the interactions array
    • MUST handle multiple callbacks when using callback_url (one per scheduled runtime)
    • Each callback’s interaction_id corresponds to one of the returned interactions
Context Handling
The context field allows you to provide conversation history for more contextual responses:
  1. Interaction ID Context: If a context item includes an interaction_id from a previous API call, TierZero will retrieve the full conversation history for that interaction
  2. Content-Only Context: If only content is provided, it will be treated as a user message in the conversation context
  3. Mixed Context: You can combine both types of context items in a single request
Error Responses
400 Bad Request:
401 Unauthorized:
500 Internal Server Error:

Billing

Get Credit Usage by Team (POST /api/v1/billing/credit-usage)

Retrieve credit usage data grouped by team and month for a given time range. Rows with team_id: null represent unattributed usage from automated features (alert responders, incidents, digests, internal agents).
Request
Method: POST Path: /api/v1/billing/credit-usage Content-Type: application/json Headers:
  • X-TierZero-Org-Api-Key (required): Your organization API key
  • Content-Type: application/json
Authentication: This endpoint uses an organization API key, consistent with the other programmatic endpoints. The key scopes the response to that organization’s usage. Request Body:
Validation:
  • end must be after start
  • Maximum time range is 366 days
Response
Status Code: 200 OK
Data Fields:
  • data: Array of per-team, per-month credit usage records, ordered by month then credits descending
  • data[].team_id / data[].team_name: The team. null values represent unattributed usage from automated features (alert responders, incident investigations, digests, internal agents, support agents)
  • data[].credits: Credit usage rounded to 2 decimal places
  • monthly_totals: Convenience object summing all credits (attributed + unattributed) per month
Error Responses
400 Bad Request:
401 Unauthorized:

Usage Examples

Alert Agent Management Examples

Create an Alert Agent

List Alert Agents

Get Alert Agent Details

Update Alert Agent

Enable/Disable Alert Agent

Delete Alert Agent

Investigation Management Examples

Get Investigation Details

Example Response:

Digest Agent Management Examples

Create a Daily Digest Agent

Get Digest Agent Details

Update a Digest Agent

Run a Digest Agent Immediately

Schedule a Digest Agent for Later

Delete a Digest Agent

Scheduled Action Examples

Scheduled actions use the same /api/v1/interactions endpoint with additional parameters.

Create Scheduled Action with Slack Notification

Schedule a TierZero agent to run at specific times and post results to a Slack channel:

Create Scheduled Action with Discord Notification

Schedule an action to send results to a Discord webhook:

Create Scheduled Action with Multiple Notifications

Send results to both Slack and Discord:

Billing Examples

Get Credit Usage by Team

Interaction Examples

Basic Question

Question with Context

Asynchronous Request with Callback

Scheduled Request with Polling

Request Without Tools (Knowledge-Only Response)

Retrieve Interaction Results

Response Format

TierZero responses are formatted as markdown and may include:
  • Analysis summaries with key findings
  • Relevant log excerpts and error messages
  • Metric trends and performance data
  • Recommendations for investigation or resolution
  • Links to relevant dashboards and tools
The interaction_id can be used in subsequent API calls to maintain conversation context and build upon previous analyses.

Rate Limits

API requests are subject to rate limiting based on your organization’s plan. Rate limit information is included in response headers:
  • X-RateLimit-Limit: Maximum requests per time window
  • X-RateLimit-Remaining: Remaining requests in current window
  • X-RateLimit-Reset: Time when the rate limit resets

Best Practices

  1. Provide Context: Use the context field to maintain conversation history for better responses
  2. Descriptive Questions: Ask specific, detailed questions for more accurate analysis
  3. Choose the Right Mode:
    • Use synchronous mode for immediate responses (no callback_url or scheduled_runtime)
    • Use scheduled mode with polling (scheduled_runtime) for time-based execution when you need full control over result retrieval
    • Use async mode with callbacks (callback_url) for fire-and-forget scenarios with webhook handling
  4. Optimize Tool Usage:
    • Set use_tools: true (default) when you need TierZero to query data sources, run integrations, or perform real-time analysis
    • Set use_tools: false for faster responses when you only need answers based on existing knowledge (e.g., documentation, runbooks, best practices)
  5. Track Interactions: Store interaction IDs to enable follow-up questions and conversation threading
  6. Handle Errors: Implement proper error handling for all HTTP status codes
  7. Respect Rate Limits: Monitor rate limit headers and implement backoff strategies
  8. Poll Efficiently: For scheduled mode, use reasonable polling intervals (2-5 seconds) and implement timeouts
  9. User Tracking: Use the user_id field for analytics, rate limiting, and audit trails

Integration Examples

Python

Node.js