Conversation
davidgamez
reviewed
Jun 15, 2026
|
|
||
| /v1/subscriptions/{id}: | ||
| get: | ||
| summary: Get a subscription by ID (unauthenticated) |
Member
There was a problem hiding this comment.
This endpoint is, in fact, protected by authentication/authorization.
| email=email, | ||
| attributes={"MDB_SUBSCRIPTION_ID": subscription_id}, | ||
| list_ids=[list_id], | ||
| update_enabled=True, |
| sib_api_v3_sdk.CreateContact( | ||
| email=email, | ||
| attributes={"MDB_SUBSCRIPTION_ID": subscription_id}, | ||
| list_ids=[list_id], |
Member
There was a problem hiding this comment.
[question]: Does the update_enabled add the list_id to the lists, or does it reset the list to only one list?
| "404": | ||
| description: Subscription not found. | ||
| delete: | ||
| summary: Delete a subscription by ID (unauthenticated) |
Member
There was a problem hiding this comment.
The same here; this endpoint is authenticated, even though it's not an "user" endpoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This pull request introduces a complete implementation of notification subscription management for both authenticated users and unauthenticated (public) APIs, including integration with the Brevo email provider for announcement subscriptions. It adds new API endpoints, shared helpers, and comprehensive unit tests, enabling users to manage their notification subscriptions and ensuring synchronization with the external email provider.
Key changes include:
API and Endpoint Additions
SubscriptionsApiImpland fully implementing subscription methods inUsersApiImpl, allowing users to create, update, list, and delete notification subscriptions. [1] [2]subscriptions_apiroutes with the main application to expose these endpoints. [1] [2] [3]Brevo Integration
api.announcementssubscriptions with Brevo, and handled provider errors gracefully. [1] [2] [3]Database and Model Layer
NotificationSubscriptionImplfor converting ORM subscription objects to Pydantic models, supporting both API layers.Testing
These changes provide robust, production-ready notification subscription management with external provider synchronization and thorough test coverage.
Summarize the changes in the pull request including how it relates to any issues (include the #number, or link them).
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything