Grant credit to an organization (internal)

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
POST /admin/orgs/{orgId}/credits

Adds amountCents of credit to the organization's balance without any payment and returns the new balance with the latest 50 ledger entries. A repeated requestId does not grant again. Returns 403 while credits are turned off. Super admin only.

Path parameters

  • orgId string Required

    Id of the organization

application/json

Body Required

  • amountCents number Required

    Credit to add, in integer cents

    Minimum value is 1.

  • reason string Required

    Required audit reason — persisted on the ledger

  • requestId string

    Client-supplied dedup token — repeating the same requestId returns the prior grant instead of double-crediting

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • balanceCents number Required
      • currency string Required
      • effectiveDeductPercentage number Required
      • entries array[object] Required
        Hide entries attributes Show entries attributes object
        • type string Required

          Values are credit, debit, or reversal.

        • reason string Required

          Values are admin_grant, deduction, or reversal.

        • deltaCents number Required
        • balanceAfterCents number Required
        • description string Required
        • invoice string | null Required
        • createdAt string(date-time) Required
    • statusCode number Required
    • timestamp string(date-time) Required
POST /admin/orgs/{orgId}/credits
curl \
 --request POST 'http://api.example.com/admin/orgs/{orgId}/credits' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "amountCents": 42.0,
  "reason": "string",
  "requestId": "string"
}'
Request examples
{
  "amountCents": 42.0,
  "reason": "string",
  "requestId": "string"
}
Response examples (200)
{
  "data": {
    "balanceCents": 20000,
    "currency": "usd",
    "effectiveDeductPercentage": 100,
    "entries": [
      {
        "type": "debit",
        "reason": "deduction",
        "deltaCents": -5000,
        "balanceAfterCents": 20000,
        "description": "Credit applied to invoice in_1QExampleInvoice0001",
        "invoice": "in_1QExampleInvoice0001",
        "createdAt": "2026-01-15T14:30:00.000Z"
      }
    ]
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}