Custom API
Import customer content from your own tools with source-scoped API keys.
Connect your customer portal, feedback system, or other tool to Sift. Custom API imports private conversations and starts Sift analysis. Imported conversations use normal action statuses. Moderators can claim, tag, and change their status. Sift cannot send replies to these conversations.
At a glance
| Import customer content | ✅ Single items or batches |
| Author information, channels, and tags | ✅ |
| Registered item and author fields | ✅ Map fields before importing |
| Stable IDs and exact retries | ✅ |
| Analysis and receipt tracking | ✅ |
| Import key access | Selected sources only |
| Batch size | Up to 100 items and 1 MiB |
| Outbound replies or attachments | ❌ Text intake only |
What you're looking at
Open Settings → Connections → Integrations → Custom API. Each source represents an external system. Its three tabs guide setup:
| Tab | Use |
|---|---|
| Setup | Open API keys, configure the source, channels, and tags. Copy the endpoint and try an item. |
| Fields | Map producer field names to registered Sift item or author fields. Fields that a batch agent writes are not offered. |
| Activity | Track receipts, check analysis, and open stored conversations. |
The flow is: Source → Import key → Validate → Import → Receipt → Sift analysis.
Set it up

- Select Add source. Enter a source name. The default channel name is optional and defaults to the source name.
- In Setup, add channels or source tags if needed. Keep the channel with external ID
default. - If you send custom fields, map them in Fields first.
- In API keys, create an Import key. The default selects this source and a 90-day expiry.
- Copy the secret once. Store it in your tool's secret store.
- Copy the endpoint from Setup.
Organization admins manage sources and keys. Use one source per external system. Item and author IDs stay separate across sources.
Choose the right key

| Profile | Access |
|---|---|
| Import | Validate, import, correct items, retry failed intake, and read receipts for selected sources. Scopes: ingest, ingest:read. |
| Reporting | Read reporting data. No intake or receipt access. Scope: read. |
| Write | General API writes. No Custom API intake. Scope: write. |
| Read and write | General reads and writes. No Custom API intake. Scopes: read, write. |
Use separate keys for ingestion and reporting. Expiry options are 30 days, 90 days, or no expiry. Revocation blocks new requests.
Send an item
Use a source and its Import key from the same environment. This example uses staging. Run all commands in the same Bash or Zsh terminal. You need cURL and jq.
Copy the endpoint in Setup. The part before /v0 is the base URL. In /v0/sources/{sourceId}/items, copy the value in place of {sourceId}.
Set SIFT_API_BASE to the base URL from Setup. Replace YOUR_SOURCE_ID with the source ID. Paste the Import key when the terminal prompts you.
export SIFT_API_BASE='https://api.staging.getsift.ai'
export SIFT_SOURCE_ID='YOUR_SOURCE_ID'
printf 'Sift Import key: '
IFS= read -rs SIFT_IMPORT_KEY
printf '\n'
export SIFT_IMPORT_KEYSave this example as item.json. Replace the example values with your content.
{
"externalId": "feedback-184",
"text": "Please add CSV export for feedback.",
"occurredAt": "2026-10-12T09:00:00Z",
"author": {
"externalId": "customer-73",
"name": "Maya Chen"
}
}Required fields are externalId, text, occurredAt, author.externalId, and author.name. Use a stable item ID from your system. No platform message ID is required. Use the original event time in ISO format with Z or a timezone offset.
Validate the item
jq -c '{items: [.]}' item.json > validate.json &&
curl --fail-with-body \
"$SIFT_API_BASE/v0/sources/$SIFT_SOURCE_ID/items/validate" \
--header "X-API-Key: $SIFT_IMPORT_KEY" \
--header "Content-Type: application/json" \
--data-binary @validate.jsonOn success, HTTP 200 includes valid: true and count: 1. Validation checks the item and source settings before Sift stores anything.
You can also use Try an item in Setup to validate the JSON.
Import the validated item
curl --fail-with-body -X POST \
"$SIFT_API_BASE/v0/sources/$SIFT_SOURCE_ID/items" \
-H "X-API-Key: $SIFT_IMPORT_KEY" \
-H "Content-Type: application/json" \
--data-binary @item.json > import-response.json.part &&
mv import-response.json.part import-response.json &&
jq '.receipts[0] | {id, externalId, revision, status}' import-response.jsonHTTP 202 means Sift accepted the request for processing. The command prints the receipt ID, external ID, revision, and status. If the request fails, check import-response.json.part for the error response. The last successful response is in import-response.json, if one exists.
Check the receipt
Read the receipt ID from import-response.json and request its current status.
SIFT_RECEIPT_ID=$(jq -er '.receipts[0].id' import-response.json) &&
curl --fail-with-body \
"$SIFT_API_BASE/v0/sources/$SIFT_SOURCE_ID/receipts/$SIFT_RECEIPT_ID" \
--header "X-API-Key: $SIFT_IMPORT_KEY"If you see accepted or processing, wait and check the receipt again. When status becomes stored, open Activity to check analysis or open the conversation. If the import request times out, resend the same item with the same external ID. Sift returns the existing receipt for an exact retry. A changed body with the same ID returns 409.
Channels, tags, and custom fields
| Optional field | Use |
|---|---|
channelExternalId | A configured channel ID. Defaults to default. |
title, sourceUrl | An optional title and HTTPS link to the original item. |
author.username, author.email | Optional username and valid email address. |
author.avatarUrl, author.profileUrl | Optional HTTPS URLs. |
customFields, author.customFields | Values for mapped, registered Sift fields. |
metadata, author.metadata | JSON context. Metadata does not create report fields. |
tagIds | Up to 32 existing Sift tag IDs from your organization. Use IDs, not names. |
A source supports up to 50 channels. Source tags and channel tags can filter imported conversations.
Map producer keys to registered fields under Fields. For example, map plan to an author field, then send "customFields": {"plan": "Pro"} inside author. Unmapped keys are rejected. Human edits and verified item fields stay protected.
Threads and replies
For a standalone item, omit thread and parent IDs. For a thread root, set threadExternalId to its own externalId. For a reply, send the root ID as threadExternalId and the immediate parent ID as parentExternalId.
Import roots first. A reply cannot be its own parent or root. A reply received before its root can show waiting_for_root.
Track processing
Open Activity, or read recent receipts with GET /v0/sources/{sourceId}/receipts?limit=50. The limit is 1–100; the default is 50.
| Intake status | Meaning |
|---|---|
accepted | A durable receipt is reserved. |
processing | Intake work is running. |
waiting_for_root | Import the matching thread root. |
stored | Content is stored. Check analysis separately. |
failed | Fix the cause, then retry the receipt. |
superseded | A newer revision replaces this pending work. |
Stored receipts show current conversation analysis as complete, pending, skipped, or unavailable. Open conversation opens the imported conversation. Analysis describes the current record, not a specific receipt revision.
The recent-receipts response includes recordId, analysisStatus, and url. Read one intake receipt with GET /v0/sources/{sourceId}/receipts/{receiptId}. This single-receipt response does not include analysis status.
Sift uses its existing analysis pipeline for imported content, including generated titles, summaries, and sentiment. Processing takes time. If Search shows no results, include the original occurredAt date in its range.
Batches, retries, and corrections
Send {"items": [...]} to POST /v0/sources/{sourceId}/items/batch. Use distinct item IDs. Each item has a 100 KiB limit and text supports up to 64,000 characters. Custom field and metadata objects allow 64 keys and six nested levels. Split batches that exceed 100 items or 1 MiB.
If an import times out, resend the same item ID and content. An exact retry returns the original receipt. Changed content under the same ID conflicts. Retry failed intake with POST /v0/sources/{sourceId}/receipts/{receiptId}/retry. Pending or completed work cannot be retried this way.
To correct content, send PATCH /v0/sources/{sourceId}/items/{externalId}:
{
"expectedRevision": 1,
"requestId": "7192cdcb-c9d4-4cf4-8c37-d09d8a2ff715",
"text": "Please add CSV export with dates."
}Use the latest receipt revision and a new UUID for each correction. For a network retry, reuse the same UUID and body. Corrections can change text, title, item custom fields, or metadata. Identity, original time, author, channel, and thread stay unchanged. Custom field and metadata objects replace the corresponding objects; include values you want to retain.
Troubleshooting
| Problem | Action |
|---|---|
| Invalid or expired key | Check expiry and revocation. Replace the key if needed. |
| Missing scope | Use an Import key for intake and receipts. |
| Source not found | Check the source ID and the key's allowed sources. |
| Invalid item or unknown channel | Check required fields, JSON types, channels, and field mappings. Validate again. |
| Conflict | Keep retry content unchanged. Use the latest revision for a correction. |
| Source paused or archived | Resume a paused source before importing. Archived sources block new items. |
| Analysis pending or unavailable | Refresh Activity. If the state persists, contact your administrator. |
Pause blocks new imports and corrections. Archive retains stored conversations and receipts.
Tips
- Keep item and author IDs stable. URL-encode IDs in route paths.
- Save request bodies and receipt IDs so you can retry safely.
- Do not put keys in browser code, logs, or source control.
- Use the original timestamp rather than the time you send the request.