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

# Update source

> Partially update a source by its id.

<Note>
  **Key type:** requires a private key. A public key returns `403` here, because it may only
  upload — see [key types and scope](/docs/api-reference/introduction#key-types-and-scope). Call
  this from your server, never from browser code.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl --request PATCH \
    --url 'https://upload.autorender.io/api/v1/sources/974628c2-9b55-4ce4-adf1-9b63edff6baa' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "name": "renamed_source"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "id": "974628c2-9b55-4ce4-adf1-9b63edff6baa",
      "name": "renamed_source",
      "type": "image_source",
      "configuration": {
        "base_url": "https://cdn.example.com",
        "forward_header": true
      },
      "is_active": true,
      "created_at": "2026-03-27T14:58:53.795Z",
      "updated_at": "2026-03-28T09:03:11.402Z"
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Source not found"
  }
  ```

  ```json 409 theme={null}
  {
    "error": "Origin name already exists in this workspace"
  }
  ```
</ResponseExample>

## Overview

Partially updates the source identified by **`sourceId`**. Both fields are optional — send only what changes. When **`configuration`** is provided, its fields are merged into the existing configuration rather than replacing it, and previously-masked secret fields you send back unchanged (e.g. `"****"`) are left untouched.

## Path parameters

| Parameter  | Description                |
| ---------- | -------------------------- |
| `sourceId` | Source id (UUID) to update |

## Request body

| Field           | Type   | Required | Description                                                                                  |
| --------------- | ------ | -------- | -------------------------------------------------------------------------------------------- |
| `name`          | string | No       | New name — letters, numbers, underscores, and hyphens only. Must be unique in the workspace. |
| `configuration` | object | No       | Fields to merge into the existing configuration                                              |

## Response

The updated source, wrapped as `{ "success": true, "data": { ... } }`.

## Next steps

<CardGroup cols={2}>
  <Card title="Source details" icon="circle-info" iconType="solid" href="/docs/api-reference/get-source-details">
    Fetch the current state of a source.
  </Card>

  <Card title="Delete source" icon="trash" iconType="solid" href="/docs/api-reference/delete-source">
    Permanently remove a source from your workspace.
  </Card>
</CardGroup>
