Skip to main content
GET
/
tagsets
JavaScript
import Moonbase from '@moonbaseai/sdk';

const client = new Moonbase({
  apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const tagset of client.tagsets.list()) {
  console.log(tagset.id);
}
{
  "type": "list",
  "data": [
    {
      "id": "1CLJt2v1cFRDidcZsXKEd4",
      "type": "tagset",
      "name": "Finance",
      "description": "Tags for the finance team",
      "tags": [],
      "created_at": "2025-02-17T16:00:00.000Z",
      "updated_at": "2025-02-17T16:00:00.000Z"
    },
    {
      "id": "1CLJt2v1MsDbov8DBEEeWH",
      "type": "tagset",
      "name": "Sales",
      "description": "Sales tags",
      "tags": [],
      "created_at": "2025-02-17T16:00:00.000Z",
      "updated_at": "2025-02-17T16:00:00.000Z"
    },
    {
      "id": "1CLJt2v17V1yuCdrUwA4PW",
      "type": "tagset",
      "name": "Support",
      "description": "Tags for our support inbox",
      "tags": [],
      "created_at": "2025-02-17T16:00:00.000Z",
      "updated_at": "2025-02-17T16:00:00.000Z"
    }
  ],
  "meta": {
    "cursors": {}
  }
}

Authorizations

Authorization
string
header
required

Your Moonbase API key.

Query Parameters

before
string

When specified, returns results starting immediately before the item identified by this cursor. Use the cursor value from the response's metadata to fetch the previous page of results.

after
string

When specified, returns results starting immediately after the item identified by this cursor. Use the cursor value from the previous response's metadata to fetch the next page of results.

limit
integer
default:20

Maximum number of items to return per page. Must be between 1 and 100. Defaults to 20 if not specified.

Required range: 1 <= x <= 100

Response

Successful response.

A set of results using cursor-based pagination.

type
string
required
Allowed value: "list"
data
Tagset · object[]
required

An array of Tagset items.

meta
object
required

Metadata about the pagination, including the cursors pointing to the previous and next pages.