texa / texa-php
PHP SDK for the Texa API: Texa AI in your own app
v1.0.0
2026-10-19 01:10 UTC
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
PHP 8.1+ with the curl and json extensions. Keep your key on your server.
composer require texa/texa-php
$texa = new Texa\Client(getenv('TEXA_API_KEY')); $convo = $texa->openConversation(['channel' => 'web', 'customer_ref' => 'user-1842'], idempotencyKey: 'open-user-1842'); $out = $texa->sendMessage($convo['conversation_id'], ['text' => 'Where is my transfer?', 'message_id' => 'msg-551']); $events = $texa->runActions($convo['conversation_id'], $out, [ 'get_transfer_status' => fn (array $inputs) => ['status' => 'paid_out'], ]); // in your webhook endpoint: $event = Texa\Webhooks::parse($secret, getallheaders(), file_get_contents('php://input'));
Errors are Texa\TexaError with status, errorCode, field and requestId.
Guides and the full reference: https://api.texadesk.com/docs