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

# Log a custom incentive for study participants

> Logs the study's configured custom incentive (for example swag or cash handed out outside Rally) against one or more participants. Custom incentives are recorded in Rally, not sent by email.



## OpenAPI

````yaml https://api.rallyuxr.com/api/openapi post /incentives/custom/log
openapi: 3.1.0
info:
  title: Rally UXR Developer Docs
  version: '1.0'
servers:
  - url: https://api.rallyuxr.com/api/public/v1
security:
  - bearerAuth: []
tags:
  - name: Forms
    description: Operations on Forms in your workspace
  - name: People
    description: Operations on Person's stored in your workspace
  - name: Person Properties
    description: Operations on workspace level Person Properties
  - name: Populations
    description: Operations on Populations in your workspace
  - name: Segments
    description: Operations on Segments in your workspace
  - name: Studies
    description: Operations on Studies in your workspace
  - name: Participants
    description: Operations on Participants in studies
  - name: Participant Status Events
    description: Poll participant status-change events across your workspace
  - name: Study Status Events
    description: Poll-based access to study status-change events in your workspace
  - name: Screener
    description: Operations on a study's screener
  - name: Consent Submissions
    description: Operations on Consent Submissions for studies
  - name: Incentives
    description: Operations on Incentives in your workspace
  - name: Messages
    description: Operations on Message activities in your workspace
  - name: Imports
    description: Operations on Imports in your workspace
  - name: Users
    description: Operations on Workspace Users
  - name: Teams
    description: Operations on Teams in your workspace
  - name: Backfills
    description: >-
      Routes that can be used to backfill data into Rally. If you'd like access
      to these apis, please reach out to your Customer Success rep
  - name: Person
    description: Deprecated, use People
paths:
  /incentives/custom/log:
    post:
      tags:
        - Incentives
      summary: Log a custom incentive for study participants
      description: >-
        Logs the study's configured custom incentive (for example swag or cash
        handed out outside Rally) against one or more participants. Custom
        incentives are recorded in Rally, not sent by email.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                studyId:
                  type: string
                  description: The ID of the study the participants belong to
                participantIds:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 10
                  description: >-
                    The IDs of the study participants to log the custom
                    incentive against. A maximum of 10 participants may be
                    logged per request.
                amountCents:
                  type: integer
                  exclusiveMinimum: 0
                  description: >-
                    Override for the logged value in cents. Only applies when
                    the study's custom incentive is a monetary value. Defaults
                    to the study's configured amount
                customIncentiveOptionId:
                  type: string
                  description: >-
                    Override for the selected custom incentive option. Only
                    applies when the study's custom incentive is single-select.
                    Defaults to the study's configured default option
                customIncentiveValue:
                  type: string
                  description: >-
                    Override for the logged custom incentive value. Only applies
                    when the study's custom incentive is not single-select.
                    Defaults to the study's configured default value
                allowDuplicate:
                  type: boolean
                  description: >-
                    By default, participants who already have an outstanding
                    custom incentive for this study are skipped and returned in
                    skippedParticipantIds. Set to true to log anyway, allowing
                    multiple custom incentives per participant
              required:
                - studyId
                - participantIds
              description: >-
                Log the custom incentive configured on a study (for example swag
                or cash handed out to people outside Rally) against one or more
                of its participants. Custom incentives are recorded in Rally,
                not sent; the custom incentive itself comes from the study
                configuration, with the option / value / amount as the only
                overrides.
      responses:
        '202':
          description: The custom incentive log was accepted
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogCustomIncentiveResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            text/plain:
              schema:
                type: string
                example: Unauthorized
        '403':
          description: Forbidden
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            text/plain:
              schema:
                type: string
                example: Forbidden
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                type: string
                example: '{Resource} not found'
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            text/plain:
              schema:
                type: string
                example: Too Many Requests
        '500':
          description: Internal Server Error
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            text/plain:
              schema:
                type: string
                example: Internal Server Error
      security:
        - bearerAuth: []
components:
  headers:
    X-RateLimit-Limit:
      description: The maximum number of requests the client is allowed to make.
      schema:
        type: integer
        format: int32
    X-RateLimit-Remaining:
      description: >-
        The number of requests remaining for the client in the current time
        window.
      schema:
        type: integer
        format: int32
    X-RateLimit-Reset:
      description: >-
        The time at which the current time window ends (in Unix timestamp
        format).
      schema:
        type: integer
        format: int32
    Retry-After:
      description: The number of seconds until the client should retry the request.
      schema:
        type: integer
        format: int32
  schemas:
    LogCustomIncentiveResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the custom incentive was logged
        isAsync:
          type: boolean
          description: >-
            Whether logging is processed asynchronously. Larger requests are
            queued and processed in the background
        loggedIncentiveCount:
          type: number
          description: The number of participants the incentive was logged against
        skippedParticipantIds:
          type: array
          items:
            type: string
          description: >-
            Participants that were skipped because they already had an
            outstanding custom incentive for the study. Empty when
            allowDuplicate is true
      required:
        - success
        - isAsync
      description: The result of logging a custom incentive
    BadRequestError:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
            required:
              - message
              - path
      required:
        - errors
      description: Error response for a bad request with details on what was invalid
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````