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

# Edit a store record

> Writes your manual assertions to one record and returns the updated resolved view. The edit becomes the record's `manual` layer and obeys the same rules as every other source: your precedence decides whether it wins a field, the change is recorded in the record's history, and a change to a resolved value emits the store's change event. A field your precedence does not allow `manual` to write is refused. A record that does not exist, or belongs to another account, returns 404.



## OpenAPI

````yaml /openapi.json patch /data/stores/{store}/records/{key}
openapi: 3.1.0
info:
  title: GetDialed API
  version: 0.1.0
servers:
  - url: https://api.getdialed.ai/v1
    description: Production
security: []
paths:
  /data/stores/{store}/records/{key}:
    patch:
      tags:
        - data-stores
      summary: Edit a store record
      description: >-
        Writes your manual assertions to one record and returns the updated
        resolved view. The edit becomes the record's `manual` layer and obeys
        the same rules as every other source: your precedence decides whether it
        wins a field, the change is recorded in the record's history, and a
        change to a resolved value emits the store's change event. A field your
        precedence does not allow `manual` to write is refused. A record that
        does not exist, or belongs to another account, returns 404.
      operationId: patch_store_record_data_stores__store__records__key__patch
      parameters:
        - name: store
          in: path
          required: true
          schema:
            type: string
            title: Store
        - name: key
          in: path
          required: true
          schema:
            type: string
            title: Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreRecordPatch'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreRecordResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/json:
              example:
                detail: Authentication required
        '404':
          description: Not found — also returned on cross-tenant access (never 403)
          content:
            application/json:
              example:
                detail: Record not found
        '422':
          description: Validation error (see body for field details)
          content:
            application/json:
              example:
                detail: Validation error
        '429':
          description: Rate limit exceeded — retry after the Retry-After header
          content:
            application/json:
              example:
                detail: Rate limit exceeded
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    StoreRecordPatch:
      properties:
        layer_data:
          additionalProperties: true
          type: object
          title: Layer Data
          description: >-
            The values you assert for this record. Every key must be a field the
            store declares and that your precedence allows `manual` to write.
      additionalProperties: false
      type: object
      required:
        - layer_data
      title: StoreRecordPatch
      description: >-
        A manual edit to one record.


        The values you send replace your manual assertions on this record
        wholesale:

        a field you omit stops being asserted manually, and resolution falls
        through

        to the next source that asserts it. Send `{}` to withdraw every manual

        assertion.


        The edit is written as the `manual` layer and obeys the same rules as
        every

        other source — your precedence decides whether it wins a field, and a
        field

        your precedence excludes `manual` from is refused rather than stored
        where it

        could never be read.
      example:
        layer_data:
          friendly_name: West Region Main
          owner_team: Support
    StoreRecordResponse:
      properties:
        key:
          type: string
          title: Key
          description: The record's key, in the store's canonical key format.
        resolved:
          additionalProperties: true
          type: object
          title: Resolved
          description: >-
            The resolved view — one value per field, taken from the
            highest-precedence source asserting it. A field no source asserts is
            absent rather than null.
        layers:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/StoreLayerResponse'
              type: object
            - type: 'null'
          title: Layers
          description: >-
            Each source's own assertions, keyed by source name. Present only
            when `include=layers` was requested.
        resolved_config_version:
          type: integer
          title: Resolved Config Version
          description: >-
            Which precedence version produced this resolved view. A value behind
            the store's current `config_version` means the view is awaiting
            recompute.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the record was first written by any source.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When any source last wrote to the record.
      type: object
      required:
        - key
        - resolved
        - resolved_config_version
        - created_at
        - updated_at
      title: StoreRecordResponse
      description: |-
        One record of a store: its resolved view, and optionally its layers.

        `resolved` is the single view computed from the record's layers by your
        precedence. Request `include=layers` to also see each source's own
        assertions and provenance.
      example:
        created_at: '2026-08-01T09:00:00Z'
        key: '+15551234567'
        resolved:
          campaign: Inbound Main
          e164: '+15551234567'
          friendly_name: West Region Main
          status: active
        resolved_config_version: 1
        updated_at: '2026-08-20T12:00:00Z'
    StoreLayerResponse:
      properties:
        data:
          additionalProperties: true
          type: object
          title: Data
          description: >-
            The values this source asserts. A field present here is an assertion
            — including one whose value is null. A field absent is not an
            assertion, and resolution moves on to the next source.
        written_at:
          type: string
          format: date-time
          title: Written At
          description: >-
            When this source last wrote the layer, whether or not the values
            changed. Use it to tell a stale source from a quiet one.
        written_by:
          $ref: '#/components/schemas/LayerWrittenBy'
      type: object
      required:
        - data
        - written_at
        - written_by
      title: StoreLayerResponse
      description: >-
        One source's assertions about one record, with its own provenance.


        Layers are kept side by side rather than overwriting each other, so this
        is

        where the answer to "why is the resolved value what it is" lives:
        whichever

        layer wins a field under your precedence supplied that value.
    LayerWrittenBy:
      properties:
        kind:
          type: string
          enum:
            - flow
            - csv_upload
            - user
            - seed
          title: Kind
        execution_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Execution Id
        definition_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition Id
        trigger_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Trigger Type
        record_set_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Record Set Id
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        report_folder:
          anyOf:
            - type: string
            - type: 'null'
          title: Report Folder
        report_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Report Name
      additionalProperties: false
      type: object
      required:
        - kind
      title: LayerWrittenBy
      description: >-
        Who or what wrote a layer, and from where.


        `kind` says which door the write came through; the remaining fields are
        the

        detail that door can supply — the flow execution and definition behind a

        scheduled sync, the file and record set behind an upload, the user
        behind a

        manual edit. Unknown keys are refused so provenance never quietly loses
        a

        field it was meant to carry.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````