Skip to main content

1. Create organization and API key

curl -X POST "https://api.getconch.ai/v1/createOrganization" \
  -H "Content-Type: application/json" \
  -H "admin-key: YOUR_ADMIN_KEY" \
  -d '{
    "name": "Acme Learning",
    "url": "https://acme.example"
  }'
Response includes organization and apiKey.

2. Request upload URL for source

curl -X POST "https://api.getconch.ai/v1/sources/upload-url" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_ISSUED_API_KEY" \
  -d '{
    "fileName": "intro-biology.pdf",
    "sourceType": "file"
  }'
Response includes:
  • uploadUrl (S3 pre-signed URL)
  • fileKey
  • sourceId

3. Upload the file to S3 using the pre-signed URL

curl -X PUT "UPLOAD_URL_FROM_STEP_2" \
  -H "Content-Type: application/pdf" \
  --upload-file "./intro-biology.pdf"

4. Poll source status until it is indexed

curl -X GET "https://api.getconch.ai/v1/sources/SOURCE_ID" \
  -H "x-api-key: YOUR_ISSUED_API_KEY"
Repeat until data.status becomes indexed.

5. List sources

curl -X GET "https://api.getconch.ai/v1/sources" \
  -H "x-api-key: YOUR_ISSUED_API_KEY"

6. Generate a quiz from a source

curl -X POST "https://api.getconch.ai/v1/sources/SOURCE_ID/quizzes" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_ISSUED_API_KEY" \
  -d '{
    "numberOfQuestions": 10,
    "difficulty": "medium"
  }'

7. Explore complete API contract

Use the OpenAPI file at docs/openapi/v1.yaml for all request/response schemas.