-
Notifications
You must be signed in to change notification settings - Fork 2
docs: add account emails endpoint reference #114
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
Changes from all commits
fd0b4b2
66439cd
f9652dd
0912f6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
| title: 'Get Account Emails' | ||
| openapi: 'GET /api/accounts/emails' | ||
| --- | ||
|
|
||
| Retrieve raw `account_emails` rows for one or more accounts the authenticated caller can access. | ||
|
|
||
| Provide at least one `account_id` query parameter. Repeat it to request multiple accounts: | ||
|
|
||
| ```bash | ||
| curl --request GET \ | ||
| --url 'https://recoup-api.vercel.app/api/accounts/emails?account_id=24994fe8-e63c-4c4a-867e-f38976e3fd31&account_id=ab1c64cd-4364-415e-abb4-04abbbda368e' \ | ||
| --header 'x-api-key: YOUR_API_KEY' | ||
| ``` | ||
|
|
||
| The server validates access for every requested `account_id`. If no `account_id` values are provided, the request returns `400`. If any requested account is unauthorized, the request returns `403`. | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -304,6 +304,87 @@ | |||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "/api/accounts/emails": { | ||||||||||||||||||||||||||||||||||||
| "get": { | ||||||||||||||||||||||||||||||||||||
| "description": "Retrieve raw account email rows for one or more account IDs after verifying that the authenticated caller can access every requested account.", | ||||||||||||||||||||||||||||||||||||
| "parameters": [ | ||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||
| "name": "account_id", | ||||||||||||||||||||||||||||||||||||
| "in": "query", | ||||||||||||||||||||||||||||||||||||
| "description": "Account ID to look up. Repeat this query parameter to fetch multiple rows. At least one account_id is required, and the authenticated caller must be allowed to access every requested account.", | ||||||||||||||||||||||||||||||||||||
| "required": true, | ||||||||||||||||||||||||||||||||||||
| "schema": { | ||||||||||||||||||||||||||||||||||||
| "type": "array", | ||||||||||||||||||||||||||||||||||||
| "items": { | ||||||||||||||||||||||||||||||||||||
| "type": "string", | ||||||||||||||||||||||||||||||||||||
| "format": "uuid" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "explode": true | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+316
to
+323
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bound
Proposed fix "schema": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
- }
+ },
+ "maxItems": 100
},
"explode": true📝 Committable suggestion
Suggested change
🧰 Tools🪛 Checkov (3.2.513)[medium] 316-321: Ensure that arrays have a maximum number of items (CKV_OPENAPI_21) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||
| "security": [ | ||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||
| "apiKeyAuth": [] | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||
| "bearerAuth": [] | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||
| "responses": { | ||||||||||||||||||||||||||||||||||||
| "200": { | ||||||||||||||||||||||||||||||||||||
| "description": "Account email rows retrieved successfully. Returns an empty array when the requested accounts are authorized but have no matching account_emails rows.", | ||||||||||||||||||||||||||||||||||||
| "content": { | ||||||||||||||||||||||||||||||||||||
| "application/json": { | ||||||||||||||||||||||||||||||||||||
| "schema": { | ||||||||||||||||||||||||||||||||||||
| "$ref": "#/components/schemas/AccountEmailsResponse" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "400": { | ||||||||||||||||||||||||||||||||||||
| "description": "Bad request - at least one account_id query parameter is required", | ||||||||||||||||||||||||||||||||||||
| "content": { | ||||||||||||||||||||||||||||||||||||
| "application/json": { | ||||||||||||||||||||||||||||||||||||
| "schema": { | ||||||||||||||||||||||||||||||||||||
| "$ref": "#/components/schemas/AccountEmailsErrorResponse" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "401": { | ||||||||||||||||||||||||||||||||||||
| "description": "Unauthorized - missing or invalid credentials", | ||||||||||||||||||||||||||||||||||||
| "content": { | ||||||||||||||||||||||||||||||||||||
| "application/json": { | ||||||||||||||||||||||||||||||||||||
| "schema": { | ||||||||||||||||||||||||||||||||||||
| "$ref": "#/components/schemas/StatusErrorResponse" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "403": { | ||||||||||||||||||||||||||||||||||||
| "description": "Forbidden - authenticated account does not have access to one or more requested account_id values", | ||||||||||||||||||||||||||||||||||||
| "content": { | ||||||||||||||||||||||||||||||||||||
| "application/json": { | ||||||||||||||||||||||||||||||||||||
| "schema": { | ||||||||||||||||||||||||||||||||||||
| "$ref": "#/components/schemas/AccountEmailsErrorResponse" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "500": { | ||||||||||||||||||||||||||||||||||||
| "description": "Unexpected internal server error", | ||||||||||||||||||||||||||||||||||||
| "content": { | ||||||||||||||||||||||||||||||||||||
| "application/json": { | ||||||||||||||||||||||||||||||||||||
| "schema": { | ||||||||||||||||||||||||||||||||||||
| "$ref": "#/components/schemas/AccountEmailsErrorResponse" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "/api/accounts/id": { | ||||||||||||||||||||||||||||||||||||
| "get": { | ||||||||||||||||||||||||||||||||||||
| "description": "Retrieve the ID of the authenticated account associated with the provided credentials. This is useful when you have an API key or access token but do not yet know the corresponding accountId.", | ||||||||||||||||||||||||||||||||||||
|
|
@@ -7623,6 +7704,26 @@ | |||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "StatusErrorResponse": { | ||||||||||||||||||||||||||||||||||||
| "type": "object", | ||||||||||||||||||||||||||||||||||||
| "required": [ | ||||||||||||||||||||||||||||||||||||
| "status", | ||||||||||||||||||||||||||||||||||||
| "error" | ||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||
| "properties": { | ||||||||||||||||||||||||||||||||||||
| "status": { | ||||||||||||||||||||||||||||||||||||
| "type": "string", | ||||||||||||||||||||||||||||||||||||
| "enum": [ | ||||||||||||||||||||||||||||||||||||
| "error" | ||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||
| "description": "Status of the request" | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "error": { | ||||||||||||||||||||||||||||||||||||
| "type": "string", | ||||||||||||||||||||||||||||||||||||
| "description": "Error message describing what went wrong" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "AccountErrorResponse": { | ||||||||||||||||||||||||||||||||||||
| "type": "object", | ||||||||||||||||||||||||||||||||||||
| "required": [ | ||||||||||||||||||||||||||||||||||||
|
|
@@ -7643,6 +7744,55 @@ | |||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "AccountEmailRow": { | ||||||||||||||||||||||||||||||||||||
| "type": "object", | ||||||||||||||||||||||||||||||||||||
| "required": [ | ||||||||||||||||||||||||||||||||||||
| "id", | ||||||||||||||||||||||||||||||||||||
| "updated_at" | ||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||
| "properties": { | ||||||||||||||||||||||||||||||||||||
| "id": { | ||||||||||||||||||||||||||||||||||||
| "type": "string", | ||||||||||||||||||||||||||||||||||||
| "format": "uuid", | ||||||||||||||||||||||||||||||||||||
| "description": "Unique identifier for the account email row" | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "account_id": { | ||||||||||||||||||||||||||||||||||||
| "type": "string", | ||||||||||||||||||||||||||||||||||||
| "format": "uuid", | ||||||||||||||||||||||||||||||||||||
| "nullable": true, | ||||||||||||||||||||||||||||||||||||
| "description": "Account ID associated with the email row" | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "email": { | ||||||||||||||||||||||||||||||||||||
| "type": "string", | ||||||||||||||||||||||||||||||||||||
| "format": "email", | ||||||||||||||||||||||||||||||||||||
| "nullable": true, | ||||||||||||||||||||||||||||||||||||
| "description": "Email address associated with the account" | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "updated_at": { | ||||||||||||||||||||||||||||||||||||
| "type": "string", | ||||||||||||||||||||||||||||||||||||
| "format": "date-time", | ||||||||||||||||||||||||||||||||||||
| "description": "Timestamp when the row was last updated" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "AccountEmailsResponse": { | ||||||||||||||||||||||||||||||||||||
| "type": "array", | ||||||||||||||||||||||||||||||||||||
| "items": { | ||||||||||||||||||||||||||||||||||||
| "$ref": "#/components/schemas/AccountEmailRow" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "AccountEmailsErrorResponse": { | ||||||||||||||||||||||||||||||||||||
| "type": "object", | ||||||||||||||||||||||||||||||||||||
| "required": [ | ||||||||||||||||||||||||||||||||||||
| "error" | ||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||
| "properties": { | ||||||||||||||||||||||||||||||||||||
| "error": { | ||||||||||||||||||||||||||||||||||||
| "type": "string", | ||||||||||||||||||||||||||||||||||||
| "description": "Error message describing what went wrong" | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "CreateAccountRequest": { | ||||||||||||||||||||||||||||||||||||
| "type": "object", | ||||||||||||||||||||||||||||||||||||
| "properties": { | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
P1: Custom agent: Flag AI Slop and Fabricated Changes
This MDX file should be frontmatter-only per the repository convention (
AGENTS.md→ "CRITICAL: API reference MDX pages should be frontmatter-only"). All other account endpoint pages (get.mdx,create.mdx,id.mdx,update.mdx,add-artist.mdx) follow this pattern. The description, parameter docs, curl example, and response behavior belong inopenapi.jsonand will be auto-generated by Mintlify from the spec.Prompt for AI agents