Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rest Api Laravel Package

sendpulse/rest-api

Official PHP client for the SendPulse REST API, supporting API key and OAuth auth. Manage bulk email campaigns, transactional SMTP, SMS, CRM contacts and chatbots through a typed, ergonomic service layer with optional PSR-18 and PSR-16 adapters. Requires PHP 8.3+ and ext-curl/ext-json.

View on GitHub
Deep Wiki
Context7
3.0.1

Fixed

  • CRM and chatbot URL prefixes — all CRM endpoints now correctly target /crm/v1/* and chatbot endpoints /chatbots/*; previously every call returned 404.
  • Path parameter encoding — path parameters are now percent-encoded via rawurlencode() in all generated operations; values containing #, ?, / or + no longer corrupt the request URI.
  • ForbiddenException added — HTTP 403 (tariff or permission restriction) is now thrown as ForbiddenException instead of AuthException; the two can be caught and handled independently.
  • SendPulseExceptionInterface added — NetworkException and ProtocolException now implement this marker interface alongside the SendPulseException hierarchy; a single catch (SendPulseExceptionInterface $e) block covers all six SDK exception classes.
  • Non-array JSON response — ResponseValidator now throws ProtocolException when the API returns a JSON primitive (true, a number, a string) instead of silently returning [].

3.0.0

Complete rewrite. See docs/upgrading.md for the migration guide.

BC Breaks

  • Entry point changed — use new Sendpulse\RestApi\Client(apiKey: '...') instead of the old ApiClient class.
  • Authentication — OAuth (clientId + clientSecret) and API key (apiKey) are now named constructor arguments; the old positional (API_USER_ID, API_SECRET, $storage) signature is gone.
  • Service layer — raw get()/post()/put()/patch()/delete() calls replaced by typed facades (emailService(), smtpService(), etc.).
  • Exceptions — ApiClientException replaced by a typed hierarchy: AuthException, RateLimitException, ApiException, NetworkException, ProtocolException.
  • PHP 8.3+ required (was 7.1+).
  • Storage — FileStorage/SessionStorage/MemcachedStorage removed; use FileTokenStorage, InMemoryTokenStorage, or bring your own via TokenStorage interface.

Added

  • Typed service facades: emailService(), smtpService(), smsService(), crmService(), chatbotService().
  • Services and models generated from OpenAPI specs — all endpoints covered.
  • TokenStorage interface with FileTokenStorage (atomic, flock-based) and InMemoryTokenStorage.
  • Optional PSR-16 adapter (Psr16TokenStorage) and PSR-18 HTTP adapter (Http\Adapter\Psr18Adapter).
  • Auto-retry on 401 — cached token is invalidated and a fresh one is fetched before retrying once.
  • PHPStan level max compliance.

2.0.1.2
  • Refactored README.
2.0.1.1
  • Updated README examples.
2.0.1
  • Added usage examples to README.
2.0
  • Internal refactoring; public ApiClient API unchanged.
1.0.27
  • Fixed incorrect API route paths.
1.0.26
  • Added Automation360 methods to documentation.
1.0.25
  • Added Automation360 client integration.
1.0.24
  • Added binary attachment support for campaign creation.
1.0.23
  • Fixed SMTP resend functionality.
1.0.22
  • Extended smtpSendEmail response handling.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route