Actions
Task #927
openPE-1812: Add API SDK/client library
Status:
To do
Priority:
High
Assignee:
-
Target version:
-
Start date:
2026-05-16
Due date:
% Done:
0%
Estimated time:
Description
Problem¶
No SDK available for common languages (Python, JavaScript, Go). Users must implement their own HTTP client.
Requested Features¶
- Python SDK (pip install persona-engine)
- JavaScript/TypeScript SDK (npm install persona-engine-sdk)
- Go SDK (go get github.com/persona/engine-sdk)
API Endpoints Needed¶
- POST /auth/token - No way for existing user to get their token (only register returns token)
- Current workaround: user must store token from registration
Proposed Solution¶
- Add POST /api/v1/auth/token endpoint that takes email and returns token
- Create SDK libraries with:
- Authentication (token management)
- Persona CRUD operations
- Webhook management
- Rate limiting handling
- Retry logic with exponential backoff
SDK Features¶
- Type-safe models
- Async support
- Automatic token refresh
- Webhook signature verification
- OpenAPI spec auto-generation
References¶
- Stripe SDK as reference implementation
- Vercel SDK pattern
Actions