Box Developer Documentation

Join BoxWorks 2024 to discover what's possible with content and AI!

Register now!

Get collection by ID

get
https://api.box.com/2.0
/collections/:collection_id

Retrieves a collection by its ID.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
926489

The ID of the collection.

Response

application/jsonCollection

Returns an array of items in the collection.

application/jsonClient error

An unexpected client error.

get
Get collection by ID
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

TypeScript Gen
await client.collections.getCollectionById(collections.entries![0].id!);
Python Gen
client.collections.get_collection_by_id(collections.entries[0].id)
.NET Gen
await client.Collections.GetCollectionByIdAsync(collectionId: NullableUtils.Unwrap(NullableUtils.Unwrap(collections.Entries)[0].Id));
Swift Gen (Beta)
try await client.collections.getCollectionById(collectionId: collections.entries![0].id!)

Response Example

{
  "id": "11446498",
  "type": "collection",
  "collection_type": "favorites",
  "name": "Favorites"
}