POST /integrations/repos
Updated Oct 1, 20261 minute read
Mirror a repository
Points the knowledge base at a repository, or one folder of it. Every markdown file becomes a document the agent answers out of, and a push re-syncs it. The sync starts immediately. publishedAt is where those files are published, which is what lets an answer carry a link instead of a paragraph; the hunt for the matching pages runs itself.
Part of Integrations.
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
repo | string | Yes | owner/repo. |
branch | string | No | The default branch if left out. |
path | string | No | One folder, e.g. docs. The whole tree if left out. |
publishedAt | string | No | e.g. https://docs.acme.com |
Responses
| Status | Description |
|---|---|
200 | The repository now being mirrored. |
400 | The request is malformed, and the message names the field. |
401 | The bearer token is missing, revoked, or expired. |
429 | Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits. |
200 body
| Field | Type | Required | Description |
|---|---|---|---|
repo | string | No |
Example request
curl -X POST https://api.median.sh/v1/integrations/repos \
-H "Authorization: Bearer $BEARER_AUTH"