Resources

Resource Details API

One topic by slug, or all resources inside one list.

Returns the details of a single topic, or the resources contained in a single list.

GET https://api.crediblemind.com/{client}/resources/{type}/{slug}

Parameters

NameInTypeRequiredNotes
x-api-keyheaderstringYesYour API key. See Authentication.
clientpathstringYesYour client identifier.
typepathstringYestopics or lists.
slugpathstringYesThe topic or list slug, from the Topics API or Lists API.

Request

curl "https://api.crediblemind.com/acme/resources/lists/best-apps-for-better-sleep" \
  -H "x-api-key: YOUR_API_KEY"

Response for a list

The resources in the list, after removing resource types and articles your client excludes:

{
  "numResults": 1,
  "results": [
    {
      "entryId": "5xYc0eWbB3kq8mN2pQ7rTz",
      "title": "Calm",
      "subtitle": "Meditation and sleep stories to help you relax.",
      "organization": "Calm.com, Inc.",
      "type": "App",
      "imageUrl": "https://images.ctfassets.net/example/calm.png",
      "primaryTopic": "Sleep",
      "slug": "calm",
      "path": "apps/calm",
      "tags": ["Editor's Pick"],
      "featured": false,
      "averageRating": 4.6
    }
  ]
}

Response for a topic

The topic itself, with the same fields as one item above:

{
  "entryId": "3kTq9vX2bLmR7nP4sW8yZa",
  "title": "Anxiety",
  "subtitle": "Understand anxiety and find ways to manage it.",
  "type": "Topic",
  "imageUrl": "https://images.ctfassets.net/example/anxiety.jpg",
  "slug": "anxiety",
  "path": "topics/anxiety",
  "tags": [],
  "featured": false
}
FieldTypeAlways presentDescription
numResultsnumberLists onlyNumber of resources in results.
entryIdstringYesUnique identifier of the resource.
titlestringYesTitle.
subtitlestringNoShort description.
authorstringNoAuthor, when the resource has one.
organizationstringNoOrganization behind the resource, when it has one.
typestringYesResource type, singular, for example Topic, Article, Video, App.
imageUrlstringNoImage.
primaryTopicstringNoThe resource's primary topic.
slugstringYesSlug.
pathstringNoPath of the resource, without a leading /, for example apps/calm. Missing for resource types that have no page on the CredibleMind site.
tagsstring[]YesTags and audiences. May be empty.
featuredbooleanYesReserved for future use.
averageRatingnumberNoAverage rating, when the resource has one.

Only published (accepted) topics and lists are returned. A topic your client excludes by resource type comes back as 200 with an empty object {}.

Errors

StatusBodyWhen
400Validation envelope, shown belowtype is not topics or lists.
401{ "error": "Invalid API Client or Key" }The key is missing or does not match client.
404{ "error": "Resource not found" }No published topic or list has this slug.
500{ "error": "Internal server error" }Unexpected server error.
400 response
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed",
    "issues": [
      { "path": "type", "message": "Type must be either 'topics' or 'lists'" }
    ]
  }
}

On this page