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

# Upsert Rows

> Insert or update rows by `external_id`.



## OpenAPI

````yaml /openapi-v1.json post /api/v1/custom-data-sources/{id_or_slug}/rows
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/custom-data-sources/{id_or_slug}/rows:
    post:
      tags:
        - Custom Data Sources
      summary: Upsert Rows
      description: Insert or update rows by `external_id`.
      operationId: core_api_v1_controllers_custom_data_sources_upsert_rows
      parameters:
        - in: path
          name: id_or_slug
          schema:
            title: Id Or Slug
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RowUpsertRequestSchema'
        required: true
      responses:
        '200':
          description: OK
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    RowUpsertRequestSchema:
      properties:
        rows:
          items:
            $ref: '#/components/schemas/RowPayload'
          title: Rows
          type: array
      required:
        - rows
      title: RowUpsertRequestSchema
      type: object
    RowPayload:
      properties:
        external_id:
          title: External Id
          type: string
        data:
          additionalProperties: true
          title: Data
          type: object
        tags:
          items:
            type: string
          title: Tags
          type: array
        metadata:
          additionalProperties: true
          title: Metadata
          type: object
        searchable_text:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Explicit text to embed and store as searchable_text. When provided,
            overrides the concatenation of the schema's searchable_fields for
            this row.
          title: Searchable Text
        content:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Free-form full-text payload stored alongside the row (e.g. the
            markdown extracted from a source document). Not embedded — only
            displayed.
          title: Content
      required:
        - external_id
      title: RowPayload
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````