Project

General

Profile

Actions

Task #927

open

PE-1812: Add API SDK/client library

Added by Fredrick Amnehagen about 3 hours ago. Updated about 2 hours ago.

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

  1. Python SDK (pip install persona-engine)
  2. JavaScript/TypeScript SDK (npm install persona-engine-sdk)
  3. 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

  1. Add POST /api/v1/auth/token endpoint that takes email and returns token
  2. 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 #1

Updated by Fredrick Amnehagen about 2 hours ago

Deferred - requires creating new SDK repositories (Python, JavaScript, Go). Lower priority than core API features. Can be revisited when API stabilizes.

Actions

Also available in: Atom PDF