C# client for HubSpot email subscription API, handling subscribe/unsubscribe and status queries.
// Source: https://github.com/hubspot-net/HubSpot.NET | License: MIT | Copyright 2018 Squared Up
// Provided via justclaw.it.com; keep this notice with the code.
namespace HubSpot.NET.Api.EmailSubscriptions
{
using HubSpot.NET.Api.EmailSubscriptions.Dto;
using HubSpot.NET.Core.Abstracts;
using HubSpot.NET.Core.Dictionaries;
using HubSpot.NET.Core.Interfaces;
using RestSharp;
using System.Collections.Generic;
using System.Linq;
public class HubSpotEmailSubscriptionsApi : ApiRoutable, IHubSpotEmailSubscriptionsApi
{
private readonly IHubSpotClient _client;
public override string MidRoute => "/email/public/v1/subscriptions";
public HubSpotEmailSubscriptionsApi(IHubSpotClient client)
{
_client = client;
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key