Upload from scripts and CI
The REST API takes the same API key as MCP and acts on the same namespace.
Base URL: https://app.jitprompt.com.
Upload
Section titled “Upload”curl -H "Authorization: Bearer $JITPROMPT_KEY" \ -F "file=@docs/refund-policy.md" -F "title=Refund policy" \ https://app.jitprompt.com/documents# {"document_id": "…", "status": "pending", "deduped": false}Uploading identical content again returns the existing document with
"deduped": true and uses no ingestion — so re-running the upload of an
unchanged file is free.
Update in place
Section titled “Update in place”Replacing content keeps the document’s id and title:
curl -X PUT -H "Authorization: Bearer $JITPROMPT_KEY" \ -H "Content-Type: text/markdown" --data-binary @docs/refund-policy.md \ https://app.jitprompt.com/documents/$DOC_ID/contentWait for it
Section titled “Wait for it”curl -s -H "Authorization: Bearer $JITPROMPT_KEY" \ https://app.jitprompt.com/documents/$DOC_ID | jq -r .status # … readyGitHub Actions
Section titled “GitHub Actions”name: publish instructionson: push: branches: [main] paths: ["instructions/**"]jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Upload changed files env: JITPROMPT_KEY: ${{ secrets.JITPROMPT_KEY }} run: | for f in instructions/*.md; do curl -sf -H "Authorization: Bearer $JITPROMPT_KEY" \ -F "file=@$f" -F "title=$(head -1 "$f" | sed 's/^# //')" \ https://app.jitprompt.com/documents doneNew content creates a new document; to keep one document per file, store the
document_id and use PUT …/content instead. Every upload or replacement
counts as one ingestion against your plan.
The full endpoint list is in the API reference.