P0 App Documentation
Sign up for FreeKnowledge Base
  • What Is P0?
    • 🎛️IAM Dashboard
    • 🔎Access Inventory
    • 🪑IAM Posture
    • ⏱️Just-In-Time Access
    • ♻️Service-Account Key Rotation
  • Getting Started
    • ⬇️Quick Start
    • 🎁Share P0 With Your Team
  • INVENTORY
    • 🗺️Access Inventory
    • 🔬Result Details
    • ❔Query Search
      • 📖Search Reference
  • Posture
    • ⚖️Posture Overview
  • Monitor Results
  • 🤔Finding Details
  • ORCHESTRATION
    • ⏰Just-in-time access
      • 🖐️Requesting Access
        • 👉For Another Party
      • 🏁Approving Access
        • Pre-approving Access
      • 🔀Request Routing
        • Google Cloud Filtering
        • AWS Filtering
      • 🗒️Session Recording
        • 📦AWS
      • 🔌Just-in-time API
        • Command API
        • Access Requests API
        • Routing Rules API
  • Environments
    • ☁️Creating an Environment
    • 📓Environment Terminology
    • ⚙️Settings
  • Integrations
    • 📞Notifier integrations
      • 💬Slack
      • 👬Microsoft Teams
      • 📣Custom Notifiers
        • AWS Lambda Notifier
    • 🔑Resource integrations
      • ☁️Google Cloud
        • Security Perimeter
        • Requesting Access
        • Permissions Reference
          • Cloud Storage
          • Compute Engine
        • Function Caller
      • 📦AWS
        • Requesting Access
        • AWS Integration API
        • Function Caller
      • ☸️Kubernetes
        • Requesting Access
        • Advanced Requests
      • 🔋PostgreSQL
        • Requesting Access
      • ❄️Snowflake
      • 🖥️SSH
      • GitHub
        • Requesting Access
      • 🛠️Custom Resource
        • Installing a Custom Resource Integration
    • 👥Directory integrations
      • Microsoft Entra ID
        • Requesting Access
      • Google Workspace
      • Okta
    • ✔️Approval integrations
      • 🔔PagerDuty
    • ⚡SIEM Integrations
      • Splunk HEC Setup
  • 📝Tracker integrations
    • 🎟️Jira
  • P0 Management
    • 🎩Role-Based Access Control
    • 🔌Management API
      • Role Management API
      • Just-in-time settings API
Powered by GitBook
On this page
  1. ORCHESTRATION
  2. Just-in-time access
  3. Just-in-time API

Access Requests API

Enable programmatic approval, denial, and revocation of access—enabling seamless integration with internal tools, bots, and security workflows for automated access escalation.

PreviousCommand APINextRouting Rules API

Last updated 1 day ago

The Access Request API enables programmatic approval, denial, and revocation of access requests within the P0 platform. It is designed to support custom workflows and automation. Integrate with external systems and services to process access grants without using the P0 user interface.

This is particularly useful for integrating P0 into your internal tooling, bots, or security workflows that require automatic access escalation based on alerts, CI/CD pipelines, or external approvals.

⏰
🔌
  • POSTApprove a permission request
  • POSTDeny a permission request
  • POSTRevoke a granted permission

Approve a permission request

post

Approve an access request by request ID.

Authorizations
Path parameters
orgIdstringRequired

Organization identifier

requestIdstringRequired

Unique identifier for the permission request

Body
expirationLengthstringRequired

Duration for which access should be granted (e.g. "2h", "30m")

Example: 2h
Responses
200
Request approved
400
Invalid or expired request
401
Unauthorized
post
POST /o/{orgId}/permission-requests/{requestId}/approve HTTP/1.1
Host: api.p0.app
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 25

{
  "expirationLength": "2h"
}

No content

Deny a permission request

post

Deny an access request by request ID.

Authorizations
Path parameters
orgIdstringRequired

Organization identifier

requestIdstringRequired

Unique identifier for the permission request

Body
objectOptional
Responses
200
Request denied
400
Invalid or expired request
401
Unauthorized
post
POST /o/{orgId}/permission-requests/{requestId}/deny HTTP/1.1
Host: api.p0.app
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 2

{}

No content

Revoke a granted permission

post

Revoke access previously granted by request ID.

Authorizations
Path parameters
orgIdstringRequired

Organization identifier

requestIdstringRequired

Unique identifier for the permission request

Body
objectOptional
Responses
200
Access revoked
400
Invalid or expired request
401
Unauthorized
post
POST /o/{orgId}/permission-requests/{requestId}/revoke HTTP/1.1
Host: api.p0.app
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 2

{}

No content