Card Collections API
The Card Collections endpoint allows you to retrieve card collections from your Storyteller tenant. This is a minimal endpoint that returns basic identifiers and titles, alphabetically sorted.
Endpoint Details
GET https://integrations.usestoryteller.com/api/card-collections
| Header |
Required |
Description |
x-storyteller-api-key |
Yes |
Your API key for authentication |
Query Parameters
| Parameter |
Type |
Required |
Default |
Description |
searchText |
string |
No |
- |
Filter card collections by title |
currentPage |
integer |
No |
1 |
Page number for pagination |
pageSize |
integer |
No |
10 |
Number of items per page |
Response
Success Response (200 OK)
{
"cardCollections": [
{
"id": "product-tutorials",
"title": "Product Tutorials",
"externalId": "product-tutorials",
"displayTitle": "Product Tutorials",
"internalTitle": "Product Tutorials"
},
{
"id": "marketing-campaigns",
"title": "Marketing Campaigns",
"externalId": "marketing-campaigns",
"displayTitle": "Marketing Campaigns",
"internalTitle": "Marketing Campaigns"
}
],
"pageSize": 10,
"currentPage": 1,
"totalPages": 1
}
Response Fields
Card Collection Object
| Field |
Type |
Description |
id |
string |
Unique card collection internal identifier |
title |
string |
Display title or internal title if display title is missing |
externalId |
string |
Alias of id for consistency with other endpoints |
displayTitle |
string |
Display name of the card collection |
internalTitle |
string |
Internal name of the card collection |
| Field |
Type |
Description |
pageSize |
integer |
Number of items per page |
currentPage |
integer |
Current page number |
totalPages |
integer |
Total number of pages available |
Examples
# Get card collections
curl -X GET "https://integrations.usestoryteller.com/api/card-collections" \
-H "x-storyteller-api-key: your-api-key-here"
# Search for specific card collections
curl -X GET "https://integrations.usestoryteller.com/api/card-collections?searchText=product&pageSize=20" \
-H "x-storyteller-api-key: your-api-key-here"
async function getCardCollections(searchText = '', currentPage = 1, pageSize = 10) {
const params = new URLSearchParams({
...(searchText && { searchText }),
currentPage: currentPage.toString(),
pageSize: pageSize.toString()
});
const response = await fetch(`https://integrations.usestoryteller.com/api/card-collections?${params}`, {
method: 'GET',
headers: { 'x-storyteller-api-key': process.env.STORYTELLER_API_KEY }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return await response.json();
}
const { cardCollections } = await getCardCollections('product', 1, 20);
console.log(cardCollections.map(c => c.id));