---
title: "Track an account"
description: "Follows the account in Discover, or stops. Needs the `videos:create` permission."
---

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

Path: Mosio REST API › Discover

`PATCH /v1/discover/accounts/{id}`

Follows the account in Discover, or stops. Needs the `videos:create` permission.

## Authentication

- `apiKey`, apiKey, in header, header `x-api-key`

## Path parameters

- `id` (`updateDiscoverAccount.path.id`; string, required)

## Request body

_Required._

- `tracked` (`updateDiscoverAccount.tracked`; boolean, required)

## Example request

```json
{
  "tracked": true
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://app.mosio.me/v1/discover/accounts/<id>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "tracked": true
}
'
```

### TypeScript

```typescript
const url = 'https://app.mosio.me/v1/discover/accounts/<id>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', 'x-api-key': '<x-api-key>'},
  body: JSON.stringify({tracked: true})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.mosio.me/v1/discover/accounts/<id>"

payload = { "tracked": True }
headers = {
    "Content-Type": "application/json",
    "x-api-key": "<x-api-key>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The account.

#### Example

```json
{
  "id": "string",
  "platform": "tiktok",
  "handle": "string",
  "name": "string",
  "avatar_url": "string",
  "median_views": 0,
  "url": "string",
  "followers": 0,
  "posts_count": 0,
  "posts_seen": -9007199254740991,
  "outliers": -9007199254740991,
  "avg_engagement": 0,
  "posts_per_week": 0,
  "tracked": true,
  "last_seen_at": "string"
}
```

- `id` (`updateDiscoverAccount.response.200.id`; string, required)
- `platform` (`updateDiscoverAccount.response.200.platform`; string, required)
  - one of `"tiktok"`, `"instagram"`, `"youtube"`, `"facebook"`
- `handle` (`updateDiscoverAccount.response.200.handle`; string, required)
- `name` (`updateDiscoverAccount.response.200.name`; string | null, required)
- `avatar_url` (`updateDiscoverAccount.response.200.avatar_url`; string | null, required)
- `median_views` (`updateDiscoverAccount.response.200.median_views`; number | null, required)
- `url` (`updateDiscoverAccount.response.200.url`; string | null, required)
- `followers` (`updateDiscoverAccount.response.200.followers`; number | null, required)
- `posts_count` (`updateDiscoverAccount.response.200.posts_count`; number | null, required)
- `posts_seen` (`updateDiscoverAccount.response.200.posts_seen`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `outliers` (`updateDiscoverAccount.response.200.outliers`; integer, required)
  - min -9007199254740991; max 9007199254740991
- `avg_engagement` (`updateDiscoverAccount.response.200.avg_engagement`; number | null, required)
- `posts_per_week` (`updateDiscoverAccount.response.200.posts_per_week`; number | null, required)
- `tracked` (`updateDiscoverAccount.response.200.tracked`; boolean, required)
- `last_seen_at` (`updateDiscoverAccount.response.200.last_seen_at`; string, required)

### 400

The request body is not valid JSON or does not match the schema.

#### Example

```json
{
  "error": "unauthorized",
  "message": "string",
  "details": null
}
```

- `error` (`updateDiscoverAccount.response.400.error`; string, required) — A stable error code.
  - one of `"unauthorized"`, `"invalid_api_key"`, `"insufficient_scope"`, `"forbidden"`, `"invalid_input"`, `"invalid_composition"`, `"idempotency_conflict"`, `"project_edited"`, `"quota_exceeded"`, `"insufficient_credits"`, `"too_many_active_renders"`, `"duration_too_long"`, `"not_found"`, `"internal_error"`
- `message` (`updateDiscoverAccount.response.400.message`; string, required) — A message for people, in Indonesian.
- `details` (`updateDiscoverAccount.response.400.details`; unknown, optional) — More about the error, such as the fields to fix.

### 401

The API key is missing or not valid.

#### Example

```json
{
  "error": "unauthorized",
  "message": "Kirim API key di header x-api-key."
}
```

- `error` (`updateDiscoverAccount.response.401.error`; string, required) — A stable error code.
  - one of `"unauthorized"`, `"invalid_api_key"`, `"insufficient_scope"`, `"forbidden"`, `"invalid_input"`, `"invalid_composition"`, `"idempotency_conflict"`, `"project_edited"`, `"quota_exceeded"`, `"insufficient_credits"`, `"too_many_active_renders"`, `"duration_too_long"`, `"not_found"`, `"internal_error"`
- `message` (`updateDiscoverAccount.response.401.message`; string, required) — A message for people, in Indonesian.
- `details` (`updateDiscoverAccount.response.401.details`; unknown, optional) — More about the error, such as the fields to fix.

### 404

No such video or file in this workspace.

#### Example

```json
{
  "error": "unauthorized",
  "message": "string",
  "details": null
}
```

- `error` (`updateDiscoverAccount.response.404.error`; string, required) — A stable error code.
  - one of `"unauthorized"`, `"invalid_api_key"`, `"insufficient_scope"`, `"forbidden"`, `"invalid_input"`, `"invalid_composition"`, `"idempotency_conflict"`, `"project_edited"`, `"quota_exceeded"`, `"insufficient_credits"`, `"too_many_active_renders"`, `"duration_too_long"`, `"not_found"`, `"internal_error"`
- `message` (`updateDiscoverAccount.response.404.message`; string, required) — A message for people, in Indonesian.
- `details` (`updateDiscoverAccount.response.404.details`; unknown, optional) — More about the error, such as the fields to fix.


Source: https://docs.mosio.me/api/update-discover-account/index.md
