POST Create New Subscription
Use the API to programatically create a calendar subscription for Webcal and Google.
Request
Path
POST /v2/subscribe/{accountCode}/{calendarCode}
Parameters
Name | Type | In | Description | Required | Example |
---|---|---|---|---|---|
accountCode | String | path | The Rokt Calendar merchant account code, or the subdomain of your Rokt Calendar dashboard URL. | true | |
calendarCode | String | path | This is a unique identifier of a specific calendar in your Rokt Calendar account. | true |
Request Body
{
"redirectUrl": "string",
"authCode": "string",
"tagId": "string",
"calendarTags": [
{
"internalId": "string",
"externalId": "string"
}
],
"timeZoneId": "string",
"marketingAllowed": true,
"additionalOptIn": true,
"allowPromotionalContent": true,
"eventReminderMinutes": null,
"isEventReminderDisabled": true,
"channelFinderZipCode": "string",
"channelFinderLineUpId": "string",
"sourceId": null,
"networkDevice": "string",
"providerName": "string",
"providerLocation": "string",
"stationNum": null,
"stationName": "string",
"utmSource": "string",
"utmMedium": "string",
"utmCampaign": "string",
"utmContent": "string",
"requestEventIds": [
"string"
],
"externalEventIds": [
"string"
],
"clickId": "string",
"urlReferrer": "string",
"userAgent": "string",
"ipAddress": "string",
"redirectTo": "string",
"userName": "string",
"subscriberId": "string",
"emailAddress": "string",
"trackingId": "string",
"sessionId": "string",
"roktSessionId": "string",
"subscriptionMethod": 0,
"events": [
{
"eventId": "string",
"title": "string",
"description": "string",
"location": "string",
"timezone": "string",
"timezoneIanaId": "string",
"start": "2021-02-24T21:38:05.408Z",
"end": "2021-02-24T21:38:05.408Z",
"allDayEvent": true,
"notifyBefore": null,
"actionType": "string"
}
],
"actionType": "string"
}
Object { }
redirectUrl: String
authCode: String
tagId: String
calendarTags: Array [
Object { }
] internalId: String
externalId: String
timeZoneId: String
marketingAllowed: Boolean
additionalOptIn: Boolean
allowPromotionalContent: Boolean
eventReminderMinutes: Enum
isEventReminderDisabled: Boolean
channelFinderZipCode: String
channelFinderLineUpId: String
sourceId: Enum
networkDevice: String
providerName: String
providerLocation: String
stationNum: Enum
stationName: String
utmSource: String
utmMedium: String
utmCampaign: String
utmContent: String
requestEventIds: Array [
String
] externalEventIds: Array [
String
] clickId: String
urlReferrer: String
userAgent: String
ipAddress: String
redirectTo: String
userName: String
subscriberId: String
emailAddress: String
trackingId: String
sessionId: String
roktSessionId: String
subscriptionMethod: Enum
events: Array [
Object { }
] eventId: String
title: String
description: String
location: String
timezone: String
timezoneIanaId: String
start: Date
end: Date
allDayEvent: Boolean
notifyBefore: Enum
actionType: String
actionType: String
Response
200 OK
{
"subscriptionId": "string",
"subscriptionUrl": "string",
"username": "string",
"password": "string",
"isNewSubscription": true,
"subscriberId": "string",
"redirectTo": "string",
"subscriptionType": 0,
"success": true,
"statusCode": 100,
"message": "string",
"errors": [
{
"code": "string",
"reason": "string"
}
]
}
Object { }
subscriptionId: String
subscriptionUrl: String
username: String
password: String
isNewSubscription: Boolean
subscriberId: String
redirectTo: String
subscriptionType: Enum
success: Boolean
statusCode: Enum
message: String
errors: Array [
Object { }
] code: String
reason: String
Error
401 Unauthorized
404 NotFound