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

# Upload by URL

> AiGenda downloads the file from a direct link. Responds immediately, the file downloads in the background.

## Path parameters

<ParamField path="space_id" type="integer" required>
  Space ID.
</ParamField>

## Request body

<ParamField body="url" type="string" required>
  Direct link to the file, up to 255 characters, no authorization.
</ParamField>

<ParamField body="title" type="string" required>
  Title up to 255 characters, ends with the file extension.
</ParamField>

<ParamField body="content_type" type="string" required>
  MIME type of the file.
</ParamField>

## Response

<ResponseField name="audio_id" type="integer">
  Recording ID. While the file downloads, the recording is hidden from the list.
</ResponseField>

After the response, wait for `is_uploaded: true` in [Upload status](/en/api-reference/audio/info) for that `audio_id`, then [start processing](/en/api-reference/processing/classify). If the file can't be downloaded, the recording stays at `is_uploaded: false` with no separate error. Learn more: [Uploading by URL](/en/upload/url).

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.aigenda.tech/api/spaces/1024/audio/by_url/" \
    -H "Authorization: Bearer <access>" \
    -H "Content-Type: application/json" \
    -d '{
      "url": "https://records.example.com/calls/client-call.mp3",
      "title": "Client call 2026-10-17.mp3",
      "content_type": "audio/mpeg"
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.aigenda.tech/api/spaces/1024/audio/by_url/",
      headers={"Authorization": "Bearer <access>"},
      json={
          "url": "https://records.example.com/calls/client-call.mp3",
          "title": "Client call 2026-10-17.mp3",
          "content_type": "audio/mpeg",
      },
      timeout=30,
  )
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.aigenda.tech/api/spaces/1024/audio/by_url/", {
    method: "POST",
    headers: { Authorization: "Bearer <access>", "Content-Type": "application/json" },
    body: JSON.stringify({
      "url": "https://records.example.com/calls/client-call.mp3",
      "title": "Client call 2026-10-17.mp3",
      "content_type": "audio/mpeg"
    }),
  });
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "audio_id": 51234
  }
  ```

  ```json 400 theme={null}
  {
    "url": [
      "Ensure this field has no more than 255 characters."
    ]
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.