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

Api Library Laravel Package

mautic/api-library

A PHP client library for the Mautic API, providing simple, framework-agnostic access to contacts, segments, campaigns, emails, forms, and other REST endpoints. Handles authentication and request/response parsing so you can integrate Mautic marketing automation into your PHP applications.

Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on marketing integration. If Mautic is your marketing automation platform (MAP), this library collapses a large chunk of the "build" — OAuth 2 token lifecycle, refresh handling, REST endpoint shapes, batch methods — into a dependency. That frees engineering capacity for product differentiation rather than integration plumbing.
  • Feature discovery: "marketing data inside the product." Concrete capabilities this unlocks include contact sync between your app and Mautic, lead/segment membership lookups surfaced in your UI, campaign enrollment triggered by product events (trial started, feature adopted, plan upgraded), form submission capture, and lifecycle-stage automation.
  • Roadmap sequencing. Use cases to slot onto a roadmap: onboarding email sequences driven by app events rather than cron jobs; batch import of trial signups into segments; syncing product-usage signals into dynamic segments for lead scoring; "your marketing profile" panels in account settings.
  • System-of-record decision. Adopting this makes it cheap to keep Mautic as the source of truth for marketing contacts while your app keeps a lightweight reference. That is a data-ownership and architecture decision worth making explicitly rather than drifting into it.
  • Use-case triage. Because endpoints are uniform (consistent CRUD and batch across contacts, segments, campaigns, forms), you can prototype several marketing features against the same client and let usage data decide which graduate — low cost to test.
  • Vendor and lock-in strategy. Mautic-specific by definition; the decision to adopt this is really "we're committing to Mautic," which is a portfolio-level call worth documenting.

When to Consider This Package

Consider it when:

  • You are running — or have firmly decided to run — Mautic as your MAP. Outside that context the library has zero value.
  • You are on PHP (Laravel, Symfony, or plain PHP) and want OAuth 2 handled for you rather than writing token storage, refresh, and error handling yourself.
  • Your near-term needs map to standard contact/segment/campaign/form CRUD and batch operations.
  • You want an official client rather than a hand-rolled Guzzle wrapper — lower integration risk, MIT license, no procurement cycle.
  • You are comfortable owning the surrounding orchestration (field mapping, retry/idempotency policy, webhook receivers) yourself.

Look elsewhere when:

  • Not on Mautic. HubSpot, Klaviyo, Customer.io, ActiveCampaign, and Mailchimp each have their own SDKs and APIs; this library is a dead end for those.
  • You need higher-level abstractions. This is a thin client, not a sync engine. Field mapping, conflict resolution, deduplication, and backfill are yours to build.
  • You need event-driven push from Mautic. Mautic supports webhooks, but this library is request-oriented; you will still build receivers and dispatch logic.
  • Non-PHP stack.
  • Community/maintenance risk matters to you. At ~202 stars this is a small, narrow SDK. Verify release cadence, issue responsiveness, and whether the endpoint coverage you need is actually wrapped before committing. Mitigate by pinning the version and wrapping it behind an internal interface so a fork or vendor swap stays cheap.
  • You need endpoints it doesn't cover. The fallback is calling Mautic's REST API directly with Guzzle — acceptable, but then you are partially maintaining your own client anyway.

How to Pitch It (Stakeholders)

To executives: "Mautic is our marketing engine. This is the official, MIT-licensed client for it — it handles authentication and the API surface so we don't spend engineering weeks rebuilding plumbing. The cost is near zero; the payoff is faster delivery of the features that turn product activity into pipeline: onboarding sequences, lead scoring, segment-driven campaigns. Because it's official and MIT, there's no procurement or licensing overhead. The main risk is concentration — adopting it means committing to Mautic — so we wrap it behind an internal interface and keep the exit cheap."

To engineering: "Thin, Guzzle-based, framework-agnostic SDK with OAuth 2 and automatic token refresh, plus consistent CRUD/batch methods for contacts, segments, campaigns, and forms. Drop it into a Laravel service provider, wrap it behind a MarketingClient interface, and we're productive fast. Caveats to plan for: it's a client, not a platform — we still own field mapping, retries and idempotency, webhook receivers, and error normalization. It's a ~200-star project, so pin the version and don't let calls spray across the codebase; if it's ever abandoned, the surface is small enough to fork or vendor."

Shared framing: cheap to adopt, narrow in scope, and Mautic-specific. The honest pitch is "this removes the boring half of the integration and leaves us the decisions that actually matter" — not "this solves marketing automation."

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib