SparrowDesk
Collections

Retrieve a collection

Returns the collection details along with its direct sub-collections and articles.

GET
/collections/{id}
AuthorizationBearer <token>

In: header

Path Parameters

idinteger

Collection id

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.sparrowdesk.com/v1/collections/0"
{
  "data": {
    "id": 1201,
    "name": "Getting started",
    "description": "Everything you need to get up and running.",
    "icon": "📘",
    "slug": "getting-started",
    "level": 1,
    "help_center_id": 994,
    "brand_id": 1,
    "parent_collection_id": null,
    "root_collection_id": null,
    "parent_collection": {
      "id": 1200,
      "name": "Support",
      "slug": "support"
    },
    "root_collection": {
      "id": 1200,
      "name": "Support",
      "slug": "support"
    },
    "position": "a4",
    "subcollections_count": 2,
    "articles_count": 10,
    "published_articles_count": 8,
    "is_last_level_sub_collection": false,
    "created_at": 0,
    "updated_at": 0,
    "sub_collections": [
      {
        "id": 1201,
        "name": "Getting started",
        "description": "Everything you need to get up and running.",
        "icon": "📘",
        "slug": "getting-started",
        "level": 1,
        "help_center_id": 994,
        "brand_id": 1,
        "parent_collection_id": null,
        "root_collection_id": null,
        "parent_collection": {
          "id": 1200,
          "name": "Support",
          "slug": "support"
        },
        "root_collection": {
          "id": 1200,
          "name": "Support",
          "slug": "support"
        },
        "position": "a4",
        "subcollections_count": 2,
        "articles_count": 10,
        "published_articles_count": 8,
        "is_last_level_sub_collection": false,
        "created_at": 0,
        "updated_at": 0,
        "sub_collections": []
      }
    ],
    "articles": [
      {
        "id": 1001,
        "title": "Getting started",
        "slug": "string",
        "help_center_id": 0,
        "brand_id": 0,
        "position": "string",
        "created_by": {
          "id": 0,
          "name": "string",
          "email": "string"
        },
        "created_at": 0,
        "updated_at": 0
      }
    ]
  }
}
{
  "message": "Unauthorized"
}
{
  "error": {
    "message": "Missing required scope or feature is not enabled"
  }
}
{
  "error": {
    "message": "Collection not found."
  }
}
{
  "error": {
    "message": "Invalid id"
  }
}
{
  "name": "RateLimitExceeded",
  "message": "Rate limit exceeded for: APIS_PER_MINUTE",
  "code": 429,
  "details": [
    {
      "name": "APIS_PER_MINUTE",
      "quota": 0,
      "count": 0,
      "remaining": 0
    }
  ]
}
{
  "error": {
    "message": "An error occurred while retrieving the collection"
  }
}