Source Code
View on GitHub
Package
View on Packagist
Install
Configure
Add your API key to your.env file:
.env
Send email
Using the Laravel Mail driver
SendKit integrates with Laravel’s built-in Mail system. Just set the mailer in your.env:
.env
Mail facade as usual:
Using the SendKit facade
If you need more control, you can use the SendKit facade directly:Validate email
Validate an email address before sending. Each validation costs credits.evaluations array contains:
Contacts
Create or update a contact
Create a new contact or update an existing one if the email already exists (upsert).List contacts
Retrieve a paginated list of contacts.Get a contact
Update a contact
Delete a contact
Add a contact to lists
List a contact’s lists
Remove a contact from a list
Contact properties
Contact properties let you define custom fields for your contacts.Create a property
List properties
Update a property
Delete a property
A
SendKitException with status 409 is thrown if the property is used in segment filters.Webhooks
The package automatically registers aPOST /webhook/sendkit route in your application — no extra setup needed. When SendKit sends a webhook to this endpoint, the package verifies the signature and dispatches a Laravel event you can listen to.
Add your webhook secret
To verify that incoming webhooks are actually from SendKit, add your webhook secret to.env:
.env
403 response.
If no secret is configured, signature verification is skipped. We strongly recommend always setting a secret in production.
Customizing the webhook path
By default the webhook listens at/webhook/sendkit. You can change this with an environment variable:
.env
POST /api/webhooks/sendkit instead. Make sure to update the webhook URL in your SendKit dashboard to match.
Listening for events
When a webhook is received, the package dispatches a Laravel event based on the event type. You can listen for these events anywhere you normally would — in a listener, a service provider, or anEventServiceProvider:
payload property with the webhook data sent by SendKit.
Available events
All event classes are in the
SendKit\Laravel\Events namespace.
Advanced configuration
For full control over the webhook configuration, publish the config file:config/sendkit.php file where you can customize the webhook path, secret, and other options.
