# Execute a custom earning flow for a customer

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/programs/{programId}/custom-earning-flows/{earningFlowId}/execute:
    post:
      summary: Execute a custom earning flow for a customer
      deprecated: false
      description: >-
        earningFlowId may be the program engagement flow UUID or its
        EngagementFlowType name (e.g. CUSTOM_1). Auth: an API key targets any
        customer via body customerEmail; a customer JWT executes the flow for
        the authenticated customer.
      operationId: CustomerActionsController_executeCustomEarningFlow_v1
      tags:
        - Customers
        - Customer Actions
      parameters:
        - name: programId
          in: path
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: earningFlowId
          in: path
          description: ''
          required: true
          example: ''
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteCustomEarningFlowDto'
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecuteCustomEarningFlowResponseDto'
          headers: {}
          x-apidog-name: ''
      security:
        - bearer: []
          x-apidog:
            schemeGroups:
              - id: bmJBcjDgcIDqBaN0x1QeH
                schemeIds:
                  - bearer
              - id: l6rzhIJF8SntPkLA7XEOQ
                schemeIds:
                  - api-key
            required: true
            use:
              id: bmJBcjDgcIDqBaN0x1QeH
            scopes:
              l6rzhIJF8SntPkLA7XEOQ:
                api-key: []
      x-apidog-folder: Customers
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1139723/apis/api-36510922-run
components:
  schemas:
    ExecuteCustomEarningFlowDto:
      type: object
      properties:
        customerEmail:
          type: string
          description: >-
            Email of the customer to award points to. Required for API key auth;
            ignored when using a customer JWT (the authenticated customer is
            used)
      x-apidog-orders:
        - customerEmail
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ExecuteCustomEarningFlowResponseDto:
      type: object
      properties:
        pointsAwarded:
          type: number
          description: Points awarded to the customer in this execution
        remainingExecutions:
          type: number
          description: >-
            Remaining executions allowed for this customer within the current
            recurrence window
        recurrence:
          type: string
          description: Recurrence window the executions limit is counted against
          enum:
            - once
            - daily
            - weekly
            - monthly
            - quarterly
            - semiannually
            - yearly
      required:
        - pointsAwarded
        - remainingExecutions
        - recurrence
      x-apidog-orders:
        - pointsAwarded
        - remainingExecutions
        - recurrence
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: jwt
    api-key:
      type: apikey
      in: header
      name: api-key
servers:
  - url: https://api.jericommerce.com
    description: Entorno producción
  - url: ''
    description: Mock Nube
security: []

```
