---
title: "Create Source"
method: POST
path: "/data-sources"
tags: ["imports"]
---

# Create Source

`POST /data-sources`

## Request

- Base URL: `https://api.os3robotics.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.os3robotics.com/data-sources`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Connects a source in your own storage. Its credential is kept in your organisation's key
vault and never returned.

## Request body

- union
  - AzureSourceIn
    - `provider` 'azure_blob', required
    - `sas_url` string, password, required
    - `workspace_id` string, uuid, required
    - `name` string, required
    - `prefix` string
  - S3SourceIn
    - `provider` 's3', required
    - `access_key_id` string, required
    - `secret_access_key` string, password, required
    - `session_token` string, password, required
    - `expires_at` string, date-time, required
    - `workspace_id` string, uuid, required
    - `name` string, required
    - `bucket` string, required
    - `region` string, required
    - `prefix` string

## Response `201`

Successful Response

- Source: A source in the customer's storage: an Azure container (`account`, `bucket` the container) or an S3 bucket (`region`), under `prefix`. Its credential is in the organisation's key vault and is never returned.
  - `id` string, uuid, required
  - `tenant_id` string, uuid, required
  - `workspace_id` string, uuid, required
  - `name` string, required
  - `provider` string, required
  - `account` string, nullable, required
  - `bucket` string, required
  - `region` string, nullable, required
  - `prefix` string, required
  - `credential_expires_at` string, date-time, required
  - `created_by` string, required
  - `created_at` string, date-time, required
  - `revoked_at` string, date-time, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/os3robotics/apis/os3-api.md) - [All operations](https://skmtc.dev/os3robotics/apis/os3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/os3robotics/apis/os3-api/revisions/af32cd4f14bb?raw)
