# Update Account Limits

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

To update account-specific operational limits (like profile visits, searches, or batch size), use this endpoint. The `params` object contains the updated values for batch size, limits per action over a rolling 24 hours, 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) Limit for the attribute, like profiles, searches, or messages, in any 24 hours: each action frees its slot 24 hours after it was counted |

## 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">
  Actions counted for this attribute in the last 24 hours, when the account was last used. For a live count, read `limits` on the account. Example: `0`
</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>
  `limits` on the account ([List Accounts](https://staging.docs.lobstr.io/docs/list-accounts)) gives each limit's live use over the last 24 hours, what remains, and when capacity returns.
</Note>

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

## Code Examples

<CodeGroup>
```bash cURL
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
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,      # Profiles per 24h
        "searches": 199,      # Searches per 24h
        "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
{
  "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
{
  "detail": "Invalid parameters. Check account hash and type."
}
```

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