---
agentTools:
  projectIndex: https://chimoney.readme.io/llms.txt
---

# Claim community membership reward

Claims reward for community membership if eligible

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Chimoney API Docs",
    "version": "0.2.4",
    "description": "This is the latest version of the Chimoney API. For deprecated version routes, please refer to /v0.2/api-docs."
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.chimoney.io/",
      "description": "Prod Server"
    },
    {
      "url": "https://api-v2-sandbox.chimoney.io",
      "description": "Sandbox API v2 (v0.2.4)"
    }
  ],
  "paths": {
    "/v0.2.4/accounts/claim-reward": {
      "post": {
        "summary": "Claim community membership reward",
        "tags": [
          "Account"
        ],
        "description": "Claims reward for community membership if eligible",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userID",
                  "community"
                ],
                "properties": {
                  "userID": {
                    "type": "string",
                    "description": "The userID claiming the reward",
                    "example": "user123"
                  },
                  "community": {
                    "type": "object",
                    "required": [
                      "communityID"
                    ],
                    "properties": {
                      "communityID": {
                        "type": "string",
                        "description": "Unique identifier for the community",
                        "example": "premium-123"
                      },
                      "membershipID": {
                        "type": "string",
                        "description": "Unique identifier for the membership",
                        "example": "premium-123"
                      },
                      "voucherCode": {
                        "type": "string",
                        "description": "Optional voucher code for the membership",
                        "example": "WELCOME2024"
                      },
                      "name": {
                        "type": "string",
                        "description": "Name of the community",
                        "example": "Premium Community"
                      },
                      "memberName": {
                        "type": "string",
                        "description": "Name of the member in the community",
                        "example": "John Doe"
                      },
                      "communityType": {
                        "type": "string",
                        "enum": [
                          "free",
                          "paid"
                        ],
                        "description": "Type of community membership",
                        "example": "paid"
                      },
                      "expiryDate": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Optional expiry date for the membership",
                        "example": "2024-12-31T23:59:59Z"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reward claim processed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "success"
                      ],
                      "example": "success"
                    },
                    "message": {
                      "type": "string",
                      "example": "Reward claimed successfully"
                    },
                    "data": {
                      "type": "object",
                      "description": "Additional data about the claim"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ],
                      "example": "error"
                    },
                    "error": {
                      "type": "string",
                      "example": "Invalid membership details"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    },
    "responses": {
      "Forbidden": {
        "description": "Access to this resource is forbidden.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Forbidden"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Access to this resource is not available for unauthenticated users.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Unauthorized"
            }
          }
        }
      }
    },
    "schemas": {
      "Forbidden": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the response.",
            "example": "error"
          },
          "error": {
            "type": "string",
            "description": "Error message indicating forbidden access.",
            "example": "API Access not enabled for account Test. Email support@chimoney.io"
          }
        }
      },
      "Unauthorized": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the response.",
            "example": "error"
          },
          "error": {
            "type": "string",
            "description": "Error message indicating unauthorized access.",
            "example": "API key is not defined. Generate a new one from the developer portal."
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Account",
      "description": "All account related endpoints."
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 102,
      "1": 208,
      "2": 243,
      "3": 240,
      "4": 73,
      "5": 214,
      "6": 34,
      "7": 0,
      "8": 37,
      "9": 190,
      "10": 200,
      "11": 166
    }
  }
}
```