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

# Get paginated challenge templates

> Get a paginated list of challenge templates available to your organisation.



## OpenAPI

````yaml /openapi/admin.json get /templates/challenges
openapi: 3.1.0
info:
  title: Nudj Admin API
  version: 1.0.0
servers:
  - url: https://{subdomain}.nudj.cx/api/v2/admin
    description: Organization API Server
    variables:
      subdomain:
        description: Your organization's subdomain (required)
        default: your-org
security:
  - ApiToken: []
paths:
  /templates/challenges:
    get:
      tags:
        - Templates
      summary: Get paginated challenge templates
      description: >-
        Get a paginated list of challenge templates available to your
        organisation.
      operationId: getPaginatedChallengeTemplates
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          required: false
        - in: query
          name: skip
          schema:
            type: integer
            minimum: 0
            default: 0
          required: false
        - in: query
          name: sort
          schema:
            type: string
        - in: query
          name: search
          schema:
            type: string
        - in: query
          name: communityId
          schema:
            type: string
        - in: query
          name: allocationId
          schema:
            type: string
        - in: query
          name: featured
          schema:
            type: boolean
        - in: query
          name: verified
          schema:
            type: boolean
        - in: query
          name: isShop
          schema:
            type: boolean
        - in: query
          name: type
          schema:
            type: string
        - in: query
          name: status
          schema:
            type: string
        - in: query
          name: eventCategory
          schema:
            type: string
        - in: query
          name: eventSubCategory
          schema:
            type: string
        - in: query
          name: eventName
          schema:
            type: string
        - in: query
          name: displayMode
          schema:
            type: string
        - in: query
          name: fromDate
          schema:
            type: string
        - in: query
          name: toDate
          schema:
            type: string
        - in: query
          name: isGlobalTemplate
          schema:
            type: boolean
        - in: query
          name: key
          schema:
            type: string
        - in: query
          name: progressPeriod
          schema:
            type: string
        - in: query
          name: expand
          schema:
            type: string
        - in: query
          name: redeemableType
          schema:
            type: string
        - in: header
          name: x-language
          description: >-
            The language to return the challenges in. If not provided, the
            default language for the organisation will be used.
          schema:
            type: string
            description: >-
              The language to return the challenges in. If not provided, the
              default language for the organisation will be used.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  totalCount:
                    type: number
                  edges:
                    type: array
                    items:
                      $ref: '#/components/schemas/Challenge'
                required:
                  - totalCount
                  - edges
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
components:
  schemas:
    Challenge:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: The id of the challenge
        organisationId:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: The id of the organisation the challenge belongs to
        communityId:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: The id of the community the challenge belongs to
        additionalCommunityIds:
          type: array
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          description: The ids of any additional communities the challenge belongs to
        details:
          $ref: '#/components/schemas/Details'
        progressPeriod:
          type: string
          enum:
            - daily
            - weekly
            - monthly
            - yearly
            - open
          description: The progress period of the challenge
        maxCompletionsPerPeriod:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              const: Infinity
          description: The maximum number of completions per period for the challenge
        numberOfActions:
          type: number
          minimum: 0
          description: The number of actions in the challenge
        actionIds:
          type: array
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          description: The ids of the actions in the challenge
        challengeType:
          type:
            - string
            - 'null'
          enum:
            - survey
          description: The type of the challenge
        enabledForSingleView:
          type:
            - boolean
            - 'null'
          description: Whether the challenge is enabled for single view
        actionGroups:
          type: array
          items:
            $ref: '#/components/schemas/ActionGroup'
          description: The action groups of the challenge
        status:
          type: string
          enum:
            - archived
            - draft
            - expired
            - live
            - scheduled
          description: The status of the challenge
        startDate:
          type:
            - string
            - 'null'
          description: Deprecated use `startsAt` instead
        endDate:
          type:
            - string
            - 'null'
          description: Deprecated use `expiresAt` instead
        featured:
          type:
            - boolean
            - 'null'
        threadId:
          type:
            - string
            - 'null'
          description: The thread id of the challenge
        isSkippable:
          type:
            - boolean
            - 'null'
          description: Whether the challenge is skippable
        isLinear:
          type: boolean
          description: Whether the challenge must be completed in sequential order
        unlockPrice:
          type: number
          minimum: 0
          description: The number of keys required to unlock this challenge
        tags:
          type: array
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          description: The tags of the challenge
        startedCount:
          type: number
          minimum: 0
          description: The total number of times participants have started the challenge
        completedCount:
          type: number
          minimum: 0
          description: The total number of times participants have completed the challenge
        uniqueUsersStartedCount:
          type: number
          minimum: 0
          description: The number of distinct participants who have started the challenge
        uniqueUsersCompletedCount:
          type: number
          minimum: 0
          description: The number of distinct participants who have completed the challenge
        campaigns:
          type: array
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          description: The campaigns of the challenge
        availableAsTemplateForOrganisations:
          type: array
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          description: The organisations that the challenge is available as a template for
        isGlobalTemplate:
          type: boolean
          description: Whether the challenge is a global template
        startsAt:
          type:
            - string
            - 'null'
          description: The start date of the challenge
        expiresAt:
          type:
            - string
            - 'null'
          description: The expiry date of the challenge
        groupIds:
          type: array
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          description: The challenge groups the challenge belongs to
        createdAt:
          type: string
          description: The creation date of the challenge
        updatedAt:
          type:
            - string
            - 'null'
          description: The update date of the challenge
        videoConfig:
          oneOf:
            - $ref: '#/components/schemas/VideoConfig'
            - type: 'null'
          description: Video configuration for challenges with video content
        xpConfig:
          allOf:
            - $ref: '#/components/schemas/UserXPBreakdown'
          description: >-
            XP breakdown for this challenge. This is the sum of all action
            xpConfigs within the challenge and is automatically calculated.
        rewardDistribution:
          oneOf:
            - $ref: '#/components/schemas/EntityRewardDistribution'
            - type: 'null'
          description: Reward distribution information for the challenge completion itself
        actionsRewardDistribution:
          oneOf:
            - $ref: '#/components/schemas/AggregatedRewardDistribution'
            - type: 'null'
          description: >-
            Aggregated reward distribution information from all actions within
            the challenge
      required:
        - id
        - organisationId
        - communityId
        - additionalCommunityIds
        - details
        - progressPeriod
        - maxCompletionsPerPeriod
        - numberOfActions
        - actionIds
        - actionGroups
        - status
        - isLinear
        - unlockPrice
        - tags
        - startedCount
        - completedCount
        - uniqueUsersStartedCount
        - uniqueUsersCompletedCount
        - campaigns
        - availableAsTemplateForOrganisations
        - isGlobalTemplate
        - groupIds
        - createdAt
        - videoConfig
        - xpConfig
        - rewardDistribution
        - actionsRewardDistribution
      description: A challenge
      title: Challenge
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
    Details:
      type: object
      properties:
        title:
          type: string
          description: The title of the entity
        description:
          type:
            - string
            - 'null'
          description: The description of the entity
        light:
          type: object
          properties:
            primaryImageUrl:
              type:
                - string
                - 'null'
              description: The url of the primary image for this theme mode
            secondaryImageUrl:
              type:
                - string
                - 'null'
              description: The url of the secondary image for this theme mode
          required:
            - primaryImageUrl
            - secondaryImageUrl
          description: Light theme images
        dark:
          type: object
          properties:
            primaryImageUrl:
              type:
                - string
                - 'null'
              description: The url of the primary image for this theme mode
            secondaryImageUrl:
              type:
                - string
                - 'null'
              description: The url of the secondary image for this theme mode
          required:
            - primaryImageUrl
            - secondaryImageUrl
          description: Dark theme images
      required:
        - title
        - description
        - light
        - dark
      description: Used to describe an entity
      title: Details
    ActionGroup:
      type: object
      properties:
        id:
          type: string
        parentGroupId:
          type:
            - string
            - 'null'
        type:
          type: string
          enum:
            - single
            - group
            - child
        displayType:
          type:
            - string
            - 'null'
          enum:
            - list
            - grid
            - stepper
            - map
            - chapters
            - widget
        details:
          $ref: '#/components/schemas/Details'
      required:
        - id
        - type
        - details
      title: ActionGroup
      description: An action group
    VideoConfig:
      type: object
      properties:
        videoUrl:
          type: string
          description: The URL of the video
        isVideoEnabled:
          type: boolean
          description: Whether video functionality is enabled for this challenge
      required:
        - videoUrl
        - isVideoEnabled
      description: Video configuration for challenges with video content
      title: Video Config
    UserXPBreakdown:
      type: object
      properties:
        total:
          type: number
          minimum: 0
        knowledge:
          type: number
          minimum: 0
        creativity:
          type: number
          minimum: 0
        loyalty:
          type: number
          minimum: 0
        influence:
          type: number
          minimum: 0
        participation:
          type: number
          minimum: 0
        contribution:
          type: number
          minimum: 0
      required:
        - total
        - knowledge
        - creativity
        - loyalty
        - influence
        - participation
        - contribution
      description: User XP Breakdown
      title: User XP Breakdown
    EntityRewardDistribution:
      type: object
      properties:
        points:
          type: number
          minimum: 0
          description: Number of points awarded upon completion
        xp:
          type: number
          minimum: 0
          description: XP awarded upon completion
        rewardSelectionMethod:
          type: string
          enum:
            - all
            - priority
            - random
            - select
          description: Method for selecting rewards when multiple are available
        distributionEventId:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: ID of the distribution event managing these rewards
        rewardAllocations:
          type: array
          items:
            $ref: '#/components/schemas/RewardAllocationReference'
          description: >-
            Array of reward allocations with their types. Filter by
            allocationType to get counts: assets for tangible rewards, entries
            for giveaway entries
        numberOfRewardsToReceive:
          type: number
          minimum: 0
          description: Number of rewards the user will receive from the available rewards
      required:
        - points
        - xp
        - rewardSelectionMethod
        - distributionEventId
        - rewardAllocations
        - numberOfRewardsToReceive
      description: >-
        Reward distribution for a single entity with distribution event
        reference
      title: Entity Reward Distribution
    AggregatedRewardDistribution:
      type: object
      properties:
        points:
          type: number
          minimum: 0
          description: Total number of points from all sources
        xp:
          type: number
          minimum: 0
          description: Total XP from all sources
        rewardAllocations:
          type: array
          items:
            $ref: '#/components/schemas/RewardAllocationReference'
          description: >-
            Array of all reward allocations from all sources. Filter by
            allocationType to get counts: assets for tangible rewards, entries
            for giveaway entries
      required:
        - points
        - xp
        - rewardAllocations
      description: >-
        Aggregated reward distribution summed from multiple sources (e.g.,
        challenge's total action rewards)
      title: Aggregated Reward Distribution
    RewardAllocationReference:
      type: object
      properties:
        rewardId:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: ID of the reward
        allocationId:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: ID of the specific allocation within the reward
        allocationType:
          type: string
          enum:
            - assets
            - entries
          description: >-
            The type of allocation - either 'assets' for tangible rewards or
            'entries' for giveaway entries
        amountToDistribute:
          type: number
          minimum: 1
          description: >-
            The quantity of this specific reward to distribute when this
            allocation is selected
      required:
        - rewardId
        - allocationId
        - allocationType
        - amountToDistribute
      description: Reference to a specific reward and its allocation
      title: Reward Allocation Reference
  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: x-api-token

````