curl --request PUT \
--url "${UNSTRUCTURED_API_URL}/api/v1/sources/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" \
--header "unstructured-api-key: ${UNSTRUCTURED_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"name": "My Updated S3 Source",
"config": {
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": true
}
}'
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import UpdateSourceRequest
from unstructured_client.models.shared import UpdateSourceConnector
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = client.sources.update_source(
request=UpdateSourceRequest(
source_id="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
update_source_connector=UpdateSourceConnector(
name="My Updated S3 Source",
config={
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": True,
},
)
)
)
print(response)
import asyncio
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import UpdateSourceRequest
from unstructured_client.models.shared import UpdateSourceConnector
async def update_source():
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = await client.sources.update_source_async(
request=UpdateSourceRequest(
source_id="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
update_source_connector=UpdateSourceConnector(
name="My Updated S3 Source",
config={
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": True,
},
)
)
)
print(response)
asyncio.run(update_source())
{
"id": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"name": "My Updated S3 Source",
"key": "my-s3-source-a1b2c3",
"type": "s3",
"config": {
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": true
},
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-04-29T10:00:00Z"
}
Source
Update source connector
Update a source connector’s name, configuration, or key. Send every configuration setting, including unchanged ones. The type cannot change.
PUT
/
api
/
v1
/
sources
/
{source_id}
curl --request PUT \
--url "${UNSTRUCTURED_API_URL}/api/v1/sources/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" \
--header "unstructured-api-key: ${UNSTRUCTURED_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"name": "My Updated S3 Source",
"config": {
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": true
}
}'
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import UpdateSourceRequest
from unstructured_client.models.shared import UpdateSourceConnector
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = client.sources.update_source(
request=UpdateSourceRequest(
source_id="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
update_source_connector=UpdateSourceConnector(
name="My Updated S3 Source",
config={
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": True,
},
)
)
)
print(response)
import asyncio
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import UpdateSourceRequest
from unstructured_client.models.shared import UpdateSourceConnector
async def update_source():
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = await client.sources.update_source_async(
request=UpdateSourceRequest(
source_id="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
update_source_connector=UpdateSourceConnector(
name="My Updated S3 Source",
config={
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": True,
},
)
)
)
print(response)
asyncio.run(update_source())
{
"id": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"name": "My Updated S3 Source",
"key": "my-s3-source-a1b2c3",
"type": "s3",
"config": {
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": true
},
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-04-29T10:00:00Z"
}
Include every connector setting, even those you are not changing.
You can change the connector’s name, key, and configuration. You cannot change its type.
Path parameters
string
required
The unique identifier of the source connector.
Body
string
New source connector name.
object
required
Updated connector configuration. Fields vary by connector type.For the specific settings to include for a connector, see the entry for that connector in Sources.
string
Set a key unique across sources and destinations in the workspace. Use 1 to 63 lowercase letters, digits, or hyphens, with no leading, trailing, or consecutive hyphens. Omit to keep the current key. After a change, the old key returns 404; the connector ID stays the same.
Response
string
required
Unique identifier for the source connector.
string
required
Source connector name.
string
required
Connector type.
object
required
Connector configuration. Fields vary by connector
type.For the specific settings to include for a specific connector, see the entry for that connector in Sources.string
required
ISO 8601 timestamp when the connector was created.
string
ISO 8601 timestamp when the connector was last updated.
string
Workspace-scoped connector key used for cross-environment export, if set.
curl --request PUT \
--url "${UNSTRUCTURED_API_URL}/api/v1/sources/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" \
--header "unstructured-api-key: ${UNSTRUCTURED_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"name": "My Updated S3 Source",
"config": {
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": true
}
}'
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import UpdateSourceRequest
from unstructured_client.models.shared import UpdateSourceConnector
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = client.sources.update_source(
request=UpdateSourceRequest(
source_id="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
update_source_connector=UpdateSourceConnector(
name="My Updated S3 Source",
config={
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": True,
},
)
)
)
print(response)
import asyncio
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import UpdateSourceRequest
from unstructured_client.models.shared import UpdateSourceConnector
async def update_source():
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = await client.sources.update_source_async(
request=UpdateSourceRequest(
source_id="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
update_source_connector=UpdateSourceConnector(
name="My Updated S3 Source",
config={
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": True,
},
)
)
)
print(response)
asyncio.run(update_source())
{
"id": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"name": "My Updated S3 Source",
"key": "my-s3-source-a1b2c3",
"type": "s3",
"config": {
"remote_url": "s3://my-new-bucket/input/",
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"recursive": true
},
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-04-29T10:00:00Z"
}
Was this page helpful?

