Skip to main content
POST
/
organisations
/
{orgId}
/
workspaces
/
{workspaceId}
/
knowledge
/
source
/
pdf
Create a new piece of knowledge from a PDF file
curl --request POST \
  --url https://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/knowledge/source/pdf \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fileName": "example.pdf",
  "id": "7b9e5d2c-f314-48a9-be56-9843a2f6c019"
}
'
{
  "data": {
    "id": "7b9e5d2c-f314-48a9-be56-9843a2f6c019",
    "state": "initial",
    "title": "Best practices for AI in healthcare",
    "description": "A collection of best practices for AI in healthcare",
    "createdAt": "2023-01-01T00:00:00.000Z",
    "updatedAt": "2023-01-01T00:00:00.000Z",
    "source": "text",
    "providedBy": "NotionPage",
    "uploadUrl": "https://s3.amazonaws.com/basilisk-ai-dev/example.pdf",
    "pdfFileUrl": "https://example.com/document.pdf",
    "txtFileUrl": "/knowledge/7b9e5d2c-f314-48a9-be56-9843a2f6c019",
    "url": "https://example.com/document.pdf"
  }
}

Authorizations

Authorization
string
header
required

JWT authentication for organization-scoped endpoints.

Path Parameters

orgId
string
required

Organization ID

workspaceId
string
required

Workspace ID

Body

application/json

Request schema for creating knowledge from a PDF file

fileName
string
required

The name of the file to create knowledge from

Example:

"example.pdf"

id
string<uuid>

An optional Knowledge ID must be a uuid

Example:

"7b9e5d2c-f314-48a9-be56-9843a2f6c019"

Response

Success

data
object
required

Response containing a single knowledge