Overview
Prerequisites
- An API key for authentication.
- The connector slug for the source type (e.g.
facebook-ads). See List Source Connectors.
Step 1: Create a draft source with a callback webhook
Create the source withdraft: true. Only connector_slug is required for a draft — you (or a third party) fill in the rest later.
Optionally attach a callback_webhook: Nekt POSTs to it once the third party finishes filling in the configuration through the setup link. Use the optional custom header to authenticate the call on your side.
callback_webhook object
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | HTTPS URL Nekt POSTs to on setup completion. Must be a public https:// endpoint. |
header_name | string | No | Optional custom header name to send with the callback. |
header_value | string | No | Value for the custom header. Required if header_name is set. Stored encrypted and never returned. |
callback_webhook is write-only. Responses never echo it back; they expose a read-only boolean has_callback_webhook so you can confirm one is configured. To remove a configured webhook, send "callback_webhook": null on an update.Step 2: Create a setup token
Generate a time-limited token scoped to this draft source, then build the link ashttps://app.nekt.ai/scl/{token} and share it with the third party.
| Field | Type | Required | Description |
|---|---|---|---|
expires_in_seconds | integer | No | Token lifetime. Defaults to 24 hours (86400). |
The full
token is returned only on creation. When listing tokens it is redacted. To revoke a link, delete the token: DELETE /api/v1/sources/{source_slug}/setup-tokens/{id}/.Step 3: The third party fills in the configuration
The recipient openshttps://app.nekt.ai/scl/{token} and enters the connector credentials (or authenticates via OAuth for connectors that support it). No Nekt account is required, and the link is scoped strictly to this draft source.
When they submit, Nekt POSTs to your callback_webhook (if configured):
| Field | Type | Description |
|---|---|---|
config_completed | boolean | true when all required connector config fields are filled. |
missing_required_fields | array | Dot-paths of required fields still missing (e.g. report_definition.action_report_time). Empty when config_completed is true. |
config_completed to decide whether you can proceed to validation, or whether you need to send another setup link to collect the remaining fields.
Step 4: Validate the connector configuration
Start a validation for the draft source. This confirms the credentials work and discovers the available streams. The validation uses the configuration already saved on the draft (from the setup link), so you don’t need to send a request body.You may optionally pass
{ "config": { ... } } to merge extra fields into the saved configuration before validating.id with status in_progress. Poll it until the status is success or failed:
Step 5: Finalize the source
Once validation succeeds, complete the source by settingdraft: false along with the streams, output layer, and trigger. See Update Source for the full set of fields.
Setup tokens stop working once the source leaves draft. Any unused link for this source is invalidated when you finalize it.