API REFERENCE
Upload Connector File
On this page
/api/connectors/filesStage an image into Connector file storage so it can be attached to a connector action that accepts a file_uploadable field. The returned descriptor is embedded in a file_uploadable array on Execute Connector Action.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request POST \
--url 'https://api.recoupable.dev/api/connectors/files' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"url": "string",
"toolSlug": "string"
}'Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request POST \
--url 'https://recoup-api.vercel.app/api/connectors/files' \
--header 'Content-Type: application/json' \
--data '{
"url": "string",
"toolSlug": "string"
}'Request body required
The image URL to stage and the action it will be attached to.
application/json
urlstringrequiredPublicly reachable URL of the image to stage. Fetched server-side and uploaded to Connector storage. Required.
format: uri
toolSlugstringrequiredThe action slug the image will be attached to, UPPERCASE_SNAKE_CASE (e.g. LINKEDIN_CREATE_LINKED_IN_POST). Scopes the upload to that tool/toolkit. Required.
Responses
200Image staged. Returns the Connector file descriptor to embed in the action's file_uploadable array.+
application/json
successbooleanrequirednamestringrequiredStored filename.
mimetypestringrequiredDetected MIME type of the stored file.
s3keystringrequiredConnector storage key. Pass this together with name and mimetype in the action's file_uploadable array.
400Bad request — missing or invalid url (must be a reachable URL) or toolSlug.+
application/json
errorintegerrequiredformat: int32
messagestringrequired401Unauthorized — invalid or missing API key.+
application/json
errorintegerrequiredformat: int32
messagestringrequired502Upstream failure staging the file into Connector storage (the image fetch failed or Connector errored).+
application/json
errorintegerrequiredformat: int32
messagestringrequiredFull specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download social.jsonView operation source
{
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"description": "Stage an image into Connector file storage so it can be attached to a connector action that accepts a file_uploadable field. The returned descriptor is embedded in a file_uploadable array on [Execute Connector Action](/api-reference/connectors/execute-action).",
"requestBody": {
"description": "The image URL to stage and the action it will be attached to.",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadConnectorFileRequest"
}
}
}
},
"responses": {
"200": {
"description": "Image staged. Returns the Connector file descriptor to embed in the action's file_uploadable array.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadConnectorFileResponse"
}
}
}
},
"400": {
"description": "Bad request — missing or invalid `url` (must be a reachable URL) or `toolSlug`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized — invalid or missing API key.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"502": {
"description": "Upstream failure staging the file into Connector storage (the image fetch failed or Connector errored).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}