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

# Update data-export destination selection

> Update a destination's entity selection. Pushes the new enabled_models to the provider first, then persists the selection. Applies on the next scheduled transfer.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/stigg/openapi.documented.yml patch /api/v1/data-export/destinations/{destinationId}
openapi: 3.0.0
info:
  title: Stigg API
  description: Stigg API documentation
  version: 7.64.2
  contact: {}
servers:
  - url: https://api.stigg.io
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Operations related to customers
  - name: Subscriptions
    description: Operations related to subscriptions
  - name: Coupons
    description: Operations related to coupons
  - name: Bulk Import
    description: Operations related to import of customers and subscriptions
  - name: Usage
    description: Operations related to usage & metering
  - name: Promotional Entitlements
    description: Operations related to promotional entitlements
  - name: Products
    description: Operations related to products
  - name: Features
    description: Operations related to features
  - name: Addons
    description: Operations related to addons
  - name: Plans
    description: Operations related to plans
  - name: Credit grants
    description: Operations related to credit grants
  - name: Credit ledger
    description: Operations related to credit ledger
  - name: Custom currencies
    description: Operations related to custom currencies
paths:
  /api/v1/data-export/destinations/{destinationId}:
    patch:
      tags:
        - Data Export
      summary: Update data-export destination selection
      description: >-
        Update a destination's entity selection. Pushes the new enabled_models
        to the provider first, then persists the selection. Applies on the next
        scheduled transfer.
      operationId: DataExportController_updateDestinationSelection
      parameters:
        - name: destinationId
          required: true
          in: path
          description: Provider destination ID to update
          schema:
            minLength: 1
            maxLength: 255
            type: string
        - name: X-ACCOUNT-ID
          in: header
          description: >-
            Account ID — optional when authenticating with a user JWT (Bearer
            token); falls back to the user's first membership. Ignored for
            API-key auth.
          required: false
          schema:
            type: string
        - name: X-ENVIRONMENT-ID
          in: header
          description: >-
            Environment ID — required when authenticating with a user JWT
            (Bearer token) on environment-scoped endpoints. Ignored for API-key
            auth (env is intrinsic to the key).
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/UpdateDataExportDestinationSelectionRequestDto
      responses:
        '200':
          description: Current list of destinations under the DATA_EXPORT integration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExportDestinationListResponseDto'
              examples:
                default:
                  value:
                    data:
                      destinations:
                        - type: snowflake
                          connectedAt: '2026-06-04T12:00:00.000Z'
                          destinationId: dst_9f2a1c7b3e4d
                          connectionStatus: connected
                          lastSyncStatus:
                            transferId: transfer_4b8e2d1a
                            status: SUCCEEDED
                            finishedAt: '2026-06-04T12:30:00.000Z'
                            rowsTransferred: 1284
                          enabledModels: []
        '400':
          description: bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadInputErrorResponseDto'
        '401':
          description: User is not authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponseDto'
        '403':
          description: User is not allowed to access this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponseDto'
        '404':
          description: DataExport not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponseDto'
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponseDto'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Stigg from '@stigg/typescript';


            const client = new Stigg({
              apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
            });


            const destination = await
            client.v1.events.dataExport.destinations.update('x', {
              enabledModels: ['x'],
              integrationId: 'x',
            });


            console.log(destination.data);
        - lang: Python
          source: |-
            import os
            from stigg import Stigg

            client = Stigg(
                api_key=os.environ.get("STIGG_API_KEY"),  # This is the default and can be omitted
            )
            destination = client.v1.events.data_export.destinations.update(
                destination_id="x",
                enabled_models=["x"],
                integration_id="x",
            )
            print(destination.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stiggio/stigg-go\"\n\t\"github.com/stiggio/stigg-go/option\"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tdestination, err := client.V1.Events.DataExport.Destinations.Update(\n\t\tcontext.TODO(),\n\t\t\"x\",\n\t\tstigg.V1EventDataExportDestinationUpdateParams{\n\t\t\tEnabledModels: []string{\"x\"},\n\t\t\tIntegrationID: \"x\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", destination.Data)\n}\n"
        - lang: Java
          source: >-
            package io.stigg.example;


            import io.stigg.client.StiggClient;

            import io.stigg.client.okhttp.StiggOkHttpClient;

            import
            io.stigg.models.v1.events.dataexport.destinations.DestinationUpdateParams;

            import
            io.stigg.models.v1.events.dataexport.destinations.DestinationUpdateResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    StiggClient client = StiggOkHttpClient.fromEnv();

                    DestinationUpdateParams params = DestinationUpdateParams.builder()
                        .destinationId("x")
                        .addEnabledModel("x")
                        .integrationId("x")
                        .build();
                    DestinationUpdateResponse destination = client.v1().events().dataExport().destinations().update(params);
                }
            }
        - lang: Ruby
          source: >-
            require "stigg"


            stigg = Stigg::Client.new(api_key: "My API Key")


            destination = stigg.v1.events.data_export.destinations.update("x",
            enabled_models: ["x"], integration_id: "x")


            puts(destination)
        - lang: C#
          source: >-
            using System;

            using Stigg.Client;

            using Stigg.Client.Models.V1.Events.DataExport.Destinations;


            StiggClient client = new();


            DestinationUpdateParams parameters = new()

            {
                DestinationID = "x",
                EnabledModels =
                [
                    "x"
                ],
                IntegrationID = "x",
            };


            var destination = await
            client.V1.Events.DataExport.Destinations.Update(parameters);


            Console.WriteLine(destination);
        - lang: CLI
          source: |-
            stigg v1:events:data-export:destinations update \
              --api-key 'My API Key' \
              --destination-id x \
              --enabled-model x \
              --integration-id x
components:
  schemas:
    UpdateDataExportDestinationSelectionRequestDto:
      type: object
      properties:
        integrationId:
          type: string
          maxLength: 255
          minLength: 1
          description: Target integration row hosting the destination
        enabledModels:
          type: array
          items:
            type: string
            maxLength: 255
            minLength: 1
            description: >-
              Wire identifier of a data-export model to enable on this
              destination
          minItems: 1
      required:
        - integrationId
        - enabledModels
      additionalProperties: false
      title: UpdateDataExportDestinationSelectionRequest
      description: Update a destination's entity selection and push it to the provider.
    DataExportDestinationListResponseDto:
      type: object
      properties:
        data:
          type: object
          properties:
            destinations:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    maxLength: 255
                    description: Destination type (snowflake, bigquery, ...)
                  connectedAt:
                    type: string
                    maxLength: 255
                    description: ISO8601 timestamp of when the destination was connected
                  destinationId:
                    type: string
                    maxLength: 255
                    description: Provider destination ID
                  connectionStatus:
                    type: string
                    maxLength: 255
                    description: Connection status of the destination (connected, failed)
                  lastSyncStatus:
                    type: object
                    properties:
                      transferId:
                        type: string
                        maxLength: 255
                        description: Provider transfer ID of the latest sync
                      status:
                        type: string
                        maxLength: 255
                        description: >-
                          Sync status (PENDING, RUNNING, INCOMPLETE, FAILED,
                          SUCCEEDED, CANCELLED)
                      finishedAt:
                        type: string
                        maxLength: 255
                        description: ISO8601 timestamp of when the latest sync finished
                      rowsTransferred:
                        type: number
                        description: Number of rows transferred in the latest sync
                      blamedParty:
                        type: string
                        maxLength: 255
                        description: >-
                          Party responsible for a failed sync, as reported by
                          the data-export provider
                      failureMessage:
                        type: string
                        maxLength: 255
                        description: >-
                          Customer-friendly failure message, when the latest
                          sync failed
                    required:
                      - transferId
                      - status
                      - finishedAt
                    title: DataExportLastSyncStatus
                    description: >-
                      Latest sync snapshot for the destination, refreshed by the
                      provider webhook
                  enabledModels:
                    type: array
                    items:
                      type: string
                      maxLength: 255
                      description: >-
                        Wire identifier of a data-export model the destination
                        is configured to receive (omit the parent field for the
                        full catalog)
                required:
                  - type
                  - connectedAt
                  - destinationId
                title: DataExportDestination
                description: A single destination entry under the DATA_EXPORT integration.
              description: Current destinations under the DATA_EXPORT integration
          required:
            - destinations
          title: DataExportDestinationListResponse
          description: Current destinations under the DATA_EXPORT integration.
      required:
        - data
      title: Response
      description: Response object
    BadInputErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - BadUserInput
            - DuplicateIntegrationNotAllowed
            - EntityIsArchivedError
            - IntegrityViolation
            - FreePlanCantHaveCompatiblePackageGroupError
            - SubscriptionMustHaveSinglePlanError
            - AddonIsCompatibleWithPlan
            - AddonIsCompatibleWithGroup
            - DuplicateAddonProvisionedError
            - ScheduledMigrationAlreadyExistsError
            - SubscriptionAlreadyOnLatestPlan
            - EntityIdDifferentFromRefIdError
            - UnsupportedFeatureType
            - UnsupportedVendorIdentifier
            - UnsupportedSubscriptionScheduleType
            - InvalidEntitlementResetPeriod
            - IncompatibleSubscriptionAddon
            - UnPublishedPackage
            - MeteringNotAvailableForFeatureType
            - AuthCustomerMismatch
            - AuthCustomerReadonly
            - FetchAllCountriesPricesNotAllowed
            - MemberInvitationError
            - PlansCircularDependencyError
            - NoFeatureEntitlementInSubscription
            - CheckoutIsNotSupported
            - UnsupportedParameter
            - PricingModelNotSupportedByBillingIntegration
            - BillingIntegrationMissing
            - BillingIntegrationAlreadyExistsError
            - InvalidMemberDelete
            - PackageAlreadyPublished
            - DraftPlanCantBeArchived
            - DraftAddonCantBeArchived
            - PlanWithChildCantBeDeleted
            - PlanCannotBePublishWhenBasePlanIsDraft
            - PlanCannotBePublishWhenCompatibleAddonIsDraft
            - PlanIsUsedAsDefaultStartPlan
            - PlanIsUsedAsDowngradePlan
            - InvalidAddressError
            - InvalidQuantity
            - BillingPeriodMissingError
            - DowngradeBillingPeriodNotSupportedError
            - CustomerAlreadyUsesCouponError
            - CustomerAlreadyHaveCustomerCoupon
            - SubscriptionAlreadyCanceledOrExpired
            - TrialMustBeCancelledImmediately
            - SubscriptionDoesNotHaveBillingPeriod
            - InvalidCancellationDate
            - FailedToImportCustomer
            - FailedToImportSubscriptions
            - PackagePricingTypeNotSet
            - InvalidSubscriptionStatus
            - InvalidArgumentError
            - EditAllowedOnDraftPackageOnlyError
            - ResyncAlreadyInProgress
            - ArchivedCouponCantBeApplied
            - ImportAlreadyInProgress
            - AddonHasToHavePriceError
            - SelectedBillingModelDoesntMatchImportedItemError
            - CannotArchiveProductError
            - CannotUnarchiveProductError
            - CannotDeleteCustomerError
            - CannotRemovePaymentMethodFromCustomerError
            - CannotDeleteFeatureError
            - CannotArchiveFeatureError
            - InvalidUpdatePriceUnitAmountError
            - ExperimentAlreadyRunning
            - ExperimentStatusError
            - OperationNotAllowedDuringInProgressExperiment
            - EntitlementsMustBelongToSamePackage
            - CanNotUpdateEntitlementsFeatureGroup
            - MeterMustBeAssociatedToMeteredFeature
            - CannotEditPackageInNonDraftMode
            - CannotAddOverrideEntitlementToPlan
            - MissingEntityIdError
            - NoProductsAvailable
            - PromotionCodeNotForCustomer
            - PromotionCodeNotActive
            - PromotionCodeMaxRedemptionsReached
            - PromotionCodeMinimumAmountNotReached
            - PromotionCodeCustomerNotFirstPurchase
            - AddonWithDraftCannotBeDeletedError
            - CannotReportUsageForEntitlementWithMeterError
            - RecalculateEntitlementsError
            - ImportSubscriptionsBulkError
            - InvalidMetadataError
            - CannotUpsertToPackageThatHasDraft
            - IntegrationValidationError
            - AwsMarketplaceIntegrationValidationError
            - AwsMarketplaceIntegrationError
            - DataExportIntegrationError
            - HubspotIntegrationError
            - DuplicateProductValidationError
            - AmountTooLarge
            - CustomerHasNoEmailAddress
            - MergeEnvironmentValidationError
            - EntitlementLimitExceededError
            - EntitlementUsageOutOfRangeError
            - UsageMeasurementDiffOutOfRangeError
            - AddonQuantityExceedsLimitError
            - AddonDependencyMissingError
            - PackageGroupMinItemsError
            - CannotUpdateUnitTransformationError
            - SingleSubscriptionCantBeAutoCancellationTargetError
            - MultiSubscriptionCantBeAutoCancellationSourceError
            - ChangingPayingCustomerIsNotSupportedError
            - RequiredSsoAuthenticationError
            - InvalidDoggoSignatureError
            - InvalidReceivedSignatureError
            - CannotDeleteDefaultIntegration
            - CannotChangeBillingIntegration
            - FailedToResolveBillingIntegration
            - WorkflowTriggerNotFound
            - DeprecatedEstimateSubscriptionError
            - FeatureConfigurationExceededLimitError
            - FeatureNotBelongToFeatureGroupError
            - FeatureGroupMissingFeaturesError
            - VersionExceedsMaxValueError
            - CannotUpdateExpireAtForExpiredCreditGrantError
            - ExpireAtMustBeLaterThanEffectiveAtError
            - OfferAlreadyExists
            - DraftAlreadyExists
            - CreditGrantAlreadyVoided
            - CreditGrantCannotBeVoided
            - InvalidTaxId
            - ObjectAlreadyBeingUsedByAnotherRequestError
            - TooManySubscriptionsPerCustomer
            - TooManyCustomCurrencies
            - StripeError
            - SchedulingAtEndOfBillingPeriod
            - ApiKeyExpired
            - ApiKeyHasExpiry
          nullable: true
      required:
        - message
        - code
    UnauthenticatedErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - Unauthenticated
          nullable: true
      required:
        - message
        - code
    ForbiddenErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - IdentityForbidden
            - AccessDeniedError
            - NoFeatureEntitlementError
          nullable: true
      required:
        - message
        - code
    NotFoundErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - CustomerNotFound
            - CustomCurrencyNotFound
            - CreditGrantNotFound
            - MemberNotFound
            - PackageGroupNotFound
            - AddonNotFound
            - AddonsNotFound
            - EnvironmentMissing
            - IntegrationNotFound
            - VendorIsNotSupported
            - CouponNotFound
            - FutureUpdateNotFound
            - CustomerNoBillingId
            - SubscriptionNoBillingId
            - StripeCustomerIsDeleted
            - InitStripePaymentMethodError
            - PreparePaymentMethodFormError
            - AccountNotFoundError
            - ExperimentNotFoundError
            - NoDraftOfferFound
            - PromotionCodeNotFound
            - FailedToCreateCheckoutSessionError
            - PaymentMethodNotFoundError
            - ProductNotFoundError
            - ProductNotPublishedError
            - MissingBillingInvoiceError
            - BillingInvoiceStatusError
            - FeatureGroupNotFoundError
            - CannotArchiveFeatureGroupError
            - OfferNotFound
            - CustomerResourceNotFound
            - FeatureNotFound
            - PriceNotFound
            - NoActiveSubscriptionForCustomer
            - PlanNotFound
            - PromotionalEntitlementNotFoundError
            - SubscriptionNotFound
            - ApiKeyNotFound
          nullable: true
      required:
        - message
        - code
    TooManyRequestsErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - RateLimitExceeded
          nullable: true
      required:
        - message
        - code
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Server API Key

````