> ## 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.

# Sync Collections

> Manually trigger a sync of this card's collections to their linked Domo DataSets.
Only syncEnabled collections with pending changes are synced. Returns an empty body on success.

By default, only the collections in this card's own datastore are synced. Set
`includeRelatedCollections=true` to also sync any additional collections listed
in the app design's `collectionsMapping` — this is useful for designs that declare
**shared collections** with a fixed UUID, which are the same collection reused
across all instances of the design.

<Warning>
**Collections won't sync if the collection owner lacks permissions on the target DataSet.** If that user is removed from Domo, syncing stops. The new owner must have both Collection ownership and Admin Permissions.
</Warning>




## OpenAPI

````yaml /openapi/framework/appdb.yaml post /domo/datastores/v1/export
openapi: 3.0.0
info:
  title: Domo AppDB API
  version: v1
  description: >
    AppDB API for storing arbitrary JSON documents similar to a NoSQL database.
    This enables storing state within your DomoApp

    with optional syncing to Domo DataSets.


    Three layers provide data storage:

    - **Datastores**: Analogous to a database. A CustomApp has a single
    datastore created automatically.

    - **Collections**: Analogous to a collection in NoSQL or table in relational
    databases.

    - **Documents**: Analogous to documents in NoSQL or table rows in relational
    databases.
servers:
  - url: https://{instance}.domo.com
    description: Domo Instance
    variables:
      instance:
        default: example
        description: Your Domo instance name
security: []
paths:
  /domo/datastores/v1/export:
    post:
      tags:
        - AppDB API
      summary: Sync Collections
      description: >
        Manually trigger a sync of this card's collections to their linked Domo
        DataSets.

        Only syncEnabled collections with pending changes are synced. Returns an
        empty body on success.


        By default, only the collections in this card's own datastore are
        synced. Set

        `includeRelatedCollections=true` to also sync any additional collections
        listed

        in the app design's `collectionsMapping` — this is useful for designs
        that declare

        **shared collections** with a fixed UUID, which are the same collection
        reused

        across all instances of the design.


        <Warning>

        **Collections won't sync if the collection owner lacks permissions on
        the target DataSet.** If that user is removed from Domo, syncing stops.
        The new owner must have both Collection ownership and Admin Permissions.

        </Warning>
      parameters:
        - name: includeRelatedCollections
          in: query
          description: >-
            When `false` (default), syncs only the collections in this card's
            own datastore. When `true`, also syncs any additional collections
            listed in the app design's `collectionsMapping` alongside this
            card's own collections. Primarily useful for designs that declare
            shared collections with a fixed UUID — collections that are the same
            across all instances of the design.
          schema:
            type: boolean
            default: false
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
            example: {}
      responses:
        '200':
          description: >-
            Sync accepted and running asynchronously. No response body is
            returned.
        '423':
          description: >-
            Sync already in progress (LOCKED). Retry once the current sync
            completes.
      x-codeSamples:
        - lang: JavaScript
          label: domo.js
          source: >-
            // Sync this card's own collections

            domo.post('/domo/datastores/v1/export')
              .then(() => console.log('sync started'));

            // Also sync related collections (collectionsMapping)

            domo.post('/domo/datastores/v1/export?includeRelatedCollections=true')
              .then(() => console.log('sync started'));
        - lang: JavaScript
          label: domo.js v6
          source: |-
            // domo.js v6

            // Sync this card's own collections
            await domo.appdb.export();
            console.log('sync started');
        - lang: cURL
          label: cURL
          source: |-
            # This API is only available inside a Domo app.
            # Use the JavaScript (domo.js) tab for the correct usage.
        - lang: Python
          label: Python
          source: |-
            # This API is only available inside a Domo app.
            # Use the JavaScript (domo.js) tab for the correct usage.
        - lang: PHP
          label: PHP
          source: |-
            // This API is only available inside a Domo app.
            // Use the JavaScript (domo.js) tab for the correct usage.
        - lang: Go
          label: Go
          source: |-
            // This API is only available inside a Domo app.
            // Use the JavaScript (domo.js) tab for the correct usage.
        - lang: Java
          label: Java
          source: |-
            // This API is only available inside a Domo app.
            // Use the JavaScript (domo.js) tab for the correct usage.
        - lang: Ruby
          label: Ruby
          source: |-
            # This API is only available inside a Domo app.
            # Use the JavaScript (domo.js) tab for the correct usage.

````