API Documentation

Build with Persona16

Integrate personality assessments and insights directly into your applications with our RESTful API.

Getting Started

Quick Start

1Install the SDK

Terminal
npm install @persona16/sdk

2Initialize the Client

app.ts
import { Persona16 } from '@persona16/sdk';

const client = new Persona16({
  apiKey: process.env.PERSONA16_API_KEY,
});

3Fetch Results

example.ts
// 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/v1

Authentication

All API requests require authentication via Bearer token in the Authorization header.

Header
Authorization: Bearer sk_live_...

Rate Limits

  • 1,000 requests/minute (standard)
  • 10,000 requests/minute (enterprise)
Reference

API Endpoints

Test Results

  • GET
    /results/:id

    Get a specific test result

  • GET
    /results

    List all results (paginated)

  • POST
    /results/:id/share

    Generate shareable link

Users

  • GET
    /users/me

    Get current user

  • PATCH
    /users/me

    Update current user

  • GET
    /users/:id/results

    Get user's results

Teams

  • GET
    /teams

    List all teams

  • POST
    /teams

    Create a new team

  • GET
    /teams/:id

    Get team details

  • GET
    /teams/:id/members

    Get team members

  • GET
    /teams/:id/insights

    Get team insights

Invites

  • GET
    /invites

    List all invites

  • POST
    /invites

    Create invite(s)

  • POST
    /invites/bulk

    Bulk create from CSV

  • DELETE
    /invites/:id

    Cancel an invite

Branded Pages

  • GET
    /branded-pages

    List branded pages

  • POST
    /branded-pages

    Create branded page

  • PATCH
    /branded-pages/:id

    Update branded page

  • DELETE
    /branded-pages/:id

    Delete branded page

Analytics

  • GET
    /analytics/overview

    Get usage overview

  • GET
    /analytics/completions

    Get completion stats

  • GET
    /analytics/types

    Get type distribution

Real-time Updates

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 test
test.completedWhen a user completes a test
invite.sentWhen an invite is sent
invite.acceptedWhen an invite is accepted
team.member_addedWhen a member joins a team
webhook-payload.json
// 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.

Libraries

Official SDKs

Use our official SDKs to integrate Persona16 in your favorite language.

JavaScript/TypeScript

@persona16/sdkstable

Python

persona16stable

Ruby

persona16beta

Go

github.com/persona16/gobeta

PHP

persona16/persona16-phpcoming soon

Ready to start building?

Get your API keys and start integrating Persona16 into your applications.