PHPackages                             cloudpdf/api - 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. cloudpdf/api

ActiveLibrary

cloudpdf/api
============

API Wrapper for the CloudPDF API

v1.0.2(3y ago)198MITPHPPHP &gt;=7.1.0

Since May 26Pushed 3y agoCompare

[ Source](https://github.com/cloudpdf-io/cloudpdf-php)[ Packagist](https://packagist.org/packages/cloudpdf/api)[ RSS](/packages/cloudpdf-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (0)

CloudPDF PHP
============

[](#cloudpdf-php)

PHP wrapper for the [CloudPDF API](https://cloudpdf.io/developers/api-docs) - an cloud-based PDF management service.

Installation
------------

[](#installation)

Install the package with:

```
composer require cloudpdf/api

```

To use the bindings, load it via Autoload

```
require_once('vendor/autoload.php');
```

Usage
-----

[](#usage)

### Table of Contents

[](#table-of-contents)

- [Authentication](#authentication)
- [Account Info](#account-info)
- [Documents](#documents)
- [Webhooks](#webhooks)

### Authentication

[](#authentication)

Get the API key for your project from your CloudPDF Dashboard → Settings → API Keys.

```
$config = array(
  'apiKey' => 'YOUR API KEY',
  'cloudName' => 'YOUR CLOUD NAME',
  'signingSecret' => 'YOUR SIGNING SECRET'
);

$cloudpdf = new CloudPDF\Client($config);
```

### Account Info

[](#account-info)

Return info about the Account associated with this API key.

```
$cloudpdf->account()
```

### Documents

[](#documents)

#### Create a Document

[](#create-a-document)

Before you can upload a PDF to CloudPDF you must create a new document.

The server will return a pre-signed Amazon upload URL where you can [upload your PDF file](#upload-file) using a PUT request.

After uploading the file you must [notify our server](#upload-file-completed) that the upload is finished and we will process the PDF by our PDF engine.

```
$cloudpdf.createDocument([
  "name" => "your_document_name.pdf",
  "description" => "Description of your document",
  "tags" => ["tag1", "tag2"],
  "defaultPermissions" => [
    "download" => "Allowed",
    "search" => true,
    "selection" => false,
    "info" => ["email", "phone"]
  ]
])
```

##### Options

[](#options)

- `name`: The name of the PDF you want to upload (`string`)
- `description`: Description of the PDF you want to upload (`string`)
- `parentId`: The ID of the folder you want to create the document in (`string`)
- `tags`: Set tags on the document to easily filter and search documents later (`array`)
- `defaultPermissions`: Set the default permissions for this document. You can find all parameters in te [API docs](https://cloudpdf.io/developers/api-docs#create-document). If none are given we use the default permissions of the organization. You can change the default permissions of the organization in the Dashboard → Settings → Upload Settings. (`object`)

#### Get a Document

[](#get-a-document)

```
$cloudpdf.getDocument("DOCUMENT ID")
```

#### Update a Document

[](#update-a-document)

```
$cloudpdf.updateDocument("DOCUMENT ID", [
  "name" => "your_document_name.pdf",
  "description" => "Description of your document",
  "tags" => ["tag1", "tag2"],
  "defaultPermissions" => [
    "download" => "Allowed",
    "search" => true,
    "selection" => false,
    "info" => ["email", "phone"]
  ]
])
```

##### Options

[](#options-1)

- `name`: The name of the PDF you want to upload (`string`)
- `description`: Description of the PDF you want to upload (`string`)
- `parentId`: The ID of the folder you want to create the document in (`string`)
- `tags`: Set tags on the document to easily filter and search documents later (`array`)
- `defaultPermissions`: Set the default permissions for this document. You can find all parameters in te [API docs](https://cloudpdf.io/developers/api-docs#update-document). If none are given we use the default permissions of the organization. You can change the default permissions of the organization in the Dashboard → Settings → Upload Settings. (`object`)

#### Delete a Document

[](#delete-a-document)

```
$cloudpdf.deleteDocument("DOCUMENT ID")
```

#### Upload file

[](#upload-file)

After you [create a document](#create-a-document) you will receive an Amazon signed URL where you can upload your PDF file using a PUT request. We suggest to upload the file directly from the clients browser to spare your server load. Below you find an example using axios in typescript.

When the file upload is finished you must [notify our server](#upload-file-completed).

```
import axios from 'axios';

axios.put(signedUploadURL, file, {
  headers: {
    "Content-Type": "application/pdf"
  },
  onUploadProgress: (e) => {
    //  Show progress
    const percentComplete = Math.round((e.loaded * 100) / e.total);
    console.log(percentComplete);
  },
});
```

#### Upload file completed

[](#upload-file-completed)

After uploading your file to Amazon S3 you must notify our server on this endpoint that the upload is complete. On a successful request the status of the document will change from "WaitingUpload" to "Processing".

You can poll the [GET endpoint](#get-a-file) for status updates or [use a webhook](#webhooks) to find out if your document has completed processing by our PDF engine.

```
$cloudpdf.uploadDocumentFileComplete("DOCUMENT ID", "FILE ID", ["uploadCompleted" => true])
```

#### Get a file

[](#get-a-file)

```
$cloudpdf.getDocumentFile("DOCUMENT ID", "FILE ID")
```

### Webhooks

[](#webhooks)

Webhooks are used to notify your system of specific CloudPDF events.

#### Create a Webhook

[](#create-a-webhook)

```
$cloudpdf.createWebhook([
  "name" => "Webhook 1",
  "url" => "https://urltotrigger.com/",
  "events" => ["document.created"],
  "headers" => [
    "Authorization" => "Bearer secret"
  ]
])
```

##### Options

[](#options-2)

- `name`: The name of your webhook for your own reference (`string`)
- `url`: The URL that the webhook should trigger on a event (`string`)
- `secret`: Optional secret that you can use to secure the webhook endpoint (`string`)
- `events`: An array of events. Possible values are: document.created, document.updated, collection.created, collection.updated, tracker.new, lead.new, file.processed (`array`)
- `headers`: Object of header keys and values that will be sent as request header on the webhook request (`object`)

#### Get a Webhook

[](#get-a-webhook)

```
$cloudpdf.getWebhook("WEBHOOK ID")
```

#### Update a Webhook

[](#update-a-webhook)

```
$cloudpdf.updateWebhook("WEBHOOK ID", [
  "name" => "Webhook 1",
  "url" => "https://urltotrigger.com/",
  "events" => ["document.created"],
  "headers" => [
    "Authorization" => "Bearer secret"
  ]
])
```

##### Options

[](#options-3)

- `name`: The name of your webhook for your own reference (`string`)
- `url`: The URL that the webhook should trigger on a event (`string`)
- `secret`: Optional secret that you can use to secure the webhook endpoint (`string`)
- `events`: An array of events. Possible values are: document.created, document.updated, collection.created, collection.updated, tracker.new, lead.new, file.processed (`array`)
- `headers`: Object of header keys and values that will be sent as request header on the webhook request (`object`)

#### Delete a Webhook

[](#delete-a-webhook)

```
$cloudpdf.deleteWebhook("WEBHOOK ID")
```

#### List all Webhooks

[](#list-all-webhooks)

```
$cloudpdf.listWebhooks()
```

Contributing
------------

[](#contributing)

Bug reports and pull requests are welcome on GitHub at .

License
-------

[](#license)

The repository is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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 ~10 days

Total

3

Last Release

1433d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f876a25cfb301ea961e507a19e8c041031c8128b91efbcf56b847ec57a6363dd?d=identicon)[cloudpdf](/maintainers/cloudpdf)

---

Top Contributors

[![bobsingor](https://avatars.githubusercontent.com/u/7645917?v=4)](https://github.com/bobsingor "bobsingor (10 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cloudpdf-api/health.svg)

```
[![Health](https://phpackages.com/badges/cloudpdf-api/health.svg)](https://phpackages.com/packages/cloudpdf-api)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[google/auth

Google Auth Library for PHP

1.4k272.7M162](/packages/google-auth)[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2509.6M48](/packages/thenetworg-oauth2-azure)

PHPackages © 2026

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