PHPackages                             cloudinary/account-provisioning - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. cloudinary/account-provisioning

ActiveLibrary[API Development](/categories/api)

cloudinary/account-provisioning
===============================

v0.2.0(2mo ago)16MITPHPPHP &gt;=8.2CI failing

Since Dec 31Pushed 1mo ago12 watchersCompare

[ Source](https://github.com/cloudinary/account-provisioning-php)[ Packagist](https://packagist.org/packages/cloudinary/account-provisioning)[ RSS](/packages/cloudinary-account-provisioning/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (15)Versions (8)Used By (0)

Cloudinary Account Provisioning PHP SDK
=======================================

[](#cloudinary-account-provisioning-php-sdk)

[![Packagist Version](https://camo.githubusercontent.com/7f2dfed090734a6e0fd9ce1c460f44b43f0a7c79309710f74ddf6629a7316d5c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c6f7564696e6172792f6163636f756e742d70726f766973696f6e696e672e737667)](https://packagist.org/packages/cloudinary/account-provisioning)[![Packagist Downloads](https://camo.githubusercontent.com/f48471a448e7b5dfacfb24548aa7a0a8d6d982d56855e03635900f61fe7f6b6d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f636c6f7564696e6172792f6163636f756e742d70726f766973696f6e696e672e737667)](https://packagist.org/packages/cloudinary/account-provisioning)[![License](https://camo.githubusercontent.com/ee68e418fea7b6cda7ba20d61ed54eb12ed7e09884087fe00bbcdfac772b7584/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636c6f7564696e6172792f6163636f756e742d70726f766973696f6e696e672d7068702e737667)](https://github.com/cloudinary/account-provisioning-php/blob/main/LICENSE)

Developer-friendly &amp; type-safe PHP SDK for the [Cloudinary Account Provisioning](https://cloudinary.com/documentation/provisioning_api_1) and Permissions APIs.

Summary
-------

[](#summary)

Cloudinary Account Provisioning API: Accounts with provisioning API access can create and manage their **product environments**, **users** and **user groups** using the RESTful Provisioning API.

Provisioning API access is available [upon request](https://cloudinary.com/contact?plan=enterprise) for accounts on an [Enterprise plan](https://cloudinary.com/pricing#pricing-enterprise).

The API uses **Basic Authentication** over HTTPS. Your **Account API Key** and **Account API Secret** (previously referred to as **Provisioning API keys**) are used for the authentication. These credentials (as well as your ACCOUNT\_ID) are located in the [Cloudinary Console](https://console.cloudinary.com/pm) under **Settings &gt; Account API Keys**.

The Provisioning API has dedicated SDKs for the following languages:

- [JavaScript](https://github.com/cloudinary/account-provisioning-js)
- [PHP](https://github.com/cloudinary/account-provisioning-php)
- [Java](https://github.com/cloudinary/account-provisioning-java)

Useful links:

- [Provisioning API reference (Classic)](https://cloudinary.com/documentation/provisioning_api_1) (includes SDKs for additional languages)

Accounts with Permissions API access can assign roles, made up of system policies, to control what principals (users, groups, and API keys) can do across the Cloudinary account and product environments. For more information about Cloudinary roles and permissions, see the [Role-based permissions](permissions_overview) guide.

Permissions API access is available [upon request](https://cloudinary.com/contact?plan=enterprise) for accounts on an [Enterprise plan](https://cloudinary.com/pricing#pricing-enterprise).

The API uses **Basic Authentication** over HTTPS. Your **Account API Key** and **Account API Secret** (previously referred to as **Provisioning API keys**) are used for the authentication. These credentials (as well as your ACCOUNT\_ID) are located in the [Cloudinary Console](https://console.cloudinary.com/app/settings/account-api-keys) under **Settings &gt; Account API Keys**.

***Important:***

*Cloudinary's **Roles and Permissions Management** is now available as a **Beta**. This is an early stage release, and while it's functional and ready for real-world testing, it's subject to change as we continue refining the experience based on what we learn, including your feedback. During the Beta period, core functionality is considered stable, though some APIs, scopes, or response formats may evolve.*

***How you can help:***

- *Use Roles and Permissions Management in real projects, prototypes, or tests.*
- *Share feedback, issues, or ideas with our support team.*

*Thank you for exploring this early release and helping us shape these tools to best meet your needs.*

Table of Contents
-----------------

[](#table-of-contents)

- [Cloudinary Account Provisioning PHP SDK](#cloudinary-account-provisioning-php-sdk)
    - [SDK Installation](#sdk-installation)
    - [SDK Example Usage](#sdk-example-usage)
    - [Authentication](#authentication)
    - [Available Resources and Operations](#available-resources-and-operations)
    - [Global Parameters](#global-parameters)
    - [Error Handling](#error-handling)
    - [Server Selection](#server-selection)
- [Development](#development)
    - [Maturity](#maturity)
    - [Contributions](#contributions)

SDK Installation
----------------

[](#sdk-installation)

The SDK relies on [Composer](https://getcomposer.org/) to manage its dependencies.

To install the SDK and add it as a dependency to an existing `composer.json` file:

```
composer require "cloudinary/account-provisioning"
```

SDK Example Usage
-----------------

[](#sdk-example-usage)

### Example

[](#example)

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Cloudinary\Account\Provisioning;
use Cloudinary\Account\Provisioning\Models\Components;
use Cloudinary\Account\Provisioning\Models\Operations;

$sdk = Provisioning\CldProvisioning::builder()
    ->setAccountId('')
    ->setSecurity(
        new Components\Security(
            provisioningApiKey: 'CLOUDINARY_PROVISIONING_API_KEY',
            provisioningApiSecret: 'CLOUDINARY_PROVISIONING_API_SECRET',
        )
    )
    ->build();

$request = new Operations\GetProductEnvironmentsRequest(
    enabled: true,
    prefix: 'product',
);

$response = $sdk->productEnvironments->list(
    request: $request
);

if ($response->productEnvironmentsResponse !== null) {
    // handle response
}
```

Authentication
--------------

[](#authentication)

### Per-Client Security Schemes

[](#per-client-security-schemes)

This SDK supports the following security scheme globally:

NameTypeSchemeEnvironment Variable`provisioningApiKey`
`provisioningApiSecret`httpCustom HTTP`CLOUDINARY_PROVISIONING_API_KEY`
`CLOUDINARY_PROVISIONING_API_SECRET`You can set the security parameters through the `setSecurity` function on the `SDKBuilder` when initializing the SDK. For example:

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Cloudinary\Account\Provisioning;
use Cloudinary\Account\Provisioning\Models\Components;
use Cloudinary\Account\Provisioning\Models\Operations;

$sdk = Provisioning\CldProvisioning::builder()
    ->setSecurity(
        new Components\Security(
            provisioningApiKey: 'CLOUDINARY_PROVISIONING_API_KEY',
            provisioningApiSecret: 'CLOUDINARY_PROVISIONING_API_SECRET',
        )
    )
    ->setAccountId('')
    ->build();

$request = new Operations\GetProductEnvironmentsRequest(
    enabled: true,
    prefix: 'product',
);

$response = $sdk->productEnvironments->list(
    request: $request
);

if ($response->productEnvironmentsResponse !== null) {
    // handle response
}
```

Available Resources and Operations
----------------------------------

[](#available-resources-and-operations)

Available methods### [AccessKeys](docs/sdks/accesskeys/README.md)

[](#accesskeys)

- [list](docs/sdks/accesskeys/README.md#list) - Get access keys
- [generate](docs/sdks/accesskeys/README.md#generate) - Generate an access key
- [deleteByName](docs/sdks/accesskeys/README.md#deletebyname) - Delete access key by name
- [update](docs/sdks/accesskeys/README.md#update) - Update an access key
- [delete](docs/sdks/accesskeys/README.md#delete) - Delete access key

### [BillingUsage](docs/sdks/billingusage/README.md)

[](#billingusage)

- [get](docs/sdks/billingusage/README.md#get) - Get billing usage information

### [CustomPolicies](docs/sdks/custompolicies/README.md)

[](#custompolicies)

- [list](docs/sdks/custompolicies/README.md#list) - Get custom policies
- [create](docs/sdks/custompolicies/README.md#create) - Create custom policy
- [get](docs/sdks/custompolicies/README.md#get) - Get custom policy
- [update](docs/sdks/custompolicies/README.md#update) - Update custom policy
- [delete](docs/sdks/custompolicies/README.md#delete) - Delete custom policy

### [EffectivePolicies](docs/sdks/effectivepolicies/README.md)

[](#effectivepolicies)

- [list](docs/sdks/effectivepolicies/README.md#list) - Get effective policies

### [Principals](docs/sdks/principals/README.md)

[](#principals)

- [listRoles](docs/sdks/principals/README.md#listroles) - Get a principal's roles
- [updateRoles](docs/sdks/principals/README.md#updateroles) - Assign roles to a principal
- [inspect](docs/sdks/principals/README.md#inspect) - Inspect
- [inspectMultiple](docs/sdks/principals/README.md#inspectmultiple) - Inspect multiple

### [ProductEnvironments](docs/sdks/productenvironments/README.md)

[](#productenvironments)

- [list](docs/sdks/productenvironments/README.md#list) - Get product environments
- [create](docs/sdks/productenvironments/README.md#create) - Create product environment
- [get](docs/sdks/productenvironments/README.md#get) - Get product environment
- [update](docs/sdks/productenvironments/README.md#update) - Update product environment
- [delete](docs/sdks/productenvironments/README.md#delete) - Delete product environment

### [Public](docs/sdks/public/README.md)

[](#public)

- [getCatalog](docs/sdks/public/README.md#getcatalog) - Get system roles and policies catalog
- [validatePolicy](docs/sdks/public/README.md#validatepolicy) - Validate a Cedar policy
- [getSchema](docs/sdks/public/README.md#getschema) - Get Cedar schema

### [Roles](docs/sdks/roles/README.md)

[](#roles)

- [list](docs/sdks/roles/README.md#list) - Get roles
- [create](docs/sdks/roles/README.md#create) - Create custom role
- [get](docs/sdks/roles/README.md#get) - Get role
- [update](docs/sdks/roles/README.md#update) - Update custom role
- [delete](docs/sdks/roles/README.md#delete) - Delete custom role
- [listPrincipals](docs/sdks/roles/README.md#listprincipals) - Get a role's principals
- [updatePrincipals](docs/sdks/roles/README.md#updateprincipals) - Assign principals to a role

### [SystemPolicies](docs/sdks/systempolicies/README.md)

[](#systempolicies)

- [list](docs/sdks/systempolicies/README.md#list) - Get system policies

### [UserGroups](docs/sdks/usergroups/README.md)

[](#usergroups)

- [list](docs/sdks/usergroups/README.md#list) - Get User Groups
- [create](docs/sdks/usergroups/README.md#create) - Create User Group
- [get](docs/sdks/usergroups/README.md#get) - Get User Group
- [update](docs/sdks/usergroups/README.md#update) - Update User Group
- [delete](docs/sdks/usergroups/README.md#delete) - Delete User Group
- [listUsers](docs/sdks/usergroups/README.md#listusers) - Get Users in User Group
- [addUser](docs/sdks/usergroups/README.md#adduser) - Add User to User Group
- [removeUser](docs/sdks/usergroups/README.md#removeuser) - Remove User from User Group

### [Users](docs/sdks/users/README.md)

[](#users)

- [list](docs/sdks/users/README.md#list) - Get users
- [create](docs/sdks/users/README.md#create) - Create user
- [get](docs/sdks/users/README.md#get) - Get user
- [update](docs/sdks/users/README.md#update) - Update user
- [delete](docs/sdks/users/README.md#delete) - Delete user
- [getGroups](docs/sdks/users/README.md#getgroups) - Get user groups
- [listSubAccounts](docs/sdks/users/README.md#listsubaccounts) - Get user sub-accounts

Global Parameters
-----------------

[](#global-parameters)

A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.

For example, you can set `account_id` to `''` at SDK initialization and then you do not have to pass the same value on calls to operations like `list`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.

### Available Globals

[](#available-globals)

The following global parameter is available. Global parameters can also be set via environment variable.

NameTypeDescriptionEnvironmentaccountIdstringAccount IDCLOUDINARY\_ACCOUNT\_ID### Example

[](#example-1)

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Cloudinary\Account\Provisioning;
use Cloudinary\Account\Provisioning\Models\Components;
use Cloudinary\Account\Provisioning\Models\Operations;

$sdk = Provisioning\CldProvisioning::builder()
    ->setAccountId('')
    ->setSecurity(
        new Components\Security(
            provisioningApiKey: 'CLOUDINARY_PROVISIONING_API_KEY',
            provisioningApiSecret: 'CLOUDINARY_PROVISIONING_API_SECRET',
        )
    )
    ->build();

$request = new Operations\GetProductEnvironmentsRequest(
    enabled: true,
    prefix: 'product',
);

$response = $sdk->productEnvironments->list(
    request: $request
);

if ($response->productEnvironmentsResponse !== null) {
    // handle response
}
```

Error Handling
--------------

[](#error-handling)

Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.

By default an API error will raise a `Errors\APIException` exception, which has the following properties:

PropertyTypeDescription`$message`*string*The error message`$statusCode`*int*The HTTP status code`$rawResponse`*?\\Psr\\Http\\Message\\ResponseInterface*The raw HTTP response`$body`*string*The response contentWhen custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `list` method throws the following exceptions:

Error TypeStatus CodeContent TypeErrors\\ErrorResponse400, 401, 403, 404, 409, 420, 429application/jsonErrors\\APIException4XX, 5XX\*/\*### Example

[](#example-2)

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Cloudinary\Account\Provisioning;
use Cloudinary\Account\Provisioning\Models\Components;
use Cloudinary\Account\Provisioning\Models\Errors;
use Cloudinary\Account\Provisioning\Models\Operations;

$sdk = Provisioning\CldProvisioning::builder()
    ->setAccountId('')
    ->setSecurity(
        new Components\Security(
            provisioningApiKey: 'CLOUDINARY_PROVISIONING_API_KEY',
            provisioningApiSecret: 'CLOUDINARY_PROVISIONING_API_SECRET',
        )
    )
    ->build();

try {
    $request = new Operations\GetProductEnvironmentsRequest(
        enabled: true,
        prefix: 'product',
    );

    $response = $sdk->productEnvironments->list(
        request: $request
    );

    if ($response->productEnvironmentsResponse !== null) {
        // handle response
    }
} catch (Errors\ErrorResponseThrowable $e) {
    // handle $e->$container data
    throw $e;
} catch (Errors\APIException $e) {
    // handle default exception
    throw $e;
}
```

Server Selection
----------------

[](#server-selection)

### Select Server by Index

[](#select-server-by-index)

You can override the default server globally using the `setServerIndex(int $serverIdx)` builder method when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

\#ServerVariablesDescription0`https://{region}.cloudinary.com``region`Regional API endpoints for optimal performance.1`https://{host}``host`Custom domains for enterprise deployments.If the selected server has variables, you may override its default values using the associated builder method(s):

VariableBuilderMethodSupported ValuesDefaultDescription`region``setRegion(Provisioning\ServerRegion region)`- `"api"`
- `"api-eu"`
- `"api-ap"``"api"`Regional endpoint selection`host``setHost(string host)`string`"api.cloudinary.com"`API host domain.#### Example

[](#example-3)

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Cloudinary\Account\Provisioning;
use Cloudinary\Account\Provisioning\Models\Components;
use Cloudinary\Account\Provisioning\Models\Operations;

$sdk = Provisioning\CldProvisioning::builder()
    ->setServerIndex(0)
    ->setRegion('api-ap')
    ->setAccountId('')
    ->setSecurity(
        new Components\Security(
            provisioningApiKey: 'CLOUDINARY_PROVISIONING_API_KEY',
            provisioningApiSecret: 'CLOUDINARY_PROVISIONING_API_SECRET',
        )
    )
    ->build();

$request = new Operations\GetProductEnvironmentsRequest(
    enabled: true,
    prefix: 'product',
);

$response = $sdk->productEnvironments->list(
    request: $request
);

if ($response->productEnvironmentsResponse !== null) {
    // handle response
}
```

### Override Server URL Per-Client

[](#override-server-url-per-client)

The default server can also be overridden globally using the `setServerUrl(string $serverUrl)` builder method when initializing the SDK client instance. For example:

```
declare(strict_types=1);

require 'vendor/autoload.php';

use Cloudinary\Account\Provisioning;
use Cloudinary\Account\Provisioning\Models\Components;
use Cloudinary\Account\Provisioning\Models\Operations;

$sdk = Provisioning\CldProvisioning::builder()
    ->setServerURL('https://api.cloudinary.com')
    ->setAccountId('')
    ->setSecurity(
        new Components\Security(
            provisioningApiKey: 'CLOUDINARY_PROVISIONING_API_KEY',
            provisioningApiSecret: 'CLOUDINARY_PROVISIONING_API_SECRET',
        )
    )
    ->build();

$request = new Operations\GetProductEnvironmentsRequest(
    enabled: true,
    prefix: 'product',
);

$response = $sdk->productEnvironments->list(
    request: $request
);

if ($response->productEnvironmentsResponse !== null) {
    // handle response
}
```

Development
===========

[](#development)

Maturity
--------

[](#maturity)

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions
-------------

[](#contributions)

While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.

### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=cloudinary/account-provisioning&utm_campaign=php)

[](#sdk-created-by-speakeasy)

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance88

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~142 days

Recently: every ~210 days

Total

7

Last Release

61d ago

PHP version history (3 changes)0.0.2PHP &gt;=7.3.0

0.0.4PHP ^8.1

v0.2.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/63bb27f752bdbf0c4017692238430b775e6a6e3649eb762524ebfaa51f985bf1?d=identicon)[cloudinary](/maintainers/cloudinary)

---

Top Contributors

[![const-cloudinary](https://avatars.githubusercontent.com/u/35217733?v=4)](https://github.com/const-cloudinary "const-cloudinary (9 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cloudinary-account-provisioning/health.svg)

```
[![Health](https://phpackages.com/badges/cloudinary-account-provisioning/health.svg)](https://phpackages.com/packages/cloudinary-account-provisioning)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[polar-sh/sdk

4527.8k9](/packages/polar-sh-sdk)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[clerkinc/backend-php

3493.3k](/packages/clerkinc-backend-php)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
