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

TNID API documentation User Subscriptions Remove B2C subscription (user)

Remove B2C subscription (user)

On this page

GraphQL endpoint: /user

Removes an existing B2C subscription the user has with a company, unsubscribing the user from communications of that type. The subscription is permanently removed; the user can create a new subscription to resubscribe.

Query

mutation (
  $subscriptionId: ID!
) {
  removeB2cSubscription (
    subscriptionId: $subscriptionId
  ) {
    ... on B2cEmailSubscription {
      id
      insertedAt
      updatedAt
      type
      subscriptionTopics
      expirationDate
      notificationStartTime
      notificationEndTime
      email
      company {
        id
      }
      user {
        id
      }
    }

    ... on B2cSmsSubscription {
      id
      insertedAt
      updatedAt
      type
      subscriptionTopics
      expirationDate
      notificationStartTime
      notificationEndTime
      telephoneNumber
      company {
        id
      }
      user {
        id
      }
    }

    ... on B2cVoiceSubscription {
      id
      insertedAt
      updatedAt
      type
      subscriptionTopics
      expirationDate
      notificationStartTime
      notificationEndTime
      telephoneNumber
      company {
        id
      }
      user {
        id
      }
    }
  }
}

Variables

{
  "subscriptionId": "00000000-0000-4000-8000-000000000002"
}

Response

{
  "data": {
    "removeB2cSubscription": {
      "company": {
        "id": "00000000-0000-4000-8000-000000000001"
      },
      "email": "test1@email.com",
      "expirationDate": null,
      "id": "00000000-0000-4000-8000-000000000002",
      "insertedAt": "2026-01-15T09:00:00.000000",
      "notificationEndTime": "20:00:00",
      "notificationStartTime": "08:00:00",
      "subscriptionTopics": [
        "topic_2",
        "topic_3"
      ],
      "type": "EMAIL",
      "updatedAt": "2026-01-15T09:00:00.000000",
      "user": {
        "id": "00000000-0000-4000-8000-000000000003"
      }
    }
  }
}