Search by

Official Palsa client, generated from the OpenAPI specification. SMS, email and push from one request.

0.1.0 2026-11-22 06:24 UTC

This package is auto-updated.

Last update: 2026-11-22 13:28:30 UTC


README

Palsa is prepaid. Credit is reserved before anything reaches a supplier and only what a supplier accepted is charged, so a balance cannot go below nothing. QUOTA_EXCEEDED means exactly that: the workspace could not pay for the send, and nothing was sent.

A key belongs to one workspace, so no path here names a workspace and no key can reach another's data.

What happened to a send is reported by webhook, signed as Palsa-Signature: t=<milliseconds>,v1=<hex>: an HMAC-SHA256 over <t>.<raw body>. Verify against the raw body, because parsing and re-serialising it changes the bytes, and refuse a signature older than five minutes, which is what stops an old delivery being replayed at you later. Every client library ships a verifier, since no generator produces one.

This file is generated from nothing and generates everything. Every Palsa client library is produced from it, so an API change is a change here followed by a regeneration. It is also tested against the running server, because a specification is a claim about what the server does and a wrong claim would be inherited by every client at once.

For more information, please visit https://palsa.mhodieknowledge.workers.dev.

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/mhodieknowledge/palsa.git"
    }
  ],
  "require": {
    "mhodieknowledge/palsa": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure Bearer authorization: bearerAuth
$config = Palsa\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Palsa\Api\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getBalances();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->getBalances: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://palsa.mhodieknowledge.workers.dev

Class Method HTTP request Description
BillingApi getBalances GET /v1/balances Prepaid balances
ContactsApi createContact POST /v1/contacts Save a contact
ContactsApi deleteContact DELETE /v1/contacts/{id} Erase a contact
ContactsApi listContacts GET /v1/contacts List contacts
ContactsApi registerDevice POST /v1/devices Register a device for push
NotificationsApi describeMcp GET /v1/mcp What the MCP endpoint is
NotificationsApi getNotification GET /v1/notifications/{id} One send
NotificationsApi listNotifications GET /v1/notifications List sends
NotificationsApi quoteSend POST /v1/quotes Price a send without making it
NotificationsApi sendNotification POST /v1/notifications Send a notification
VerificationApi checkVerification POST /v1/verifications/{id}/check Check a code
VerificationApi startVerification POST /v1/verifications Send a one-time code

Models

Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
    • Package version: 0.1.0
    • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.

Licence

MIT. See the repository for the full text.