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

# Post v1agentsapimandates

> Browser owner session required. Available only when the Base Agent API runtime gate is enabled and verified.



## OpenAPI

````yaml /openapi/platform.json post /v1/agents/api/mandates/{agentId}
openapi: 3.1.0
info:
  title: GOL Platform API
  description: >-
    Versioned GOL developer and consumer API. Consumer routes are mounted when
    their runtime integrations are configured.
  version: 0.8.0-rc.1
servers:
  - url: http://localhost:4100
    description: Local development
security: []
tags:
  - name: system
  - name: authentication
  - name: projects
  - name: api-keys
  - name: audit
  - name: gas-executions
  - name: gas-policies
  - name: webhooks
paths:
  /v1/agents/api/mandates/{agentId}:
    post:
      tags:
        - Agent API
      description: >-
        Browser owner session required. Available only when the Base Agent API
        runtime gate is enabled and verified.
      operationId: saveAgentApiMandate
      parameters:
        - name: accountId
          in: query
          required: false
          schema:
            type: string
        - name: chainId
          in: query
          required: true
          schema:
            type: integer
            enum:
              - 8453
              - 84532
        - name: agentId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentApiMandateDraft'
      responses:
        '200':
          description: Current authoritative state or accepted request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentApiMandateSaveResult'
        '400':
          description: Invalid request.
        '401':
          description: Session required.
        '403':
          description: Access denied.
        '409':
          description: Capability unavailable or conflict.
      security:
        - bearerAuth: []
components:
  schemas:
    AgentApiMandateDraft:
      type: object
      properties:
        accountId:
          type: string
        chainId:
          type: integer
          enum:
            - 8453
            - 84532
        label:
          type: string
        perCallMax:
          type: string
          pattern: ^[1-9][0-9]*$
        maxCalls:
          minimum: 1
          type: integer
        expiresAt:
          format: date-time
          type: string
        assetAddress:
          type: string
        budgets:
          type: array
          maxItems: 4
          items:
            $ref: '#/components/schemas/AgentApiMandateBudget'
        categories:
          type: array
          maxItems: 16
          items:
            type: string
            enum:
              - search
              - market-data
              - onchain-analytics
              - infrastructure
              - browsing
              - social
              - commerce
              - messaging
          nullable: true
        categoryBudgets:
          type: array
          maxItems: 8
          items:
            $ref: '#/components/schemas/AgentApiMandateCategoryBudget'
        velocity:
          type: object
          nullable: true
          properties:
            calls:
              type: integer
              minimum: 1
              maximum: 10000
            perSeconds:
              type: integer
              minimum: 1
              maximum: 2592000
          required:
            - calls
            - perSeconds
        confirmAbove:
          type: string
          pattern: ^(0|[1-9][0-9]*)$
          nullable: true
        scopeMode:
          type: string
          enum:
            - catalog
            - list
        scope:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/AgentApiMandateScope'
      required:
        - accountId
        - chainId
        - label
        - perCallMax
        - maxCalls
        - expiresAt
    AgentApiMandateSaveResult:
      oneOf:
        - type: object
          properties:
            requiresCommit:
              type: boolean
              enum:
                - false
            mandate:
              $ref: '#/components/schemas/AgentApiMandate'
          required:
            - requiresCommit
            - mandate
        - type: object
          properties:
            requiresCommit:
              type: boolean
              enum:
                - true
            build:
              $ref: '#/components/schemas/AgentApiBudgetBuild'
          required:
            - requiresCommit
            - build
    AgentApiMandateBudget:
      type: object
      properties:
        amount:
          type: string
          pattern: ^[1-9][0-9]*$
        period:
          type: string
          enum:
            - total
            - day
            - week
            - month
      required:
        - amount
        - period
    AgentApiMandateCategoryBudget:
      type: object
      properties:
        category:
          type: string
          enum:
            - search
            - market-data
            - onchain-analytics
            - infrastructure
            - browsing
            - social
            - commerce
            - messaging
        budgets:
          type: array
          maxItems: 4
          items:
            type: object
            properties:
              amount:
                type: string
                pattern: ^[1-9][0-9]*$
              period:
                type: string
                enum:
                  - day
                  - week
                  - month
            required:
              - amount
              - period
      required:
        - category
        - budgets
    AgentApiMandateScope:
      type: object
      properties:
        providerId:
          type: string
          pattern: ^[a-z0-9][a-z0-9-]{0,63}$
        endpointIds:
          type: array
          items:
            type: string
          maxItems: 100
          nullable: true
        perCallMax:
          type: string
          pattern: ^[1-9][0-9]*$
          nullable: true
        budgets:
          type: array
          items:
            $ref: '#/components/schemas/AgentApiMandateBudget'
          maxItems: 4
          nullable: true
      required:
        - providerId
    AgentApiMandate:
      type: object
      properties:
        id:
          type: string
        accountId:
          type: string
        agentId:
          type: string
        chainId:
          type: integer
          enum:
            - 8453
            - 84532
        label:
          type: string
        status:
          type: string
          enum:
            - active
            - paused
        asset:
          type: object
          properties:
            symbol:
              type: string
              enum:
                - USDC
            address:
              pattern: ^0x[0-9a-fA-F]{40}$
              type: string
            decimals:
              type: integer
              enum:
                - 6
          required:
            - symbol
            - address
            - decimals
        perCallMax:
          type: string
          pattern: ^[1-9][0-9]*$
        maxCalls:
          type: integer
        expiresAt:
          format: date-time
          type: string
        budgets:
          type: array
          items:
            $ref: '#/components/schemas/AgentApiMandateBudget'
        categories:
          type: array
          items:
            type: string
            enum:
              - search
              - market-data
              - onchain-analytics
              - infrastructure
              - browsing
              - social
              - commerce
              - messaging
          nullable: true
        categoryBudgets:
          type: array
          items:
            $ref: '#/components/schemas/AgentApiMandateCategoryBudget'
        velocity:
          type: object
          properties:
            calls:
              type: integer
            perSeconds:
              type: integer
          required:
            - calls
            - perSeconds
          nullable: true
        confirmAbove:
          type: string
          pattern: ^(0|[1-9][0-9]*)$
          nullable: true
        scopeMode:
          type: string
          enum:
            - catalog
            - list
        scope:
          type: array
          items:
            $ref: '#/components/schemas/AgentApiMandateScope'
        committed:
          type: object
          properties:
            perCallMax:
              type: string
              pattern: ^[1-9][0-9]*$
            maxCalls:
              type: integer
            expiresAt:
              format: date-time
              type: string
            epoch:
              type: integer
            token:
              pattern: ^0x[0-9a-fA-F]{40}$
              type: string
            txHash:
              pattern: ^0x[0-9a-fA-F]{64}$
              type: string
            committedAt:
              format: date-time
              type: string
          required:
            - perCallMax
            - maxCalls
            - expiresAt
            - epoch
            - token
            - txHash
            - committedAt
      required:
        - id
        - accountId
        - agentId
        - chainId
        - label
        - status
        - asset
        - perCallMax
        - maxCalls
        - expiresAt
        - budgets
        - categories
        - categoryBudgets
        - velocity
        - confirmAbove
        - scopeMode
        - scope
        - committed
    AgentApiBudgetBuild:
      type: object
      properties:
        buildId:
          type: string
        step:
          type: string
          enum:
            - install_validator
            - set_budget
            - revoke
        intentType:
          type: string
          enum:
            - apis_budget_install
            - apis_budget_commit
            - apis_budget_revoke
        userOp:
          $ref: '#/components/schemas/UnsignedOwnerUserOp'
        userOpHash:
          pattern: ^0x[0-9a-fA-F]{64}$
          type: string
        chainId:
          type: integer
          enum:
            - 8453
            - 84532
        validator:
          type: string
        token:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
          nullable: true
        epoch:
          type: integer
          nullable: true
        expiresAt:
          format: date-time
          type: string
        humanSummary:
          type: string
        riskReducing:
          type: boolean
        gasless:
          type: boolean
          enum:
            - false
      required:
        - buildId
        - step
        - intentType
        - userOp
        - userOpHash
        - chainId
        - validator
        - token
        - epoch
        - expiresAt
        - humanSummary
        - riskReducing
        - gasless
    UnsignedOwnerUserOp:
      type: object
      properties:
        chainId:
          type: integer
          enum:
            - 8453
            - 84532
        sender:
          pattern: ^0x[0-9a-fA-F]{40}$
          type: string
        nonce:
          type: string
          pattern: ^(0|[1-9][0-9]*|0x[0-9a-fA-F]+)$
        callData:
          type: string
          pattern: ^0x(?:[0-9a-fA-F]{2})*$
        signature:
          type: string
          pattern: ^0x(?:[0-9a-fA-F]{2})*$
        entryPoint:
          pattern: ^0x[0-9a-fA-F]{40}$
          type: string
        factory:
          oneOf:
            - pattern: ^0x[0-9a-fA-F]{40}$
              type: string
            - type: 'null'
        factoryData:
          oneOf:
            - type: string
              pattern: ^0x(?:[0-9a-fA-F]{2})*$
            - type: 'null'
        paymaster:
          oneOf:
            - pattern: ^0x[0-9a-fA-F]{40}$
              type: string
            - type: 'null'
        paymasterData:
          oneOf:
            - type: string
              pattern: ^0x(?:[0-9a-fA-F]{2})*$
            - type: 'null'
        callGasLimit:
          type: string
          pattern: ^(0|[1-9][0-9]*|0x[0-9a-fA-F]+)$
        verificationGasLimit:
          type: string
          pattern: ^(0|[1-9][0-9]*|0x[0-9a-fA-F]+)$
        preVerificationGas:
          type: string
          pattern: ^(0|[1-9][0-9]*|0x[0-9a-fA-F]+)$
        paymasterVerificationGasLimit:
          oneOf:
            - type: string
              pattern: ^(0|[1-9][0-9]*|0x[0-9a-fA-F]+)$
            - type: 'null'
        paymasterPostOpGasLimit:
          oneOf:
            - type: string
              pattern: ^(0|[1-9][0-9]*|0x[0-9a-fA-F]+)$
            - type: 'null'
        maxFeePerGas:
          type: string
          pattern: ^(0|[1-9][0-9]*|0x[0-9a-fA-F]+)$
        maxPriorityFeePerGas:
          type: string
          pattern: ^(0|[1-9][0-9]*|0x[0-9a-fA-F]+)$
      required:
        - chainId
        - sender
        - nonce
        - callData
        - signature
        - entryPoint
        - callGasLimit
        - verificationGasLimit
        - preVerificationGas
        - maxFeePerGas
        - maxPriorityFeePerGas
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Opaque owner, CLI, or agent session token. Agent tokens are accepted
        only where marked.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.