---
title: "Put Credentials"
method: PUT
path: "/data-sources/{source_id}/credentials"
tags: ["imports"]
---

# Put Credentials

`PUT /data-sources/{source_id}/credentials`

## 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/{source_id}/credentials`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Replaces the source's credential (an expired one, say): a SAS of the same container, or
new session credentials.

## Path parameters

- `source_id` string, uuid, required

## Request body

- union
  - AzureCredentialsIn
    - `provider` 'azure_blob', required
    - `sas_url` string, password, required
  - S3CredentialsIn
    - `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

## Response `200`

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)
