Skip to Content

List topics

Lists visible topics, default first then by name. The organization holds at most 200 topics, so the list is bounded and unpaged.

GET
/v1/topics

Lists visible topics, default first then by name. The organization holds at most 200 topics, so the list is bounded and unpaged.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

namespaceId?string
Match^ns_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

TopicList

application/json
  1. response
items*array<>
Itemsitems <= 200
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.topics.list({});
Example Response
{
  "items": [
    {
      "id": "string",
      "namespaceId": "string",
      "name": "string",
      "description": "string",
      "default": "opt_out",
      "isDefault": true,
      "defaultSenderId": "string",
      "replyMailboxId": "string",
      "templateId": "string",
      "subscriptions": {
        "sms": {
          "subscribed": 0,
          "unsubscribed": 0
        },
        "whatsapp": {
          "subscribed": 0,
          "unsubscribed": 0
        },
        "email": {
          "subscribed": 0,
          "unsubscribed": 0
        }
      },
      "createdAt": "string",
      "updatedAt": "string"
    }
  ]
}

Related documentation