Skip to main content
POST
/
sources
Create Source
curl --request POST \
  --url https://api-prod.voltai.ai/source/api/sources/ \
  --header 'Content-Type: multipart/form-data' \
  --cookie sessionid= \
  --form source_type=pdf \
  --form file='@example-file' \
  --form topic_uuids=3c90c3cc-0d44-4b50-8888-8dd25736052a
{
  "name": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "topics": [
    "<string>"
  ],
  "display_name": "<string>",
  "type": "CODE",
  "status": "WAITING_FOR_APPROVAL",
  "retrieval_disabled": true,
  "link": "<string>"
}

Authorizations

sessionid
string
cookie
required

Query Parameters

organization_name
string
required

Organization name (required for multi-tenant API keys)

Body

multipart/form-data

Request schema for source creation.

source_type
enum<string>
required

Type of the source file (pdf, html, md, csv)

  • pdf - pdf
  • html - html
  • md - md
  • csv - csv
Available options:
pdf,
html,
md,
csv
file
file
required

The file to upload

topic_uuids
string<uuid>[]

List of topic UUIDs to associate with the source

Response

201 - application/json

Serializer for the public API - excludes internal job/tagging fields.

name
string
required
Maximum string length: 256
updated_at
string<date-time>
required
topics
string[]
required
display_name
string | null
Maximum string length: 256
type
  • CODE - Code
  • TEXT - Text
  • WEBSITE - Website
  • JIRA - Jira
  • PART - Part
  • PINOUT - Pinout
  • HANDBOOK - Handbook
  • ARTICLE - Article
  • VIDEO - Video
  • CACHE - Cache
  • REPOSITORY - Repository
  • HTML - HTML
  • MARKDOWN - Markdown
  • CSV - CSV
Available options:
CODE,
TEXT,
WEBSITE,
JIRA,
PART,
PINOUT,
HANDBOOK,
ARTICLE,
VIDEO,
CACHE,
REPOSITORY,
HTML,
MARKDOWN,
CSV
status
enum<string>
  • WAITING_FOR_APPROVAL - Waiting for Approval
  • TRAINING - Training
  • ACTIVE - Active
  • REJECTED - Rejected
  • ERROR - Error
Available options:
WAITING_FOR_APPROVAL,
TRAINING,
ACTIVE,
REJECTED,
ERROR
retrieval_disabled
boolean
Maximum string length: 2048