sendinblue/api-v3-sdk
Deprecated PHP SDK for SendinBlue API v3 (auto-generated from OpenAPI). Provides client wrappers for SendinBlue features with API key/partner key auth. Install via Composer (sendinblue/api-v3-sdk 8.x) and use included API classes to call endpoints.
Pros:
AccountApi, ContactsApi), making it easy to integrate selectively (e.g., only CRM or email features).Cons:
Http facade or GuzzleHttp can replace the SDK’s default client with minimal changes.Configuration class can be bound to Laravel’s IoC container for dependency injection.AppServiceProvider or environment variables.Exception class), which may need wrapping in Laravel’s HttpException or custom handlers.Http facade mocking).updateBatchContacts) be used heavily? If so, test memory/CPU usage in Laravel.env() or Vault)?Log or monitoring tools like Sentry)?Http client for consistency.Configuration and API classes to the container:
$this->app->singleton(SendinBlue\Client\Configuration::class, function () {
return SendinBlue\Client\Configuration::getDefaultConfiguration()
->setApiKey('api-key', config('services.sendinblue.key'));
});
.env and publish a config file:
SENDINBLUE_API_KEY=your_key_here
SENDINBLUE_PARTNER_KEY=your_partner_key
Contact, Company, Deal).class Contact extends Model {
public static function syncFromSendinBlue() {
$contacts = app(SendinBlue\Client\Api\ContactsApi::class)->getContacts();
foreach ($contacts as $contact) {
self::updateOrCreate(['email' => $contact->email], $contact->toArray());
}
}
}
class SyncContactsJob implements ShouldQueue {
public function handle() {
app(SendinBlue\Client\Api\ContactsApi::class)->importContacts(...);
}
}
getAccount) to validate the SDK works in Laravel.Contacts, Lists, and Deals with Eloquent sync.Log or structured logging).^7.0 for PHP 8.x support.^10.0 if using Laravel’s testing tools.| Priority | Task | Dependencies |
|---|---|---|
| High | Set up API keys and basic auth | .env, config/services.php |
| High | Implement ContactsApi CRUD |
Eloquent models, Http client |
| Medium | Add queue jobs for async ops | Laravel queues, ShouldQueue |
| Medium | Sync Deals/Companies with DB |
Eloquent relationships |
| Low | Webhook integration | Laravel routes, HandleIncomingWebhook |
| Low | Rate limiting middleware | Laravel middleware, Guzzle retries |
sendinblue/api-v3-sdk (though deprecated, critical bug fixes may exist)..env or a secrets manager.config('services.sendinblue.key') for dynamic updates.SendinBlueApiException).try {
$result = $apiInstance->getContacts();
} catch (Exception $e) {
Log::error("SendinBlue API failed", [
'endpoint' => 'getContacts',
'error' => $e->getMessage(),
'payload' => $request->getBody()
]);
throw new HttpException(500, "Failed to fetch contacts");
}
README.md for onboarding (e.g., setup, common use cases).$client->getMiddleware()->push(
Middleware::retry($retries, function ($retries, $request,
How can I help you explore Laravel packages today?