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

TNID API documentation Company B2C subscriptions Update B2C Subscription Topic

Update B2C Subscription Topic

On this page

GraphQL endpoint: /company

Updates one of the company's B2C subscription topics; only the provided fields change. The topic name must stay unique within the company. Once a topic has subscribers its name and type are both fixed — they are what those people consented to — while the description and the per-channel flags stay editable.

Query

mutation (
  $id: ID!
  $name: String
  $description: String
  $type: B2cSubscriptionTopicType
  $enableEmail: Boolean
  $enableSms: Boolean
  $enableVoice: Boolean
) {
  updateB2cSubscriptionTopic (
    id: $id
    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,
  "id": "00000000-0000-4000-8000-000000000001",
  "name": "test topic",
  "type": "CRITICAL"
}

Response

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