Rokt Documentation
  • Documentation
  • User Guide
  • SDK
  • API
  • Third-Party Integrations
  • Help

›Subscribe

Getting Started

  • Introduction

Transactions

    Events

    • Overview
    • Authentication
    • POST Events

    Cart

    • Overview
    • POST Reserve Cart Items
    • POST Confirm Cart Items
    • POST Release Cart Items

    Confirmation

    • POST Cancel Confirmed Item

    Placements

    • POST Any Placements

Customer Data

  • Referral Export
  • Transaction Export
  • Custom Audience Import
  • Unsubscribe Import
  • Attributes

Reporting

  • Overview
  • Authentication
  • Account Level

    • GET Account Summary
    • GET Account Campaigns Overview
    • GET Account Campaigns Breakdown
    • GET Account Campaigns Histogram
    • GET Account Transactions Overview
    • GET Account Transactions Breakdown

    Campaign Level

    • GET Campaign Overview
    • GET Campaign Breakdown
    • GET Campaign Histogram

    Creative Level

    • GET Creative Overview
    • GET Creative Breakdown

    Metadata

    • GET Campaign Metadata
    • GET Audience Metadata
    • GET Creative Metadata
    • GET Accounts Metadata

Rokt Calendar

  • Overview
  • Authentication
  • Subscription

    • DELETE Subscription Event
    • DELETE Deactivate Subscriptions
    • GET Subscription Details

    Subscription Event

    • DELETE Delete Subscription Event
    • POST Create New Subscription Event
    • POST Update Subscription Event

    Calendar

    • GET Calendar Events

    Schedule

    • GET Subscription Schedule

    Subscribe

    • POST Create New Subscription
Edit

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

NameTypeInDescriptionRequiredExample
accountCodeStringpathThe Rokt Calendar merchant account code, or the subdomain of your Rokt Calendar dashboard URL.true 
calendarCodeStringpathThis is a unique identifier of a specific calendar in your Rokt Calendar account.true 

Request Body

Example Value
Schema
{
"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

Example Value
Schema
{
"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

← GET Subscription Schedule
  • Request
  • Response
  • Error
RESOURCES
DocumentationUser GuideSDKAPIIntegration PartnersHelp
COMPANY
About UsContact UsCareersEngineering Blog
Rokt Documentation
Copyright © Rokt 2021 - All Rights Reserved