---
title: "update_account"
canonical_url: "https://tweetstream.io/docs/api/agent-action-update-account"
last_updated: 2026-11-05
---

# update_account

Change the account itself: set its name, apply another account's referral code, and turn Discord billing reminders and limit alerts on or off. Each change is applied or refused on its own. Needs a recent email-code sign-in. Tier recent: the API key and X-TweetStream-Setup-Proof from an email code verified in the last 30 minutes. The MCP tool of the same name needs the tweetstream:settings scope.

Canonical URL: https://tweetstream.io/docs/api/agent-action-update-account

## `POST /api/agent/actions/update_account`

`https://tweetstream.io/api/agent/actions/update_account`

## Authorization

| Name | Type | Description |
| --- | --- | --- |
| `Authorization` | `string`, required | Bearer authentication with your TweetStream API key: `Bearer <key>`. |

## Headers

| Name | Type | Description |
| --- | --- | --- |
| `X-TweetStream-Setup-Proof` | `string`, required | The setupProof returned by email verification. It lasts 30 minutes; after that, verify a new email code. |

## Body

| Name | Type | Description |
| --- | --- | --- |
| `changes` | `object[]`, required | an array of at most 10 item(s) |
| `changes.kind` | `enum<string>`, required |  |
| `changes.name` | `string`, required | Surrounding spaces are dropped. |

### Body example

```json
{
  "changes": [
    {
      "kind": "name",
      "name": "Market Desk"
    }
  ]
}
```

## Response fields

| Name | Type | Description |
| --- | --- | --- |
| `results` | `object[]`, required |  |
| `results.kind` | `enum<string>`, required |  |
| `results.outcome` | `enum<string>`, required |  |

## Responses

| Status | Description | Headers |
| --- | --- | --- |
| `200` | Success |  |
| `400` | The input does not match the action's schema (INVALID_REQUEST) |  |
| `401` | Missing or invalid API key, or the setup proof is missing or expired (REVERIFY_EMAIL) |  |
| `403` | The request carried a foreign Origin |  |
| `429` | Rate limit reached (RATE_LIMITED); retry after retryAfterSeconds |  |
| `503` | Temporarily unavailable; retry later |  |

### 200

```json
{
  "results": [
    {
      "kind": "name",
      "outcome": "applied"
    }
  ]
}
```

### 400

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 401

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 403

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 429

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 503

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://tweetstream.io/api/agent/actions/update_account \
  --header "Authorization: Bearer $TWEETSTREAM_API_KEY" \
  --header "X-TweetStream-Setup-Proof: $TWEETSTREAM_SETUP_PROOF" \
  --header 'Content-Type: application/json' \
  --data '{
  "changes": [
    {
      "kind": "name",
      "name": "Market Desk"
    }
  ]
}'
```

### JavaScript

```javascript
const response = await fetch("https://tweetstream.io/api/agent/actions/update_account", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TWEETSTREAM_API_KEY}`,
    "X-TweetStream-Setup-Proof": process.env.TWEETSTREAM_SETUP_PROOF,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "changes": [
      {
        "kind": "name",
        "name": "Market Desk"
      }
    ]
  }),
});

console.log(response.status, await response.json());
```

### Python

```python
import os
import requests

response = requests.post(
    "https://tweetstream.io/api/agent/actions/update_account",
    headers={"Authorization": f"Bearer {os.environ['TWEETSTREAM_API_KEY']}", "X-TweetStream-Setup-Proof": os.environ["TWEETSTREAM_SETUP_PROOF"]},
    json={
        "changes": [
            {
                "kind": "name",
                "name": "Market Desk",
            },
        ],
    },
)

print(response.status_code, response.json())
```
