Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

NPR Identity API

The Identity API from NPR — 3 operation(s) for identity.

NPR Identity API is one of 4 APIs that NPR publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Identity. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 4 operations across 3 paths, and defines 9 schemas. It is described by OpenAPI 3.0.1, at version 2.

Requests are made against a single base URL, https://identity.api.npr.org/.

4 operations 3 paths 9 schemas 1 DELETE1 GET1 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.1
API Version
2
Base URL
https://listening.api.npr.org/
Authentication
OAuth 2.0
Terms of Service
Resource Areas
1

Authentication & Security 1

NPR Identity API declares 1 security scheme for authenticating requests. It supports OAuth 2.0 (oauth2) using the authorizationCode flow, exposing 5 scopes.

Paths & Operations 4

Across 3 paths, the API surfaces 4 operations — 1 DELETE, 1 GET, 1 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

Identity 4
GET
/v2/user
NPR Get the latest state information about the logged-in user
getUser 1 param → 200401429500503
DELETE
/v2/user
NPR Delete the user's account
deleteUser 1 param → 200401500503
PUT
/v2/stations
NPR Update the logged-in user's favorite station(s)
updateStations 1 param body → 201400401429500503
POST
/v2/following
NPR Update the following status of the logged-in user for a particular aggregation
postFollowing 1 param body → 201400401429500503

Schemas 9

The contract defines 9 schemas that model the data the API accepts and returns. The most detailed are Organization (9 properties), UserData (9 properties), Affiliation (8 properties), CollectionDocument (6 properties). Each schema is shown below with its type and property counts.

UserDocument
ErrorDocument
A Collection.doc+JSON representation of an error result from an API call
Error
object
A serialized version of any error encountered when processing this request
3 properties 1 required
Organization
object
A station that a user has an affiliation with
9 properties 4 required
UserData
object
Object; see description of a user object below
9 properties 4 required
Affiliation
object
A program (aggregation) that a given user has shown an affiliation with
8 properties 3 required
Cohort
object
An experimental grouping for User Experience A/B Testing
4 properties 2 required
Algolia
object
Parameters for querying the Algolia Search SDK for content
1 property 1 required
CollectionDocument
object
Base Collection.Doc+JSON output
6 properties 6 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

npr-identity-api-openapi.yml Raw ↑

Other APIs NPR publishes across the network.

NPR Listening
NPR Authorization API
NPR Stationfinder API