-
Notifications
You must be signed in to change notification settings - Fork 4
docs: add POST /api/notifications endpoint #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sweetmantech
merged 8 commits into
main
from
sweetmantech/myc-4333-docs-post-apinotifications-follow-the-mcp-tool-definition
Feb 25, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
846c513
docs: add POST /api/notifications endpoint
sweetmantech 0f47d75
docs: remove to param, auto-resolve recipient from auth
sweetmantech 7140ef1
docs: add SDK tab with CLI notifications command reference
sweetmantech e74420a
docs: move SDK page into Guides tab after quickstart
sweetmantech 3ccc320
docs: rewrite CLI page with install instructions and all commands
sweetmantech c1cf4d0
docs: add API endpoint links to each CLI command
sweetmantech 40d7dd5
docs: add html flag example to notifications command
sweetmantech df41713
docs: reorder CLI commands — orgs, artists, notifications first
sweetmantech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| title: 'Send Notification' | ||
| openapi: 'POST /api/notifications' | ||
| --- |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| --- | ||
| title: "CLI" | ||
| description: "Install and use the Recoup CLI to interact with the platform from your terminal." | ||
| --- | ||
|
|
||
| The Recoup CLI (`@recoupable/cli`) is a command-line wrapper around the Recoup API. It's available as a global npm package and is pre-installed in sandbox environments. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| npm install -g @recoupable/cli | ||
| ``` | ||
|
|
||
| ## Authentication | ||
|
|
||
| Set your API key as an environment variable. You can get a key from the [API Keys page](https://chat.recoupable.com/keys). | ||
|
|
||
| ```bash | ||
| export RECOUP_API_KEY=your-api-key | ||
| ``` | ||
|
|
||
| Verify it works: | ||
|
|
||
| ```bash | ||
| recoup whoami | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| | Variable | Required | Default | Description | | ||
| |----------|----------|---------|-------------| | ||
| | `RECOUP_API_KEY` | Yes | — | Your Recoup API key | | ||
| | `RECOUP_API_URL` | No | `https://recoup-api.vercel.app` | API base URL override | | ||
|
|
||
| All commands support `--json` for machine-readable output and `--help` for usage info. | ||
|
|
||
| ## whoami | ||
|
|
||
| Show the authenticated account. See [`GET /api/accounts/id`](/api-reference/accounts/id). | ||
|
|
||
| ```bash | ||
| recoup whoami | ||
| recoup whoami --json | ||
| ``` | ||
|
|
||
| ## orgs | ||
|
|
||
| Manage organizations. See [`GET /api/organizations`](/api-reference/organizations/list). | ||
|
|
||
| ```bash | ||
| recoup orgs list | ||
| recoup orgs list --account <accountId> | ||
| recoup orgs list --json | ||
| ``` | ||
|
|
||
| ## artists | ||
|
|
||
| Manage artists. See [`GET /api/artists`](/api-reference/artists/list). | ||
|
|
||
| ```bash | ||
| recoup artists list | ||
| recoup artists list --org <orgId> | ||
| recoup artists list --account <accountId> | ||
| recoup artists list --json | ||
| ``` | ||
|
|
||
| ## notifications | ||
|
|
||
| Send a notification email to the authenticated account's email address. The recipient is automatically resolved from your API key — no need to specify a `to` address. | ||
|
|
||
| ```bash | ||
| recoup notifications --subject "Pulse Report" --text "Here's your weekly summary." | ||
| recoup notifications --subject "Update" --cc manager@example.com --text "New release scheduled." | ||
| recoup notifications --subject "Weekly Pulse" --html "<h1>Pulse Report</h1><p>BVB release planning is <strong>active</strong>.</p>" | ||
| ``` | ||
|
|
||
| | Flag | Required | Description | | ||
| |------|----------|-------------| | ||
| | `--subject <text>` | Yes | Email subject line | | ||
| | `--text <body>` | No | Plain text or Markdown body (rendered as HTML) | | ||
| | `--html <body>` | No | Raw HTML body (takes precedence over `--text`) | | ||
| | `--cc <email>` | No | CC recipient (repeatable) | | ||
| | `--room-id <id>` | No | Room ID for a chat link in the email footer | | ||
|
|
||
| This command wraps [`POST /api/notifications`](/api-reference/notifications/create). | ||
|
|
||
| ## chats | ||
|
|
||
| Manage chats. See [`GET /api/chats`](/api-reference/chat/chats) and [`POST /api/chats`](/api-reference/chat/create). | ||
|
|
||
| ```bash | ||
| recoup chats list | ||
| recoup chats create --name "My Topic" | ||
| recoup chats create --name "My Topic" --artist <artistId> | ||
| recoup chats list --json | ||
| ``` | ||
|
|
||
| ## sandboxes | ||
|
|
||
| Manage sandboxes. See [`GET /api/sandboxes`](/api-reference/sandboxes/list) and [`POST /api/sandboxes`](/api-reference/sandboxes/create). | ||
|
|
||
| ```bash | ||
| recoup sandboxes list | ||
| recoup sandboxes create | ||
| recoup sandboxes create --command "ls -la" | ||
| recoup sandboxes list --json | ||
| ``` |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enforce message-body and recipient invariants in
CreateNotificationRequest.The schema currently permits payloads with
to+subjectbut notext/html, and also allows an emptytoarray. That under-specifies valid requests.Suggested schema fix
"CreateNotificationRequest": { "type": "object", "required": ["to", "subject"], + "anyOf": [ + { "required": ["text"] }, + { "required": ["html"] } + ], "properties": { "to": { "type": "array", + "minItems": 1, "items": { "type": "string", "format": "email" },🤖 Prompt for AI Agents