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. [API Development](/categories/api)
4. /
5. cloudpdf/api

ActiveLibrary[API Development](/categories/api)

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

API Wrapper for the CloudPDF API

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

Since May 26Pushed 4y agoCompare

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

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 26% 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

1479d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25662646?v=4)[CloudPdf](/maintainers/cloudpdf)[@Cloudpdf](https://github.com/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

[google/apiclient

Client library for Google APIs

9.8k205.9M1.1k](/packages/google-apiclient)[plivo/plivo-php

A PHP SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML

1143.1M19](/packages/plivo-plivo-php)[wp-graphql/wp-graphql-woocommerce

WooCommerce bindings for WPGraphQL

70556.6k](/packages/wp-graphql-wp-graphql-woocommerce)[plivo/php-sdk

A PHP SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML

1112.0M6](/packages/plivo-php-sdk)[celtic/lti

PHP class library for building LTI integrations

60312.6k9](/packages/celtic-lti)[apigee/apigee-client-php

Client library for connecting to the Apigee Edge API.

27584.5k4](/packages/apigee-apigee-client-php)

PHPackages © 2026

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