> ## 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.

# Create points boosts

> Create points boosts.



## OpenAPI

````yaml https://admin.trophy.so/v1/openapi post /points/{systemId}/boosts
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}/boosts:
    servers:
      - url: https://admin.trophy.so/v1
        description: Admin API
    parameters:
      - $ref: '#/components/parameters/TenantId'
    post:
      tags:
        - Admin
      summary: Create points boosts
      description: Create points boosts.
      operationId: admin_points_boosts_create
      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
      requestBody:
        description: Array of boosts to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePointsBoostsRequest'
            examples:
              Create user-specific boost:
                value:
                  - userId: user-123
                    name: Double XP Weekend
                    start: '2024-01-01'
                    end: '2024-01-03'
                    multiplier: 2
              Create global boost:
                value:
                  - name: Global Holiday Bonus
                    start: '2024-12-25'
                    multiplier: 1.5
                    rounding: up
              Create boost with user attributes:
                value:
                  - name: Premium User Boost
                    start: '2024-01-01'
                    multiplier: 2
                    userAttributes:
                      - attributeId: 550e8400-e29b-41d4-a716-446655440000
                        attributeValue: premium
      responses:
        '200':
          description: Successful operation (no boosts created)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePointsBoostsResponse'
              examples:
                All requests had errors:
                  value:
                    created: []
                    issues:
                      - index: 0
                        severity: error
                        message: User does not exist
        '201':
          description: Created (at least one boost created)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePointsBoostsResponse'
              examples:
                Success with no issues:
                  value:
                    created:
                      - id: 550e8400-e29b-41d4-a716-446655440000
                        name: Double XP Weekend
                        status: active
                        start: '2024-01-01'
                        end: '2024-01-03'
                        multiplier: 2
                        rounding: down
                        userId: user-123
                    issues: []
                Global boost created:
                  value:
                    created:
                      - id: 550e8400-e29b-41d4-a716-446655440001
                        name: Global Holiday Bonus
                        status: active
                        start: '2024-01-15'
                        end: null
                        multiplier: 1.5
                        rounding: down
                        userId: null
                        userAttributes: []
                    issues: []
                Mixed success and errors:
                  value:
                    created:
                      - id: 550e8400-e29b-41d4-a716-446655440001
                        name: Valid Boost
                        status: active
                        start: '2024-01-15'
                        end: null
                        multiplier: 1.5
                        rounding: down
                        userId: null
                        userAttributes:
                          - attributeId: 550e8400-e29b-41d4-a716-446655440000
                            attributeValue: premium
                    issues:
                      - index: 1
                        severity: error
                        message: User does not exist
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminErrorBody'
        '404':
          description: Not Found (points system 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 response = await
            trophy.admin.points.boosts.create('system-uuid', [
              {
                userId: 'user-123',
                name: 'Double XP Weekend',
                start: '2024-01-01',
                end: '2024-01-03',
                multiplier: 2
              },
              {
                name: 'Global Holiday Bonus',
                start: '2024-12-25',
                multiplier: 1.5,
                rounding: 'up'
              },
              {
                name: 'Premium User Boost',
                start: '2024-01-01',
                multiplier: 2,
                userAttributes: [
                  { attributeId: 'attr-uuid', attributeValue: 'premium' }
                ]
              }
            ]);
        - lang: python
          source: |
            from trophy import TrophyApi

            client = TrophyApi(api_key='YOUR_API_KEY')

            response = client.admin.points.boosts.create(
              system_id='system-uuid',
              boosts=[
                {
                  "userId": "user-123",
                  "name": "Double XP Weekend",
                  "start": "2024-01-01",
                  "end": "2024-01-03",
                  "multiplier": 2
                },
                {
                  "name": "Global Holiday Bonus",
                  "start": "2024-12-25",
                  "multiplier": 1.5,
                  "rounding": "up"
                },
                {
                  "name": "Premium User Boost",
                  "start": "2024-01-01",
                  "multiplier": 2,
                  "userAttributes": [
                    {"attributeId": "attr-uuid", "attributeValue": "premium"}
                  ]
                }
              ]
            )
        - 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.Boosts.Create(context.TODO(),
            "system-uuid", api.CreatePointsBoostsRequest{})
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:
    CreatePointsBoostsRequest:
      title: CreatePointsBoostsRequest
      type: array
      description: >-
        Array of points boosts to create. Maximum 100 boosts per request. Each
        boost may optionally target a specific user via `userId` or filter by
        user attributes via `userAttributes`. These two fields are mutually
        exclusive — providing `userAttributes` when `userId` is set will result
        in an error. Omitting both creates a global boost.
      items:
        $ref: '#/components/schemas/CreatePointsBoostRequestItem'
      maxItems: 100
      minItems: 1
    CreatePointsBoostsResponse:
      title: CreatePointsBoostsResponse
      type: object
      description: >-
        Response containing created boosts and any issues encountered while
        creating points boosts.
      properties:
        created:
          type: array
          items:
            $ref: '#/components/schemas/AdminPointsBoost'
          description: Array of successfully created boosts.
        issues:
          type: array
          items:
            $ref: '#/components/schemas/AdminIssue'
          description: Array of issues encountered during boost creation.
      required:
        - created
        - issues
    AdminErrorBody:
      title: AdminErrorBody
      type: object
      properties:
        error:
          type: string
      required:
        - error
    CreatePointsBoostRequestItem:
      title: CreatePointsBoostRequestItem
      type: object
      description: >-
        A points boost to create. May optionally target a specific user via
        `userId` or filter by user attributes via `userAttributes`. These two
        fields are mutually exclusive.
      properties:
        userId:
          type:
            - string
            - 'null'
          description: >-
            The ID of the user to create a boost for. Mutually exclusive with
            `userAttributes` — providing `userAttributes` when `userId` is set
            will result in an error. Omit for a global boost.
          example: user-123
        name:
          type: string
          description: The name of the boost.
          maxLength: 255
          example: Double XP Weekend
        start:
          type: string
          format: date
          description: The start date of the boost (YYYY-MM-DD).
          example: '2024-01-01'
        end:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The end date of the boost (YYYY-MM-DD). If null, the boost has no
            end date.
          example: '2024-01-03'
        multiplier:
          type: number
          description: >-
            The points multiplier. Must be greater than 0, not equal to 1, and
            less than 100.
          example: 2
          exclusiveMinimum: 0
          exclusiveMaximum: 100
        rounding:
          type: string
          enum:
            - down
            - up
            - nearest
          default: down
          description: How to round the boosted points. Defaults to 'down'.
          example: down
        userAttributes:
          type:
            - array
            - 'null'
          description: >-
            User attribute filters for the boost. Cannot be provided when
            `userId` is set.
          items:
            type: object
            properties:
              attributeId:
                type: string
                format: uuid
                description: The UUID of the user attribute.
              attributeValue:
                type: string
                description: The value to match.
            required:
              - attributeId
              - attributeValue
          example:
            - attributeId: 550e8400-e29b-41d4-a716-446655440000
              attributeValue: premium
      required:
        - name
        - start
        - multiplier
    AdminPointsBoost:
      title: AdminPointsBoost
      type: object
      description: A points boost as returned from admin endpoints.
      properties:
        id:
          type: string
          format: uuid
          description: The UUID of the boost.
        name:
          type: string
          description: The name of the boost.
        status:
          type: string
          enum:
            - active
            - scheduled
            - finished
          description: The status of the boost.
        start:
          type: string
          format: date
          description: The start date (YYYY-MM-DD).
        end:
          type:
            - string
            - 'null'
          format: date
          description: The end date (YYYY-MM-DD) or null if no end date.
        multiplier:
          type: number
          description: The points multiplier.
        rounding:
          type: string
          enum:
            - down
            - up
            - nearest
          description: How boosted points are rounded.
        userId:
          type:
            - string
            - 'null'
          description: >-
            The ID of the user the boost was created for, or null for
            global/attribute-filtered boosts.
        userAttributes:
          type: array
          description: >-
            User attribute filters applied to the boost. Only present for
            non-user-specific boosts (i.e. when `userId` is null). Empty array
            if no filters are set.
          items:
            type: object
            properties:
              attributeId:
                type: string
                format: uuid
                description: The UUID of the user attribute.
              attributeValue:
                type: string
                description: The matched attribute value.
            required:
              - attributeId
              - attributeValue
      required:
        - id
        - name
        - status
        - start
        - end
        - multiplier
        - rounding
        - userId
    AdminIssue:
      title: AdminIssue
      type: object
      description: An issue encountered while processing an item in an admin API request.
      properties:
        id:
          type: string
          description: The ID of the resource the issue relates to, when applicable.
          example: 550e8400-e29b-41d4-a716-446655440000
        userId:
          type: string
          description: The ID of the user the issue relates to, when applicable.
          example: user-123
        boostId:
          type: string
          description: The ID of the points boost the issue relates to, when applicable.
          example: 550e8400-e29b-41d4-a716-446655440000
        index:
          type: integer
          description: >-
            The zero-based index of the item the issue relates to, when no
            resource ID exists yet.
          example: 0
        severity:
          type: string
          enum:
            - error
            - warning
          description: The severity level of the issue.
          example: warning
        message:
          type: string
          description: A human-readable description of the issue.
          example: Would exceed maximum freeze limit
      required:
        - severity
        - message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````