curl -X POST 'https://api.hydradb.com/connectors' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
-H "API-Version: 2" \
-H "Content-Type: application/json" \
-d '{
"provider": "slack",
"name": "acme-engineering",
"database": "acme_corp",
"collection": "engineering",
"provider_account_scope": "T12345ACME",
"credentials": {
"access_token": "xoxp-..."
}
}'
{
"connector_id": "{connector_id}",
"provider": "slack",
"name": "acme-engineering",
"database": "acme_corp",
"collection": "engineering",
"tenant_id": "acme_corp",
"sub_tenant_id": "engineering",
"provider_account_scope": "T12345ACME",
"lifecycle": "pending_setup",
"sync_status": "idle",
"sync_interval_seconds": 3600,
"next_sync_at": "2026-06-01T12:05:00Z",
"first_sync_at": "2026-06-01T12:05:00Z",
"message": "Connector created. Configure resources to start syncing; the first scheduled sync runs in about 5 minutes."
}
Create Connector
Store credentials for one provider account so its data can be synced.
curl -X POST 'https://api.hydradb.com/connectors' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
-H "API-Version: 2" \
-H "Content-Type: application/json" \
-d '{
"provider": "slack",
"name": "acme-engineering",
"database": "acme_corp",
"collection": "engineering",
"provider_account_scope": "T12345ACME",
"credentials": {
"access_token": "xoxp-..."
}
}'
{
"connector_id": "{connector_id}",
"provider": "slack",
"name": "acme-engineering",
"database": "acme_corp",
"collection": "engineering",
"tenant_id": "acme_corp",
"sub_tenant_id": "engineering",
"provider_account_scope": "T12345ACME",
"lifecycle": "pending_setup",
"sync_status": "idle",
"sync_interval_seconds": 3600,
"next_sync_at": "2026-06-01T12:05:00Z",
"first_sync_at": "2026-06-01T12:05:00Z",
"message": "Connector created. Configure resources to start syncing; the first scheduled sync runs in about 5 minutes."
}
provider is any provider from List Connector Providers. The shape of credentials depends on the provider: read it from credential_schema by calling that endpoint with ?id={provider}. Credentials that do not match the schema are rejected.
Optional settings you can also pass here, and change later with Update Connector:
custom_instructions: guidance for how this connector’s documents are interpreted and indexed. See Custom Ingestion Instructions.sync_interval_seconds: how often scheduled syncs run. Omit it for the provider default (one hour for most providers).
curl -X POST 'https://api.hydradb.com/connectors' \
-H "Authorization: Bearer $HYDRA_DB_API_KEY" \
-H "API-Version: 2" \
-H "Content-Type: application/json" \
-d '{
"provider": "slack",
"name": "acme-engineering",
"database": "acme_corp",
"collection": "engineering",
"provider_account_scope": "T12345ACME",
"credentials": {
"access_token": "xoxp-..."
}
}'
{
"connector_id": "{connector_id}",
"provider": "slack",
"name": "acme-engineering",
"database": "acme_corp",
"collection": "engineering",
"tenant_id": "acme_corp",
"sub_tenant_id": "engineering",
"provider_account_scope": "T12345ACME",
"lifecycle": "pending_setup",
"sync_status": "idle",
"sync_interval_seconds": 3600,
"next_sync_at": "2026-06-01T12:05:00Z",
"first_sync_at": "2026-06-01T12:05:00Z",
"message": "Connector created. Configure resources to start syncing; the first scheduled sync runs in about 5 minutes."
}
database and collection under their deprecated names tenant_id and sub_tenant_id. Read the new names.
Errors
400:providerordatabaseis missing, the provider is unknown, or a setting such assync_interval_secondsis out of range.402: your plan’s connector limit is reached.403: the provider is not available to your workspace.422:credentialsdoes not match the provider’scredential_schema.
Related Resources
- Next: Discover Resources: see what the credentials can reach
- Next: Configure Connector: choose resources and start syncing
- List Connector Providers: the credential schema for a provider
- Connectors - Overview
Authorizations
API key sent as a Bearer token: "Bearer prefix.secret"
Body
Connector configuration
External provider being synced (e.g. slack, github, linear, notion, gmail).
"slack"
Authentication method for the provider connection (e.g. api_token, oauth).
"api_token"
Default collection partition for synced objects. Deprecated alias: sub_tenant_id.
"team_docs"
Provider-specific credentials. Their shape is the provider's credential_schema from GET /connectors/providers?id=<provider>, for example {"access_token": "..."}.
Show child attributes
Show child attributes
{ "api_token": "xoxb-..." }
Instructions that steer how this connector's synced documents are ingested and indexed. Up to 4000 characters; editable later.
Database that receives the synced data. Required; the deprecated alias tenant_id is also accepted.
"acme_corp"
Human-readable label for this connector.
"general"
Identifier for the external account (e.g. Slack workspace ID, GitHub org name). Set a distinct value per account when you connect several accounts of one provider, so their objects cannot collide.
"T12345ACME"
Deprecated: use collection.
"sub_tenant_4567"
How frequently the scheduler triggers incremental syncs, in seconds. Bounded per provider; send 0 or omit to use the provider default. Change it later with PATCH /connectors/{id}.
3600
Deprecated: use database.
"tenant_1234"
Response
Created
Number of active resources on this connector. Zero means none are configured yet, and lifecycle reads pending_setup.
1
Authentication method for the provider connection (e.g. api_token, oauth).
"api_token"
Default collection for synced data; a resource can override it. Formerly sub_tenant_id, which is still returned with the same value.
"team_docs"
Unique identifier of the connector.
"conn_abc123"
Instructions that steer how this connector's synced documents are ingested and indexed. Up to 4000 characters; changes apply from the next sync.
Database that receives the synced data. Formerly tenant_id, which is still returned with the same value.
"acme_corp"
Running total of objects sent for ingestion. It shows data is moving, not the indexed count: updates count again and deletes are not subtracted.
1
RFC3339 timestamp of the first sync that sent at least one object for ingestion. Empty until then.
RFC3339 timestamp when the first scheduled sync runs.
RFC3339 timestamp of the most recent sync attempt (successful or not).
"2026-07-02T17:00:00Z"
Error message from the most recent failed sync, empty string when no error.
""
RFC3339 timestamp of the last successful sync completion.
"2026-07-02T17:00:00Z"
Current state: pending_setup (no active resources), ingesting (first sync unfinished), syncing, active, paused, or reconnect (credentials rejected or connector blocked).
Human-readable note on when data will start to sync, safe to show to users as is.
"Success"
Human-readable label for this connector.
"general"
True when the provider rejected the OAuth refresh token. Reconnect the account to resume syncing; clears on the next successful token refresh.
true
RFC3339 timestamp when needs_reauth was set.
Why the provider rejected the OAuth grant, when needs_reauth is true.
RFC3339 timestamp when the next scheduled sync will run.
"2026-07-02T18:00:00Z"
True while the connector is paused. Scheduled and manual syncs are both refused until it is resumed; each resource then continues from where it stopped.
true
RFC3339 timestamp when the connector was paused.
External provider being synced (e.g. slack, github, linear, notion, gmail).
"slack"
Identifier for the external account (e.g. Slack workspace ID, GitHub org name). Set a distinct value per account when you connect several accounts of one provider, so their objects cannot collide.
"T12345ACME"
Number of active resources that have not completed their first successful sync. While above zero, lifecycle reads ingesting.
1
Deprecated: always active. Read lifecycle for what the connector is doing.
"active"
Deprecated: use collection.
"sub_tenant_4567"
True when a failure retrying cannot fix, such as rejected credentials, stopped scheduled syncs. Updating credentials or configuration clears it.
true
RFC3339 timestamp when sync_blocked was set.
Error that blocked the connector, when sync_blocked is true. Up to 1000 characters.
How frequently the scheduler triggers incremental syncs, in seconds. Bounded per provider; send 0 or omit to use the provider default. Change it later with PATCH /connectors/{id}.
3600
syncing while a sync is running, otherwise idle.
"idle"
Deprecated: use database.
"tenant_1234"
Was this page helpful?
