API Reference
Resources
Resource Details

Resources by Slug API Documentation

The Resources by Slug API allows users to retrieve specific resources based on their slug and type. Currently, it supports topics and lists types, with more types coming in the future.

API Overview

Endpoint URL

https://api.crediblemind.com/[client]/resources/[type]/[slug]

Method

GET

Authentication

Requests to the Resources by Slug API require a valid API key provided in the request header:

💡
Ask your client success representative for your API key
GET /[client]/resources/[type]/[slug] HTTP/1.1
Host: api.crediblemind.com
x-api-key: YOUR_API_KEY

Request Parameters

Path Parameters

  • [client]: A unique identifier for each CredibleMind client.
  • [type]: The type of resource. Currently supports topics and lists.
  • [slug]: The unique slug identifier for the specific resource.

Example Requests

For a list:

curl -X GET "https://api.crediblemind.com/benovo/resources/lists/substance-abuse-recovery-and" \
 -H "x-api-key: YOUR_API_KEY"

For a topic:

curl -X GET "https://api.crediblemind.com/benovo/resources/topics/anxiety" \
 -H "x-api-key: YOUR_API_KEY"

Response Format

The response format differs depending on whether you're requesting a list or a topic.

Lists Response

{
  "numResults": 7,
  "results": [
    {
      "entryId": "2uETWSzO1bUybkBiL78eMD",
      "title": "Is Your Substance Use Harmful?",
      "subtitle": "",
      "author": "",
      "organization": "",
      "type": "Assessment",
      "imageUrl": "//images.ctfassets.net/o6q5esfvflvg/1kxwjUiPg8QQZaOUORGgde/f7921d509bdfd2cd876d4ca3e716be3d/Is_Your_Substance__Use_Harmful.png",
      "primaryTopic": "Addiction & Recovery",
      "slug": "is-your-substance-use-harmful",
      "path": "assessments/is-your-substance-use-harmful",
      "tags": [],
      "featured": false,
      "averageRating": 4.8
    },
    // ... more results
  ]
}

Topics Response

{
  "entryId": "1EP1InbAsskkcwucUeq6Yo",
  "title": "Anxiety",
  "subtitle": "Find healthy outlets to manage and treat anxiety",
  "author": "",
  "organization": "",
  "type": "Topic",
  "imageUrl": "//images.ctfassets.net/o6q5esfvflvg/4Qpt8OuDAIzOA5IFQgVrEQ/15dfd33861d5532166a81c8accb7814d/Anxiety.jpg",
  "primaryTopic": "",
  "slug": "anxiety",
  "path": "topics/anxiety",
  "tags": [],
  "featured": false
}

Response Definitions

Common Fields (for both Lists and Topics)

  • entryId (string): A unique identifier for the entry.
  • title (string): The title of the resource.
  • subtitle (string): A subtitle or brief description of the resource. May be empty.
  • author (string): The author of the resource, if applicable.
  • organization (string): The organization associated with the resource, if applicable.
  • type (string): The type of resource (e.g., "Assessment", "Insight", "Article", "Video", "Podcast", "Organization", "Topic").
  • imageUrl (string): URL of an associated image for the resource.
  • primaryTopic (string): The main topic category of the resource. May be empty for Topics.
  • slug (string): A URL-friendly identifier for the resource.
  • path (string): The full path to access the resource.
  • tags (array): An array of tags associated with the resource.
  • featured (boolean): Indicates whether the resource is featured.

Lists-specific Fields

  • numResults (int): The total number of results in the list.
  • results (array): An array of resource objects, each containing the common fields listed above.
  • averageRating (number): The average rating of the resource. Present for individual resources within the results array.

Success Response

  • Code: 200 OK
  • Content: JSON object as described in the Response Format section.

Error Response

  • Code: 401 Unauthorized
  • Content:
{
  "error": "Invalid API Key"
}
  • Code: 404 Not Found
  • Content:
{
  "error": "Resource not found"
}
💡

Note: This API currently supports topics and lists types only. More resource types will be added in future updates.