Skip to main content
POST
/
files
Upload a file
curl --request POST \
  --url https://app.generalcounsel.ai/api/external/v1/files \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form folder_id=3c90c3cc-0d44-4b50-8888-8dd25736052a \
  --form project_id=3c90c3cc-0d44-4b50-8888-8dd25736052a
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "size": 123,
  "content_type": "application/pdf",
  "status": "extracting",
  "created_at": "<string>",
  "folder_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "extraction_error": "<string>",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "warning": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.gc.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key for authentication. Format: gcai_xxxxxxxxx

Create API keys in the GC AI app under Settings → Organization → API Keys.

Body

multipart/form-data
file
file
required

The file to upload

folder_id
string<uuid>

Target folder ID. Defaults to the user's "My Files" folder. Cannot be combined with project_id.

project_id
string<uuid>

Upload the file into a project. The file is placed in the project's upload folder and linked to the project. Cannot be combined with folder_id.

Response

File uploaded successfully

id
string<uuid>
required

Unique file identifier

name
string
required

Original filename

size
number
required

File size in bytes

content_type
string
required

MIME type of the file

Example:

"application/pdf"

status
enum<string>
required

Current processing status of the file

Available options:
extracting,
embedding,
ready,
failed
created_at
string
required

ISO 8601 creation timestamp

folder_id
string<uuid> | null

Folder the file belongs to

extraction_error
string

Error message if extraction failed

project_id
string<uuid>

Project the file is linked to, if uploaded with project_id

warning
string

Present when the file was uploaded successfully but a secondary operation (e.g. project linking) failed