laravel-gtm/hubspot-sdk

Laravel-ready PHP API SDK boilerplate built with Saloon (template repository).

Maintainers

Package info

github.com/laravel-gtm/hubspot-sdk

pkg:composer/laravel-gtm/hubspot-sdk

Statistics

Installs: 118

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.0.11 2026-04-21 22:35 UTC

This package is auto-updated.

Last update: 2026-04-21 22:35:30 UTC


README

A Laravel-ready PHP SDK for the HubSpot CRM API, built with Saloon v4. Includes token auth, rate limiting, and typed response DTOs.

Requirements

  • PHP ^8.4
  • Laravel ^11.0 || ^12.0 || ^13.0 (for the optional Laravel integration)

Supported Endpoints

SDK Method HTTP API Endpoint Since
getContact() GET /crm/v3/objects/contacts/{contactId} unreleased
listContacts() GET /crm/v3/objects/contacts unreleased
listContactProperties() GET /crm/v3/properties/contact unreleased
getDeal() GET /crm/v3/objects/deals/{dealId} unreleased
listDeals() GET /crm/v3/objects/deals v0.0.1
listDealProperties() GET /crm/v3/properties/deal v0.0.3

Installation

composer require laravel-gtm/hubspot-sdk

Configuration (Laravel)

Publish the config (before init the tag is hubspot-sdk-config; after init it becomes {your-package-slug}-config):

php artisan vendor:publish --tag=hubspot-sdk-config

After running the init script, use your package slug in the tag (e.g. hubspot-sdk-config). Env keys use your chosen ENV_PREFIX (defaults before init use HUBSPOT_*):

  • HUBSPOT_BASE_URL
  • HUBSPOT_TOKEN
  • HUBSPOT_AUTH_HEADER

Usage

Via the service container

use LaravelGtm\HubspotSdk\HubspotSdk;

$sdk = app(HubspotSdk::class);

Standalone

use LaravelGtm\HubspotSdk\HubspotSdk;

$sdk = HubspotSdk::make(
    baseUrl: 'claude',
    token: 'your-token',
);

Development

composer test        # Pest
composer analyse     # PHPStan
composer lint        # Pint (check)
composer format      # Pint (fix)

License

MIT. See LICENSE.