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

# Customer Automation Campaigns

> Retrieve available automation campaigns for the customer, including onboarding journeys, engagement triggers, or milestone-based campaigns.

This API retrieves the available automation campaigns for the customer, identified by `customerId`. The response includes details of campaigns currently active and applicable to the customer, such as onboarding journeys, engagement triggers, or milestone-based campaigns. Specific campaign types can be filtered, including campaigns like **Welcome Campaigns**, **Ramadan Campaign**, and **Custom Automations**, offering a comprehensive view of personalized campaigns available for the customer.

<Info>
  **Security**: Requires **apikey** header.
</Info>


## OpenAPI

````yaml GET /api/v4.0/integrations/customers/{customerId}/automation
openapi: 3.1.0
info:
  title: Gameball API
  description: >-
    Gameball REST API v4.0 - Complete API reference for integrating loyalty,
    gamification, and customer engagement features
  version: 4.0.0
servers:
  - url: https://api.gameball.co
security:
  - bearerAuth: []
paths:
  /api/v4.0/integrations/customers/{customerId}/automation:
    get:
      summary: Get Customer Automation Campaigns
      description: >-
        This API retrieves the available automation campaigns for the customer,
        identified by customerId. The response includes details of campaigns
        currently active and applicable to the customer, such as onboarding
        journeys, engagement triggers, or milestone-based campaigns. Specific
        campaign types can be filtered, including campaigns like Welcome
        Campaigns, Ramadan Campaign, and Custom Automations, offering a
        comprehensive view of personalized campaigns available for the customer.
      operationId: getCustomerAutomationCampaigns
      parameters:
        - name: customerId
          in: path
          required: true
          description: >-
            Unique identifier for the customer that you can reference across the
            customer's whole lifetime. Could be a database ID, random string,
            email, or anything that uniquely identifies the customer.
          schema:
            type: string
        - name: campaignType
          in: query
          required: false
          schema:
            type: string
            enum:
              - mission
              - all
            default: mission
          description: >-
            Filters automation steps by a specific type, such as: mission
            (return steps for mission-based campaigns, default), all (return all
            automation steps and details).
      responses:
        '200':
          description: Customer automation campaigns found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerAutomationCampaignsResponse'
      security:
        - apiKey: []
components:
  schemas:
    CustomerAutomationCampaignsResponse:
      type: object
      properties:
        campaigns:
          type: array
          description: A list of campaigns containing automation workflows
          items:
            type: object
            properties:
              automation:
                type: array
                description: A list of automation workflows within a campaign
                items:
                  type: object
                  properties:
                    order:
                      type: number
                      description: The order in which this automation appears
                    name:
                      type: string
                      description: The internal name of the automation workflow
                    isUnlocked:
                      type: boolean
                      description: Whether this automation is unlocked
                    completed:
                      type: boolean
                      description: Whether the automation has been fully completed
                    steps:
                      type:
                        - array
                        - 'null'
                      description: List of steps involved in completing the automation.
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            description: >-
                              The type of step, for example rewarding a badge or
                              adding points.
                          order:
                            type: number
                            description: >-
                              The order of this step within the automation
                              sequence.
                          completed:
                            type: boolean
                            description: Whether this step has been completed or not.
                          configuration:
                            type:
                              - object
                              - 'null'
                            description: >-
                              Configuration details for the step, such as badge
                              name & icon.
                            additionalProperties: true
                    completionPercentage:
                      type: number
                      description: Percentage of completion for the automation
              automationCount:
                type: number
                description: Total number of automations available within this campaign
        count:
          type: number
          description: The total number of automation campaigns available
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: apikey

````