{"id":24660221,"url":"https://github.com/skarpdev/dotnetcore-hubspot-client","last_synced_at":"2026-02-27T03:32:18.390Z","repository":{"id":23004177,"uuid":"97921809","full_name":"skarpdev/dotnetcore-hubspot-client","owner":"skarpdev","description":"Dotnet core HubSpot client","archived":false,"fork":false,"pushed_at":"2022-10-26T15:40:51.000Z","size":278,"stargazers_count":22,"open_issues_count":15,"forks_count":31,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-10-07T21:39:34.281Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skarpdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-21T07:55:25.000Z","updated_at":"2025-10-03T22:22:05.000Z","dependencies_parsed_at":"2023-01-13T22:35:57.794Z","dependency_job_id":null,"html_url":"https://github.com/skarpdev/dotnetcore-hubspot-client","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/skarpdev/dotnetcore-hubspot-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skarpdev%2Fdotnetcore-hubspot-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skarpdev%2Fdotnetcore-hubspot-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skarpdev%2Fdotnetcore-hubspot-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skarpdev%2Fdotnetcore-hubspot-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skarpdev","download_url":"https://codeload.github.com/skarpdev/dotnetcore-hubspot-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skarpdev%2Fdotnetcore-hubspot-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29883722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-26T03:18:48.033Z","updated_at":"2026-02-27T03:32:18.361Z","avatar_url":"https://github.com/skarpdev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://ci.appveyor.com/api/projects/status/kwl0jx7cfmeel1jh?svg=true)](https://ci.appveyor.com/project/nover/dotnetcore-hubspot-client-qxwcp)\n[![nuget version][nuget-image]][nuget-url]\n\n# dotnet core HubSpot client\n\nThis repository contains a dotnet / dotnet core compatible HubSpot client with support for custom property mapping from your DTOs to HubSpot fields.\n\nCurrently working is (almost complete) support for `Contact`, `Company`, `Deal`, `LineItem` and `Owner` in the HubSpot API.\n\nIf you find something missing or broken, please [report an issue][github-issue] or even better fork the repo and submit a PR!\n\n## Dotnet targets\n\nPackages for the following dotnet versions are available:\n\n- dotnet 4.6.1\n- netstandard 2.0\n\nWhich means that you can use the library with `fat-framework \u003e= 4.6.1` or `netcoreapp \u003e= 2.0`\n\nVerified working on Linux, macOS and Windows.\n\n## Versioning\n\nWe use [SemVer 2.0](http://semver.org/), which means you can depend on HubSpotClient version `\u003cmajor\u003e.*`.\n\nThis also means that while we are in the `0.*` version range, **breaking** API changes can be made between minor versions - we strive to keep these at a minimum and will be explicitly stated in the release notes.\n\n## Nuget Package\n\nYou can install the HubSpotClient package from [nuget](https://www.nuget.org/packages/HubSpotClient)\n\n## Using the library\n\nThe library has been split into separate clients for each \"HubSpot API feature\", which means that `Contacts`, `Companies` and `Deals` have separate clients for you to depend on.\n\n### Contact\n\nTo interact with HubSpot contacts you must use the `HubSpotContactClient` - it has two constructors, one for quickly getting started (you just provide the `api-key`) and one with all dependencies as arguments (eager constructor).\n\nIt is generally recommended that you use the \"eager\" constructor as this allows replacing the HTTP client and other dependencies when testing.\n\nHowever, getting started is as simple as:\n\n```csharp\nusing Skarp.HubSpotClient.Contact;\nusing Xunit;\nusing Xunit.Abstractions;\n\npublic class ContactTest\n{\n  [Fact]\n  public async Task Getting_contacts_work()\n  {\n    var client = new HubSpotContactClient(\"my-awesome-api-key-or-pat\");\n    var contact = await client.GetByEmailAsync\u003cContactHubSpotEntity\u003e(\"adrian@hubspot.com\");\n    Assert.NotNull(contact); // victory!\n  }\n}\n```\n\nAll client operations takes in a generic type argument `T` - this is in order to support (de)serialization. The provided `ContactHubSpotEntity` provides the basic properties one could want on a contact person.\n\nIf you require the default props and some additional custom props, simply create your own class instance and inherit from either `IHubSpotEntity` or the `ContactHubSpotEntity`:\n\n```csharp\n[DataContract]\npublic class MyContactEntity : ContactHubSpotEntity\n{\n  [DataMember(Name=\"nick-name\")] // required so we can serialize to the hubspot property name defined in your account!\n  public string NickName {get; set;}\n}\n```\n\nAll operations (`get`, `create`, `update`) should now include this custom property.\nIf you don't include the `DataContract` and `DataMember` attributes your new props will not be serialized and sent to HubSpot!\n\n### Company\n\nTo consume the HubSpot company api you should use the `HubSpotCompanyClient` - as with the contacts there is a simple constructor taking in just the `apiKey` and an eager constructor taking in all dependencies.\n\nGetting started looks something like...\n\n```csharp\nusing Skarp.HubSpotClient.Contact;\nusing Xunit;\nusing Xunit.Abstractions;\n\npublic class CompanyTest\n{\n  [Fact]\n  public async Task Getting_company_works()\n  {\n    var client = new HubSpotCompanyClient(\"my-awesome-api-key-or-pat\");\n    var company = await client.GetByIdAsync\u003cCompanyHubSpotEntity\u003e(42L);\n    Assert.NotNull(company); // victory!\n  }\n}\n```\n\nTo create custom DTOs follow the guidelines given for Contacts above.\n\n### Deal\n\n**TODO**\n\n### Line Item\n\nTo consume the HubSpot line item api you should use the `HubSpotLineItemClient` - as with the others there is a simple constructor taking in just the `apiKey` and an eager constructor taking in all dependencies.\n\nGetting started looks something like...\n\n```csharp\nusing Skarp.HubSpotClient.LineItem;\nusing Skarp.HubSpotClient.LineItem.Dto;\nusing Xunit;\nusing Xunit.Abstractions;\n\npublic class OwnerTest\n{\n  [Fact]\n  public async Task Getting_owner_works()\n  {\n    var client = new HubSpotLineItemClient(\"my-awesome-api-key-or-pat\");\n    var lineItem = await client.GetByIdAsync\u003cLineItemHubSpotEntity\u003e(42L);\n    Assert.NotNull(lineItem); // victory!\n  }\n}\n```\n\n### Owner\n\nTo consume the HubSpot owner api you should use the `HubSpotOwnerClient` - as with the others there is a simple constructor taking in just the `apiKey` and an eager constructor taking in all dependencies.\n\nGetting started looks something like...\n\n```csharp\nusing Skarp.HubSpotClient.Owner;\nusing Skarp.HubSpotClient.Owner.Dto;\nusing Xunit;\nusing Xunit.Abstractions;\n\npublic class OwnerTest\n{\n  [Fact]\n  public async Task Getting_owner_works()\n  {\n    var client = new HubSpotOwnerClient(\"my-awesome-api-key-or-pat\");\n    var owner = await client.GetByIdAsync\u003cOwnerHubSpotEntity\u003e(42L);\n    Assert.NotNull(owner); // victory!\n  }\n}\n```\n\n[nuget-image]: https://img.shields.io/nuget/v/HubSpotClient.svg\n[nuget-url]: https://www.nuget.org/packages/HubSpotClient\n[github-issue]: https://github.com/skarpdev/dotnetcore-hubspot-client/issues/new\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskarpdev%2Fdotnetcore-hubspot-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskarpdev%2Fdotnetcore-hubspot-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskarpdev%2Fdotnetcore-hubspot-client/lists"}