{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentpmt-com/json-schema/agentpmt-com-grant-credits-request-schema.json",
  "title": "GrantCreditsRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentpmt-com-admin-api-openapi.yml#/components/schemas/GrantCreditsRequest",
  "properties": {
    "user_id": {
      "type": "string",
      "title": "User Id",
      "description": "User's ObjectId"
    },
    "amount_credits": {
      "type": "integer",
      "exclusiveMinimum": 0.0,
      "title": "Amount Credits",
      "description": "Credit amount (integer, 100 credits = $1)"
    },
    "credit_type": {
      "type": "string",
      "title": "Credit Type",
      "description": "Type of credit (admin_grant, referral_signup, etc.)"
    },
    "notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notes",
      "description": "Optional notes about the grant"
    },
    "idempotency_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Idempotency Key",
      "description": "Stable idempotency key for retry-safe grants"
    }
  },
  "type": "object",
  "required": [
    "user_id",
    "amount_credits",
    "credit_type"
  ]
}