paperclip_apply_company_import
Apply a validated company import bundle to a target company. Writes new records for agents, projects, issues, and skills with configurable collision handling.
Instructions
⚠ Board-only: Apply company import
Args:
companyId: string — Target company UUID
source: union — { type: 'inline', rootPath: string, files: Record<string,string> } or { type: 'github', url: string }
include: object — Which resource types to apply (company, agents, projects, issues, skills)
target: object — { mode: 'existing_company'|'new_company', companyId: string } — must match top-level companyId
agents: 'all' | string[] (optional) — Agents to import (default: 'all')
collisionStrategy: 'rename'|'skip'|'replace' (optional) — Collision handling (default: rename)
selectedFiles: string[] (optional) — Subset of bundle files to apply
adapterOverrides: Record<string,unknown> (optional) — Adapter overrides from the preview
Returns: Import result counts (JSON only): { insertedAgents, insertedProjects, insertedIssues, insertedSkills, warnings }. Destructive — writes new records.
Examples:
Use when: applying a validated import bundle; run paperclip_preview_company_import first to inspect changes
Don't use when: you just want to inspect what would change — use paperclip_preview_company_import
Error Handling:
400: invalid bundle → verify source files are well-formed
401: authentication failed → check PAPERCLIP_API_KEY
403: board key required → this endpoint requires board-level authentication
404: company not found → verify ID with paperclip_list_companies
409: conflict not resolvable with current strategy → try a different collisionStrategy
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyId | Yes | Target company UUID to apply the import into | |
| source | Yes | Bundle source: 'inline' provides files in the request; 'github' fetches from a repo URL | |
| include | Yes | Which resource types to apply (company, agents, projects, issues, skills) | |
| target | Yes | Import destination | |
| agents | Yes | Which agents to import: literal 'all' or an array of agent URL keys | all |
| collisionStrategy | Yes | How to handle name/key collisions: 'rename' (append suffix), 'skip' (leave existing), 'replace' (overwrite) | rename |
| selectedFiles | No | Subset of file paths from the bundle to apply (omit for all files in the bundle) | |
| adapterOverrides | No | Adapter-specific overrides map from the preview step (key: adapter name, value: override config) |