{"id":43809745,"url":"https://github.com/soenneker/soenneker.loops.openapiclient","last_synced_at":"2026-04-01T19:02:16.323Z","repository":{"id":292265885,"uuid":"980341529","full_name":"soenneker/soenneker.loops.openapiclient","owner":"soenneker","description":"A Loops (loops.so) .NET client generated from their OpenAPI schema, updated daily","archived":false,"fork":false,"pushed_at":"2026-03-31T17:44:50.000Z","size":513,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T18:08:58.031Z","etag":null,"topics":["api","client","csharp","dotnet","kiota","loops","loopsopenapiclient","open","openapi","openapiclient","so"],"latest_commit_sha":null,"homepage":"https://soenneker.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soenneker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"soenneker","thanks_dev":"soenneker"}},"created_at":"2025-05-09T01:19:30.000Z","updated_at":"2026-03-31T17:44:23.000Z","dependencies_parsed_at":"2026-02-05T21:02:07.640Z","dependency_job_id":null,"html_url":"https://github.com/soenneker/soenneker.loops.openapiclient","commit_stats":null,"previous_names":["soenneker/soenneker.loops.openapiclient"],"tags_count":92,"template":false,"template_full_name":null,"purl":"pkg:github/soenneker/soenneker.loops.openapiclient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.loops.openapiclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.loops.openapiclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.loops.openapiclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.loops.openapiclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soenneker","download_url":"https://codeload.github.com/soenneker/soenneker.loops.openapiclient/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.loops.openapiclient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","client","csharp","dotnet","kiota","loops","loopsopenapiclient","open","openapi","openapiclient","so"],"created_at":"2026-02-05T23:08:04.216Z","updated_at":"2026-04-01T19:02:16.295Z","avatar_url":"https://github.com/soenneker.png","language":"C#","funding_links":["https://github.com/sponsors/soenneker","https://thanks.dev/soenneker"],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/nuget/v/soenneker.loops.openapiclient.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.loops.openapiclient/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.loops.openapiclient/publish-package.yml?style=for-the-badge)](https://github.com/soenneker/soenneker.loops.openapiclient/actions/workflows/publish-package.yml)\n[![](https://img.shields.io/nuget/dt/soenneker.loops.openapiclient.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.loops.openapiclient/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.loops.openapiclient/codeql.yml?label=CodeQL\u0026style=for-the-badge)](https://github.com/soenneker/soenneker.loops.openapiclient/actions/workflows/codeql.yml)\n\n# ![](https://user-images.githubusercontent.com/4441470/224455560-91ed3ee7-f510-4041-a8d2-3fc093025112.png) Soenneker.Loops.OpenApiClient\n### A Loops (loops.so) .NET client generated from their OpenAPI schema, updated daily\n\n## Installation\n\n```bash\ndotnet add package Soenneker.Loops.OpenApiClient\n```\n\n## Authentication\n\nTo use the Loops API, you'll need an API key. You can generate one in the Loops dashboard under Settings -\u003e API. The API key should never be exposed client-side or to end users.\n\n```csharp\nusing Microsoft.Kiota.Http.HttpClientLibrary;\nusing Soenneker.Loops.OpenApiClient;\n\n// Create an HTTP client with the API key\nvar httpClient = new HttpClient();\nhttpClient.DefaultRequestHeaders.Add(\"Authorization\", $\"Bearer YOUR_API_KEY\");\n\n// Create the request adapter\nvar requestAdapter = new HttpClientRequestAdapter(httpClient);\n\n// Instantiate the main client\nvar client = new LoopsOpenApiClient(requestAdapter);\n```\n\n## Rate Limiting\n\nThe Loops API has a baseline rate limit of 10 requests per second per team. The API provides rate limit information in response headers:\n\n- `x-ratelimit-limit`: Maximum requests per second\n- `x-ratelimit-remaining`: Remaining requests in the current window\n\nIf you exceed the rate limit, you'll receive a 429 Too Many Requests response. Implement retry logic with exponential backoff to handle these cases.\n\n## Usage Examples\n\n### Managing Contacts\n\n```csharp\n// Create a new contact\nvar contactRequest = new ContactRequest\n{\n    Email = \"user@example.com\",\n    FirstName = \"John\",\n    LastName = \"Doe\",\n    UserProperties = new Dictionary\u003cstring, string\u003e\n    {\n        { \"company\", \"Acme Inc\" }\n    }\n};\n\nvar contact = await client.Contacts.PostAsync(contactRequest);\n\n// Find a contact\nvar contact = await client.Contacts.GetAsync(requestConfiguration =\u003e \n{\n    requestConfiguration.QueryParameters.Email = \"user@example.com\";\n});\n\n// Delete a contact\nawait client.Contacts.DeleteAsync(new ContactDeleteRequest \n{ \n    Email = \"user@example.com\" \n});\n```\n\n### Sending Events\n\n```csharp\n// Send an event to trigger emails in loops\nvar eventRequest = new EventRequest\n{\n    Email = \"user@example.com\",\n    EventName = \"purchase_completed\",\n    EventProperties = new Dictionary\u003cstring, string\u003e\n    {\n        { \"product_id\", \"123\" },\n        { \"amount\", \"99.99\" }\n    }\n};\n\nvar response = await client.Events.PostAsync(eventRequest);\n```\n\n### Transactional Emails\n\n```csharp\n// Send a transactional email\nvar transactionalRequest = new TransactionalRequest\n{\n    TransactionalId = \"your-transactional-id\",\n    Email = \"user@example.com\",\n    DataVariables = new Dictionary\u003cstring, string\u003e\n    {\n        { \"name\", \"John Doe\" },\n        { \"order_id\", \"12345\" }\n    }\n};\n\nvar response = await client.Transactional.PostAsync(transactionalRequest);\n\n// List published transactional emails\nvar transactionalEmails = await client.Transactional.GetAsync();\n```\n\n### Managing Mailing Lists\n\n```csharp\n// List all mailing lists\nvar mailingLists = await client.Lists.GetAsync();\n```\n\n## Error Handling\n\nThe client throws appropriate exceptions for different error scenarios:\n\n- `401 Unauthorized`: Invalid or missing API key\n- `429 Too Many Requests`: Rate limit exceeded\n- `400 Bad Request`: Invalid request parameters\n- `404 Not Found`: Resource not found\n\nExample error handling:\n\n```csharp\ntry\n{\n    var response = await client.Contacts.PostAsync(contactRequest);\n}\ncatch (ApiException ex) when (ex.StatusCode == 429)\n{\n    // Handle rate limiting\n    await Task.Delay(1000); // Implement exponential backoff\n    // Retry the request\n}\ncatch (ApiException ex) when (ex.StatusCode == 401)\n{\n    // Handle invalid API key\n    Console.WriteLine(\"Please check your API key\");\n}\n```\n\n## Additional Resources\n\n- [Loops API Documentation](https://loops.so/docs/api-reference/intro)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.loops.openapiclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoenneker%2Fsoenneker.loops.openapiclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.loops.openapiclient/lists"}