Skip to main content
POST
Test Source Credentials

Authorizations

Authorization
string
header
required

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path Parameters

knowledge_base_id
string<uuid>
required

Knowledge base ID: the last segment of the Service API endpoint shown in the knowledge base's API Access dialog (…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.

source_id
string<uuid>
required

Source ID. From List Sources.

Response

Test result. Rejected credentials are a 200 with valid: false and error details.

code
string | null

failure.code when valid is false. Otherwise null. SOURCE_CREDENTIAL_TEST_FAILED here means the provider rejected the credentials.

error
string | null

failure.message when valid is false, and null otherwise. The text is fixed for the failure's category or code, never the provider's own reason.

failure
object | null

Error details when valid is false, or null when the provider gave no reason. null when valid is true. stage is credential-test.

valid
boolean

true when the provider accepted the credentials.