Skip to content

REST API

The REST API lets you manage files, execute tools, and check container status programmatically. Every MCP tool is available as an HTTP endpoint. It uses the same authentication and credit system as MCP.

All REST endpoints accept the same credentials as MCP:

  • API Key: x-api-key: YOUR_API_KEY header
  • Bearer Token: Authorization: Bearer YOUR_TOKEN header

On public containers, only the status endpoint is accessible without authentication. All other endpoints (files, upload, delete, claim) require an API key or bearer token.

See Authentication for details on obtaining credentials.

GET /container/:id/status

Returns the container’s current state: initialization status, tool count, entry count, file processing stats, and analysis state. This is the only endpoint accessible on public containers without authentication.

Example request:

Terminal window
curl -H "x-api-key: YOUR_API_KEY" \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/status

Example response:

{
"success": true,
"data": {
"containerId": "abc123",
"containerName": "My Container",
"is_ephemeral": false,
"initialized": true,
"initializationStatus": "complete",
"paused": false,
"ready": true,
"counts": {
"tools": 5,
"entries": 142,
"entityTypes": 4,
"files": 3
},
"files": {
"total": 3,
"pending": 0,
"processing": 0,
"completed": 3,
"failed": 0
},
"analysis": {
"inProgress": false,
"cadence": "automatic"
}
}
}
FieldDescription
readytrue when the container is initialized, complete, and not paused
initializationStatusOne of: pending, analyzing, generating_tools, complete
counts.toolsNumber of active MCP tools
counts.entriesTotal entries in the container
counts.entityTypesNumber of discovered entity types
filesBreakdown of file processing status
analysis.inProgressWhether an analysis pass is currently running
GET /container/:id/files

Returns all files uploaded to the container. Requires authentication (no public access).

Example request:

Terminal window
curl -H "x-api-key: YOUR_API_KEY" \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/files

Example response:

{
"success": true,
"data": [
{
"id": "file_abc123",
"name": "document.pdf",
"size": 245760,
"mimeType": "application/pdf",
"uploadedAt": "2026-03-30T12:00:00Z",
"createdAt": "2026-03-30T12:00:00Z"
}
]
}
POST /container/:id/files

Upload a file using multipart form data. Requires authentication (no public access).

Wire processes the file automatically after upload, extracting entries and building context.

Example request:

Terminal window
curl -X POST \
-H "x-api-key: YOUR_API_KEY" \
-F "file=@customers.csv" \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/files

See Supported File Types for the complete list of accepted formats.

DELETE /container/:id/files/:fileId

Delete a file and all its associated entries. Requires authentication (no public access).

Example request:

Terminal window
curl -X DELETE \
-H "x-api-key: YOUR_API_KEY" \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/files/file_abc123

Every MCP tool is also available as a REST endpoint. These use the same underlying execution engine and credit system as MCP. All tool endpoints accept POST with a JSON body.

Credit costs match MCP: 1 credit per tool call, 5 credits for semantic search mode. See Tools Reference for detailed parameter documentation.

POST /container/:id/tools/explore

Discover entity types, fields, relationships, and entry counts. Call this first to understand a container’s schema before searching.

ParameterTypeRequiredDescription
entityTypestringNoDrill into a specific entity type for detailed schema and samples
includeSamplesbooleanNoInclude sample entries (only with entityType). Default false.
sampleLimitnumberNoNumber of samples (1-10). Default 3.

Example request:

Terminal window
curl -X POST \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/tools/explore

Example response:

{
"success": true,
"data": {
"totalEntityTypes": 3,
"totalEntries": 142,
"entityTypes": [
{ "name": "Customer", "entryCount": 89, "fields": [{ "name": "email", "type": "string" }] }
],
"relationships": [["Customer", "orderId", "Order"]]
}
}
POST /container/:id/tools/search

Query data using five modes: list, get, filter, text, or semantic. Same capabilities as the wire_search MCP tool.

ParameterTypeRequiredDescription
modestringYesOne of: list, get, filter, text, semantic
entityTypestringDependsRequired for list, filter, text modes
querystringDependsRequired for text and semantic modes
idstringDependsRequired for get mode
filtersarrayNoField conditions for filter mode
limitnumberNoMax results (default varies by mode)
offsetnumberNoPagination offset
includestring[]NoRelated entity types to resolve

Example request (semantic search):

Terminal window
curl -X POST \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mode": "semantic", "query": "customer feedback on pricing"}' \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/tools/search

Example request (list mode):

Terminal window
curl -X POST \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mode": "list", "entityType": "Customer", "limit": 10}' \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/tools/search
POST /container/:id/tools/write

Save a new entry to the container. Requires authentication (not available on public containers).

ParameterTypeRequiredDescription
contentstring or objectYesText/markdown string or structured data object
tagsstring[]NoTags for lightweight filtering
metadataobjectNoKey-value metadata stored in entry properties
sourcestringNoSource label (default: "agent:mcp")

Example request:

Terminal window
curl -X POST \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "Q2 revenue increased 15% driven by enterprise segment", "tags": ["finance", "q2"]}' \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/tools/write

Example response:

{
"success": true,
"data": {
"entryId": "entry_abc123",
"message": "Entry queued for storage. It will be searchable within a few seconds."
}
}
POST /container/:id/tools/delete

Permanently delete an entry and clean up related graph data. Requires authentication (not available on public containers).

ParameterTypeRequiredDescription
entryIdstringYesThe entry ID to delete (returned by write)

Example request:

Terminal window
curl -X POST \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"entryId": "entry_abc123"}' \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/tools/delete
POST /container/:id/tools/analyze

Trigger a re-analysis of the container to discover entity types, build relationships, and refresh search capabilities. Requires authentication (not available on public containers).

Takes no parameters (empty JSON body).

Example request:

Terminal window
curl -X POST \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/tools/analyze

Example response:

{
"success": true,
"data": {
"message": "Analysis triggered",
"workflowId": "wf_abc123"
}
}
POST /container/:id/claim

Generate a claim link for an ephemeral container. Returns a URL the user can open to sign up or log in and make the container permanent. Requires authentication.

Returns 409 Conflict if the container has already been claimed.

Example request:

Terminal window
curl -X POST \
-H "x-api-key: YOUR_API_KEY" \
https://YOUR_ORG_SLUG.api.usewire.io/container/YOUR_CONTAINER_ID/claim

Example response:

{
"success": true,
"data": {
"claim_url": "https://app.usewire.io/onboarding/create-account?claimToken=...",
"expires_in": 3600
}
}

All errors follow the same format:

{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Unknown endpoint: GET /unknown"
}
}
CodeHTTP StatusDescription
BAD_REQUEST400Missing required parameter
UNAUTHORIZED401Missing or invalid credentials
FORBIDDEN403Action not allowed (e.g., write tools on public access)
INSUFFICIENT_CREDITS402Not enough credits to execute tool
NOT_FOUND404Container or file not found
TOOL_ERROR422Tool execution returned an error
CONFLICT409Container already claimed
INTERNAL_ERROR500Server error