Other languages
The planned PHP library and Python and Go clients, and how to generate a client in any language from the OpenAPI contract today.
This is designed and scheduled but not built yet. We document it now so you can plan your integration.
The Agoo API is plain JSON over HTTPS, so any language with an HTTP client can use it. Official libraries beyond TypeScript are planned, and until they ship you can generate a client from the same OpenAPI document that powers the API reference.
| Language | Package | How it's made | Status |
|---|---|---|---|
| PHP | ardent-africa/agoo-php, via Composer | Hand-finished, on a generated core | Planned, P9 |
| Python | To be announced | Generated from the OpenAPI contract | Planned |
| Go | To be announced | Generated from the OpenAPI contract | Planned |
Package names for Python and Go will be announced in the changelog when they're published.
PHP
ardent-africa/agoo-php is the official PHP library. It also powers the WordPress plugin. It needs PHP 8.1 or later and works with any PSR-18 HTTP client, using Guzzle if none is given.
The install command will work once the package is published on Packagist.
composer require ardent-africa/agoo-phpIt mirrors the TypeScript SDK: the same resources and methods, snake_case fields as in the API, cursor pagination, automatic idempotency keys and retries, and webhook verification.
<?php
require __DIR__ . '/vendor/autoload.php';
use Agoo\AgooException;
use Agoo\Client;
use Agoo\Webhook;
$agoo = new Client( [ 'api_key' => getenv( 'AGOO_API_KEY' ) ] );
// Create an expected visit (an Idempotency-Key is added automatically)
$visit = $agoo->visits->create( [
'site_id' => 'site_01kjpt3yw0fz0v414608h9x65s',
'host_id' => 'person_01kjsesxm0e4zbyvkr7bcfxbfg',
'expected_at' => '2026-10-14T09:30:00Z',
'visitor' => [ 'name' => 'Ama Owusu', 'phone' => '+233241234567' ],
] );
// Every checked-in visit, across all pages
foreach ( $agoo->visits->list( [ 'status' => 'checked_in' ] )->autoPaginate() as $visit ) {
echo $visit->visitor->name, PHP_EOL;
}
// Typed errors
try {
$agoo->visits->checkIn( 'visit_01m4k5z4j0fxbte6sn6e8tpgza' );
} catch ( AgooException $e ) {
error_log( "{$e->errorCode} ({$e->status}), request {$e->requestId}" );
}
// Verify a webhook: returns the event, or throws Agoo\WebhookVerificationException
$event = Webhook::verify( file_get_contents( 'php://input' ), getallheaders(), getenv( 'AGOO_WEBHOOK_SECRET' ) );Until it's published, verify webhooks with the plain PHP function in WordPress: verifying signatures yourself, which works in any PHP application.
Python and Go
Official Python and Go clients will be generated from the OpenAPI contract, with idiomatic naming, pagination helpers and typed errors added on top. If you need one of them sooner, generate your own as below, or tell us through developer support so we can prioritise.
Generate a client today
The contract is an OpenAPI 3.1 document, agoo.v1.yaml. It's the single source for the API reference and the official SDKs.
Download it from docs.agoo.ardent.africa/openapi.yaml:
curl -o agoo.v1.yaml https://docs.agoo.ardent.africa/openapi.yamlThe contract uses OpenAPI 3.1 features, such as type: [string, "null"] for nullable fields. Use a recent version of your generator, and check that it supports 3.1.
Prefer the official TypeScript SDK. To generate a lightweight fetch client of your own instead:
npx @hey-api/openapi-ts -i agoo.v1.yaml -o src/agoo-clientWhat a generated client won't do for you
Generated clients cover requests and types. Add these yourself, following the concept pages:
| Concern | What to add | See |
|---|---|---|
| Authentication | Send Authorization: Bearer <key> on every request | Authentication |
| Idempotency | An Idempotency-Key header with a fresh UUID on every POST, reused on retries | Idempotency |
| Retries | Retry 429, 500 and 503 with backoff, honouring Retry-After | Rate limits |
| Pagination | Follow next_cursor while has_more is true | Pagination |
| Errors | Read code and request_id from the problem details body | Errors |
| Forward compatibility | Ignore unknown fields and enum values; don't fail on them | Versioning |
| Webhooks | Verify signatures before parsing | Verify signatures |
Some generators produce strict enums that reject values they don't know. Agoo adds enum values (new statuses, new event types) without a new API version, so configure your generator to allow unknown enum values, or treat them as strings. Visit types aren't an enum at all: each organisation adds its own, so type and visit_type are plain strings.