2026-03-03 15:49:43 -06:00
|
|
|
|
---
|
|
|
|
|
|
title: Companies
|
|
|
|
|
|
summary: Company CRUD endpoints
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
Manage companies within your Paperclip instance.
|
|
|
|
|
|
|
|
|
|
|
|
## List Companies
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
GET /api/companies
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Returns all companies the current user/agent has access to.
|
|
|
|
|
|
|
|
|
|
|
|
## Get Company
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
GET /api/companies/{companyId}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Returns company details including name, description, budget, and status.
|
|
|
|
|
|
|
|
|
|
|
|
## Create Company
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
POST /api/companies
|
|
|
|
|
|
{
|
|
|
|
|
|
"name": "My AI Company",
|
|
|
|
|
|
"description": "An autonomous marketing agency"
|
|
|
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Update Company
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
PATCH /api/companies/{companyId}
|
|
|
|
|
|
{
|
|
|
|
|
|
"name": "Updated Name",
|
|
|
|
|
|
"description": "Updated description",
|
2026-03-16 09:25:39 -05:00
|
|
|
|
"budgetMonthlyCents": 100000,
|
|
|
|
|
|
"logoAssetId": "b9f5e911-6de5-4cd0-8dc6-a55a13bc02f6"
|
2026-03-03 15:49:43 -06:00
|
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-06 16:39:35 -05:00
|
|
|
|
## Upload Company Logo
|
|
|
|
|
|
|
|
|
|
|
|
Upload an image for a company icon and store it as that company’s logo.
|
|
|
|
|
|
|
|
|
|
|
|
```
|
2026-03-16 10:05:14 -05:00
|
|
|
|
POST /api/companies/{companyId}/logo
|
2026-03-06 16:39:35 -05:00
|
|
|
|
Content-Type: multipart/form-data
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Valid image content types:
|
|
|
|
|
|
|
|
|
|
|
|
- `image/png`
|
|
|
|
|
|
- `image/jpeg`
|
|
|
|
|
|
- `image/jpg`
|
|
|
|
|
|
- `image/webp`
|
|
|
|
|
|
- `image/gif`
|
2026-03-06 17:18:43 -05:00
|
|
|
|
- `image/svg+xml`
|
2026-03-06 16:39:35 -05:00
|
|
|
|
|
2026-03-16 10:13:19 -05:00
|
|
|
|
Company logo uploads use the normal Paperclip attachment size limit.
|
|
|
|
|
|
|
2026-03-16 09:25:39 -05:00
|
|
|
|
Then set the company logo by PATCHing the returned `assetId` into `logoAssetId`.
|
|
|
|
|
|
|
2026-03-03 15:49:43 -06:00
|
|
|
|
## Archive Company
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
POST /api/companies/{companyId}/archive
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Archives a company. Archived companies are hidden from default listings.
|
|
|
|
|
|
|
|
|
|
|
|
## Company Fields
|
|
|
|
|
|
|
|
|
|
|
|
| Field | Type | Description |
|
|
|
|
|
|
|-------|------|-------------|
|
|
|
|
|
|
| `id` | string | Unique identifier |
|
|
|
|
|
|
| `name` | string | Company name |
|
|
|
|
|
|
| `description` | string | Company description |
|
|
|
|
|
|
| `status` | string | `active`, `paused`, `archived` |
|
2026-03-16 09:25:39 -05:00
|
|
|
|
| `logoAssetId` | string | Optional asset id for the stored logo image |
|
|
|
|
|
|
| `logoUrl` | string | Optional Paperclip asset content path for the stored logo image |
|
2026-03-03 15:49:43 -06:00
|
|
|
|
| `budgetMonthlyCents` | number | Monthly budget limit |
|
|
|
|
|
|
| `createdAt` | string | ISO timestamp |
|
|
|
|
|
|
| `updatedAt` | string | ISO timestamp |
|