canonical: https://jentic.com/apis/npr.org/npr-identity

# NPR Identity Service

Jentic publishes the only available OpenAPI specification for NPR Identity Service, keeping it validated and agent-ready. The NPR Identity Service is the entry point for user-specific information on the NPR One platform. It exposes the logged-in listener's profile, lets the listener follow programs and topics, manages favorite stations, copies listening data from a temporary account into a permanent one, and handles account deletion. All endpoints require an OAuth 2.0 access token issued by the NPR Authorization Service.

## For AI agents

Read and update the logged-in NPR One listener's profile, station preferences, and follow list, plus inherit listening data from temporary accounts.

## Scope

Does not handle audio recommendations, OAuth token issuance, or sponsorship - use for NPR One listener profile, follows, and station preferences only.

## Capabilities

- Get the logged-in listener's profile, including follows and favorite stations
- Update which programs, podcasts, or topics a listener follows
- Set or replace the listener's favorite NPR member stations
- Copy listening history from a temporary user into a logged-in account on first sign-in
- Delete the listener's NPR One account on user request

## Use cases

### Personalised NPR One Profile UI

An NPR One client app loads the listener's profile on launch to render the home screen - favorite station, followed programs, and recent activity. GET `/v2/user` returns the full profile in one call so the app can hydrate the UI without chaining multiple requests, and PUT `/v2/stations` updates the favorite when the listener changes city.

Example prompt: Call GET `/v2/user` with the listener's access token, then PUT `/v2/stations` with the new favorite call sign when the listener relocates.

### Onboarding from Guest to Signed-In

A first-time NPR One listener may stream as a guest before signing in. POST `/v2/user/inherit` copies their guest listening history into the new permanent account so recommendations don't reset to zero. This dramatically improves day-one personalization for newly signed-in users.

Example prompt: After the listener signs in, call POST `/v2/user/inherit` with the temporary user's identifier so the new account starts with the existing recommendation profile.

### Account Deletion on Request

Privacy regulations and user expectation demand a path to fully delete an account. DELETE `/v2/user` removes the NPR One account associated with the bearer token, providing an end-to-end self-service delete flow that NPR One client apps can wire to a settings screen.

Example prompt: On the listener's confirmation, call DELETE `/v2/user` with their access token and present a confirmation that the account has been removed.

### Agent-Driven Profile Maintenance

A voice assistant agent receives a request like 'follow Planet Money' and uses Jentic to call POST `/v2/following` without hand-rolling the request body. The agent then re-reads the profile to confirm the follow has taken effect before responding to the listener.

Example prompt: Search Jentic for 'follow an npr program', execute POST `/v2/following` with the program identifier, then call GET `/v2/user` to confirm the follow appears in the listener's profile.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/v2/user` | Get the logged-in listener's profile |
| DELETE | `/v2/user` | Delete the listener's NPR One account |
| POST | `/v2/user/inherit` | Copy listening data from a temporary user into the logged-in account |
| POST | `/v2/following` | Update what the listener is following |
| PUT | `/v2/stations` | Update the listener's favorite station(s) |

## Key resources

- **User** — Read and delete the logged-in listener's NPR One profile
- **Following** — Update the listener's followed programs and topics
- **Stations** — Set the listener's favorite NPR member station

## Why Jentic

- **Setup:** Wiring the NPR Identity Service by hand means carrying an OAuth 2.0 bearer token into every call to identity.api.npr.org and hand-mapping the profile, follows, and station-preference operations yourself. Through Jentic you install once, import the NPR Identity Service from the API Directory, store the access token once, and your agent calls it.
- **Permission scoping:** The listener target here is the token holder rather than a URL path resource, so scope the agent to the operations it needs, such as reading the profile or updating station preferences. You choose the operations it may call, so profile deletion is not included unless you add it.
- **Credential handling:** Your NPR OAuth 2.0 access token is stored once, encrypted, by your own Jentic One instance and injected into the Authorization header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get the logged-in NPR listener profile' or 'follow a station', and Jentic returns the matching Identity operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **NPR Authorization Service** — Issues the OAuth 2.0 tokens that the Identity Service requires on every call.
- **NPR Listening Service** — Returns audio recommendations shaped by the profile and follows held in Identity.
- **Auth0** — General-purpose user directory and authentication platform; not tied to NPR One.
- **Okta** — Enterprise identity directory for workforce or customer identity outside NPR.

## FAQ

### Why is there no official OpenAPI spec for NPR Identity Service?

NPR does not publish an OpenAPI specification for the Identity Service. Jentic generates and maintains this spec so that AI agents and developers can call NPR Identity Service via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the NPR Identity Service use?

Every endpoint requires an OAuth 2.0 bearer access token issued by the NPR Authorization Service at https://authorization.api.npr.org. Jentic holds the access token in its encrypted vault and injects it into the Authorization header - agents never see the raw token.

### Can I update a listener's favorite station with the NPR Identity Service?

Yes. PUT `/v2/stations` updates the listener's favorite NPR member station(s). Use this when a listener relocates or wants to switch their primary station - the change feeds directly into the Listening Service's recommendation logic.

### How do I follow a podcast on behalf of an NPR One listener through Jentic?

Search Jentic with 'follow an npr program', load POST `/v2/following`, and execute it with the listener's access token plus the program identifier. The follow appears immediately in subsequent GET `/v2/user` responses.

### Does the NPR Identity Service let me delete a user account?

Yes. DELETE `/v2/user` removes the NPR One account tied to the access token used in the request. This supports user-initiated account deletion from a settings screen and is the canonical path for honoring erasure requests.

### Can I limit what my agent is allowed to do with the NPR Identity Service?

Yes. Because you run Jentic One yourself, your own rules decide which NPR Identity Service operations the agent may call and which OAuth 2.0 token it may use. The listener here is the token holder rather than a path resource, so you scope the agent to only the operations it needs, such as GET `/v2/user` to read the profile, PUT `/v2/stations` to update the favorite station, or POST `/v2/following` to follow a program. Destructive operations like DELETE `/v2/user` stay off unless you explicitly grant them.
