Skip to main content
POST
/
agent-setup
/
upload
Upload context files during agent setup
curl --request POST \
  --url https://api.beamstudio.ai/agent-setup/upload \
  --header 'Content-Type: multipart/form-data' \
  --header 'current-workspace-id: <current-workspace-id>' \
  --header 'x-api-key: <api-key>' \
  --form threadId=1a2036c0-d533-4636-8f51-2a811763ef5c \
  --form 'files=<string>' \
  --form files.items='@example-file'
[
  {
    "name": "<string>",
    "threadId": "<string>",
    "uploadStatus": "processing",
    "uploadSource": "file_upload",
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "src": "<string>",
    "fileKey": "<string>",
    "url": "<string>",
    "mimeType": "<string>",
    "userId": "<string>",
    "user": {
      "name": "John Doe",
      "email": "<string>",
      "cognitoUserId": "<string>",
      "role_name": "<string>",
      "isInternalUser": true,
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "avatarSrc": "https://example.com/avatars/user123.png",
      "socialProvider": "<string>",
      "socialProviderId": "<string>",
      "password": "<string>",
      "paymentProviderCustomerId": "<string>",
      "rememberToken": "<string>",
      "emailVerified": true,
      "referralCode": "<string>"
    }
  }
]

Authorizations

x-api-key
string
header
required

Headers

current-workspace-id
string
required

Body

multipart/form-data

Files to upload with thread ID

threadId
string<uuid>
required

UUID of the conversation thread

Example:

"1a2036c0-d533-4636-8f51-2a811763ef5c"

files
file[]
required

Array of files to upload (maximum 10 files)

Response

201 - application/json
name
string
required

Name of the chat file.

threadId
string
required

UUID of the associated thread.

uploadStatus
enum<string>
required

Upload status of the file.

Available options:
processing,
uploaded,
failed
uploadSource
enum<string>
required

Source of the upload.

Available options:
file_upload,
text_snippet,
url_upload
id
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
src
string

Source path of the file.

fileKey
string

Storage key for the file.

url
string

URL of the file.

mimeType
string

MIME type of the file.

userId
string

UUID of the user.

user
object