(GET) Get collections
Retrieve collections from your workspace. Filter by collection ID or list all collections with pagination.
Endpoint
GET /collections
Retrieve collections from your workspace. Filter by collection ID to get specific collections, or omit the filter to retrieve all collections with pagination support.
Use this endpoint to list your collections, verify collection existence before creating links, or build collection management interfaces.
Endpoint text
GET /collectionsAuthentication
Requires an authorized credential with permission for collectionsRead. API keys are one supported credential; eligible OAuth or authenticated sessions may also authorize this operation.
Query Parameters
Request Limits
The `take` parameter supports values from 1 to 5,000. Requests above 5,000 are rejected.
Examples
Request cURL
curl -X GET "https://api.hoko.to/collections?take=50&sort=desc" \
-H "Authorization: Bearer <API_KEY>"Request JavaScript
const response = await fetch('https://api.hoko.to/collections?take=50&sort=desc', {
method: 'GET',
headers: {
Authorization: 'Bearer <API_KEY>'
}
});
const collections = await response.json();Response json
[
{
"id": "<collection_id>",
"name": "Marketing Campaigns",
"description": "All marketing links",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
]