API Overview
The Private Packagist API allows you to programmatically manage your organization's packages, teams, credentials, and other resources. You can use the API to integrate Private Packagist into your CI/CD pipelines, automate package management, or build custom tools and integrations.
Getting Started
To use the API, you'll need to understand two key concepts:
- Authentication - Create API credentials in your organization settings and learn how to sign requests using HMAC-SHA256 or use simple token-based authentication for GET requests.
- Pagination - List endpoints return paginated results. Learn how to efficiently retrieve large result sets using page and limit parameters.
Client Library (Recommended)
We provide a PHP client library that handles authentication, signature generation, pagination, and access to all endpoints. Using the client library is the easiest way to interact with the API.
Installation: composer require private-packagist/api-client php-http/guzzle6-adapter
Basic usage:
$client = new \PrivatePackagist\ApiClient\Client();
$client->authenticate('api-key', 'api-secret');
$packages = $client->packages()->all();
API Endpoints
Generating OpenAPI documentation...
Start Free Trial
Login to create an organization and start your free trial!