About this project

Soenneker.Loops.Contacts is a .NET utility library for contact-related Loops operations. It lets callers create, update, find, and delete Loops contacts by email address. The package is distributed on NuGet and can be added with the dotnet add package command. Configuration uses a Loops section with an ApiKey value. The service is registered through dependency injection. The scoped operation service intentionally uses the singleton Loops client provider; a singleton registration can be used when the operation layer should also live for the application lifetime. The contact API exposes Create, Update, Find, and Delete. Create subscribes the contact by default and returns a contact ID. Update can change first name and subscription state; passing null for subscribed leaves subscription state unchanged, while true or false is intended only when the caller wants to change consent. Both Create and Update throw if Loops returns no contact ID. Find returns the first matching contact ID. Delete is destructive and reports the API's success flag. API failures are logged with the contact email and rethrown, so application logs should be handled as personal data.