---
title: "Begin project context upload"
method: POST
path: "/websiteKnowledge"
tags: ["Project Context"]
---

# Begin project context upload

`POST /websiteKnowledge`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/websiteKnowledge`
- Auth: HTTP bearer

Reserves one of the website’s 25 context slots and returns a private presigned upload request for a supported document up to 10 MiB or image up to 2 MB.

## Request body

- object
  - `websiteId` string, required
  - `filename` string, required
  - `mimeType` string, required
  - `byteSize` integer, required

## Response `200`

The resource id and private upload instructions.

- object
  - `resourceId` string, required
  - `upload` object, required
    - `url` string, required
    - `method` 'PUT', required
    - `headers` object, required
    - `expiresAt` string, date-time, required

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
