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

# Authorize Access To Contract

> Allows the client to (pre-)authorize access to (or remove authorization to access) one of  its Smart Contracts (or one of the Smart Contracts for which the client is part) to a remote  party.

## Overview

Allows the client to (pre-)authorize access to (or remove authorization to access) one of  its Smart Contracts (or one of the Smart Contracts for which the client is part) to a remote  party. When (if) the remote party requests access to the the Smart Contract, the broker will  return it automatically, if already authorized. If not authorized, a petition to access the  Smart Contract will be sent to the clients of the part of the contract for manual approval.

## Authentication

Requires a valid JWT bearer token.

## Notes

This endpoint uses the request schema notation described in [Pattern matching](/guides/pattern-matching).


## OpenAPI

````yaml /test-api/openapi.yaml post /Agent/Legal/AuthorizeAccessToContract
openapi: 3.1.0
info:
  title: Neuron Agent API
  version: 1.0.0
  description: |-
    The Agent API exposes core Neuron functionality over HTTP so services can
    operate without a persistent XMPP connection. Endpoints are grouped by
    capability, starting with Accounts and XMPP messaging.
servers:
  - url: https://{host}
    variables:
      host:
        default: neuron.example.com
        description: Neuron domain issued to you.
security:
  - bearerAuth: []
tags:
  - name: Accounts
  - name: Crypto
  - name: Open intelligence
  - name: Legal and contracts
  - name: State machines
  - name: Storage
  - name: Tokens
  - name: Wallet
  - name: XMPP messaging
paths:
  /Agent/Legal/AuthorizeAccessToContract:
    post:
      tags:
        - Legal and contracts
      summary: Authorize Access To Contract
      description: >-
        Allows the client to (pre-)authorize access to (or remove authorization
        to access) one of  its Smart Contracts (or one of the Smart Contracts
        for which the client is part) to a remote  party.
      operationId: post_Agent_Legal_AuthorizeAccessToContract
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contractId:
                  type: string
                remoteId:
                  type: string
                authorized:
                  type: boolean
              additionalProperties: true
              required:
                - contractId
                - remoteId
                - authorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: true
              example: {}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````