Syndai Docs

Connect a site

POST
/api/v1/external/coding/customers/{customer_id}/sites

Set a GitHub repository's address (source: github, coding_repository_id + origin), or say it has no website (no_website: true); the call upserts the repository's one site, and a new address forgets the old one's Google connection and moves. Syndai works on search only for sites it hosts or repositories it can change, so any other source is a 400. Addresses are stored as https://<lowercase host>; addresses on the Syndai apps domain, IP addresses and private names are refused (400). An address another site of the workspace has, or a repository Syndai hosts, is a 409. Returns the site's /sites row. A site with an address also starts the workspace's own Google identity (the Connect card shows it).

Authorization

CustomerApiKey
headerAuthorizationBearer <API Key>

Customer API key sent as a bearer token

Path Parameters

customer_id*string
Formatuuid

Request Body

application/json
  1. body
coding_repository_id?|null
display_name?|null
no_website?boolean
Defaultfalse
origin?|null
source*string

Response Body

Request fulfilled, document follows

application/json
  1. response
coding_repository_id?|null
display_name?string|null
google_state*string
open_moves*integer
origin?string|null
site_id*string
Formatuuid
source*string
state*string
Example Request
curl -X POST 'https://api.syndai.ai/api/v1/external/coding/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/sites' \  -H 'Content-Type: application/json' \  -d '{  "source": "github"}'
Example Response
{  "coding_repository_id": "0d18edb4-5201-4374-8af8-14fdbf761813",  "display_name": "string",  "google_state": "string",  "open_moves": 0,  "origin": "string",  "site_id": "72771e6a-6f5e-4de4-a5b9-1266c4197811",  "source": "string",  "state": "string"}