Skip to content

GET /v1/collections

Retrieve a paginated list of all collections belonging to your organisation.

Request

bash
curl -H "X-API-Key: your-api-key" \
  "https://api.interplai.app/v1/collections?page=0&pageSize=20"
javascript
const response = await fetch(
  'https://api.interplai.app/v1/collections?page=0&pageSize=20',
  { headers: { 'X-API-Key': 'your-api-key' } }
);
const data = await response.json();

Query parameters

ParameterTypeDefaultDescription
pageinteger0Page number (0-indexed)
pageSizeinteger20Items per page (min: 1, max: 100)
contentTypestringFilter by content type (see Content Types)

Filtering by content type

bash
# Only social post collections
curl -H "X-API-Key: your-api-key" \
  "https://api.interplai.app/v1/collections?contentType=SOCIAL_POST"

Response

json
{
  "collections": [
    {
      "id": "col_abc123",
      "name": "Match Day Social Feed",
      "contentType": "SOCIAL_POST",
      "stagingContentCount": 5,
      "liveContentCount": 20,
      "createdDate": "2026-01-10T08:00:00.000Z",
      "lastModifiedDate": "2026-01-18T10:35:00.000Z",
      "url": "https://api.interplai.app/v1/collections/col_abc123"
    },
    {
      "id": "col_def456",
      "name": "Fan Messages - Premier League",
      "contentType": "SOCIAL_POST",
      "stagingContentCount": 2,
      "liveContentCount": 10,
      "createdDate": "2026-01-08T12:00:00.000Z",
      "lastModifiedDate": "2026-01-17T14:22:00.000Z",
      "url": "https://api.interplai.app/v1/collections/col_def456"
    }
  ],
  "meta": {
    "page": 0,
    "pageSize": 20,
    "totalItems": 42,
    "totalPages": 3
  }
}

Response fields

Collection summary

FieldTypeDescription
idstringUnique collection identifier
namestringCollection display name
contentTypestringContent type (see Content Types)
stagingContentCountintegerNumber of staging content items
liveContentCountintegerNumber of live content items
createdDatestringISO 8601 creation timestamp
lastModifiedDatestringISO 8601 last update timestamp
urlstringURL to fetch the full collection

Pagination meta

FieldTypeDescription
pageintegerCurrent page number (0-indexed)
pageSizeintegerItems per page
totalItemsintegerTotal number of collections
totalPagesintegerTotal number of pages

Error responses

StatusCodeDescription
400VALIDATION_ERRORInvalid query parameters
401MISSING_API_KEY / INVALID_API_KEYAuthentication failure
502BAD_GATEWAYUpstream service error
503SERVICE_UNAVAILABLEService temporarily unavailable

Interplai API v1.2.0