POST
/
upload
/
upload_app_sources
cURL
curl --request POST \
  --url https://api.usecortex.ai/upload/upload_app_sources \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'accept: <accept>' \
  --data '[
  {
    "collections": [
      "<string>"
    ],
    "id": "<string>",
    "title": "<string>",
    "type": "<string>",
    "description": "<string>",
    "note": "<string>",
    "url": "<string>",
    "timestamp": "<string>",
    "content": {
      "text": "<string>",
      "html_base64": "<string>",
      "csv_base64": "<string>",
      "markdown": "<string>",
      "files": [
        "<any>"
      ],
      "layout": [
        "<any>"
      ]
    },
    "cortex_metadata": {},
    "meta": {},
    "attachments": [
      {
        "id": "<string>",
        "url": "<string>",
        "title": "<string>",
        "content_type": "<string>",
        "content_url": "<string>",
        "misc": {},
        "content": {
          "text": "<string>",
          "html_base64": "<string>",
          "csv_base64": "<string>",
          "markdown": "<string>",
          "files": [
            "<any>"
          ],
          "layout": [
            "<any>"
          ]
        }
      }
    ]
  }
]'
Works similar to the upload endpoint but is specifically designed to upload multiple app sources (e.g., Gmail, Slack, Notion) in a single request for processing and indexing. Each app upload is handled using specialized pipelines inside Cortex and can include various content types with rich metadata.
Recommended: For optimal performance, limit each batch to a maximum of 20 app sources per request. Send multiple batch requests with an interval of 1 second between each request.

Sample Request

curl --location 'https://api.usecortex.ai/upload/upload_app_sources?tenant_id={TENANT_ID}&sub_tenant_id={SUB_TENANT_ID}' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {API_KEY}' \
--header 'Content-Type: application/json' \
--data '[
    {
    "collections": [""],
    "id": "{SOURCE_ID}",
    "title": "{SOURCE_TITLE}",
    "type": "{APP_SOURCE_TYPE}",
    "description": "{SOURCE_DESCRIPTION}",
        "note": "",
    "url": "{SOURCE_URL}",
    "timestamp": "{TIMESTAMP}",
        "content": {
      "text": "{CONTENT_TEXT}",
            "html_base64": "",
            "csv_base64": "",
            "markdown": "",
            "files": [],
            "layout": []
        },
        "cortex_metadata": {},
        "meta": {},
    "attachments": []
    }
]'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer token (Firebase token)

Content-Type
string
default:application/json
required

Request content type

accept
string
default:application/json
required

Response content type

Query Parameters

tenant_id
string

Tenant identifier

sub_tenant_id
string

Sub-tenant identifier

Body

application/json · object[]

The body is of type object[].

Response

200

App sources uploaded successfully