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

# /SetScheduledRefresh

> Enable or disable nightly refreshes for a specific account.

Nightly refreshes is a feature that's available for customer accounts that are already linked via Flinks Connect. It refreshes account data each night, which provides increased visibility into the accounts that you choose to set this up for. Enable nightly refreshes if you need to see current account balances and most recent transactions.

Use the `/SetScheduledRefresh` endpoint to set up nightly refreshes for a specific account. You can also use this endpoint to disable nightly refreshes for a specific account, typically required if the account becomes inactive in your system.

If a particular account is not refreshing each night, use the [/GetNightlyRefreshStatus](./get-nightly-refresh-status) endpoint to determine why this is happening.


## OpenAPI

````yaml PATCH /v3/{customerId}/BankingServices/SetScheduledRefresh
openapi: 3.0.3
info:
  title: Flinks API
  description: >
    Flinks API provides financial data connectivity, enrichment, and payment
    solutions.


    ## Authentication

    Endpoints require authentication using `flinks-auth-key` header (Bearer
    token).


    For more information, visit: https://docs.flinks.com
  version: 3.0.0
  contact:
    name: Flinks Support
    url: https://www.flinks.com/contact/sales
  termsOfService: https://www.flinks.com
servers:
  - url: https://{instance}-api.private.fin.ag
    description: Flinks API Environment
    variables:
      instance:
        default: toolbox
        description: The environment instance (e.g., toolbox, sandbox, production)
security: []
tags:
  - name: Authorization
    description: Endpoints for generating authorization tokens and authenticating requests
  - name: Enrich - Consumer Attributes
    description: Consumer financial attribute analysis and credit risk assessment
paths:
  /v3/{customerId}/BankingServices/SetScheduledRefresh:
    patch:
      tags:
        - Connect
      summary: Set Scheduled Refresh
      description: Enable or disable nightly refreshes for a specific account.
      operationId: setScheduledRefresh
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
            default: 43387ca6-0391-4c82-857d-70d95f087ecb
          description: Unique GUID provided by Flinks.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - isActivated
              properties:
                loginId:
                  type: string
                  description: Access Token that's associated with a customer account.
                isActivated:
                  type: boolean
                  default: false
                  description: Enabled or disabled (true or false).
              example:
                isActivated: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: string
                description: Confirmation message.
              example: >-
                LoginId bb8b8569-3bfc-43c1-ae31-08d6decf1675 has now been
                activated for automatic refresh
        '400':
          description: Invalid Login
          content:
            application/json:
              schema:
                type: object
                properties:
                  HttpStatusCode:
                    type: integer
                    description: HTTP status code of the response.
                  Message:
                    type: string
                    description: Error message describing the issue.
                  FlinksCode:
                    type: string
                    description: 'Flinks-specific error code: INVALID_LOGIN.'
              example:
                HttpStatusCode: 400
                Message: We couldn't trace the source of this request.
                FlinksCode: INVALID_LOGIN

````