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

# Mint Point/ERC-20

> Reward users with points for completing specific actions in your application. This endpoint is designed to incentivise user engagement by awarding points for various activities such as:

- User registration
- Task completion
- Video watching
- Comment posting
- Other custom actions

The endpoint returns an [unsigned transaction](/api-reference/architecture/transaction-lifecycle) that needs to be signed using your application's private key (stored securely in server environment variables). After signing, you can broadcast the transaction using either:

- [Execute Transaction](/api-reference/endpoint/transactions/post-transactionsexecute) endpoint for immediate submission
- [Execute Transaction and Wait](/api-reference/endpoint/transactions/post-transactionsexecuteandwait) endpoint if you need to wait for transaction confirmation

This reward system helps build user engagement and loyalty while maintaining transparency through blockchain-based point distribution.


<ResponseExample>
  ```json 200 theme={null}
  {
    "status": "success",
    "unsignedTransaction": {
      "to": "0x014b680bed2433b1861239cf812dbe660fe339f2",
      "data": "0x609512c90000000000000000000000009574e9ba92cb0966c9d2ff1a9ab9e11949b9b873000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000de0b6b3a7640000647261676f6e5f736c6179656400000000000000000000000000000000000000414354494f4e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000",
      "maxPriorityFeePerGas": "30000000000",
      "maxFeePerGas": "30000000015",
      "gasLimit": "95935",
      "nonce": 2484,
      "chainId": 80001,
      "type": 2
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "issues": [
        {
          "code": "invalid_type",
          "expected": "string",
          "received": "undefined",
          "path": ["action_id"],
          "message": "Required"
        },
        {
          "code": "invalid_type",
          "expected": "string",
          "received": "undefined",
          "path": ["receiver"],
          "message": "Required"
        }
      ],
      "name": "ZodError"
    }
  }
  ```

  ```JSON 404 theme={null}
  {
    "status": "failed",
    "error": "No Token found"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml post /reward/point
openapi: 3.0.0
info:
  version: 0.1.0
  title: Openformat API
servers:
  - url: https://api.openformat.tech/v1
    description: Live server
security:
  - ApiKeyAuth: []
paths:
  /reward/point:
    post:
      tags:
        - Triggers
        - Point
      description: Trigger Point
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                chain:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: Blockchain network to use
                  example: arbitrum-sepolia
                action_id:
                  type: string
                  minLength: 1
                  maxLength: 32
                  description: Action Id
                  example: dragon_slayed
                receiver:
                  type: string
                  pattern: ^(0x)?[0-9a-fA-F]{40}$
                  description: Ethereum addres of the receiver
                  example: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266'
                app_id:
                  type: string
                  pattern: ^(0x)?[0-9a-fA-F]{40}$
                  description: Ethereum address of the application
                  example: '0x9716fb655f2a72b1fc1b4db02b8ad20b6747442a'
                token_address:
                  type: string
                  pattern: ^(0x)?[0-9a-fA-F]{40}$
                  description: Ethereum address of the Point token
                  example: '0xd1f09c70f6f2838a3ab6209c1465af68594667ec'
                amount:
                  type: number
                  minimum: 0
                  exclusiveMinimum: true
                  description: Amount of tokens to reward
                  example: 123
              required:
                - chain
                - action_id
                - receiver
                - app_id
                - token_address
                - amount
      responses:
        '200':
          description: Rewards Points
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Success response status
                    example: success
                  unsignedTransaction:
                    nullable: true
                    description: Unsigned transaction object for the user to sign
                required:
                  - status
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: Error code for the field
                              example: invalid_type
                            path:
                              type: array
                              items:
                                type: string
                              description: Field with error
                              example:
                                - some_field
                            message:
                              type: string
                              description: Error message
                              example: Required
                          required:
                            - code
                            - path
                            - message
                        description: Error object with all validation issues
                    required:
                      - issues
                required:
                  - error
        '404':
          description: Point token not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - failed
                    description: Failed reponse status
                    example: failed
                  error:
                    type: string
                    description: Error message
                    example: No Token found
                required:
                  - status
                  - error
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````