Median

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.

FieldTypeRequiredDescription
repostringYesowner/repo.
branchstringNoThe default branch if left out.
pathstringNoOne folder, e.g. docs. The whole tree if left out.
publishedAtstringNoe.g. https://docs.acme.com

Responses

StatusDescription
200The repository now being mirrored.
400The request is malformed, and the message names the field.
401The bearer token is missing, revoked, or expired.
429Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits.

200 body

FieldTypeRequiredDescription
repostringNo

Example request

curl -X POST https://api.median.sh/v1/integrations/repos \
  -H "Authorization: Bearer $BEARER_AUTH"

Still need help?

    Esc