xboard / php
Official PHP SDK for the xBoard
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.9
- psr/log: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.75
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-03 07:10:09 UTC
README
Official PHP SDK for xBoard partner integrations.
Create and update posts on a customer’s shared or private board. Authenticate with an API key (xbk_live_… / xbk_test_…). Server-side only. PHP 8.2+. The customer must already exist in xBoard.
Installation
composer require xboard/php
Published on Packagist.
Quick start
use XBoard\BoardType; use XBoard\FileUpload; use XBoard\XBoard; $client = new XBoard([ 'apiKey' => getenv('XBOARD_API_KEY'), 'baseUrl' => getenv('XBOARD_BASE_URL'), ]); $posts = $client->customers->posts(); // handle only — does not list or fetch posts $post = $posts ->compose('CRM-1001', BoardType::Shared) ->setTitle('Kickoff') ->addNote('Hello from the partner SDK') ->addFile(new FileUpload("hello\n", 'hello.txt', 'text/plain')) ->create();
$client->customers->posts() is a resource handle. It does not list posts and does not call the API. Create, compose, and list always take externalCustomerId and boardType. There is no account-wide post list.
$listed = $posts->list('CRM-1001', BoardType::Shared);
Copy .env.example to .env for local examples.
make help make install make run-example list-customers make run-example compose-create XBOARD_POST_ID=<id> make run-example compose-update make smoke
Documentation
| Guide | Description |
|---|---|
| Getting started | Install, configure, and write a post |
| Customers | Posts, composer, list, and notes |
| Authentication | API keys and token refresh |
| Configuration | Client options, timeouts, and hooks |
| Errors | Error types and handling |
| Publishing | Packagist registration and git tags |
A printable partner sheet is in docs/partner-handoff.html.
Examples
- list-customers.php — list CRM customers
- list-posts.php — list posts on one customer board
- list-notes.php — list notes and files on a post (
XBOARD_POST_ID) - compose-create.php — create a post with notes and a file
- compose-update.php — append to an existing post (
XBOARD_POST_ID) - create-customer-post.php — titled post without composer parts
Development
make install make validate
See CONTRIBUTING.md.
Releasing
Bump XBoard\Version::VERSION and CHANGELOG.md, merge to main, then tag a new version. GitHub Actions creates a GitHub Release and updates Packagist. See docs/publishing.md.
Security
Report vulnerabilities per SECURITY.md. Never commit API keys.