> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erdo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# UpsertDeclarationAPI mirrors erdo_upsert_declaration.


> Status confirmed means the owning app committed the declaration and merged it through a human-reviewed pull request. The platform stores that status. A model proposal is sent as draft and does not resolve.




## OpenAPI

````yaml /api/openapi.json put /v1/declarations
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, experiments, and bounded outreach.
    Authenticate with a Bearer API key (erdo_api_...) or scoped token
    (erdo_token_...).
  version: '2026-11-08'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/declarations:
    put:
      summary: |
        UpsertDeclarationAPI mirrors erdo_upsert_declaration.
      description: >
        Status confirmed means the owning app committed the declaration and
        merged it through a human-reviewed pull request. The platform stores
        that status. A model proposal is sent as draft and does not resolve.
      operationId: PUT:mcp.UpsertDeclarationAPI
      requestBody:
        content:
          application/json:
            schema:
              properties:
                adopt:
                  description: >
                    table. Leave meaning empty to take the template expression,
                    or set meaning to override it.
                  title: >
                    Adopt copies the connector template for this kind, key,
                    source, and
                  type: boolean
                confidence:
                  type: string
                key:
                  type: string
                kind:
                  type: string
                meaning:
                  type: string
                namespace:
                  type: string
                reasoning:
                  type: string
                scope:
                  $ref: '#/components/schemas/knowledge.DeclarationScope'
                status:
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  confidence:
                    type: string
                  created:
                    type: boolean
                  id:
                    type: string
                  key:
                    type: string
                  kind:
                    type: string
                  meaning:
                    type: string
                  namespace:
                    type: string
                  reasoning:
                    type: string
                  scope:
                    $ref: '#/components/schemas/knowledge.DeclarationScope'
                  status:
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    knowledge.DeclarationScope:
      properties:
        source:
          type: string
        table:
          type: string
      title: |
        DeclarationScope is the source and table a declaration was written for.
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.