Skip to main content
POST
/
profiles
TypeScript
import { DiscovrClient } from "discovr";
import type { CreateProfilePayload, CreateProfileResponse } from "discovr";

const discovr = new DiscovrClient("your-client-id", {
  basePath: "https://api.discovr.media",
});

// After sign-in and profile selection …
const response: CreateProfileResponse = await discovr.createProfile("Sci-Fi Lover", "https://example.com/avatar.jpg");
console.log(response);
{
  "profileId": "profile_abc123xyz"
}

Documentation Index

Fetch the complete documentation index at: https://docs.discovr.media/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer token authentication.

  • Identity-tier endpoints (/profiles, /auth/session-token, /auth/session) accept a long-lived refresh token (rt_<hex>).
  • Session-tier endpoints (/pages/*, /profile/*) accept a short-lived session JWT.

SDK clients use two typed API accessors (identityApi() with the refresh token vs sessionApi() with the session JWT) — see the SDK DiscovrAuth helper.

Format: Authorization: Bearer {token}

Body

application/json

Name and avatar for the new profile.

name
string
required

The display name for the profile.

Example:

"Sci-Fi Lover"

avatarUrl
string<uri>
required

URL of the profile avatar image.

Example:

"https://example.com/avatar.jpg"

Response

Profile created. The response contains the new profile's ID.

Contains the ID of the newly created profile. Use it with POST /auth/session-token to start browsing.

profileId
string
required

The ID of the newly created profile.

Example:

"profile_abc123xyz"