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

# Set User Agent

> Mark your listings and buy orders as automated

## Overview

Sets the user agent timestamp for the authenticated user, indicating that a bot is actively running. This causes your listings and buy orders to show as "automated" for 10 minutes (600 seconds).

<Tip>
  Call this endpoint every 5-9 minutes from your bot to maintain automated status (expires after 10 minutes).
</Tip>

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Your site API key
</ParamField>

## Rate Limit

**1 request per minute**

## Query Parameters

<ParamField query="multiaccounts" type="string">
  Comma-separated list of linked account Steam IDs to also set user agent for.

  Example: `76561198001234567,76561198007654321`
</ParamField>

## Response

<ResponseField name="refresh_at" type="integer">
  Unix timestamp when the user agent will expire (current time + 600 seconds).
  Your bot should refresh before this time.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.liquid.tf/api/dev/set_user_agent" \
    -H "X-API-Key: YOUR_SITE_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.liquid.tf/api/dev/set_user_agent', {
    headers: {
      'X-API-Key': 'YOUR_SITE_API_KEY'
    }
  });

  const data = await response.json();
  console.log('Refresh at:', new Date(data.refresh_at * 1000));
  ```

  ```python Python theme={null}
  import requests
  import time

  response = requests.get(
      'https://api.liquid.tf/api/dev/set_user_agent',
      headers={'X-API-Key': 'YOUR_SITE_API_KEY'}
  )

  data = response.json()
  print(f'Refresh at: {time.ctime(data["refresh_at"])}')
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "refresh_at": 1704067800
  }
  ```
</ResponseExample>

## How It Works

<Steps>
  <Step title="Set user agent">
    Call this endpoint from your bot
  </Step>

  <Step title="Automated status active">
    Your listings/buy orders show a lightning icon (⚡) for 10 minutes
  </Step>

  <Step title="Refresh before expiry">
    Call again before `refresh_at` timestamp to maintain status
  </Step>
</Steps>

## Linked Accounts

When `multiaccounts` is provided:

* The user agent is set for those linked accounts in addition to the main account
* Listings/buy orders created with a `multiaccount_proxy` will check that linked account's user agent status
* For buy orders, automation status can be triggered by either the linked account's user agent OR the main account's autoaccept feature

<Note>
  The lightning icon indicates automated listings/buy orders, helping users know they'll receive instant trade offers.
</Note>
