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

# Update Account Limits

> Configure account-specific operational limits for rate limiting and batch processing

To update account-specific operational limits (like daily profile visits, search limits, or batch size), use this endpoint. The `params` object contains the updated values for batch size, daily limits per action, or time gaps between batches.

### Parameter Keys

| Param Key        | Type    | Description                                                                            |
| ---------------- | ------- | -------------------------------------------------------------------------------------- |
| **batch**        | integer | (Optional) Updated batch size per launch. Controls how many actions run per batch      |
| **batch\_hours** | integer | (Optional) Delay in hours between each batch run                                       |
| **\[attribute]** | integer | (Optional) Daily limit for the specific attribute like profiles, searches, or messages |

## Headers

<ParamField header="Authorization" type="string" required>
  Your API authentication token. Value: `Token YOUR_API_KEY`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be application/json. Value: `application/json`
</ParamField>

## Request Body

<ParamField body="account" type="string" required>
  Account hash to update. Example: `"2372242060b59e03ac39f7691765bbf8"`
</ParamField>

<ParamField body="type" type="string" required>
  Account type identifier. Example: `"sales-nav-sync"`
</ParamField>

<ParamField body="params" type="object" required>
  Object containing limit parameters to update. Example: `{"batch": 20, "profiles": 150, "searches": 199, "batch_hours": 2}`
</ParamField>

## Response Field Explanations

<ResponseField name="params.default" type="object">
  Default account limits for this account type. Example: `{...}`
</ResponseField>

<ResponseField name="params.user" type="object">
  User-configured limits with current usage tracking. Example: `{...}`
</ResponseField>

<ResponseField name="params.user.batch.current" type="integer">
  Current batch count. Example: `0`
</ResponseField>

<ResponseField name="params.user.batch.last_batch_at" type="string">
  Timestamp of last batch execution. Example: `"18/07/2022 21:47:09"`
</ResponseField>

<ResponseField name="params.user.[attribute].value" type="integer">
  Current usage count for this attribute today. Example: `0`
</ResponseField>

<ResponseField name="params.user.[attribute].timestamp" type="integer">
  Unix timestamp when the daily counter resets. Example: `1716508800`
</ResponseField>

<Tip>
  Adjust batch and batch\_hours to control how aggressively your account scrapes. Lower values help avoid platform rate limits.
</Tip>

<Warning>
  Don't exceed the max values defined in the account type's default params. Higher limits may trigger anti-bot measures.
</Warning>

<Note>
  The params.user object tracks real-time usage. Use it to monitor how close you are to daily limits.
</Note>

<Tip>
  Set conservative limits initially and increase gradually based on your account's health and platform tolerance.
</Tip>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.lobstr.io/v1/accounts" \
    -H "Authorization: Token YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "account": "2372242060b59e03ac39f7691765bbf8",
      "type": "sales-nav-sync",
      "params": {
        "batch": 20,
        "profiles": 150,
        "searches": 199,
        "batch_hours": 2
      }
    }'
  ```

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

  url = "https://api.lobstr.io/v1/accounts"
  headers = {
      "Authorization": "Token YOUR_API_KEY",
      "Content-Type": "application/json"
  }

  # Update limits for a Sales Navigator account
  payload = {
      "account": "2372242060b59e03ac39f7691765bbf8",
      "type": "sales-nav-sync",
      "params": {
          "batch": 20,          # Profiles per launch
          "profiles": 150,      # Daily profile limit
          "searches": 199,      # Daily search limit
          "batch_hours": 2      # Hours between batches
      }
  }

  response = requests.post(url, headers=headers, json=payload)
  data = response.json()

  print(f"Account: {data['username']}")
  print(f"Status: {data['status_code_info']}")
  print(f"\nUpdated limits:")

  user_params = data['params']['user']
  print(f"   Batch size: {user_params['batch']['max']}")
  print(f"   Profiles/day: {user_params['profiles']['max']}")
  print(f"   Searches/day: {user_params['searches']['max']}")
  print(f"   Batch interval: {user_params['batch_hours']['max']} hours")
  ```
</CodeGroup>

## Response

```json 200 theme={null}
{
  "id": "2372242060b59e03ac39f7691765bbf8",
  "object": "account",
  "username": "user@domain.com",
  "created_at": "2022-06-16T05:26:31Z",
  "last_synchronization_time": "2022-06-17T14:01:08Z",
  "status": "200",
  "status_code_info": "synchronized",
  "status_code_description": "Success!",
  "type": "sales-nav-sync",
  "params": {
    "default": {
      "batch": {
        "max": 20,
        "default": 20,
        "attribute": "profiles",
        "description": "Number of profiles visited per launch"
      },
      "profiles": {
        "max": 150,
        "default": 150,
        "description": "Maximum number of profile requests per day"
      },
      "searches": {
        "max": 200,
        "default": 200,
        "description": "Maximum number of searches per day"
      },
      "batch_hours": {
        "max": 2,
        "default": 2,
        "description": "Hours between each launch during a day"
      }
    },
    "user": {
      "batch": {
        "max": 20,
        "current": 0,
        "default": 20,
        "attribute": "profiles",
        "start_time": null,
        "last_batch_at": "18/07/2022 21:47:09"
      },
      "profiles": {
        "max": 150,
        "value": 0,
        "default": 150,
        "timestamp": 1716508800,
        "start_time": null
      },
      "searches": {
        "max": 199,
        "value": 0,
        "default": 200,
        "timestamp": 1716508800,
        "start_time": null
      },
      "batch_hours": {
        "max": 2,
        "value": 0,
        "default": 2,
        "description": "Hours between each launch during a day"
      }
    }
  },
  "updated_at": "2025-03-20T11:49:01Z",
  "account_type_hash": "cf67cafe03776e796f02a29f29ab2866",
  "squids": [],
  "baseurl": "https://www.linkedin.com",
  "cookies": [
    {"name": "li_at", "required": true},
    {"name": "JSESSIONID", "required": true},
    {"name": "li_a", "required": true}
  ],
  "icon": "<base64 image data>"
}
```

```json 400 theme={null}
{
  "detail": "Invalid parameters. Check account hash and type."
}
```

```json 404 theme={null}
{
  "detail": "Account not found."
}
```
