List B2C subscriptions (company)
GraphQL endpoint: /company
Lists all active B2C subscriptions for the authenticated company. B2C subscriptions represent users who have opted in to receive communications from the company via email, SMS, or voice. You can filter by user, topic (included or excluded), expiration date, and subscription types. Results are paginated via limit and cursor.
Query
query (
$userId: ID
$companyId: ID
$includedTopic: String
$excludedTopic: String
$expirationDateBefore: Date
$expirationDateAfter: Date
$types: [B2cSubscriptionType!]
$limit: Int
$cursor: String
) {
b2cSubscriptions (
userId: $userId
companyId: $companyId
includedTopic: $includedTopic
excludedTopic: $excludedTopic
expirationDateBefore: $expirationDateBefore
expirationDateAfter: $expirationDateAfter
types: $types
limit: $limit
cursor: $cursor
) {
paginationInfo {
limit
nextCursor
}
records {
... 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
Response
Last updated