A source is one connected system, such as a Xero organization or a folder of CSV exports. The API only stores its name and connector type. Credentials and configuration stay on the seller's machine.
POST /api/v1/sources
Creates a source, or returns the existing one if your organization already has a source with that name. The SDK calls it at the start of every run.
Body
| Field | Type | Meaning |
|---|---|---|
name |
string | Your name for the source, unique within your organization |
connector |
string | The connector type, such as xero, hubspot or csv |
curl https://datayield.ai/api/v1/sources \
-H "Authorization: Bearer $DATAYIELD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "xero-uk", "connector": "xero" }'Response
{
"source": { "id": "...", "name": "xero-uk", "connector": "xero" }
}Because the call is idempotent on name, sending it twice returns the same source.id. Use that ID when you create batches.