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

TNID API documentation Company B2C subscriptions Remove B2C subscription (company)

Remove B2C subscription (company)

On this page

GraphQL endpoint: /company

Removes an existing B2C subscription for a user, unsubscribing them from receiving communications of that type from the company. The subscription is permanently removed. This action cannot be undone, but a new subscription can be created if consent is obtained again.

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"
      }
    }
  }
}