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

# Store Variable to Database

> The variable to store and track in the agent's database. You can later retrieve the latest or any number of previous values.



## OpenAPI

````yaml /api-reference/v1/v1.1.0_openapi.json post /action/store_variable_to_database
openapi: 3.0.0
info:
  version: 1.1.0
  title: AI Actions - Get Data
  description: API specifications for 'Get Data' category AI actions.
  license:
    name: MIT
servers:
  - url: https://api-lr.agent.ai/v1
security:
  - bearerAuth: []
paths:
  /action/store_variable_to_database:
    post:
      tags:
        - Workflow & Logic
      summary: Store Variable to Database
      description: >-
        The variable to store and track in the agent's database. You can later
        retrieve the latest or any number of previous values.
      operationId: storeVariableToDatabase
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                variable:
                  type: string
                  description: The variable to store.
              required:
                - variable
      responses:
        '200':
          description: Confirmation of variable storage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
components:
  schemas:
    ActionResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
          description: HTTP status code of the action response
        response:
          type: object
          description: Response data from the action
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from your account
        ([https://agent.ai/user/integrations#api](https://agent.ai/user/integrations#api))

````