> ## Documentation Index
> Fetch the complete documentation index at: https://docs.machines.cash/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Tool Schemas

> Copy-paste JSON Schemas for tools to call the API.

<CodeGroup>
  ```json api.users.resolve theme={null}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "required": ["userId"],
    "properties": {
      "userId": { "type": "string", "maxLength": 120 },
      "walletAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" },
      "walletLabel": { "type": "string", "maxLength": 120 }
    }
  }
  ```

  ```json api.sessions.create theme={null}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "required": ["userId","scopes"],
    "properties": {
      "userId": { "type": "string" },
      "walletAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" },
      "scopes": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
      "ttlSeconds": { "type": "integer", "minimum": 60, "maximum": 86400 }
    }
  }
  ```

  ```json api.cards.create theme={null}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "encryptedName": { "type": "object", "required": ["v","iv","ct"], "properties": {
        "v": { "type": "integer" },
        "iv": { "type": "string" },
        "ct": { "type": "string" }
      }},
      "limit": { "type": "object", "required": ["amountCents","frequency"], "properties": {
        "amountCents": { "type": "integer", "minimum": 1 },
        "frequency": { "type": "string", "enum": ["perAuthorization","per24HourPeriod","per7DayPeriod","per30DayPeriod","perYearPeriod","allTime"] }
      }}
    }
  }
  ```

  ```json api.encryption.encrypt theme={null}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "required": ["value"],
    "properties": {
      "value": { "type": "string" }
    }
  }
  ```

  ```json api.balances.get theme={null}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "properties": {}
  }
  ```

  ```json api.cards.update theme={null}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "status": { "type": "string", "enum": ["active","locked","canceled","not_activated"] },
      "limit": { "type": "object", "required": ["amountCents","frequency"], "properties": {
        "amountCents": { "type": "integer", "minimum": 1 },
        "frequency": { "type": "string", "enum": ["perAuthorization","per24HourPeriod","per7DayPeriod","per30DayPeriod","perYearPeriod","allTime"] }
      }},
      "encryptedName": { "type": "object", "required": ["v","iv","ct"], "properties": {
        "v": { "type": "integer" },
        "iv": { "type": "string" },
        "ct": { "type": "string" }
      }}
    }
  }
  ```

  ```json api.cards.secrets.get theme={null}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "required": ["sessionId"],
    "properties": {
      "sessionId": { "type": "string" }
    }
  }
  ```

  ```json api.cards.secrets.session theme={null}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "properties": {}
  }
  ```

  ```json api.deposits.create theme={null}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "required": ["currency","network"],
    "properties": {
      "currency": { "type": "string", "enum": ["usdc","rusd"] },
      "network": { "type": "string", "enum": ["base"] },
      "amount": { "type": "number", "exclusiveMinimum": 0 }
    }
  }
  ```

  ```json api.withdrawals.create theme={null}
  {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "required": ["amountCents","tokenAddress","recipientAddress","chainId"],
    "properties": {
      "amountCents": { "type": "integer", "minimum": 1 },
      "tokenAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" },
      "recipientAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" },
      "chainId": { "type": "integer", "minimum": 1 },
      "contractId": { "type": "string" },
      "adminAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }
    }
  }
  ```
</CodeGroup>

<Note>
  Set <code>
  additionalProperties: false</code>

  and explicit <code>
  required</code>

  to keep agents deterministic.
</Note>
