Add channels when creating a new subscriber (via API)

Hi there, When creating a new subscriber, I noticed that I can add channels, but the types indicate it should be an array of strings. Which strings should I provide? I did some investigation and checked the code. It appears that in CreateSubscriberRequestDto, channels should accept multiple properties SubscriberChannelDto. Could the documentation have incorrect types? I can create a PR to address this, but I need confirmation of my observations. Thank you.
3 Replies
abdlrahmansaber.
I have a note regarding creating a new subscriber: when I add the channels property, it does not seem to be respected, and no channels are created. The same issue occurs when using the update endpoint. Am I doing something wrong? Here is the payload I used:
{
"name": "Abdlrahman",
"email": "[email protected]",
"subscriberId": "123456",
"channels": [
{
"providerId": "one-signal",
"credentials": {
"deviceTokens": ["device-token"]
}
}
]
}
{
"name": "Abdlrahman",
"email": "[email protected]",
"subscriberId": "123456",
"channels": [
{
"providerId": "one-signal",
"credentials": {
"deviceTokens": ["device-token"]
}
}
]
}
Novu_Bot
Novu_Bot3mo ago
@abdlrahmansaber., you just advanced to level 1!
Want results from more Discord servers?
Add your server