mutation IssueOffChainPoints {
  insert_api_points_one(object: {
    account_id: "0xB58621209Dc0b0c514E52a6D9A165a16ae95e4f7", 
    identity_type: EVM_ADDRESS, 
    amount: "10", 
    reg_event_id: "ebffbc49-fa89-4e73-ab40-4e8be59331fd"
  }) {
    id
    amount
    added_by
    client_season
  }
}
{
  "data": {
    "insert_api_points_one": {
      "id": 4,
      "amount": 10,
      "added_by": "729af390-29d0-402a-b73a-d2164d914020",
      "client_season": "my-campaign-name"
    }
  }
}
mutation IssueOffChainPoints {
  insert_api_points_one(object: {
    account_id: "0xB58621209Dc0b0c514E52a6D9A165a16ae95e4f7", 
    identity_type: EVM_ADDRESS, 
    amount: "10", 
    reg_event_id: "ebffbc49-fa89-4e73-ab40-4e8be59331fd"
  }) {
    id
    amount
    added_by
    client_season
  }
}
{
  "data": {
    "insert_api_points_one": {
      "id": 4,
      "amount": 10,
      "added_by": "729af390-29d0-402a-b73a-d2164d914020",
      "client_season": "my-campaign-name"
    }
  }
}

Before issuing points for an event, you must first register the event. This is a one-time process for each unique event. You can do this through the “API” sidebar in your app dashboard.

You can test-drive the API in our interactive graphql playground here.

Absinthe’s off-chain points API allows any project the freedom to issue, query, update, and delete points for any off-chain action

IMPORTANT: Point Deltas Only

This API endpoint is designed to record point changes (deltas), not a user’s new total score. Submit the amount you wish to add to their current score. We will automatically aggregate and sum all issued points internally to calculate the user’s total.

WARNING: Irreversible Points

Points issued via this API are permanent. Once points have been successfully recorded for an identity, they cannot be removed, decreased, or reversed through the API.

CAUTION: Negative Points Ignored

While the API may technically accept negative point values, they will be disregarded and not counted in the final aggregated point total. Only positive values contribute to the user’s score.

Setting The Authorization Header

Before being able to introspect the schema through our interactive graphql playground or through a direct call, you will need to set the API key as an authorization header via this format:

You will need an API key to set in an authorization header. If you don’t have one yet, you can create your own via your campaign in your app dashboard.

{"Authorization": "Bearer <INSERT_KEY_HERE>"}

Endpoint URL

https://gql3.absinthe.network/v1/graphql

Request Method and Error Responses

  • Requests must be sent as POST, not GET.
  • On failure, you’ll still receive a 200 OK HTTP status, but the JSON response will include an errors array with details of what went wrong. Clients should inspect the errors field to detect and handle failures.

FAQ

Parameters

The client_season and added_by fields are visible via the gql queries but cannot be manually modified through mutations. The client_season field represents the name of your campaign and is used to organize and categorize point issuances.