Skip to main content

API Overview

Ground exposes a REST API for managing sources, jobs, search, and trust policy.

Base URL

https://api.trygroundai.com

Authentication

Ground uses API keys for authentication. You can generate and manage your API keys in the Dashboard. All requests must include the Authorization header with your bearer token.
curl -H "Authorization: Bearer gnd_your_api_key" https://api.trygroundai.com/sources

Endpoints

Sources

MethodEndpointDescription
POST/sourcesCreate a source
GET/sourcesList all sources
GET/sources/{id}Get a source
PATCH/sources/{id}Update a source
DELETE/sources/{id}Delete a source
POST/sources/{id}/syncTrigger sync

Jobs

MethodEndpointDescription
GET/jobsList all jobs
GET/jobs/{id}Get job status
POST/jobs/{id}/cancelCancel a job
MethodEndpointDescription
POST/searchSearch indexed content with citations

Policy

MethodEndpointDescription
GET/policyGet trust policy
PUT/policyUpdate trust policy
POST/policy/resetReset to defaults

Common Response Codes

CodeDescription
200Success
201Created
204No Content (success, no body)
400Bad Request
401Unauthorized (invalid or missing API key)
404Not Found
409Conflict (e.g., job already running)
429Too Many Requests (rate limit exceeded)
500Internal Server Error

Error Responses

{
  "error": "Source abc123 not found"
}

Pagination

List endpoints support pagination:
curl "https://api.trygroundai.com/sources?skip=0&limit=50" \
  -H "Authorization: Bearer gnd_your_api_key"

Filtering

Sources

# Filter by type
curl "https://api.trygroundai.com/sources?source_type=docs" \
  -H "Authorization: Bearer gnd_your_api_key"

# Filter by status
curl "https://api.trygroundai.com/sources?status=synced" \
  -H "Authorization: Bearer gnd_your_api_key"

Jobs

# Filter by source
curl "https://api.trygroundai.com/jobs?source_id=abc123" \
  -H "Authorization: Bearer gnd_your_api_key"