to navigate
to select
esc to close
GET Globals

Globals API

https://api.airogelcms.com/v1/accounts/:account_id/globals

Globals are site-wide content variables accessible in all templates (e.g., footer content, social links, contact info).

Supported Operations

  • GET /v1/accounts/:account_id/globals - List globals
  • GET /v1/accounts/:account_id/globals/:id - Get a global
  • POST /v1/accounts/:account_id/globals - Create a global
  • PUT /v1/accounts/:account_id/globals/:id - Update a global
  • DELETE /v1/accounts/:account_id/globals/:id - Delete a global

Structure

Globals contain:

  • An embedded blueprint defining the fields
  • Field values that are accessible site-wide

In Liquid templates, globals are accessed by their handle:
{{ footer.copyright }}
{{ site_settings.logo }}

Parameters

Name Type Required Description
account_id string Required Your account ID
handle string Optional Filter by exact handle match
page integer Optional Page number (default: 1)

Request Example

# Create global with fields
curl -X POST \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Footer",
    "handle": "footer",
    "fields": [
      {
        "handle": "copyright",
        "display": "Copyright",
        "type": "text",
        "position": 1
      },
      {
        "handle": "social_links",
        "display": "Social Links",
        "type": "dictionary",
        "position": 2
      }
    ],
    "copyright": "2025 My Company",
    "social_links": {
      "twitter": "https://twitter.com/example"
    }
  }' \
  https://api.airogelcms.com/v1/accounts/$ACCOUNT_ID/globals

# Update global values
curl -X PUT \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"copyright": "2026 My Company Updated"}' \
  https://api.airogelcms.com/v1/accounts/$ACCOUNT_ID/globals/footer

Response Example

{
  "id": "stgbl_abc123",
  "handle": "footer",
  "name": "Footer",
  "blueprint": {
    "id": "blprt_xyz789",
    "handle": "footer",
    "title": "Footer",
    "fields": [
      {
        "handle": "copyright",
        "display": "Copyright",
        "type": "BlueprintFieldText",
        "position": 1,
        "options": {}
      },
      {
        "handle": "social_links",
        "display": "Social Links",
        "type": "BlueprintFieldDictionary",
        "position": 2,
        "options": {}
      }
    ]
  },
  "copyright": "2025 My Company",
  "social_links": {
    "twitter": "https://twitter.com/example",
    "facebook": "https://facebook.com/example"
  },
  "created_at": "2025-01-08T12:00:00Z",
  "updated_at": "2025-01-08T12:00:00Z"
}

Additional Notes

Common use cases:

  • Site configuration (logo, tagline, contact info)
  • Footer content
  • Social media links
  • Analytics tracking codes
  • Feature flags

Handles: Global handles must use snake_case (e.g., 'site_settings', not 'site-settings') as they become Liquid template variable names.