POST Create New Subscription
Use the API to programatically create a calendar subscription for Webcal and Google.
#
RequestPath
POST /v2/subscribe/{accountCode}/{calendarCode}
Parameters
Name | Type | In | Description | Required |
---|---|---|---|---|
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": "2025-10-04T10:00:00.000Z", "end": "2025-10-04T10:00:00.000Z", "allDayEvent": true, "notifyBefore": null, "actionType": "string" } ], "actionType": "string"}
#
Response200 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" } ]}
#
Error401 Unauthorized
404 NotFound