# Lots Social API Documentation

Base URL: `https://api.lots.social`

## Overview

Social media management

## Authentication

All API requests require authentication using an API key. Include your API key in the request header:

```bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/endpoint
```

Or using the `X-API-Key` header:

```bash
curl -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/endpoint
```

### Getting an API Key

1. Log in to your account at https://api.lots.social/dashboard
2. Navigate to the API Keys section
3. Click "Create New API Key"
4. Copy and securely store your API key (it will only be shown once)

## Rate Limiting

API requests are rate-limited to prevent abuse. Default limits:

- **100 requests per minute** per API key
- Rate limit headers are included in all responses:
  - `X-RateLimit-Limit`: Maximum requests allowed
  - `X-RateLimit-Remaining`: Requests remaining in current window
  - `X-RateLimit-Reset`: Time when the rate limit resets

## Response Format

All API responses follow a consistent JSON format:

### Success Response

```json
{
  "success": true,
  "data": {
    // Response data
  },
  "meta": {
    "timestamp": "2025-01-06T00:00:00.000Z"
  }
}
```

### Error Response

```json
{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message"
  },
  "meta": {
    "timestamp": "2025-01-06T00:00:00.000Z"
  }
}
```

## Common Error Codes

| Code | HTTP Status | Description |
|------|-------------|-------------|
| `AUTHENTICATION_REQUIRED` | 401 | API key is missing or invalid |
| `RATE_LIMIT_EXCEEDED` | 429 | Too many requests, slow down |
| `ENDPOINT_NOT_FOUND` | 404 | The requested endpoint does not exist |
| `VALIDATION_ERROR` | 400 | Request parameters are invalid |
| `INTERNAL_ERROR` | 500 | Server error, please try again |

## API Endpoints

Total endpoints: **29**

### access

#### GET /api/v1/lotssocial/billing

Show what LotsSocial costs this person right now: LotsTech Credits balance, which plan (if any) covers how many accounts, how many accounts are paid from credits, the monthly credit spend, and roughly how long the balance lasts. Use it when they ask about credits, cost, billing or whether they can add another account, and after they buy credits to confirm the top-up arrived. Accounts beyond a plan cost credits monthly; posts, media storage, workspaces and brands are free (fair use). Members of someone else's workspace see only whether another account can be added, since the owner pays.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `workspace_id` (string, optional): Workspace to report on. Omit for the person's default workspace.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/billing
```

---

#### POST /api/v1/lotssocial/connect-link

Create a link the person opens in their browser to connect a social account (LinkedIn, Instagram, X and the rest) to LotsSocial. Use it whenever they ask to connect, add or link an account, or when list_connected_accounts shows the account they want to post to is missing. Give them the url and ask them to open it; never open it yourself, because it signs in to their social account. The link works for one hour and can connect several accounts. Accounts beyond plan coverage are paid from credits automatically; if the balance cannot cover the account, offer get_credits_link. Afterwards call list_connected_accounts to confirm.

**Rate Limit:** 20 requests/minute

**Request Parameters:**

- `brand_id` (string, optional): Optional brand in that workspace the account belongs to.
- `platform` (string, optional): Limit the page to one network. twitter is X; linkedin is a personal profile and linkedin_page a company page. Omit to offer every network.
- `workspace_id` (string, optional): Workspace the account joins. Omit to use the person's default workspace. Call list_workspaces when they run more than one business.

**Example Request:**

```bash
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://api.lots.social/api/v1/lotssocial/connect-link
```

---

#### POST /api/v1/lotssocial/credits/checkout

Create a checkout link to buy LotsTech Credits, which pay for connected accounts beyond plan coverage. Use it when the person asks to add credits, or when get_billing_status or get_connect_link shows there are not enough credits for what they want. Ask how much they want to spend if they have not said (minimum $10). Give them the url to pay in their browser; never ask for card details in the chat. Purchased credits never expire. Call get_billing_status afterwards to confirm they arrived.

**Rate Limit:** 10 requests/minute

**Request Parameters:**

- `amount_usd` (number, optional): How much to spend in US dollars; default 10.

**Example Request:**

```bash
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://api.lots.social/api/v1/lotssocial/credits/checkout
```

---

### media

#### POST /api/v1/lotssocial/media/metadata

Update a media asset description, alt text, or tags so people and agents can find and reuse it.

**Rate Limit:** 30 requests/minute

**Request Parameters:**

- `tags` (array, optional): Replacement tags; maximum 20.
- `alt_text` (string,null, optional): Accessibility text; maximum 500 characters.
- `media_id` (string, **required**): Media UUID.
- `description` (string,null, optional): Searchable asset description; maximum 2000 characters.
- `workspace_id` (string, optional): Optional workspace verification.

**Example Request:**

```bash
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"media_id":"00000000-0000-0000-0000-000000000000"}' \
  https://api.lots.social/api/v1/lotssocial/media/metadata
```

---

### research

#### GET /api/v1/lotssocial/research/brand-winners

Return the brand’s published posts ranked against its median engagement per platform, from saved analytics. Use for requested performance analysis or relevant prior examples. Reports coverage and relative performance; it does not require a research workflow.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `limit` (integer, optional): Max winners to return; default 8, max 20.
- `date_to` (string, optional): Optional ISO 8601 upper bound on published time.
- `brand_id` (string, optional): Brand UUID to scope winners to that brand's connected accounts.
- `platform` (string, optional): Optional platform filter, e.g. twitter, instagram, linkedin, tiktok, threads, bluesky, mastodon. Accepts any platform LotsSocial publishes to, since this reads your own analytics rather than an outside source.
- `date_from` (string, optional): Optional ISO 8601 lower bound on published time.
- `workspace_id` (string, optional): Optional workspace scope / membership check.
- `connected_account_ids` (array, optional): Optional account subset; intersected with accounts you can access.
- `include_underperformers` (boolean, optional): Also return up to 3 of the brand's weakest posts, marked band=underperformer, so structures that failed can be avoided. Default false.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/research/brand-winners
```

---

### strategy

#### GET /api/v1/lotssocial/platform-playbook

Get versioned, dated platform guidance with official-policy, observed-practice, and experimental evidence kept separate. Agents must obey official rules and treat reach guidance as testable rather than guaranteed.

**Rate Limit:** 120 requests/minute

**Request Parameters:**

- `platform` (string, optional): Optional platform key such as linkedin, x, instagram, tiktok, facebook, pinterest, youtube, google-business.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/platform-playbook
```

---

### General

#### POST /api/v1/lotssocial/posts/bulk

Create up to 50 drafts or scheduled posts for one shared set of connected accounts. Brand-scoped work must pass brand_id; media-required platforms need media before scheduling.

**Rate Limit:** 10 requests/minute

**Request Parameters:**

- `posts` (array, **required**): Post objects to create; maximum 50.
- `brand_id` (string, optional): Brand owning every selected account.
- `platforms` (array, **required**): Shared connected-account UUIDs.
- `workspace_id` (string, optional): Optional workspace UUID.

**Example Request:**

```bash
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"posts":[],"platforms":[]}' \
  https://api.lots.social/api/v1/lotssocial/posts/bulk
```

---

#### POST /api/v1/lotssocial/posts/:post_id/cancel

Cancel a scheduled post and return it to draft. Use list_social_posts with type=scheduled to find the post UUID.

**Rate Limit:** 30 requests/minute

**Request Parameters:**

- `post_id` (string, **required**): Scheduled post UUID.
- `workspace_id` (string, optional): Optional workspace verification.

**Example Request:**

```bash
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"post_id":"00000000-0000-0000-0000-000000000000"}' \
  https://api.lots.social/api/v1/lotssocial/posts/:post_id/cancel
```

---

#### GET /api/v1/lotssocial/funding

Check plan coverage, credit funding and current capacity rates. Plan coverage is used first; capacity beyond it is paid from the owner's credits automatically, charged daily (free credits first, then plan credits, then purchased). If credits run low, give the returned settings_url so the owner can top up or choose a plan.

**Rate Limit:** 100 requests/minute

**Request Parameters:**


**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/funding
```

---

#### POST /api/v1/lotssocial/media/uploads/complete

Finish an upload started with create_media_upload after the file has been PUT to upload_url. Verifies the file, saves it to the media library and returns its media_id for create_social_post or update_social_post. Add a description and alt text so the file can be found and reused.

**Rate Limit:** 20 requests/minute

**Request Parameters:**

- `tags` (array, optional): Optional organization/search tags.
- `alt_text` (string, optional): Short accessibility text.
- `file_key` (string, **required**): file_key returned by create_media_upload.
- `filename` (string, optional): Optional human-readable filename.
- `description` (string, optional): What the asset shows and when to use it.
- `folder_path` (string, optional): Optional media-library folder.
- `workspace_id` (string, optional): Same workspace passed to create_media_upload.

**Example Request:**

```bash
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_key":"example_file_key"}' \
  https://api.lots.social/api/v1/lotssocial/media/uploads/complete
```

---

#### POST /api/v1/lotssocial/media/uploads

Start uploading a video or image file you have locally. Returns a short-lived upload_url: PUT the raw file bytes to it with the given Content-Type header, then call complete_media_upload with the file_key to get a media_id. Use this for every video and for any image you cannot pass as a URL.

**Rate Limit:** 20 requests/minute

**Request Parameters:**

- `filename` (string, optional): Optional human-readable filename.
- `file_size` (integer, **required**): Exact file size in bytes. Videos up to 200 MB, images up to 25 MB.
- `mime_type` (string, **required**): video/mp4, video/quicktime, video/webm, image/jpeg, image/png, image/webp or image/gif.
- `folder_path` (string, optional): Optional media-library folder.
- `workspace_id` (string, optional): Optional destination workspace.

**Example Request:**

```bash
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_size":0,"mime_type":"example_mime_type"}' \
  https://api.lots.social/api/v1/lotssocial/media/uploads
```

---

#### POST /api/v1/lotssocial/posts

Create one draft or scheduled post for selected connected accounts. Use platform_captions for account-specific copy. Brand-scoped work must pass brand_id. Media-required platforms need media before scheduling; drafts may remain incomplete.

**Rate Limit:** 30 requests/minute

**Request Parameters:**

- `link` (string, optional): Optional HTTP/HTTPS URL.
- `type` (string, optional): Defaults to scheduled when scheduled_time is set, otherwise draft.
- `title` (string, optional): Optional title; required where the selected platform requires one.
- `caption` (string, **required**): Default caption; platform limits are validated.
- `brand_id` (string, optional): Brand owning every selected account.
- `media_ids` (array, optional): Ordered media UUIDs from upload_media/list_media.
- `media_tip` (string, optional): Short, concrete visual-production note when useful.
- `platforms` (array, optional): Connected-account UUIDs. Required when scheduling.
- `standalone` (boolean, optional): Optional. Leave unset for normal posts; campaigns are not required.
- `campaign_id` (string, optional): Optional campaign attribution. Not required to post.
- `workspace_id` (string, optional): Workspace UUID; otherwise derived from selected accounts.
- `scheduled_time` (string, optional): ISO 8601 time at least five minutes ahead.
- `platform_captions` (object, optional): Caption overrides keyed by connected-account UUID.
- `campaign_plan_version_id` (string, optional): Exact plan version that produced this post.

**Example Request:**

```bash
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"caption":"example_caption"}' \
  https://api.lots.social/api/v1/lotssocial/posts
```

---

#### POST /api/v1/lotssocial/workspaces

Create a new workspace owned by the person, for example one per business or client they run. Accounts, posts, media and results in different workspaces never mix. Workspaces are free and unlimited. Afterwards, use get_connect_link with the new workspace_id to connect its social accounts.

**Rate Limit:** 30 requests/minute

**Request Parameters:**

- `name` (string, **required**): Workspace name, usually the business name.
- `avatar_url` (string, optional): Optional logo image URL.
- `description` (string, optional): Optional short description.

**Example Request:**

```bash
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example_name"}' \
  https://api.lots.social/api/v1/lotssocial/workspaces
```

---

#### DELETE /api/v1/lotssocial/media/:media_id

Permanently deletes a media file. IMPORTANT: Requires media_id — call list_media first to get the UUID of the media file. Deletion is irreversible.

**Rate Limit:** 20 requests/minute

**Request Parameters:**

- `media_id` (string, **required**): REQUIRED. UUID of the media file to delete. Call list_media to get media UUIDs.
- `workspace_id` (string, optional): Optional workspace UUID for scoping. Call list_workspaces to get workspace IDs.

**Example Request:**

```bash
curl -X DELETE \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/media/:media_id
```

---

#### DELETE /api/v1/lotssocial/posts/:post_id

Permanently delete a draft or scheduled post from LotsSocial. Published posts cannot be deleted: LotsSocial cannot remove a post from the network, so the refusal returns each network's live link for the person to open and delete it there while signed in. Creators can delete only their own drafts; managers and admins can delete any draft or scheduled post in their workspace.

**Rate Limit:** 20 requests/minute

**Request Parameters:**

- `post_id` (string, **required**): Draft or scheduled post UUID.
- `workspace_id` (string, optional): Optional workspace verification.

**Example Request:**

```bash
curl -X DELETE \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/posts/:post_id
```

---

#### DELETE /api/v1/lotssocial/accounts/:account_id

Disconnect a connected social account from LotsSocial so it stops counting toward daily account charges. Use only when the person asks to remove that account. Its LotsSocial post history and analytics are removed with it; posts already on the network stay live there. Refused while the account is in a scheduled post: cancel or edit those posts first. Reconnect later with get_connect_link.

**Rate Limit:** 20 requests/minute

**Request Parameters:**

- `account_id` (string, **required**): Connected-account UUID from list_connected_accounts.
- `workspace_id` (string, optional): Optional workspace verification.

**Example Request:**

```bash
curl -X DELETE \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/accounts/:account_id
```

---

#### GET /api/v1/lotssocial/accounts/:account_id

Get one connected account's profile, connection health (active, expiring or needs reconnect, with the last error) and posting record. Use it when posts to the account fail or the person asks about it; if it needs reconnecting, give them get_connect_link.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `account_id` (string, **required**): REQUIRED. UUID of the connected social account to retrieve details for. Call list_connected_accounts to get account UUIDs.
- `workspace_id` (string, optional): Optional workspace UUID. Call list_workspaces to get workspace IDs.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/accounts/:account_id
```

---

#### GET /api/v1/lotssocial/analytics

Return normalized engagement totals, platform breakdowns, top posts, and analytics freshness for a workspace, brand, account subset, platform, or date range. Totals cover only posts with analytics; analytics_freshness.posts_without_analytics counts published posts that have none yet or whose network does not share them.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `limit` (number, optional): Top-post count; default 10.
- `date_to` (string, optional): Optional inclusive ISO 8601 end.
- `brand_id` (string, optional): Optional brand scope.
- `platform` (string, optional): Optional platform filter.
- `date_from` (string, optional): Optional inclusive ISO 8601 start.
- `workspace_id` (string, optional): Optional workspace scope.
- `connected_account_ids` (array, optional): Optional account subset; ignored when brand_id is supplied.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/analytics
```

---

#### GET /api/v1/lotssocial/media/:media_id

Retrieves details for a specific media file (image/video). IMPORTANT: Requires media_id — call list_media first to get the UUID of the media file.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `media_id` (string, **required**): REQUIRED. UUID of the media file to retrieve. Call list_media to get media UUIDs.
- `workspace_id` (string, optional): Optional workspace UUID for scoping. Call list_workspaces to get workspace IDs.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/media/:media_id
```

---

#### GET /api/v1/lotssocial/posts/:post_id/analytics

Return engagement analytics for one published post, per network. Use list_social_posts with type=posted to find the post UUID. A network entry with analytics_available=false has no data yet (or the network does not share it) and gives a reason: report that reason, never as zero engagement.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `post_id` (string, **required**): Published post UUID.
- `workspace_id` (string, optional): Optional workspace verification.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/posts/:post_id/analytics
```

---

#### GET /api/v1/lotssocial/posts/:post_id

Retrieves complete details for a single social post including all media files, platform logs, connected accounts, publishing status, and edit history. Enforces role-based access control - creators can only access their own posts unless they have manager/admin permissions.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `post_id` (string, **required**): REQUIRED. UUID of the post to retrieve from the ls_posts table. Must be a valid post ID that the authenticated user has permission to access.
- `workspace_id` (string, optional): Optional UUID of the workspace. If provided, verifies that the post belongs to this workspace before returning it. Useful for workspace-scoped operations to prevent accessing posts from other workspaces.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/posts/:post_id
```

---

#### GET /api/v1/lotssocial/brands

List the brands in a workspace with how many connected accounts each holds. Brands group accounts (for example one company or client); pass a brand_id when posting so only that brand's accounts are used. Create or regroup brands with create_brand and update_brand.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `workspace_id` (string, optional): Optional UUID to filter brands by workspace. Call list_workspaces to get workspace IDs. Omit to list all brands you have access to.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/brands
```

---

#### GET /api/v1/lotssocial/accounts

List connected social accounts for you, a workspace or one brand: platform, name, connection status, brand, caption_limit (characters this account accepts; X Premium allows 25,000, free X 280) and requires_media (Instagram, YouTube, Pinterest and TikTok need an image or video). Write each caption to its account's caption_limit. When working for a brand, pass brand_id: a workspace can hold several brands' accounts.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `brand_id` (string, optional): Optional UUID to filter connected accounts down to a single brand. Strongly recommended whenever a workspace has more than one brand (e.g. an owner running several LotsSocial brands from one workspace) — without it, accounts from every brand in the workspace are returned mixed together and you cannot tell which ones belong to the brand you are posting for.
- `workspace_id` (string, optional): Optional UUID to filter connected accounts by workspace. Call list_workspaces to get workspace IDs. Omit to list all your personal connected accounts.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/accounts
```

---

#### GET /api/v1/lotssocial/media

Search accessible images and videos by filename, tags, description, or alt text before asking the owner for a new asset.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `limit` (integer, optional): Maximum number of results to return. Default 20, max 100.
- `offset` (integer, optional): Number of results to skip for pagination. Default 0.
- `search` (string, optional): Semantic search across filename, tags, description, and alt text.
- `file_type` (string, optional): Filter by media type. image = JPG/PNG/GIF/WEBP, video = MP4/MOV. Default is all.
- `folder_path` (string, optional): Optional folder path to filter results. Used for organizing media into folders.
- `workspace_id` (string, optional): Optional UUID to filter media by workspace. Call list_workspaces to get workspace IDs. Omit to list all your personal media.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/media
```

---

#### GET /api/v1/lotssocial/posts

List draft, scheduled, or published posts with platform, media, creator, workspace, and optional brand filtering.

**Rate Limit:** 60 requests/minute

**Request Parameters:**

- `type` (string, **required**): Post state to list.
- `limit` (number, optional): Page size; default 20, maximum 100.
- `offset` (number, optional): Pagination offset.
- `brand_id` (string, optional): Optional brand filter.
- `created_by` (string, optional): Optional creator filter.
- `workspace_id` (string, optional): Optional workspace filter.

**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/posts
```

---

#### GET /api/v1/lotssocial/workspaces

Retrieves all workspaces the authenticated user is a member of. Returns workspace details including name, slug, type, owner, and the user role and join date for each workspace. Automatically checks subscription status.

**Rate Limit:** 60 requests/minute

**Request Parameters:**


**Example Request:**

```bash
curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  https://api.lots.social/api/v1/lotssocial/workspaces
```

---

#### PATCH /api/v1/lotssocial/posts/:post_id

Update an existing draft or scheduled post. Supports account-specific captions and replacement platform/media selections; preserves existing attribution and fields not changed by the request.

**Rate Limit:** 30 requests/minute

**Request Parameters:**

- `link` (string, optional): Replacement URL; empty string removes it.
- `title` (string, optional): Replacement title.
- `caption` (string, optional): Replacement default caption.
- `post_id` (string, **required**): Draft or scheduled post UUID.
- `brand_id` (string, optional): Brand owning every selected account.
- `media_ids` (array, optional): Replacement ordered media UUIDs.
- `media_tip` (string, optional): Replacement visual-production note.
- `platforms` (array, optional): Replacement connected-account UUIDs.
- `workspace_id` (string, optional): Optional workspace verification.
- `scheduled_time` (string,null, optional): New ISO 8601 schedule, or null to return to draft.
- `platform_captions` (object, optional): Caption overrides keyed by connected-account UUID.

**Example Request:**

```bash
curl -X PATCH \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"post_id":"00000000-0000-0000-0000-000000000000"}' \
  https://api.lots.social/api/v1/lotssocial/posts/:post_id
```

---

#### PATCH /api/v1/lotssocial/workspaces/:workspace_id

Rename a workspace or change its description or logo. Owners and admins only. Deleting a workspace, and managing its members, are done in the LotsSocial app.

**Rate Limit:** 30 requests/minute

**Request Parameters:**

- `name` (string, optional): New name.
- `avatar_url` (string, optional): New logo image URL.
- `description` (string, optional): New description.
- `workspace_id` (string, **required**): Workspace to update. Call list_workspaces for ids.

**Example Request:**

```bash
curl -X PATCH \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workspace_id":"00000000-0000-0000-0000-000000000000"}' \
  https://api.lots.social/api/v1/lotssocial/workspaces/:workspace_id
```

---

#### POST /api/v1/lotssocial/media

Store an image or video in the LotsSocial media library from a public link (url), or an image from base64, and return its media_id and public URL. Videos (MP4, MOV, WebM up to 200 MB) are streamed from the link. For a file on your computer, use create_media_upload and complete_media_upload instead. Add a description and alt text so the asset can be found and reused.

**Rate Limit:** 10 requests/minute

**Request Parameters:**

- `url` (string, optional): Public or signed http(s) link to an image or video.
- `tags` (array, optional): Optional organization/search tags.
- `alt_text` (string, optional): Short accessibility text.
- `filename` (string, optional): Optional human-readable filename.
- `image_url` (string, optional): Older name for url; prefer url.
- `mime_type` (string, optional): Optional type hint, e.g. video/mp4, when the link does not show it.
- `description` (string, optional): What the asset shows and when to use it.
- `folder_path` (string, optional): Optional media-library folder.
- `image_base64` (string, optional): Image as raw base64 or a data URI, instead of url.
- `workspace_id` (string, optional): Optional destination workspace.

**Example Request:**

```bash
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://api.lots.social/api/v1/lotssocial/media
```

---

## Support

For questions or issues, please visit https://api.lots.social/docs or contact our support team.

## SDK and Libraries

We provide official SDKs for popular programming languages:

- **JavaScript/TypeScript**: Coming soon
- **Python**: Coming soon
- **Go**: Coming soon

## Changelog

Stay updated with the latest API changes:

- Visit https://api.lots.social/docs for the latest documentation
- Check our changelog for API updates and deprecations

---

*Documentation generated on 2026-10-08T22:27:26.737Z*
