TSGGLOBAL Support sign in
Skip to page content
Browse TNID API docs

TNID API documentation Company B2C subscriptions Create B2C Subscription Topic

Create B2C Subscription Topic

On this page

GraphQL endpoint: /company

Creates a B2C subscription topic for the company, with per-channel delivery flags (email, SMS, voice). The topic name must be unique within the company.

Query

mutation (
  $name: String!
  $description: String
  $type: B2cSubscriptionTopicType
  $enableEmail: Boolean
  $enableSms: Boolean
  $enableVoice: Boolean
) {
  createB2cSubscriptionTopic (
    name: $name
    description: $description
    type: $type
    enableEmail: $enableEmail
    enableSms: $enableSms
    enableVoice: $enableVoice
  ) {
    id
    name
    description
    type
    enableEmail
    enableSms
    enableVoice
  }
}

Variables

{
  "description": "test description",
  "enableEmail": true,
  "enableSms": false,
  "enableVoice": true,
  "name": "test topic",
  "type": "CRITICAL"
}

Response

{
  "data": {
    "createB2cSubscriptionTopic": {
      "description": "test description",
      "enableEmail": true,
      "enableSms": false,
      "enableVoice": true,
      "id": "00000000-0000-4000-8000-000000000001",
      "name": "test topic",
      "type": "CRITICAL"
    }
  }
}