Skip to main content
PATCH
/
profiles
/
{profileId}
TypeScript
import { DiscovrClient } from "discovr";
import type { Profile, UpdateProfilePayload } from "discovr";

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

// After sign-in and profile selection …
const response: Profile = await discovr.updateProfile("profile_abc123xyz", { name: "Action Movie Fan", avatarUrl: "https://example.com/new-avatar.jpg" });
console.log(response);
{
  "id": "profile_abc123xyz",
  "name": "Action Movie Fan",
  "avatarUrl": "https://example.com/new-avatar.jpg",
  "createdAt": "2023-01-01T00:00:00.000Z"
}

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}

Path Parameters

profileId
string
required

The ID of the profile to update.

Body

application/json

Fields to update on the profile. All fields are optional — provide only what's changing. At least one must be present.

name
string

New display name for the profile.

Example:

"Action Movie Fan"

avatarUrl
string<uri>

New avatar URL for the profile.

Example:

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

Response

Profile updated successfully. Returns the full updated profile object.

A Discovr profile with its display info and creation timestamp.

id
string
required

The unique ID of the profile.

Example:

"profile_abc123xyz"

name
string
required

The profile's display name.

Example:

"Sci-Fi Lover"

avatarUrl
string<uri>
required

URL of the profile's avatar image.

Example:

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

createdAt
string<date-time>
required

When the profile was created, as an ISO 8601 timestamp.

Example:

"2023-01-01T00:00:00.000Z"