PHPackages                             messagebird/php-rest-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. messagebird/php-rest-api

ActiveLibrary[API Development](/categories/api)

messagebird/php-rest-api
========================

MessageBird REST API client for PHP

v4.0.1(2mo ago)1589.4M—4.7%95[2 issues](https://github.com/messagebird/php-rest-api/issues)[2 PRs](https://github.com/messagebird/php-rest-api/pulls)20BSD-2-ClausePHPPHP &gt;=8.0CI passing

Since Jul 7Pushed 2mo ago16 watchersCompare

[ Source](https://github.com/messagebird/php-rest-api)[ Packagist](https://packagist.org/packages/messagebird/php-rest-api)[ Docs](https://github.com/messagebird/php-rest-api)[ RSS](/packages/messagebird-php-rest-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (79)Used By (20)

MessageBird's REST API for PHP
==============================

[](#messagebirds-rest-api-for-php)

This repository contains the open source PHP client for MessageBird's REST API. Documentation can be found at:

[![Build Status](https://github.com/messagebird/php-rest-api/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/messagebird/php-rest-api/actions/workflows/tests.yml?query=branch%3Amaster)[![Latest Stable Version](https://camo.githubusercontent.com/62852ec2126e34e7b8f11e88780c0d9a3470071694a086fd46897861c96909b7/68747470733a2f2f706f7365722e707567782e6f72672f6d657373616765626972642f7068702d726573742d6170692f762f737461626c652e737667)](https://packagist.org/packages/messagebird/php-rest-api)[![License](https://camo.githubusercontent.com/eecf800636f98758a6f25c7f7caff18011aecba5203eb77e8c6aefbf20d2bc5e/68747470733a2f2f706f7365722e707567782e6f72672f6d657373616765626972642f7068702d726573742d6170692f6c6963656e73652e737667)](https://packagist.org/packages/messagebird/php-rest-api)

Requirements
------------

[](#requirements)

- [Sign up](https://www.messagebird.com/en/signup) for a free MessageBird account
- Create a new access\_key in the developers sections
- MessageBird API client for PHP requires PHP &gt;= 8.0.

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

[](#installation)

#### Composer installation

[](#composer-installation)

- [Download composer](https://getcomposer.org/doc/00-intro.md#installation-nix)
- Run `composer require messagebird/php-rest-api`.

#### Manual installation

[](#manual-installation)

When you do not use Composer. You can git checkout or download [this repository](https://github.com/messagebird/php-rest-api/archive/master.zip) and include the MessageBird API client manually.

Usage
-----

[](#usage)

We have put some self-explanatory examples in the *examples* directory, but here is a quick breakdown on how it works. First, you need to set up a **MessageBird\\Client**. Be sure to replace **YOUR\_ACCESS\_KEY** with something real.

```
require 'autoload.php';

$messageBird = new \MessageBird\Client('YOUR_ACCESS_KEY');
```

That's easy enough. Now we can query the server for information. Lets use getting your balance overview as an example:

```
// Get your balance
$balance = $messageBird->balance->read();
```

Conversations WhatsApp Sandbox
------------------------------

[](#conversations-whatsapp-sandbox)

To use the WhatsApp sandbox you need to add `\MessageBird\Client::ENABLE_CONVERSATIONSAPI_WHATSAPP_SANDBOX` to the list of features you want enabled. Don't forget to replace `YOUR_ACCESS_KEY` with your actual access key.

```
$messageBird = new \MessageBird\Client('YOUR_ACCESS_KEY', null, [\MessageBird\Client::ENABLE_CONVERSATIONSAPI_WHATSAPP_SANDBOX]);
```

If you use a custom `HttpClient` you will have to manually direct Conversation API request to the WhatsApp sandbox endpoint.

Documentation
-------------

[](#documentation)

Complete documentation, instructions, and examples are available at:

License
-------

[](#license)

The MessageBird REST Client for PHP is licensed under [The BSD 2-Clause License](http://opensource.org/licenses/BSD-2-Clause). Copyright (c) 2014, MessageBird

###  Health Score

71

—

ExcellentBetter than 100% of packages

Maintenance83

Actively maintained with recent releases

Popularity64

Solid adoption and visibility

Community44

Growing community involvement

Maturity83

Battle-tested with a long release history

 Bus Factor3

3 contributors hold 50%+ of commits

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

Recently: every ~282 days

Total

64

Last Release

88d ago

Major Versions

v1.20.0 → v2.0.02021-06-28

v2.1.0 → v3.0.02022-03-04

v3.1.6 → v4.0.02026-02-19

PHP version history (7 changes)1.0.0PHP &gt;=5.3.0

1.14.0PHP &gt;=5.4.0

v1.17.0PHP &gt;=7.0

v2.0.0PHP &gt;=7.3|^8.0

v3.0.0PHP &gt;=7.3|~8.0.0|~8.1.0

v3.1.4PHP &gt;=7.3|~8.0.0|~8.1.0|~8.2.0

v4.0.0PHP &gt;=8.0

### Community

Maintainers

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

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

---

Top Contributors

[![epels](https://avatars.githubusercontent.com/u/9115513?v=4)](https://github.com/epels "epels (49 commits)")[![bviolier](https://avatars.githubusercontent.com/u/1247610?v=4)](https://github.com/bviolier "bviolier (45 commits)")[![samwierema](https://avatars.githubusercontent.com/u/276453?v=4)](https://github.com/samwierema "samwierema (29 commits)")[![rfeiner](https://avatars.githubusercontent.com/u/2319799?v=4)](https://github.com/rfeiner "rfeiner (21 commits)")[![dennisvdvliet](https://avatars.githubusercontent.com/u/789163?v=4)](https://github.com/dennisvdvliet "dennisvdvliet (19 commits)")[![paolobueno](https://avatars.githubusercontent.com/u/1294893?v=4)](https://github.com/paolobueno "paolobueno (15 commits)")[![rjelierse](https://avatars.githubusercontent.com/u/378353?v=4)](https://github.com/rjelierse "rjelierse (10 commits)")[![sotoz](https://avatars.githubusercontent.com/u/1382798?v=4)](https://github.com/sotoz "sotoz (10 commits)")[![kcroxford-mb](https://avatars.githubusercontent.com/u/61734979?v=4)](https://github.com/kcroxford-mb "kcroxford-mb (6 commits)")[![mariuspot](https://avatars.githubusercontent.com/u/25323419?v=4)](https://github.com/mariuspot "mariuspot (5 commits)")[![chrisminett](https://avatars.githubusercontent.com/u/1084019?v=4)](https://github.com/chrisminett "chrisminett (4 commits)")[![JohnstonCode](https://avatars.githubusercontent.com/u/10222719?v=4)](https://github.com/JohnstonCode "JohnstonCode (3 commits)")[![bobvandevijver](https://avatars.githubusercontent.com/u/1835343?v=4)](https://github.com/bobvandevijver "bobvandevijver (3 commits)")[![guiajlopes](https://avatars.githubusercontent.com/u/4534801?v=4)](https://github.com/guiajlopes "guiajlopes (2 commits)")[![Edofre](https://avatars.githubusercontent.com/u/710429?v=4)](https://github.com/Edofre "Edofre (2 commits)")[![SpacePossum](https://avatars.githubusercontent.com/u/10462973?v=4)](https://github.com/SpacePossum "SpacePossum (2 commits)")[![marcelcorso](https://avatars.githubusercontent.com/u/19642?v=4)](https://github.com/marcelcorso "marcelcorso (2 commits)")[![Xethron](https://avatars.githubusercontent.com/u/1497338?v=4)](https://github.com/Xethron "Xethron (2 commits)")[![dstotijn](https://avatars.githubusercontent.com/u/983924?v=4)](https://github.com/dstotijn "dstotijn (2 commits)")[![ziming](https://avatars.githubusercontent.com/u/679513?v=4)](https://github.com/ziming "ziming (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/messagebird-php-rest-api/health.svg)

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

###  Alternatives

[google/apiclient

Client library for Google APIs

9.8k191.4M997](/packages/google-apiclient)[docusign/esign-client

The Docusign PHP library makes integrating Docusign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-esign-php-client repository. Join the eSign revolution!

2087.4M13](/packages/docusign-esign-client)[get-stream/stream

A PHP client for Stream (https://getstream.io)

1451.3M8](/packages/get-stream-stream)[plivo/plivo-php

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

1102.8M18](/packages/plivo-plivo-php)[plivo/php-sdk

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

1101.9M5](/packages/plivo-php-sdk)[agence104/livekit-server-sdk

Server-side SDK for LiveKit.

79189.9k1](/packages/agence104-livekit-server-sdk)

PHPackages © 2026

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