# Focus API

> Focus mode: everything a network's API allows for one connected account. The manifest lists the resources (with JSON schemas for tables and forms); the generic operations run them. Typed per-network aliases live under the "Focus · " tags.

Base URL: `https://api.socialit.com/v1`. Authenticate with `Authorization: Bearer <API key or OAuth token>`.

## List networks with Focus mode

`GET /focus/platforms`

Networks that publish a focus module, with their navigation groups, resource / action counts and MCP toolset.

Access: `read` · MCP tool: `list-focus-platforms`

```bash
curl "https://api.socialit.com/v1/focus/platforms" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "list",
  "data": [
    {
      "object": "focus_platform",
      "platform": "string",
      "label": "string",
      "groups": [
        {
          "key": "string",
          "label": "string",
          "icon": "string"
        }
      ],
      "resource_count": 1,
      "action_count": 1,
      "operation_count": 1,
      "toolset": "string"
    }
  ],
  "page": 1,
  "limit": 1,
  "total": 1,
  "has_more": true,
  "next_page_url": "https://example.com",
  "previous_page_url": "https://example.com"
}
```

## Get the Focus manifest of an account

`GET /accounts/{accountId}/focus`

Resources of the account's network with their JSON schemas, operations and actions. Availability is computed from the account's granted scopes; missing_scopes and reconnect_url (connect with scope_set=focus) tell how to unlock the rest.

Access: `read` · MCP tool: `get-focus-manifest`

### Path parameters

- `accountId` (string; required; 1–80 characters): Social account id (sa_…)

```bash
curl "https://api.socialit.com/v1/accounts/sa_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd/focus" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "focus_manifest",
  "platform": "string",
  "label": "string",
  "account": {
    "object": "account",
    "id": "string",
    "platform": "string",
    "account_type": "string",
    "username": "string",
    "display_name": "string",
    "avatar_url": "https://example.com",
    "status": "active",
    "profile_id": "string",
    "scopes": [
      "string"
    ]
  },
  "groups": [
    {
      "key": "string",
      "label": "string",
      "icon": "string"
    }
  ],
  "resources": [
    {
      "key": "string",
      "label": "string",
      "description": "string",
      "icon": "string",
      "group": "string",
      "view": "string",
      "singleton": true,
      "id_field": "string",
      "title_field": "string",
      "columns": [
        "string"
      ],
      "fields": {},
      "operations": {
        "list": {
          "available": true,
          "query": {},
          "body": {},
          "summary": "string"
        },
        "get": {
          "available": true,
          "query": {},
          "body": {},
          "summary": "string"
        },
        "create": {
          "available": true,
          "query": {},
          "body": {},
          "summary": "string"
        },
        "update": {
          "available": true,
          "query": {},
          "body": {},
          "summary": "string"
        },
        "delete": {
          "available": true,
          "query": {},
          "body": {},
          "summary": "string"
        }
      },
      "actions": [
        {
          "name": "string",
          "label": "string",
          "target": "item",
          "destructive": true,
          "body": {},
          "summary": "string"
        }
      ],
      "available": true,
      "missing_scopes": [
        "string"
      ],
      "docs": "string",
      "typed_path": "string"
    }
  ],
  "missing_scopes": [
    "string"
  ],
  "needs_reconnect": true,
  "reconnect_url": "https://example.com"
}
```

## List focus items (or get a singleton resource)

`GET /accounts/{accountId}/focus/{resource}`

Lists items of a resource with cursor pagination (cursor = previous next_cursor). Other query parameters are validated against the resource's operations.list.query schema and passed to the network. For singleton resources (singleton: true in the manifest) returns the object.

Access: `read` · MCP tool: `list-focus-items`

### Path parameters

- `accountId` (string; required; 1–80 characters): Social account id (sa_…)
- `resource` (string; required; 1–80 characters, pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$): Focus resource key from the manifest (e.g. videos)

### Query parameters

- `cursor` (string): Opaque cursor from next_cursor
- `limit` (integer; 1–500): Page size (the network may cap it lower)

```bash
curl "https://api.socialit.com/v1/accounts/sa_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd/focus/RESOURCE" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "list",
  "data": [
    {}
  ],
  "limit": 1,
  "total": 1,
  "has_more": true,
  "next_cursor": "string",
  "next_page_url": "https://example.com",
  "previous_page_url": "https://example.com"
}
```

## Create a focus item

`POST /accounts/{accountId}/focus/{resource}`

Body validated against the resource's operations.create.body schema.

Access: `write` · MCP tool: `create-focus-item`

### Path parameters

- `accountId` (string; required; 1–80 characters): Social account id (sa_…)
- `resource` (string; required; 1–80 characters, pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$): Focus resource key from the manifest (e.g. videos)

### Headers

- `Idempotency-Key` (string; ≤ 255 characters): Unique key (for example a UUID) that makes retries safe: a repeated request with the same key and body returns the first response (Idempotent-Replayed: true) for 24 hours.

```bash
curl -X POST "https://api.socialit.com/v1/accounts/sa_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd/focus/RESOURCE" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response 201:

```json
{}
```

## Update a singleton focus resource

`PATCH /accounts/{accountId}/focus/{resource}`

For resources with singleton: true (channel settings, chat info, …). Body validated against operations.update.body.

Access: `write` · MCP tool: `update-focus-singleton`

### Path parameters

- `accountId` (string; required; 1–80 characters): Social account id (sa_…)
- `resource` (string; required; 1–80 characters, pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$): Focus resource key from the manifest (e.g. videos)

```bash
curl -X PATCH "https://api.socialit.com/v1/accounts/sa_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd/focus/RESOURCE" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response 200:

```json
{}
```

## Delete or reset a singleton focus resource

`DELETE /accounts/{accountId}/focus/{resource}`

Access: `write` · MCP tool: `delete-focus-singleton`

### Path parameters

- `accountId` (string; required; 1–80 characters): Social account id (sa_…)
- `resource` (string; required; 1–80 characters, pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$): Focus resource key from the manifest (e.g. videos)

```bash
curl -X DELETE "https://api.socialit.com/v1/accounts/sa_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd/focus/RESOURCE" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "focus_item",
  "platform": "string",
  "resource": "string",
  "id": "string",
  "deleted": true,
  "result": null
}
```

## Get a focus item

`GET /accounts/{accountId}/focus/{resource}/{itemId}`

Query parameters are passed to the network (validated against operations.get.query when present).

Access: `read` · MCP tool: `get-focus-item`

### Path parameters

- `accountId` (string; required; 1–80 characters): Social account id (sa_…)
- `resource` (string; required; 1–80 characters, pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$): Focus resource key from the manifest (e.g. videos)
- `itemId` (string; required; 1–512 characters): The network's id of the item

### Query parameters

- `type` (any)
- `additionalProperties` (any)

```bash
curl "https://api.socialit.com/v1/accounts/sa_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd/focus/RESOURCE/ITEM_ID" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{}
```

## Update a focus item

`PATCH /accounts/{accountId}/focus/{resource}/{itemId}`

Body validated against operations.update.body.

Access: `write` · MCP tool: `update-focus-item`

### Path parameters

- `accountId` (string; required; 1–80 characters): Social account id (sa_…)
- `resource` (string; required; 1–80 characters, pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$): Focus resource key from the manifest (e.g. videos)
- `itemId` (string; required; 1–512 characters): The network's id of the item

```bash
curl -X PATCH "https://api.socialit.com/v1/accounts/sa_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd/focus/RESOURCE/ITEM_ID" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response 200:

```json
{}
```

## Delete a focus item

`DELETE /accounts/{accountId}/focus/{resource}/{itemId}`

Access: `write` · MCP tool: `delete-focus-item`

### Path parameters

- `accountId` (string; required; 1–80 characters): Social account id (sa_…)
- `resource` (string; required; 1–80 characters, pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$): Focus resource key from the manifest (e.g. videos)
- `itemId` (string; required; 1–512 characters): The network's id of the item

```bash
curl -X DELETE "https://api.socialit.com/v1/accounts/sa_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd/focus/RESOURCE/ITEM_ID" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "focus_item",
  "platform": "string",
  "resource": "string",
  "id": "string",
  "deleted": true,
  "result": null
}
```

## Run a focus action

`POST /accounts/{accountId}/focus/{resource}/{itemId}/{action}`

Item actions (target: "item") take the item id; collection actions (target: "collection") and actions of singleton resources use - as itemId (…/focus/{resource}/-/{action}). Body validated against the action's body schema.

Access: `write` · MCP tool: `run-focus-action`

### Path parameters

- `accountId` (string; required; 1–80 characters): Social account id (sa_…)
- `resource` (string; required; 1–80 characters, pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$): Focus resource key from the manifest (e.g. videos)
- `itemId` (string; required; 1–512 characters): The network's id of the item
- `action` (string; required; 1–80 characters, pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$): Action name from the manifest (e.g. transition)

### Headers

- `Idempotency-Key` (string; ≤ 255 characters): Unique key (for example a UUID) that makes retries safe: a repeated request with the same key and body returns the first response (Idempotent-Replayed: true) for 24 hours.

```bash
curl -X POST "https://api.socialit.com/v1/accounts/sa_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd/focus/RESOURCE/ITEM_ID/ACTION" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response 200:

```json
{
  "object": "focus_action_result",
  "platform": "string",
  "resource": "string",
  "action": "string",
  "id": "string",
  "result": null
}
```


---

Source: https://socialit.com/docs/api-reference/focus/
