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

# Create Global Variable Endpoint

> Create a new global variable for the team.



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/workflows/api.json post /workflows/v1/global-variables
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-prod.interactly.ai
    description: API Server
security: []
paths:
  /workflows/v1/global-variables:
    post:
      tags:
        - Global Variables
      summary: Create Global Variable Endpoint
      description: Create a new global variable for the team.
      operationId: >-
        workflow_service_create_global_variable_endpoint_v1_global_variables_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGlobalVariableRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalVariableResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearer: []
components:
  schemas:
    CreateGlobalVariableRequest:
      properties:
        name:
          type: string
          maxLength: 256
          minLength: 1
          title: Name
        value:
          type: string
          title: Value
          default: ''
        description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Description
        category:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Category
        is_secret:
          type: boolean
          title: Is Secret
          default: false
      type: object
      required:
        - name
      title: CreateGlobalVariableRequest
    GlobalVariableResponse:
      properties:
        variable:
          $ref: '#/components/schemas/GlobalVariablesModel'
      type: object
      required:
        - variable
      title: GlobalVariableResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GlobalVariablesModel:
      properties:
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          description: ID of the team that owns this edge
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          description: ID of the user who created this edge
        updated_by:
          anyOf:
            - type: string
            - type: 'null'
          description: ID of the user who last updated this edge
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        _id:
          anyOf:
            - $ref: '#/components/schemas/PydanticObjectId'
            - type: 'null'
          description: MongoDB document ObjectID
        name:
          type: string
          maxLength: 256
          minLength: 1
          title: Name
          description: >-
            Unique variable name per team (valid identifier: alphanumeric +
            underscore)
        value:
          type: string
          title: Value
          description: >-
            Variable value — supports large text (e.g. long system prompts, JSON
            configs)
          default: ''
        description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Description
          description: Human-readable description of the variable's purpose
        category:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Category
          description: Grouping label (e.g. 'Prompts', 'Config', 'Credentials')
        is_secret:
          type: boolean
          title: Is Secret
          description: If True, the value is masked in list responses
          default: false
      type: object
      required:
        - name
      title: GlobalVariablesModel
      description: |-
        Stores organization/team-level global variables that are automatically
        injected into every workflow execution for that team.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````