> ## Documentation Index
> Fetch the complete documentation index at: https://docs.personal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload URL

> Upload content from a URL to your memory

## Overview

API endpoint for uploading content from URLs to your memory. Supports various types of content including public Youtube URLs, LinkedIn profiles, news articles, and blogs.

## Authorization

<ParamField header="x-api-key" type="string" required>
  Your Personal AI API key
</ParamField>

## Headers

<ParamField header="Content-Type" type="string" required>
  Must be set to application/json
</ParamField>

### Body

<ParamField body="Url" type="string" required>
  URL to upload (includes public Youtube URLs, LinkedIn profiles, news articles, blogs, etc)

  ```json Example Request theme={null}
  "Url": "https://www.youtube.com/watch?v=-9F20HckH8w"
  ```
</ParamField>

<ParamField body="Title" type="string" optional>
  Title of the uploaded content

  ```json Example Request theme={null}
   "Title": "Personal AI Company Overview (2024)"
  ```
</ParamField>

<ParamField body="DomainName" type="string" required>
  The hyphenated text below the AI's name when clicked into a Persona.

  <img alt="DomainName" classname="block dark:hidden" src="https://mintcdn.com/personalai/kGsTZefXJjPC-_P1/images/domainname.png?fit=max&auto=format&n=kGsTZefXJjPC-_P1&q=85&s=36b7c320c44dba9f962cdb342de41f3a" width="1140" height="416" data-path="images/domainname.png" />

  ```json Example Request theme={null}
  "DomainName": "product-demo-jebzrhw"
  ```
</ParamField>

<ParamField body="StartTime" type="string" optional>
  ISO timestamp string indicating start time (UTC)

  ```json Example Request theme={null}
  "StartTime": "2024-10-09T10:00:00.000Z"
  ```
</ParamField>

<ParamField body="EndTime" type="string" optional>
  ISO timestamp string indicating end time (UTC)

  ```json Example Request theme={null}
  "EndTime": "2024-10-10T10:00:00.000Z"
  ```
</ParamField>

<ParamField body="Tags" type="string" optional>
  Comma delimited list of tags for context and reference

  ```json Example Request theme={null}
  "Tags": "personal ai,youtube,company,overview"
  ```
</ParamField>

<ParamField body="is_stack" type="boolean" optional>
  Boolean to specify whether to add the content to memory. Defaults to true.

  ```json Example Request theme={null}
  "is_stack": true
  ```
</ParamField>

```json Example theme={null}
{
    "Url": "https://www.youtube.com/watch?v=-9F20HckH8w",
    "Title": "Personal AI Company Overview (2024)",
    "DomainName": "product-demo-jebzrhw",
    "Tags": "personal ai,youtube,company,overview",
    "is_stack": true,
    "StartTime": "2024-10-09T10:00:00.000Z",
    "EndTime": "2024-10-10T10:00:00.000Z"
}
```

### Example Responses

<ResponseField name="message" type="string">
  Success or error message
</ResponseField>

```json Example Success Response theme={null}
{
    "message": "url accepted and processing"
}
```

```json Example Error Response theme={null}
{
    "detail": "AI url upload unauthorized."
}
```

### Example cURL

```bash cURL theme={null}
curl --location 'https://api.personal.ai/v1/upload-url' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
    "Url": "https://personal.ai",
    "Title": "Personal AI",
    "DomainName": "product-demo-jebzrhw",
    "is_stack": false
}'
```

### Error Codes

| Code | Description                                             |
| ---- | ------------------------------------------------------- |
| 403  | Forbidden - Check that API key is invalid               |
| 400  | Invalid URL - URL cannot be accessed or is invalid      |
| 422  | Processing Error - Content cannot be extracted from URL |
