Codat Settings API

Manage company profile configuration, sync settings, and API keys.

OpenAPI Specification

codat-settings-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Bank Feeds Account mapping Settings API
  version: 3.0.0
  contact:
    email: support@codat.io
    name: Codat
  description: 'Bank Feeds solution enables your SMB users to set up bank feeds from accounts in your application to supported accounting software.


    A bank feed is a connection between a source bank account in your application and a target bank account in a supported accounting software.


    [Explore solution](https://docs.codat.io/bank-feeds-api/overview) | [See OpenAPI spec](https://github.com/codatio/oas)


    ---

    <!-- Start Codat Tags Table -->

    ## Endpoints


    | Endpoints | Description |

    | :- |:- |

    | Companies | Create and manage your SMB users'' companies. |

    | Connections | Create new and manage existing data connections for a company. |

    | Source accounts | Provide and manage lists of source bank accounts. |

    | Account mapping | Extra functionality for building an account management UI. |

    | Company information | Get detailed information about a company from the underlying platform. |

    | Transactions | Create new bank account transactions for a company''s connections, and see previous operations. |

    <!-- End Codat Tags Table -->'
  termsOfService: https://www.codat.io/legals/
servers:
- description: Production
  url: https://api.codat.io
security:
- auth_header: []
tags:
- name: Settings
  description: Manage company profile configuration, sync settings, and API keys.
paths:
  /connectionManagement/corsSettings:
    get:
      summary: Get CORS settings (old)
      operationId: get-connection-management-cors-settings
      x-speakeasy-group: cors
      deprecated: true
      x-speakeasy-deprecation-message: 'The new [Get CORS settings](https://docs.codat.io/platform-api#/operations/get-cors-settings) endpoint replaces this endpoint and includes additional functionality.

        Update your integrations to use the new path `/corsSettings` as the existing route will be removed in a future release.

        '
      x-speakeasy-deprecation-replacement: get-cors-settings
      tags:
      - Settings
      description: "\uFEFFThe *Get CORS settings* endpoint returns the allowed origins (i.e. your domains) you want to allow cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)) with Codat. \n\nEnabling CORS with Codat is required by our embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to access Codat's API endpoints."
      responses:
        '200':
          $ref: '#/components/responses/ConnectionManagementAllowedOrigins'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/Not-Found'
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
    post:
      summary: Set CORS settings (old)
      operationId: set-connection-management-cors-settings
      x-speakeasy-name-override: set
      x-speakeasy-group: cors
      deprecated: true
      x-speakeasy-deprecation-message: 'The new [Set CORS settings](https://docs.codat.io/platform-api#/operations/set-cors-settings) endpoint replaces this endpoint and includes additional functionality.

        Update your integrations to use the new path `/corsSettings` as the existing route will be removed in a future release.

        '
      x-speakeasy-deprecation-replacement: set-cors-settings
      tags:
      - Settings
      description: "\uFEFFThe *Set CORS settings* endpoint allows you to register allowed origins (i.e. your domains) for use in cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).\n \nEnabling CORS with Codat is required by our embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to access Codat's API endpoints. "
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionManagementAllowedOrigins'
            examples:
              Allowed origins:
                $ref: '#/components/examples/connectionManagementAllowedOriginsResponse'
      responses:
        '200':
          $ref: '#/components/responses/ConnectionManagementAllowedOrigins'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/Not-Found'
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
  /corsSettings:
    get:
      summary: Get CORS settings
      operationId: get-cors-settings
      tags:
      - Settings
      description: "\uFEFFThe *Get CORS settings* endpoint returns the allowed origins (i.e. your domains) you want to allow cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)) with Codat. \n\nEnabling CORS with Codat is required by our embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to access Codat's API endpoints."
      responses:
        '200':
          $ref: '#/components/responses/ConnectionManagementAllowedOrigins'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/Not-Found'
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
    post:
      summary: Set CORS settings
      operationId: set-cors-settings
      x-speakeasy-name-override: set
      tags:
      - Settings
      description: "\uFEFFThe *Set CORS settings* endpoint allows you to register allowed origins (i.e. your domains) for use in cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).\n \nEnabling CORS with Codat is required by our embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to access Codat's API endpoints."
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionManagementAllowedOrigins'
            examples:
              Allowed origins:
                $ref: '#/components/examples/connectionManagementAllowedOriginsResponse'
      responses:
        '200':
          $ref: '#/components/responses/ConnectionManagementAllowedOrigins'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/Not-Found'
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
  /profile:
    get:
      summary: Get profile
      tags:
      - Settings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Profile'
              examples: {}
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
      operationId: get-profile
      x-speakeasy-name-override: get-profile
      description: Fetch your Codat profile.
    put:
      summary: Update profile
      operationId: update-profile
      x-speakeasy-name-override: update-profile
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Profile'
              examples: {}
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
      tags:
      - Settings
      description: Update your Codat profile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Profile'
            examples: {}
        description: All fields should be included when updating your profile.
  /profile/syncSettings:
    get:
      summary: Get sync settings
      tags:
      - Settings
      operationId: get-profile-syncSettings
      x-speakeasy-name-override: get-sync-settings
      description: Retrieve the [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for your client. This includes how often data types should be queued to be updated, and how much history should be fetched.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncSettings'
              examples:
                Example:
                  value:
                    clientId: 367f7975-267b-439b-90c6-a6040ee680f3
                    settings:
                    - dataType: invoices
                      fetchOnFirstLink: true
                      syncSchedule: 24
                      syncOrder: 0
                      syncFromUtc: '2020-01-01T12:00:00.000Z'
                      syncFromWindow: 24
                      monthsToSync: 24
                      isLocked: true
                    overridesDefaults: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
    post:
      summary: Update all sync settings
      description: Update sync settings for all data types.
      tags:
      - Settings
      operationId: update-profile-syncSettings
      x-speakeasy-name-override: update-sync-settings
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - properties:
                  clientId:
                    $ref: '#/components/schemas/ClientId'
                  settings:
                    type: array
                    items:
                      $ref: '#/components/schemas/SyncSetting'
                  overridesDefaults:
                    type: boolean
                    default: true
                    description: Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).
                required:
                - clientId
                - settings
                - overridesDefaults
              type: object
        description: 'Include a `syncSetting` object for each data type.

          `syncFromWindow`, `syncFromUTC` & `monthsToSync` only need to be included if you wish to set a value for them.'
  /apiKeys:
    get:
      summary: List API keys
      description: 'Use the *List API keys* endpoint to return a list of all API keys that currently exist for your client. This includes keys created via the Portal UI or the *Create API keys* endpoint.


        [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key.


        You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API.'
      operationId: list-api-keys
      x-speakeasy-name-override: list-api-keys
      tags:
      - Settings
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeys'
              examples:
                Example:
                  value:
                    results:
                    - id: 0498e921-9b53-4396-a412-4f2f5983b0a2
                      apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd
                      createdDate: '2022-04-11T13:49:37Z'
                    - id: c438836a-61fe-443f-8a19-24cc18be21e4
                      name: azure-invoice-finance-processor
                      apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd
                      createdDate: '2022-04-23T09:43:48Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
    post:
      summary: Create API key
      operationId: create-api-key
      x-speakeasy-name-override: create-api-key
      description: "Use the *Create API keys* endpoint to generate a new API key for your client.\n\n[API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word \"Basic\" and a space with your API key.\n\nYou can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API.\n\n### Tips and pitfalls\n\n* Your first API key is created for you. Access this key via [Codat's Portal](https://app.codat.io/developers/api-keys).\n* If you require multiple API keys, perform multiple calls to the *Create API keys* endpoint. \n* The number of API keys is limited to 10. If you have reached the maximum amount of keys, use the *Delete API key* endpoint to delete an unused key first."
      tags:
      - Settings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKey'
            examples:
              Create API key with name:
                value:
                  name: azure-invoice-finance-processor
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyDetails'
              examples:
                API key details:
                  value:
                    id: 0498e921-9b53-4396-a412-4f2f5983b0a2
                    apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd
                    createdDate: '2022-04-11T13:49:37Z'
                API key details with name:
                  value:
                    id: 0498e921-9b53-4396-a412-4f2f5983b0a2
                    name: azure-invoice-finance-processor
                    apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd
                    createdDate: '2022-04-11T13:49:37Z'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Max length for name reached:
                  value:
                    statusCode: 400
                    service: PublicApi
                    error: Max string length (50) for `name` reached.
                    correlationId: bc997528a9d7abb9161ef45f05d38599
                    canBeRetried: Unknown
                    detailedErrorCode: 0
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Max length for name reached:
                  value:
                    statusCode: 400
                    service: PublicApi
                    error: Maximum number of API keys reached. To create a new API key, delete an unused key and try again.
                    correlationId: bc997528a9d7abb9161ef45f05d38599
                    canBeRetried: Unknown
                    detailedErrorCode: 0
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
  /apiKeys/{apiKeyId}:
    delete:
      summary: Delete API key
      operationId: delete-api-key
      x-speakeasy-name-override: delete-api-key
      parameters:
      - name: apiKeyId
        in: path
        required: true
        schema:
          type: string
          example: 8a210b68-6988-11ed-a1eb-0242ac120002
        description: Unique identifier for api key.
      description: 'Use the *Delete API keys* endpoint to delete an existing API key, providing its valid `id` as a parameter. Note that this operation is not reversible.


        [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key.


        You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API.


        ### Tips and pitfalls


        * It is possible to delete the last remaining API key. If this happens, a new key can be created via the [API key management page](https://app.codat.io/developers/api-keys) of the Portal.

        * It is possible to delete the API key used to authenticate the *Delete API key* request.'
      tags:
      - Settings
      responses:
        '204':
          description: No Content
          $ref: '#/components/responses/Too-Many-Requests'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/Payment-Required'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/Not-Found'
        '429':
          $ref: '#/components/responses/Too-Many-Requests'
        '500':
          $ref: '#/components/responses/Internal-Server-Error'
        '503':
          $ref: '#/components/responses/Service-Unavailable'
components:
  schemas:
    DateTime:
      title: Date time
      type: string
      examples:
      - '2022-10-23T00:00:00Z'
      - '2022-10-23'
      description: "In Codat's data model, dates and times are represented using the <a class=\"external\" href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:\n\n```\n2020-10-08T22:40:50Z\n2021-01-01T00:00:00\n```\n\n\n\nWhen syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:\n\n- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`\n- Unqualified local time: `2021-11-15T01:00:00`\n- UTC time offsets: `2021-11-15T01:00:00-05:00`\n\n> Time zones\n> \n> Not all dates from Codat will contain information about time zones.  \n> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced."
    ClientId:
      title: Client ID
      type: string
      format: uuid
      description: Unique identifier for your client in Codat.
    ConnectionManagementAllowedOrigins:
      title: Allowed origins
      type: object
      properties:
        allowedOrigins:
          type: array
          description: An array of allowed origins (i.e. your domains) to permit cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).n resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).
          items:
            type: string
            format: uri
            description: A domain you want to allow CORS with Codat.
      example:
        allowedOrigins:
        - https://www.bank-of-dave.com
    SyncSetting:
      title: SyncSetting
      description: Describes how often, and how much history, should be fetched for the given data type when a pull operation is queued.
      examples:
      - dataType: invoices
        fetchOnFirstLink: true
        syncSchedule: 24
        syncOrder: 0
        syncFromUtc: '2020-01-01T12:00:00.000Z'
        syncFromWindow: 24
        monthsToSync: 24
        isLocked: true
      type: object
      properties:
        dataType:
          $ref: '#/components/schemas/DataStatus/properties/dataType'
        fetchOnFirstLink:
          type: boolean
          description: Whether this data type should be queued after a company has authorized a connection.
        syncSchedule:
          type: integer
          example: 24
          description: Number of hours after which this data type should be refreshed.
        syncOrder:
          type: integer
          description: The sync in which data types are queued for a sync.
        syncFromUtc:
          $ref: '#/components/schemas/DateTime'
          description: Date from which data should be fetched. Set this *or* `syncFromWindow`.
        syncFromWindow:
          type: integer
          example: 24
          description: Number of months of data to be fetched. Set this *or* `syncFromUTC`.
        monthsToSync:
          type: integer
          example: 24
          description: Months of data to fetch, for report data types (`balanceSheet` & `profitAndLoss`) only.
        isLocked:
          type: boolean
          description: '`True` if the [sync setting](https://docs.codat.io/knowledge-base/advanced-sync-settings) is locked.'
      required:
      - dataType
      - fetchOnFirstLink
      - syncSchedule
      - syncOrder
    DataStatus:
      title: Data status
      description: Describes the state of data in the Codat cache for a company and data type
      type: object
      required:
      - dataType
      - currentStatus
      properties:
        dataType:
          title: Data types
          x-internal: true
          type: string
          description: Available data types
          enum:
          - accountTransactions
          - balanceSheet
          - bankAccounts
          - bankTransactions
          - billCreditNotes
          - billPayments
          - bills
          - cashFlowStatement
          - chartOfAccounts
          - company
          - creditNotes
          - customers
          - directCosts
          - directIncomes
          - invoices
          - itemReceipts
          - items
          - journalEntries
          - journals
          - paymentMethods
          - payments
          - profitAndLoss
          - purchaseOrders
          - salesOrders
          - suppliers
          - taxRates
          - trackingCategories
          - transfers
          - banking-accountBalances
          - banking-accounts
          - banking-transactionCategories
          - banking-transactions
          - commerce-companyInfo
          - commerce-customers
          - commerce-disputes
          - commerce-locations
          - commerce-orders
          - commerce-paymentMethods
          - commerce-payments
          - commerce-productCategories
          - commerce-products
          - commerce-taxComponents
          - commerce-transactions
          example: invoices
        lastSuccessfulSync:
          $ref: '#/components/schemas/DateTime'
        currentStatus:
          $ref: '#/components/schemas/PullOperation/properties/status'
        latestSyncId:
          type: string
          description: Unique identifier for most recent sync of data type.
          format: uuid
          example: ad474a37-2003-478e-baee-9af9f1ec2fe3
        latestSuccessfulSyncId:
          type: string
          description: Unique identifier for the most recent successful sync of data type.
          format: uuid
          example: 8220fc90-55b6-47bc-9417-48ac6ea93101
      examples:
      - dataType: string
        lastSuccessfulSync: '2022-01-01T13:00:00.000Z'
        currentStatus: string
        latestSyncId: ad474a37-2003-478e-baee-9af9f1ec2fe3
        latestSuccessfulSyncId: 8220fc90-55b6-47bc-9417-48ac6ea93101
    ApiKeyDetails:
      title: API key details
      description: Details of the API key.
      type: object
      allOf:
      - properties:
          id:
            type: string
            description: Unique identifier for the API key.
            example: e288a972-b402-4b21-93f9-b5335ae5679c
          name:
            type: string
            maxLength: 50
            nullable: true
            description: A meaningful name assigned to the API key.
            example: azure-invoice-finance-processor
          apiKey:
            type: string
            description: The API key value used to make authenticated http requests.
            example: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd
      - nullable: true
        description: Datetime in UTC the API key was created. The created date will be null if the API key created before YYYY-MM-DD.
        title: Created date
        type: object
        x-internal: true
        properties:
          createdDate:
            $ref: '#/components/schemas/DateTime'
            description: The date the entity was created.
    ApiKeys:
      title: API keys
      x-internal: true
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/ApiKeyDetails'
    ErrorMessage:
      title: Error message
      type: object
      x-internal: true
      properties:
        statusCode:
          type: integer
          description: The HTTP status code returned by the error.
        service:
          type: string
          description: Codat's service the returned the error.
        error:
          type: string
          description: A brief description of the error.
        correlationId:
          type: string
          description: Unique identifier used to propagate to all downstream services and determine the source of the error.
        validation:
          $ref: '#/components/schemas/ErrorMessage/definitions/errorValidation'
        canBeRetried:
          type: string
          description: '`True` if the error occurred transiently and can be retried.'
        detailedErrorCode:
          type: integer
          description: Machine readable error code used to automate processes based on the code returned.
      definitions:
        errorValidation:
          title: Validation error
          type: object
          nullable: true
          description: A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here.
          properties:
            errors:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem'
            warnings:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/ErrorMessage/definitions/errorValidationItem'
        errorValidationItem:
          title: Validation error item
          type: object
          properties:
            itemId:
              type: string
              nullable: true
              description: Unique identifier for a validation item.
            message:
              type: string
              nullable: true
              description: A message outlining validation item's issue.
            validatorName:
              type: string
              nullable: true
              description: Name of validator.
    CreateApiKey:
      title: Create API key
      description: Details about the newly created API key.
      x-internal: true
      type: object
      properties:
        name:
          $ref: '#/components/schemas/ApiKeyDetails/allOf/0/properties/name'
    SyncSettings:
      title: Sync settings
      x-internal: true
      type: object
      properties:
        clientId:
          $ref: '#/components/schemas/ClientId'
        settings:
          type: array
          items:
            $ref: '#/components/schemas/SyncSetting'
        overridesDefaults:
          type: boolean
          description: Set to `True` if you want to override the default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).
    Profile:
      title: Profile
      description: Describes your Codat client instance
      examples:
      - name: Bob's Burgers
        logoUrl: https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png
        iconUrl: https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico
        redirectUrl: https://bobs-burgers.{countrySuffix}/{companyId}
        whiteListUrls:
        - https://bobs-burgers.com
        - https://bobs-burgers.co.uk
        confirmCompanyName: true
      type: object
      properties:
        name:
          type: string
          example: Bob's Burgers
          description: The name given to the instance.
        logoUrl:
          type: string
          description: Static url to your organization's logo.
          example: https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png
        iconUrl:
          type: string
          description: Static url to your organization's icon.
          example: https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico
        redirectUrl:
          type: string
          example: https://bobs-burgers.{countrySuffix}/{companyId}
          description: The redirect URL pasted on to the SMB once Codat's [Hosted Link](https://docs.codat.io/auth-flow/authorize-hosted-link) has been completed by the SMB.
        whiteListUrls:
          type: array
          description: A list of urls that are allowed to 

# --- truncated at 32 KB (40 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/codat/refs/heads/main/openapi/codat-settings-api-openapi.yml