Skip to content

GraphQL Mutations

All mutations require an Authorization: Bearer <token> header. Every mutation is scoped to the authenticated user’s data.

Create a new connector to define a data source for ingestion.

createConnector(input: CreateConnectorInput!): Connector!
FieldTypeRequiredDescription
connectorTypeString!YesThe type of connector (e.g., "rss", "hacker-news", "podcast").
nameString!YesDisplay name for the connector.
descriptionStringNoOptional description of the data source.
iconStringNoOptional icon identifier or emoji.
executionExecutionMode!YesCLOUD for server-side syncs, LOCAL for desktop app syncs.
configJSON!YesConnector-specific configuration (e.g., feed URL, API credentials).
scheduleStringNoSchedule string for scheduled syncs. Supported values: "every 30 minutes", "every hour", "every 6 hours", "every 12 hours", "daily".

Returns the created Connector.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation CreateConnector($input: CreateConnectorInput!) { createConnector(input: $input) { id connectorType name status execution schedule createdAt } }",
"variables": {
"input": {
"connectorType": "rss",
"name": "Tech Blogs",
"description": "Engineering blogs I follow",
"execution": "CLOUD",
"config": { "feedUrl": "https://example.com/feed.xml" },
"schedule": "every 6 hours"
}
}
}'

Update an existing connector’s settings. Only the fields you include in the input are changed.

updateConnector(id: ID!, input: UpdateConnectorInput!): Connector!
ParameterTypeDescription
idID!The connector ID to update.
FieldTypeRequiredDescription
nameStringNoNew display name.
descriptionStringNoNew description.
configJSONNoUpdated configuration. Replaces the entire config object.
scheduleStringNoUpdated schedule string. Supported values: "every 30 minutes", "every hour", "every 6 hours", "every 12 hours", "daily".

Returns the updated Connector.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation UpdateConnector($id: ID!, $input: UpdateConnectorInput!) { updateConnector(id: $id, input: $input) { id name schedule updatedAt } }",
"variables": {
"id": "conn_abc123",
"input": {
"name": "Tech Blogs (Updated)",
"schedule": "every 12 hours"
}
}
}'

Delete a connector and all of its documents. This is a cascading delete that removes data from D1, R2, and Vectorize. This action is irreversible.

deleteConnector(id: ID!): Boolean!
ParameterTypeDescription
idID!The connector ID to delete.

Returns true on success.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation DeleteConnector($id: ID!) { deleteConnector(id: $id) }",
"variables": { "id": "conn_abc123" }
}'

Pause a connector. Stops all scheduled syncs until the connector is resumed.

pauseConnector(id: ID!): Connector!
ParameterTypeDescription
idID!The connector ID to pause.

Returns the updated Connector with status: PAUSED.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation PauseConnector($id: ID!) { pauseConnector(id: $id) { id name status nextSyncAt } }",
"variables": { "id": "conn_abc123" }
}'

Resume a paused connector. Scheduled syncs resume according to the connector’s schedule.

resumeConnector(id: ID!): Connector!
ParameterTypeDescription
idID!The connector ID to resume.

Returns the updated Connector with status: ACTIVE.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation ResumeConnector($id: ID!) { resumeConnector(id: $id) { id name status nextSyncAt } }",
"variables": { "id": "conn_abc123" }
}'

Trigger an immediate sync for a connector, regardless of its schedule. Returns the newly created sync run so you can track its progress.

syncConnector(id: ID!): SyncRun!
ParameterTypeDescription
idID!The connector ID to sync.

Returns the created SyncRun.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation TriggerSync($id: ID!) { syncConnector(id: $id) { id status source startedAt connector { id name } } }",
"variables": { "id": "conn_abc123" }
}'

Quick-save a piece of content to your knowledge base. Automatically creates a “Manual Saves” connector if one does not already exist.

saveDocument(input: SaveDocumentInput!): Document!
FieldTypeRequiredDescription
textStringNoThe text content to save.
urlStringNoURL of the source. If provided without text, the content is fetched.
titleStringNoTitle for the saved document.
sourceStringNoLabel for the source (e.g., "clipboard", "share-extension").
tags[String!]NoTags to apply to the document.

Returns the created Document.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation Save($input: SaveDocumentInput!) { saveDocument(input: $input) { id title tags indexedAt connector { id name } } }",
"variables": {
"input": {
"title": "Interesting article on distributed systems",
"url": "https://example.com/article",
"text": "Full text of the article goes here...",
"source": "web",
"tags": ["distributed-systems", "architecture"]
}
}
}'

Batch ingest documents for a specific connector. This is the primary way to push data into Trove programmatically. Documents with the same (connectorId, externalId) pair are skipped to prevent duplicates.

ingestDocuments(
connectorId: ID!
documents: [IngestDocumentInput!]!
cursor: String
): IngestResult!
ParameterTypeRequiredDescription
connectorIdID!YesThe connector to ingest documents into.
documents[IngestDocumentInput!]!YesArray of documents to ingest. Maximum 50 per call.
cursorStringNoPagination cursor for the connector’s sync state. Updated after successful ingestion.
FieldTypeRequiredDescription
externalIdString!YesUnique identifier from the source system. Used for deduplication.
titleStringNoDocument title.
textStringNoFull text content. Required unless audioUrl is provided.
audioUrlStringNoURL to an audio file for transcription.
urlStringNoSource URL.
authorStringNoDocument author.
dateDateTimeNoOriginal publication or creation date.
contentTypeStringNoContent type label. One of: "text", "transcript", "highlight", "bookmark".
tags[String!]NoTags to apply.
metadataJSONNoArbitrary metadata stored with the document.

Returns IngestResult with counts of indexed and skipped documents, the updated cursor, and any errors.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation Ingest($connectorId: ID!, $documents: [IngestDocumentInput!]!, $cursor: String) { ingestDocuments(connectorId: $connectorId, documents: $documents, cursor: $cursor) { documentsIndexed documentsSkipped cursor errors { externalId message } } }",
"variables": {
"connectorId": "conn_abc123",
"cursor": "page-2",
"documents": [
{
"externalId": "article-001",
"title": "Understanding Raft Consensus",
"text": "Full article text...",
"url": "https://example.com/raft",
"author": "Jane Doe",
"date": "2026-03-20T10:00:00Z",
"contentType": "text",
"tags": ["distributed-systems", "consensus"]
},
{
"externalId": "article-002",
"title": "Paxos Made Simple",
"text": "Another article...",
"author": "John Smith",
"date": "2026-03-21T14:30:00Z",
"contentType": "text"
}
]
}
}'

Delete a single document. This is a cascading delete that removes the document from D1, its full text from R2, and its vector from Vectorize. This action is irreversible.

deleteDocument(id: ID!): Boolean!
ParameterTypeDescription
idID!The document ID to delete.

Returns true on success.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation DeleteDoc($id: ID!) { deleteDocument(id: $id) }",
"variables": { "id": "doc_abc123" }
}'

Delete all documents belonging to a connector. Useful for clearing a connector’s data before a full re-sync. This action is irreversible.

deleteDocumentsByConnector(connectorId: ID!): Int!
ParameterTypeDescription
connectorIdID!The connector whose documents should be deleted.

Returns the number of documents deleted as an Int.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation ClearConnector($connectorId: ID!) { deleteDocumentsByConnector(connectorId: $connectorId) }",
"variables": { "connectorId": "conn_abc123" }
}'

Replace the full tag array on a document. This overwrites all existing tags with the new set.

updateDocumentTags(id: ID!, tags: [String!]!): Document!
ParameterTypeDescription
idID!The document ID.
tags[String!]!The new tag array. Pass an empty array to clear all tags.

Returns the updated Document.

Terminal window
curl -X POST https://api.ontrove.sh/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation UpdateTags($id: ID!, $tags: [String!]!) { updateDocumentTags(id: $id, tags: $tags) { id title tags } }",
"variables": {
"id": "doc_abc123",
"tags": ["architecture", "must-read", "2026"]
}
}'