Index Confluence
Import a Confluence Cloud site into a collection, or only the spaces listed in space_keys. Authenticates with an Atlassian account email and API token. A second call syncs: unchanged pages are skipped, changed pages are replaced and new pages are added.
Path parameters
Headers
Request
This endpoint expects an object.
1-2048 charactersAtlassian API token for that account, classic or scoped. Encrypted before the job starts and never logged in plain text. The encrypted value stays in the job’s execution record for up to 90 days, where only the indexing pipeline can decrypt it. Plain ASCII, up to 2,048 characters.
3-320 charactersEmail of the Atlassian account that owns the API token. The job sees exactly what this account can see. Up to 320 characters.
The Confluence Cloud site, as a host (‘acme.atlassian.net’) or any URL on it (‘https://acme.atlassian.net/wiki/spaces/ENG’). Only *.atlassian.net sites are accepted. Confluence Data Center is not supported.
Document processing type. ‘advanced’ uses agentic OCR with AI-enhanced extraction for complex layouts, tables, figures, charts, and documents containing images. ‘basic’ provides reliable OCR optimized for general document indexing and high-volume processing. ‘auto’ inspects each PDF and uses advanced only when it has photos, drawings, tables or scanned pages (logos and signatures do not count), otherwise basic; each file bills at the tier it used.
advancedbasicautoCustom metadata to attach to all indexed chunks. Keys must be strings. Values: str, int, float, bool, or List[str].
falseWhen true, every page and attachment in scope is re-indexed, including ones that have not changed since the last run. When false (default), unchanged pages are skipped and cost nothing.
trueWhen true, files attached to the pages are indexed as their own documents, up to 5,000 per job. Pictures, audio and video are left out unless include_images is true.
trueWhen true, footer and inline comments are added to each page’s text under a Comments heading.
falseAlso import pictures, audio and video attached to pages. Default false. Requires include_attachments.
falseWhen true, mask detected PII (emails, names, SSNs, etc.) in parsed text before embedding and storing.
Masking engine for this job. jev (default): TypeSafe’s hosted Jev classifier model; supports pii_fields and pii_instructions; there is no fallback engine, so a file Jev cannot mask fails to index. presidio: the legacy pattern engine, built-in categories only (rejects pii_fields and pii_instructions with 422), never a fallback. Requires mask_pii to be true. The earlier names captain-jev and captain-presidio keep working as before.
jevpresidiocaptain-jevcaptain-presidioRetry policy for jev, as {“retry_budget_seconds”: n}. There are no fallback engines. A non-empty engines list answers 422. On the multipart file upload endpoint, send it as a JSON string form field. With the earlier engine name captain-jev it is true (default, fall back to captain-presidio) or false (fail the file).
Additional PII categories to mask for this job, on top of the built-in set. Requires mask_pii to be true. Up to 20 fields. Each masked value is replaced with the field’s tag in angle brackets and appears in the masking report under the field’s name.
<=1000 charactersPlain-language guidance that steers what counts as personal data for this job, for the built-in categories and any pii_fields. For example: ‘Names of hospital staff may stay; patient names, record numbers and bed assignments must be masked.’ Requires mask_pii to be true. Up to 1,000 characters.
Limit the job to these spaces, by key. Omit to index every space the token can see.
Response
Successful Response
pendingThe custom_metadata Captain accepted for this job, echoed back as validated. Null when none was supplied.
Errors
import requests
BASE_URL = "https://api.filesearch.dev"
API_KEY = "your_api_key"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
response = requests.post(
f"{BASE_URL}/v2/collections/my_documents/index/confluence",
headers=headers,
json={
"confluence_site": "acme.atlassian.net",
"confluence_email": "importer@acme.com",
"confluence_api_token": "your_atlassian_api_token",
"space_keys": ["ENG", "OPS"],
"processing_type": "basic"
},
timeout=60.0
)
if response.status_code in [200, 201]:
data = response.json()
print(f"Job started! ID: {data['job_id']}")
else:
print(f"Error: {response.status_code}"){
"job_id": "job_confluence_abc123",
"status": "pending"
}