docs(connectors): add POST /api/connectors/files (image upload contract)

Merged
SW
4mo ago
+116-1

What

Documents the new POST /api/connectors/files endpoint that stages an image into Composio storage so it can be attached to connector actions with file_uploadable fields (LinkedIn/X image posts). This is the contract half of recoupable/chat#1809 (docs → api).

Changes (api-reference/openapi/social.json, additive — 110 insertions, 0 deletions)

  • New POST /api/connectors/files path, mirroring the execute-action block: apiKey/bearer security, responses 200 / 400 / 401 / 502.
  • New schemas:
    • UploadConnectorFileRequest — { url (uri, required), toolSlug (required) }. (URL-only by decision; the SDK composio.files.upload takes { file, toolSlug, toolkitSlug } and infers name/mimetype, so no mimetype/filename inputs — accuracy over symmetry.)
    • UploadConnectorFileResponse — flat { success, name, mimetype, s3key } (no data wrapper, per repo convention).
  • upload-file.mdx reference page (frontmatter-only) + docs.json nav entry.

Flow it documents

POST /api/connectors/files { url, toolSlug } → { name, mimetype, s3key } → pass that into parameters.images[] on POST /api/connectors/actions with LINKEDIN_CREATE_LINKED_IN_POST.

Merge order: this docs PR → api PR (endpoint impl, TDD). cc recoupable/chat#1809

🤖 Generated with Claude Code


Summary by cubic

Documents POST /api/connectors/files to stage images in Connector storage for actions with file_uploadable fields. Upload by URL and use the returned { name, mimetype, s3key } in parameters.images[] when executing an action.

  • New Features
    • Added POST /api/connectors/files to api-reference/openapi/social.json with apiKey/bearer auth and 200/400/401/502 responses.
    • New schemas: UploadConnectorFileRequest (url, toolSlug) and UploadConnectorFileResponse (success, name, mimetype, s3key).
    • Added api-reference/connectors/upload-file.mdx and nav entry; updated Execute Connector Action description with a cross-link. Simplified wording and removed vendor names.

Summary by CodeRabbit

  • New Features

    • Added a new endpoint to stage connector files from an image URL for use with subsequent connector actions.
  • Documentation

    • Added an API reference page for uploading connector files.
    • Updated the OpenAPI spec to include the new endpoint and request/response schemas, and to document how it integrates with file_uploadable parameters.