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

# Get all automations

> Retrieve all recurring investment and savings automations for a user.



## OpenAPI

````yaml GET /automations
openapi: 3.0.3
info:
  title: Wealthyhood Automations API
  version: 1.0.0
  description: >
    Recurring investment automation endpoints for Wealthyhood portfolios.


    All requests use machine-to-machine (M2M) authentication. Each request
    requires:

    - A bearer access token (M2M token with required scopes)

    - An `x-user-id` header to specify which user's data to access


    **Note:** Only `TopUpAutomation` (recurring investments) and
    `SavingsTopUpAutomation` (recurring savings top-ups) are currently supported
    in the API.
servers:
  - url: https://{host}
    variables:
      host:
        default: api.wealthyhood.com
        description: Wealthyhood API host name.
security:
  - bearerAuth: []
tags:
  - name: Automations
    description: Manage recurring investment automations for users.
paths:
  /automations:
    get:
      tags:
        - Automations
      summary: Get all automations
      description: >
        Retrieve all recurring investment automations for the authenticated
        user. Returns a list 

        of automations with their configuration, status, and linked mandate
        information.
      parameters:
        - $ref: '#/components/parameters/XUserId'
      responses:
        '200':
          description: List of automations retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsListResponse'
              example:
                data:
                  - id: 7501d8537fb3fc001234abcd
                    category: TopUpAutomation
                    status: Active
                    frequency: monthly
                    dayOfMonth: 15
                    currency: EUR
                    amount: 100
                    allocationMethod: holdings
                    mandate:
                      id: 7501d8537fb3fc001234efgh
                      status: Active
                      bankAccountId: 7501d8537fb3fc001234ijkl
                  - id: 7501d8537fb3fc001234mnop
                    category: SavingsTopUpAutomation
                    status: Active
                    frequency: monthly
                    dayOfMonth: 1
                    currency: EUR
                    amount: 50
                    savingsProduct: mmf_dist_eur
                    mandate:
                      id: 7501d8537fb3fc001234qrst
                      status: Active
                      bankAccountId: 7501d8537fb3fc001234ijkl
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
components:
  parameters:
    XUserId:
      name: x-user-id
      in: header
      required: true
      description: >-
        User identifier for the M2M client to specify which user's data to
        access.
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
  schemas:
    AutomationsListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Automation'
    Automation:
      oneOf:
        - $ref: '#/components/schemas/TopUpAutomation'
        - $ref: '#/components/schemas/SavingsTopUpAutomation'
      discriminator:
        propertyName: category
        mapping:
          TopUpAutomation:
            $ref: '#/components/schemas/TopUpAutomation'
          SavingsTopUpAutomation:
            $ref: '#/components/schemas/SavingsTopUpAutomation'
    ApiErrorResponse:
      type: object
      properties:
        status:
          type: integer
        error:
          type: object
          properties:
            message:
              type: string
            description:
              type: string
              nullable: true
        responseId:
          type: string
          format: uuid
    TopUpAutomation:
      type: object
      required:
        - id
        - category
        - status
        - frequency
        - dayOfMonth
        - currency
        - amount
        - allocationMethod
        - mandate
      properties:
        id:
          type: string
          description: Automation identifier.
        category:
          type: string
          enum:
            - TopUpAutomation
        status:
          type: string
          description: |
            Current status of the automation:
            - `Active`: Automation is active and will execute on schedule
            - `Inactive`: Automation has been cancelled
            - `Pending`: Automation is waiting to be activated
          enum:
            - Active
            - Inactive
            - Pending
        frequency:
          type: string
          description: >-
            How often the automation runs. Currently only `monthly` is
            supported.
          enum:
            - monthly
        dayOfMonth:
          type: integer
          description: |
            Day of the month for recurring investment scheduling.
        currency:
          type: string
          description: ISO 4217 currency code for the recurring investment.
        amount:
          type: number
          format: double
          description: Amount invested each month.
        consideration:
          type: object
          description: Automation consideration with currency and amount
          properties:
            currency:
              type: string
              description: ISO 4217 currency code
              example: EUR
              enum:
                - GBP
                - EUR
                - USD
            amount:
              type: number
              format: double
              description: Amount invested each month in major units
              example: 100
              minimum: 0
        allocationMethod:
          type: string
          description: >
            How funds are allocated. In B2B, this is always `holdings`
            (proportional to 

            existing holdings).
          enum:
            - holdings
        mandate:
          $ref: '#/components/schemas/Mandate'
    SavingsTopUpAutomation:
      type: object
      required:
        - id
        - category
        - status
        - frequency
        - dayOfMonth
        - currency
        - amount
        - savingsProduct
        - mandate
      properties:
        id:
          type: string
          description: Automation identifier.
        category:
          type: string
          enum:
            - SavingsTopUpAutomation
        status:
          type: string
          description: |
            Current status of the automation:
            - `Active`: Automation is active and will execute on schedule
            - `Inactive`: Automation has been cancelled
            - `Pending`: Automation is waiting to be activated
          enum:
            - Active
            - Inactive
            - Pending
        frequency:
          type: string
          description: >-
            How often the automation runs. Currently only `monthly` is
            supported.
          enum:
            - monthly
        dayOfMonth:
          type: integer
          description: Day of the month when the recurring savings top-up is collected.
        currency:
          type: string
          description: ISO 4217 currency code for the recurring savings top-up.
        amount:
          type: number
          format: double
          description: Amount added to savings each month.
        consideration:
          type: object
          description: Automation consideration with currency and amount
          properties:
            currency:
              type: string
              description: ISO 4217 currency code
              example: EUR
              enum:
                - GBP
                - EUR
                - USD
            amount:
              type: number
              format: double
              description: Amount added to savings each month in major units
              example: 50
              minimum: 0
        savingsProduct:
          type: string
          description: >
            The savings product ID where funds are deposited. Currently set to
            `mmf_dist_eur` 

            (Euro money market fund) for all SavingsTopUpAutomation automations.
          example: mmf_dist_eur
        mandate:
          $ref: '#/components/schemas/Mandate'
    Mandate:
      type: object
      description: Direct debit mandate information linked to the automation.
      properties:
        id:
          type: string
          description: Mandate identifier.
        status:
          type: string
          description: |
            Current status of the mandate:
            - `Pending`: Mandate is being set up with the payment provider
            - `Active`: Mandate is active and can be used for payments
            - `Inactive`: Mandate has been cancelled or failed
          enum:
            - Pending
            - Active
            - Inactive
        bankAccountId:
          type: string
          description: ID of the bank account linked to this mandate.
  responses:
    UnauthorizedError:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 401
            error:
              message: User not found
            responseId: 145f2b0d-1d5b-4e91-8d0d-7af0ae9ad13a
    ForbiddenError:
      description: Authenticated user cannot act on the requested resource or lacks scopes.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 403
            error:
              message: You do not have access to this bank account
            responseId: 5e467f79-c62c-4d83-9810-7a0f8529fd76
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Auth0-issued access token that includes the scopes listed for the
        endpoint.

````