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

# Update Collection

> Update one or more fields on a collection. All request body fields are optional — only the fields you include are changed.



## OpenAPI

````yaml /openapi/product/appdb.yaml put /api/datastores/v1/collections/{collectionId}
openapi: 3.0.0
info:
  title: App DB API
  version: v1
  description: |
    The App DB API allows developers to interact with AppDB, a NoSQL database 
    for storing arbitrary JSON documents. This API supports CRUD operations, 
    querying, and aggregation, enabling developers to manage data efficiently 
    within their Domo applications.
servers:
  - url: https://{instance}.domo.com
    description: Domo Instance
    variables:
      instance:
        default: api
        description: Your specific Domo instance name (e.g., mycompany)
security:
  - developerToken: []
tags:
  - name: Documents
    description: Manage individual documents in an AppDB collection.
  - name: Collections
    description: Manage AppDB collections (schema, permissions).
  - name: App DB API (Product)
    description: Manage documents and collections in AppDB.
paths:
  /api/datastores/v1/collections/{collectionId}:
    put:
      tags:
        - App DB API (Product)
      summary: Update Collection
      description: >-
        Update one or more fields on a collection. All request body fields are
        optional — only the fields you include are changed.
      parameters:
        - name: collectionId
          in: path
          required: true
          schema:
            type: string
          description: The ID of the collection to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionUpdateRequest'
            examples:
              rename:
                summary: Rename a collection
                value:
                  name: My new name
              update-schema:
                summary: Update schema
                value:
                  schema:
                    columns:
                      - type: STRING
                        name: theme
                      - type: STRING
                        name: defaultView
                  syncEnabled: true
              rename-and-update-schema:
                summary: Rename and update schema
                value:
                  name: preferences
                  schema:
                    columns:
                      - type: STRING
                        name: theme
                      - type: STRING
                        name: defaultView
                  syncEnabled: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
        '404':
          $ref: '#/components/responses/CollectionNotFoundDirect'
components:
  schemas:
    CollectionUpdateRequest:
      type: object
      description: >-
        All fields are optional. Only the fields you include are updated;
        omitted fields are left unchanged.
      properties:
        name:
          type: string
          description: New name for the collection.
        schema:
          type: object
          description: >-
            Updated column schema for this collection. Required before enabling
            DataSet sync. Requires admin privilege. Valid column types:
            `STRING`, `LONG`, `DECIMAL`, `DOUBLE`, `DATE`, `DATETIME`. The
            legacy field name `schemaJson` is also accepted.
          properties:
            columns:
              type: array
              items:
                $ref: '#/components/schemas/CollectionColumn'
        syncEnabled:
          type: boolean
          description: >-
            Whether to enable periodic syncing of documents to a linked Domo
            DataSet. Returns a 400 if set to `true` and the collection has no
            schema — set `schema` first.
        fullReplaceRequired:
          type: boolean
          description: >-
            Whether the next DataSet sync should fully replace existing rows
            rather than upsert.
        defaultPermissions:
          type: string
          nullable: true
          description: >-
            Comma-separated default permission set for new app grants on this
            collection. `READ` is always appended even if omitted. When `null`
            or blank, defaults to
            `READ,CREATE_CONTENT,READ_CONTENT,UPDATE_CONTENT,DELETE_CONTENT`.
            Valid values: `ADMIN`, `SHARE`, `DELETE`, `WRITE`, `READ`,
            `CREATE_CONTENT`, `READ_CONTENT`, `UPDATE_CONTENT`,
            `DELETE_CONTENT`. Requires admin privilege.
        owner:
          type: integer
          description: >-
            Numeric user ID to set as the collection owner. Requires admin
            privilege to change.
        requiredAuthorities:
          type: object
          nullable: true
          description: >-
            Maps `CollectionOperation` names to arrays of authority strings.
            When set, only users with matching authorities may perform the
            corresponding operation. Requires admin privilege.
        filters:
          type: array
          nullable: true
          description: >-
            Array of document-level filter predicates applied to read operations
            on this collection. Requires WRITE permission on the collection.
          items:
            type: object
    Collection:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the collection.
        datastoreId:
          type: string
          format: uuid
          description: ID of the datastore this collection belongs to.
        defaultPermissions:
          nullable: true
          description: >-
            Comma-separated default permission set for new app grants on this
            collection, or null if not set.
        requiredAuthorities:
          nullable: true
          description: >-
            Maps CollectionOperation names to required authority strings, or
            null if not set.
        owner:
          type: integer
          description: User ID of the collection owner.
        name:
          type: string
          description: Name of the collection.
        datasourceId:
          type: string
          nullable: true
          description: ID of the linked Domo DataSet, or null if not yet linked.
        schema:
          type: object
          properties:
            columns:
              type: array
              items:
                $ref: '#/components/schemas/CollectionColumn'
        filters:
          nullable: true
          description: >-
            Array of document-level filter predicates applied to read
            operations, or null if not set.
        syncEnabled:
          type: boolean
          description: Whether documents are periodically synced to the linked DataSet.
        syncRequired:
          type: boolean
          description: Whether a sync is pending.
        fullReplaceRequired:
          type: boolean
        lastSync:
          type: string
          format: date-time
          nullable: true
        createdOn:
          type: string
          format: date-time
        updatedOn:
          type: string
          format: date-time
        updatedBy:
          type: integer
      example:
        id: 232e6d6c-46e9-49b6-a137-8933f0f05999
        datastoreId: 39b88a97-8247-4c0d-ba1d-8ed78d1a6680
        defaultPermissions: null
        requiredAuthorities: null
        owner: 870010733
        name: users
        datasourceId: null
        schema:
          columns:
            - type: STRING
              name: username
            - type: STRING
              name: email
        filters: null
        syncEnabled: true
        syncRequired: false
        fullReplaceRequired: false
        lastSync: null
        createdOn: '2024-01-15T18:42:30.115Z'
        updatedOn: '2024-01-15T18:42:30.115Z'
        updatedBy: 870010733
    CollectionColumn:
      type: object
      properties:
        type:
          type: string
          enum:
            - STRING
            - LONG
            - DECIMAL
            - DOUBLE
            - DATE
            - DATETIME
        name:
          type: string
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message.
        status:
          type: integer
          description: HTTP status code.
        statusReason:
          type: string
          description: HTTP status reason phrase.
        toe:
          type: string
          description: Trace identifier for support; stands for Thread of Execution.
  responses:
    CollectionNotFoundDirect:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: No collection with id a3f7d891-bc24-4e56-9a12-c7e3b0f845d2 found
            status: 404
            statusReason: Not Found
            toe: UO3SB982DA-RL9G8-GO8DF
  securitySchemes:
    developerToken:
      type: apiKey
      in: header
      name: X-DOMO-Developer-Token
      description: Domo Developer Token for authentication.

````