Skip to content

feat: Add HTTP save endpoints for brands and properties - #1101

Merged
bokelley merged 4 commits into
mainfrom
bokelley/brand-save-endpoint
Feb 16, 2026
Merged

bokelley merged 4 commits into
mainfrom
bokelley/brand-save-endpoint

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

  • Add POST /api/brands/save — HTTP endpoint mirroring Addie's save_brand MCP tool
  • Add POST /api/properties/save — HTTP endpoint mirroring Addie's save_property MCP tool
  • Both require authentication, rate limiting (60/hour), domain validation, and create revision-tracked edits

Details

These endpoints expose the same brand/property save logic that Addie uses internally via MCP as authenticated HTTP endpoints. Key behaviors:

  • Create: New brands/properties are created with source_type: "community"
  • Update: Existing records get revision-tracked edits with the authenticated user's identity
  • Authoritative protection: Returns 409 for brands managed via brand.json or properties with live adagents.json
  • Domain normalization: Strips protocol/path, lowercases, validates format

Test plan

  • Verify authentication is enforced (401 without credentials)
  • Create a new brand via POST /api/brands/save
  • Update the brand and verify revision tracking
  • Attempt to edit an authoritative brand.json brand (expect 409)
  • Create a new property via POST /api/properties/save
  • Update the property and verify revision tracking
  • Verify resolve endpoints return saved data
  • Test invalid domain format (expect 400)
  • Test missing required fields (expect 400)

🤖 Generated with Claude Code

bokelley and others added 4 commits February 16, 2026 14:12
Exposes the same save_brand logic Addie uses via MCP as a public HTTP
endpoint. Supports creating new brands and revision-tracked edits to
existing ones. Returns 409 for authoritative brand.json sources.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Exposes the same save_property logic Addie uses via MCP as a public
HTTP endpoint. Builds a synthetic adagents.json from authorized_agents
and properties, supports revision-tracked edits for existing hosted
properties, and returns 409 for authoritative adagents.json sources.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
No protocol spec changes — these are registry API implementation endpoints.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Address code review findings:
- Require authentication via requireAuth middleware
- Add brandCreationRateLimiter (60 req/hour)
- Normalize and validate domain format (strip protocol, lowercase)
- Use authenticated user identity for revision audit trail
- Force source_type to "community" (server-determined, not caller)
- Remove source_type from OpenAPI request schema
- Add 401/429 response codes to OpenAPI spec

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@bokelley
bokelley merged commit 4fd01e3 into main Feb 16, 2026
6 checks passed
bokelley added a commit that referenced this pull request Feb 16, 2026
The POST /api/brands/save and POST /api/properties/save endpoints were
implemented in #1101 but missing from the Mintlify docs. Adds full
documentation including request/response examples, rate limits, auth
requirements, and error codes.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
bokelley added a commit that referenced this pull request Feb 16, 2026
The POST /api/brands/save and POST /api/properties/save endpoints were
implemented in #1101 but missing from the Mintlify docs. Adds full
documentation including request/response examples, rate limits, auth
requirements, and error codes.

Co-authored-by: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant