Skip to main content
POST
/
knowledge-hub
/
sources
Create source
curl --request POST \
  --url https://api.exec.com/rest/v1/knowledge-hub/sources \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "url",
  "title": "Competitor pricing page",
  "url": "https://example.com/pricing",
  "folder_ids": [
    "f1a2b3c4d5e6"
  ]
}
'
{
  "id": "<string>",
  "title": "<string>",
  "token_count": 123,
  "has_images": true,
  "external_url": "<string>",
  "summary": "<string>",
  "cover": "<string>",
  "folders": [
    {
      "id": "<string>",
      "name": "<string>",
      "emoji": "<string>"
    }
  ],
  "created_by": {
    "id": "<string>",
    "email": "[email protected]",
    "first_name": "<string>",
    "last_name": "<string>"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "processed_at": "2023-11-07T05:31:56Z",
  "content": "<string>"
}

Authorizations

Authorization
string
header
required

API key created in Settings > API.

Format: exec_live_ followed by 40 alphanumeric characters.

Body

application/json
type
enum<string>
required

Source type. Only url is supported via the REST API today.

Available options:
url
title
string
required

Display title for the source

url
string<uri>

The URL to ingest (required when type is url)

cover
string

Optional cover image reference

folder_ids
string[]

UUIDs of folders to place the source in

Response

An existing source with the same URL was returned (de-duplicated)

A Knowledge Hub source — an uploaded file or ingested URL whose text is extracted and indexed.

id
string

Unique source identifier (UUID)

title
string

Source title

source_type
enum<string>

Where the source came from

Available options:
upload,
url,
notion,
google_drive,
guru,
page,
integration
status
enum<string>

Text-extraction status

Available options:
pending,
processing,
ready,
failed
content_format
enum<string> | null

Format of the extracted content

Available options:
markdown,
plain_text,
image,
video
token_count
integer | null

Number of tokens in the extracted text

has_images
boolean

Whether the source contains images

external_url
string | null

Original URL for url/notion/guru/google_drive sources (null otherwise)

summary
string | null

AI-generated summary of the source

cover
string

Cover image reference (empty string if none)

folders
object[]

Folders the source belongs to

created_by
object | null

User who added the source

created_at
string<date-time>
updated_at
string<date-time>
processed_at
string<date-time> | null

When extraction finished

content
string | null

Extracted text (only included when requested via ?include=content)