> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/v8.8/api-integrations/connectors-management-apis/sources.md).

# Sources

## List sources

> Returns a list of sources.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/sources":{"get":{"description":"Returns a list of sources.","operationId":"TdCxWeb.SourceController.index","parameters":[{"description":"Filter by source type","in":"query","name":"type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceIndexResponse"}}},"description":"Sources"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List sources","tags":["Sources"]}}},"components":{"schemas":{"SourceIndexResponse":{"additionalProperties":false,"properties":{"data":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"}},"required":["data"],"title":"SourceIndexResponse","type":"object"},"Source":{"additionalProperties":false,"properties":{"active":{"description":"Whether the source is active","type":"boolean"},"config":{"additionalProperties":true,"description":"Source configuration (flattened key-value pairs)","type":"object"},"dynamic_content":{"additionalProperties":true,"description":"Configuration with metadata (value, origin)","nullable":true,"type":"object"},"external_id":{"description":"Source external identifier","type":"string"},"id":{"description":"Source internal ID","type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"job_types":{"description":"List of job types supported by the source","items":{"type":"string"},"nullable":true,"type":"array"},"secrets":{"additionalProperties":true,"description":"Source secrets (visible with proper permissions)","nullable":true,"type":"object"},"type":{"description":"Source type (template name)","type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","external_id","type","active"],"title":"Source","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Create a source

> Creates a source.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/sources":{"post":{"description":"Creates a source.","operationId":"TdCxWeb.SourceController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceCreateRequest"}}},"description":"Source","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceShowResponse"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create a source","tags":["Sources"]}}},"components":{"schemas":{"SourceCreateRequest":{"properties":{"source":{"additionalProperties":false,"properties":{"active":{"description":"Whether the source is active","nullable":true,"type":"boolean"},"config":{"additionalProperties":true,"type":"object"},"external_id":{"type":"string"},"type":{"type":"string"}},"required":["external_id","type"],"type":"object"}},"required":["source"],"title":"SourceCreateRequest","type":"object"},"SourceShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Source"}},"required":["data"],"title":"SourceShowResponse","type":"object"},"Source":{"additionalProperties":false,"properties":{"active":{"description":"Whether the source is active","type":"boolean"},"config":{"additionalProperties":true,"description":"Source configuration (flattened key-value pairs)","type":"object"},"dynamic_content":{"additionalProperties":true,"description":"Configuration with metadata (value, origin)","nullable":true,"type":"object"},"external_id":{"description":"Source external identifier","type":"string"},"id":{"description":"Source internal ID","type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"job_types":{"description":"List of job types supported by the source","items":{"type":"string"},"nullable":true,"type":"array"},"secrets":{"additionalProperties":true,"description":"Source secrets (visible with proper permissions)","nullable":true,"type":"object"},"type":{"description":"Source type (template name)","type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","external_id","type","active"],"title":"Source","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnprocessableEntityResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Get a source by external ID

> Fetches a source by external ID.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/sources/{external_id}":{"get":{"description":"Fetches a source by external ID.","operationId":"TdCxWeb.SourceController.show","parameters":[{"description":"Source external ID","in":"path","name":"external_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceShowResponse"}}},"description":"Source"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxNotFoundResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get a source by external ID","tags":["Sources"]}}},"components":{"schemas":{"SourceShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Source"}},"required":["data"],"title":"SourceShowResponse","type":"object"},"Source":{"additionalProperties":false,"properties":{"active":{"description":"Whether the source is active","type":"boolean"},"config":{"additionalProperties":true,"description":"Source configuration (flattened key-value pairs)","type":"object"},"dynamic_content":{"additionalProperties":true,"description":"Configuration with metadata (value, origin)","nullable":true,"type":"object"},"external_id":{"description":"Source external identifier","type":"string"},"id":{"description":"Source internal ID","type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"job_types":{"description":"List of job types supported by the source","items":{"type":"string"},"nullable":true,"type":"array"},"secrets":{"additionalProperties":true,"description":"Source secrets (visible with proper permissions)","nullable":true,"type":"object"},"type":{"description":"Source type (template name)","type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","external_id","type","active"],"title":"Source","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxNotFoundResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Update a source or source configuration

> Update either the source properties or the source configuration. Use 'source' key for general source updates or 'source\_config' key for configuration updates.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/sources/{external_id}":{"put":{"description":"Update either the source properties or the source configuration. Use 'source' key for general source updates or 'source_config' key for configuration updates.","operationId":"TdCxWeb.SourceController.update","parameters":[{"description":"Source external ID","in":"path","name":"external_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceUpdateUnionRequest"}}},"description":"Source update","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceShowResponse"}}},"description":"Updated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxNotFoundResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Update a source or source configuration","tags":["Sources"]}}},"components":{"schemas":{"SourceUpdateUnionRequest":{"anyOf":[{"$ref":"#/components/schemas/SourceUpdateRequestSource"},{"$ref":"#/components/schemas/SourceUpdateRequestConfig"}],"description":"Update request that can contain either 'source' (general source update) or 'source_config' (configuration update). Only one of them should be provided.","title":"SourceUpdateUnionRequest"},"SourceUpdateRequestSource":{"additionalProperties":false,"properties":{"source":{"additionalProperties":false,"properties":{"active":{"description":"Active status","nullable":true,"type":"boolean"},"config":{"additionalProperties":true,"description":"Source configuration","nullable":true,"type":"object"},"type":{"description":"Source type","nullable":true,"type":"string"}},"type":"object"}},"required":["source"],"title":"SourceUpdateRequestSource","type":"object"},"SourceUpdateRequestConfig":{"additionalProperties":false,"properties":{"source_config":{"additionalProperties":true,"description":"Source configuration object to merge/update","type":"object"}},"required":["source_config"],"title":"SourceUpdateRequestConfig","type":"object"},"SourceShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Source"}},"required":["data"],"title":"SourceShowResponse","type":"object"},"Source":{"additionalProperties":false,"properties":{"active":{"description":"Whether the source is active","type":"boolean"},"config":{"additionalProperties":true,"description":"Source configuration (flattened key-value pairs)","type":"object"},"dynamic_content":{"additionalProperties":true,"description":"Configuration with metadata (value, origin)","nullable":true,"type":"object"},"external_id":{"description":"Source external identifier","type":"string"},"id":{"description":"Source internal ID","type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"job_types":{"description":"List of job types supported by the source","items":{"type":"string"},"nullable":true,"type":"array"},"secrets":{"additionalProperties":true,"description":"Source secrets (visible with proper permissions)","nullable":true,"type":"object"},"type":{"description":"Source type (template name)","type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","external_id","type","active"],"title":"Source","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxNotFoundResponse","type":"object"},"TdCxUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnprocessableEntityResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Delete a source

> Deletes a source.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/sources/{external_id}":{"delete":{"description":"Deletes a source.","operationId":"TdCxWeb.SourceController.delete","parameters":[{"description":"Source external ID","in":"path","name":"external_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Source deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxNotFoundResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Delete a source","tags":["Sources"]}}},"components":{"schemas":{"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxNotFoundResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Update a source or source configuration

> Update either the source properties or the source configuration. Use 'source' key for general source updates or 'source\_config' key for configuration updates.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/sources/{external_id}":{"patch":{"description":"Update either the source properties or the source configuration. Use 'source' key for general source updates or 'source_config' key for configuration updates.","operationId":"TdCxWeb.SourceController.update (2)","parameters":[{"description":"Source external ID","in":"path","name":"external_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceUpdateUnionRequest"}}},"description":"Source update","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceShowResponse"}}},"description":"Updated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxNotFoundResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Update a source or source configuration","tags":["Sources"]}}},"components":{"schemas":{"SourceUpdateUnionRequest":{"anyOf":[{"$ref":"#/components/schemas/SourceUpdateRequestSource"},{"$ref":"#/components/schemas/SourceUpdateRequestConfig"}],"description":"Update request that can contain either 'source' (general source update) or 'source_config' (configuration update). Only one of them should be provided.","title":"SourceUpdateUnionRequest"},"SourceUpdateRequestSource":{"additionalProperties":false,"properties":{"source":{"additionalProperties":false,"properties":{"active":{"description":"Active status","nullable":true,"type":"boolean"},"config":{"additionalProperties":true,"description":"Source configuration","nullable":true,"type":"object"},"type":{"description":"Source type","nullable":true,"type":"string"}},"type":"object"}},"required":["source"],"title":"SourceUpdateRequestSource","type":"object"},"SourceUpdateRequestConfig":{"additionalProperties":false,"properties":{"source_config":{"additionalProperties":true,"description":"Source configuration object to merge/update","type":"object"}},"required":["source_config"],"title":"SourceUpdateRequestConfig","type":"object"},"SourceShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Source"}},"required":["data"],"title":"SourceShowResponse","type":"object"},"Source":{"additionalProperties":false,"properties":{"active":{"description":"Whether the source is active","type":"boolean"},"config":{"additionalProperties":true,"description":"Source configuration (flattened key-value pairs)","type":"object"},"dynamic_content":{"additionalProperties":true,"description":"Configuration with metadata (value, origin)","nullable":true,"type":"object"},"external_id":{"description":"Source external identifier","type":"string"},"id":{"description":"Source internal ID","type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"job_types":{"description":"List of job types supported by the source","items":{"type":"string"},"nullable":true,"type":"array"},"secrets":{"additionalProperties":true,"description":"Source secrets (visible with proper permissions)","nullable":true,"type":"object"},"type":{"description":"Source type (template name)","type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","external_id","type","active"],"title":"Source","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxNotFoundResponse","type":"object"},"TdCxUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnprocessableEntityResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```
