Skip to main content
POST
/
api
/
content-sources
Add content source
curl --request POST \
  --url https://api.example.com/api/content-sources \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "repo_full_name": "<string>",
  "branch": "main"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "repo_full_name": "<string>",
  "branch": "<string>",
  "index_status": "<string>",
  "last_indexed_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "error_message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
integration_id
string<uuid>
required
repo_full_name
string
required
Pattern: ^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$
Example:

"owner/repo"

branch
string
default:main
Maximum string length: 255
Pattern: ^[a-zA-Z0-9._/\-]+$

Response

Successful Response

id
string<uuid>
required
integration_id
string<uuid>
required
repo_full_name
string
required
branch
string
required
index_status
string
required
last_indexed_at
string<date-time> | null
required
created_at
string<date-time>
required
error_message
string | null