Build with Persona16
Integrate personality assessments and insights directly into your applications with our RESTful API.
Quick Start
1Install the SDK
npm install @persona16/sdk2Initialize the Client
import { Persona16 } from '@persona16/sdk';
const client = new Persona16({
apiKey: process.env.PERSONA16_API_KEY,
});3Fetch Results
// Fetch a user's personality results
const result = await client.results.get('result_abc123');
console.log(result);
// {
// id: 'result_abc123',
// type: 'INTJ',
// scores: {
// EI: -0.72, // Introversion
// SN: 0.85, // Intuition
// TF: -0.68, // Thinking
// JP: -0.45 // Judging
// },
// completedAt: '2024-01-15T10:30:00Z'
// }Base URL
https://api.persona16.com/v1Authentication
All API requests require authentication via Bearer token in the Authorization header.
Authorization: Bearer sk_live_...Rate Limits
- 1,000 requests/minute (standard)
- 10,000 requests/minute (enterprise)
API Endpoints
Test Results
- GET
/results/:idGet a specific test result
- GET
/resultsList all results (paginated)
- POST
/results/:id/shareGenerate shareable link
Users
- GET
/users/meGet current user
- PATCH
/users/meUpdate current user
- GET
/users/:id/resultsGet user's results
Teams
- GET
/teamsList all teams
- POST
/teamsCreate a new team
- GET
/teams/:idGet team details
- GET
/teams/:id/membersGet team members
- GET
/teams/:id/insightsGet team insights
Invites
- GET
/invitesList all invites
- POST
/invitesCreate invite(s)
- POST
/invites/bulkBulk create from CSV
- DELETE
/invites/:idCancel an invite
Branded Pages
- GET
/branded-pagesList branded pages
- POST
/branded-pagesCreate branded page
- PATCH
/branded-pages/:idUpdate branded page
- DELETE
/branded-pages/:idDelete branded page
Analytics
- GET
/analytics/overviewGet usage overview
- GET
/analytics/completionsGet completion stats
- GET
/analytics/typesGet type distribution
Webhooks
Receive real-time notifications when events occur in your Persona16 account. Configure webhook endpoints in your dashboard.
Available Events
test.startedWhen a user starts taking a testtest.completedWhen a user completes a testinvite.sentWhen an invite is sentinvite.acceptedWhen an invite is acceptedteam.member_addedWhen a member joins a team// Webhook payload example
{
"event": "test.completed",
"data": {
"resultId": "result_abc123",
"userId": "user_xyz789",
"type": "INTJ",
"completedAt": "2024-01-15T10:30:00Z"
},
"timestamp": "2024-01-15T10:30:01Z"
}Webhook Security
All webhooks include a signature header (X-Persona16-Signature) that you can use to verify the payload authenticity.
Official SDKs
Use our official SDKs to integrate Persona16 in your favorite language.
JavaScript/TypeScript
@persona16/sdkstablePython
persona16stableRuby
persona16betaGo
github.com/persona16/gobetaPHP
persona16/persona16-phpcoming soonReady to start building?
Get your API keys and start integrating Persona16 into your applications.