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

# Grant resource access to user

<RequestExample>
  ```bash cURL theme={null}
  curl -X 'POST' \
    'https://api.coaxial.ai/provisions/add_to_user' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer <api_key>' \
    -H 'Content-Type: application/json' \
    -d '{
    "user_id": <user_id>,
    "coaxial_id": <coaxial_model_id>
  }'
  ```

  ```python python theme={null}
  import coaxial
  from coaxial.models import GrantAccessRequest
  from pprint import pprint

  coaxial_api = coaxial.Api(api_key=<api_key>)
  grant_access_request = GrantAccessRequest(user_id=<user_id>, coaxial_id=<coaxial_model_id>)

  try:
      api_response = coaxial_api.provision.grant_access(grant_access_request)
      print("The response of ProvisionApi->grant_access:\n")
      pprint(api_response)
  except Exception as e:
      print("Exception when calling ProvisionApi->grant_access: %s\n" % e)
  ```
</RequestExample>

<ResponseExample>
  ```json Example Response theme={null}
  {
    "user_id": <user_id>
  }
  ```
</ResponseExample>


## OpenAPI

````yaml post /provisions/add_to_user
openapi: 3.1.0
info:
  contact:
    email: team@coaxial.ai
    name: Team Coaxial
  description: The Coaxial REST API. Please see https://docs.coaxial.ai for more details.
  termsOfService: https://coaxial.ai/terms/
  title: The Coaxial API
  version: 0.0.1
servers:
  - description: production
    url: https://api.coaxial.ai
  - description: sandbox
    url: https://sandbox.coaxial.ai
security: []
paths:
  /provisions/add_to_user:
    post:
      tags:
        - provision
      summary: Grant resource access to user
      operationId: grant_access
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/grant_access_request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/grant_access_response'
          description: The user id with updated resource access information
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - Authorization: []
components:
  schemas:
    grant_access_request:
      properties:
        coaxial_id:
          format: uuid
          title: Coaxial Id
          type: string
        user_id:
          title: User Id
          type: string
      required:
        - user_id
        - coaxial_id
      title: grant_access_request
      type: object
    grant_access_response:
      properties:
        user_id:
          title: User Id
          type: string
      required:
        - user_id
      title: grant_access_response
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    Authorization:
      scheme: bearer
      type: http

````