For the complete documentation index, see llms.txt. This page is also available as Markdown.

Overview

The Cashramp Bot API is a GraphQL API for agents — it lets you programmatically access your agent profile, balances, rates, and account settings, and manage P2P payments on behalf of your bot.

Endpoint

Environment
URL

Production

https://api.useaccrue.com/cashramp/bot/graphql

Authentication

All requests require an agent API key passed as a Bearer token:

Authorization: Bearer {api_key}

Example

First-party SDKs do not yet cover the Bot API. Use the raw-HTTP examples below until the Bot SDK ships.

import axios from "axios";

const cashrampBot = axios.create({
  baseURL: "https://api.useaccrue.com/cashramp/bot/graphql",
  headers: {
    Authorization: `Bearer ${process.env.AGENT_API_KEY}`,
  },
});
import os
import requests

CASHRAMP_BOT_URL = "https://api.useaccrue.com/cashramp/bot/graphql"

cashramp_bot = requests.Session()
cashramp_bot.headers.update({
    "Authorization": f"Bearer {os.environ['AGENT_API_KEY']}",
    "Content-Type": "application/json",
})
require "net/http"
require "uri"
require "json"

CASHRAMP_BOT_URL = URI("https://api.useaccrue.com/cashramp/bot/graphql")

def cashramp_bot_request(query, variables = {})
  http = Net::HTTP.new(CASHRAMP_BOT_URL.host, CASHRAMP_BOT_URL.port)
  http.use_ssl = true
  req = Net::HTTP::Post.new(CASHRAMP_BOT_URL)
  req["Authorization"] = "Bearer #{ENV['AGENT_API_KEY']}"
  req["Content-Type"] = "application/json"
  req.body = { query: query, variables: variables }.to_json
  JSON.parse(http.request(req).body)
end

All requests must be over HTTPS. Calls without valid authentication are rejected.

Last updated