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

# Get a points trigger by ID

> Get a single points trigger by ID.



## OpenAPI

````yaml https://admin.trophy.so/v1/openapi get /points/{systemId}/triggers/{id}
openapi: 3.1.0
info:
  title: Trophy
  version: 1.19.0
servers:
  - x-fern-server-name: Admin API
    url: https://admin.trophy.so/v1
    description: Admin API
security: []
paths:
  /points/{systemId}/triggers/{id}:
    servers:
      - url: https://admin.trophy.so/v1
        description: Admin API
    parameters:
      - $ref: '#/components/parameters/TenantId'
    get:
      tags:
        - Admin
      summary: Get a points trigger by ID
      description: Get a single points trigger by ID.
      operationId: admin_points_triggers_get
      parameters:
        - name: systemId
          in: path
          description: The UUID of the points system.
          required: true
          schema:
            type: string
            format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
        - name: id
          in: path
          description: The UUID of the points trigger.
          required: true
          schema:
            type: string
            format: uuid
          example: 660f9500-f30c-42e5-b827-557766550001
      responses:
        '200':
          description: The points trigger.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminPointsTrigger'
              examples:
                A single trigger:
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440000
                    type: metric
                    points: 10
                    status: active
                    userAttributes: []
                    metricId: 660f9500-f30c-42e5-b827-557766550001
                    metricThreshold: 5
                    eventAttributes: []
                    blockIfOutOfPoints: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminErrorBody'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminErrorBody'
        '422':
          description: Unprocessible Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminErrorBody'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: javascript
          source: >
            import { TrophyApiClient } from '@trophyso/node';


            const trophy = new TrophyApiClient({
              apiKey: 'YOUR_API_KEY'
            });


            const trigger = await
            trophy.admin.points.triggers.get('system-uuid', 'trigger-uuid');
        - lang: python
          source: |
            from trophy import TrophyApi

            client = TrophyApi(api_key='YOUR_API_KEY')

            trigger = client.admin.points.triggers.get(
              system_id='system-uuid',
              id='trigger-uuid'
            )
        - lang: go
          source: >
            import (
              "context"

              api "github.com/trophyso/trophy-go"
              trophyclient "github.com/trophyso/trophy-go/client"
              "github.com/trophyso/trophy-go/option"
            )


            client := trophyclient.NewClient(
              option.WithApiKey("YOUR_API_KEY"),
            )


            response, err := client.Admin.Points.Triggers.Get(context.TODO(),
            "system-uuid", "trigger-uuid")
components:
  parameters:
    TenantId:
      name: Tenant-ID
      in: header
      description: >-
        The tenant identifier for multi-tenant organisations. Required when the
        organisation has multi-tenancy enabled. Pass your own internal customer
        ID for the tenant. Ignored for single-tenant organisations.
      required: false
      schema:
        type: string
      example: customer_12345
  schemas:
    AdminPointsTrigger:
      title: AdminPointsTrigger
      type: object
      description: A points trigger as returned from admin endpoints.
      properties:
        id:
          type: string
          format: uuid
          description: The UUID of the trigger.
        type:
          type: string
          enum:
            - metric
            - achievement
            - streak
            - time
            - user_creation
          description: The type of trigger.
        points:
          type: integer
          description: The number of points awarded or deducted when the trigger fires.
        status:
          type: string
          enum:
            - active
            - inactive
          description: The status of the trigger.
        userAttributes:
          type: array
          description: User attribute filters applied to the trigger.
          items:
            type: object
            properties:
              attributeId:
                type: string
                format: uuid
              attributeValue:
                type: string
            required:
              - attributeId
              - attributeValue
        metricId:
          type: string
          format: uuid
          description: The UUID of the metric. Only present for metric triggers.
        metricThreshold:
          type: integer
          description: The metric threshold. Only present for metric triggers.
        eventAttributes:
          type: array
          description: >-
            Event attribute filters applied to the trigger. Only present for
            metric triggers.
          items:
            type: object
            properties:
              attributeId:
                type: string
                format: uuid
              attributeValue:
                type: string
            required:
              - attributeId
              - attributeValue
        achievementId:
          type: string
          format: uuid
          description: The UUID of the achievement. Only present for achievement triggers.
        streakLength:
          type: integer
          description: The streak length. Only present for streak triggers.
        timeUnit:
          type: string
          enum:
            - hours
            - days
          description: The time unit. Only present for time triggers.
        timeInterval:
          type: integer
          description: The time interval. Only present for time triggers.
        blockIfOutOfPoints:
          type: boolean
          description: >-
            Whether metric events that would reduce the user's points below zero
            are blocked.
      required:
        - id
        - type
        - points
        - status
        - userAttributes
        - blockIfOutOfPoints
    AdminErrorBody:
      title: AdminErrorBody
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````