POST
/
file
curl --request POST \
  --url https://api.vapi.ai/file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=<string>'
{
  "object": "file",
  "status": "indexed",
  "name": "<string>",
  "originalName": "<string>",
  "bytes": 123,
  "purpose": "<string>",
  "mimetype": "<string>",
  "key": "<string>",
  "path": "<string>",
  "bucket": "<string>",
  "url": "<string>",
  "metadata": {},
  "id": "<string>",
  "orgId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
headerrequired

Retrieve your API Key from Dashboard.

Body

multipart/form-data
file
string
required

This is the File you want to upload for use with the Knowledge Base.

Response

201 - application/json
object
enum<string>
Available options:
file
status
enum<string>
Available options:
indexed,
not_indexed
name
string

This is the name of the file. This is just for your own reference.

originalName
string
bytes
number
purpose
string
mimetype
string
key
string
path
string
bucket
string
url
string
metadata
object
id
string
required

This is the unique identifier for the file.

orgId
string
required

This is the unique identifier for the org that this file belongs to.

createdAt
string
required

This is the ISO 8601 date-time string of when the file was created.

updatedAt
string
required

This is the ISO 8601 date-time string of when the file was last updated.