Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.petrasecurity.com/llms.txt

Use this file to discover all available pages before exploring further.

For common API errors, see API Troubleshooting.

Overview

The Petra Security API provides programmatic access to security data and functionality within your Petra portal. Use our API to integrate Petra’s security capabilities into your own applications and workflows.

Base URL

All API requests should be made to:
https://api.petrasecurity.com

Authentication

The Petra API uses Bearer token authentication. You’ll need to include your API key in the Authorization header of all requests:
Authorization: Bearer YOUR_API_KEY
To get your API key, navigate to Settings in your Petra portal.

Response Format

All API responses are returned in JSON format. Successful requests will return a 200 OK status code along with the requested data.

Rate Limiting

API requests are subject to rate limiting to ensure fair usage. If you exceed the rate limit, you’ll receive a 429 Too Many Requests response.

Getting Started

  1. Obtain your API key from the Settings page in your Petra portal
  2. Include the API key in your request headers
  3. Make your first API call to the /v1/usage endpoint
Check out our Authentication guide for detailed setup instructions.