Example API request
curl -X POST https://api.xedi.ai/documents/import-csv \
-H "Authorization: Bearer xedi_ai_api_key_here" \
-H "Content-Type: multipart/form-data" \
-F "file=@orders.csv" \
-F "format=x12"
xedi.ai gives AI agents and developer tools access to XEDI document processing through a simple API and MCP-ready workflow.
Each account has one active API token. Use it as a Bearer token when calling the API.
Authorization: Bearer xedi_ai_api_key_here
API tokens can be revoked and regenerated from your account settings.
curl -X POST https://api.xedi.ai/documents/import-csv \
-H "Authorization: Bearer xedi_ai_api_key_here" \
-H "Content-Type: multipart/form-data" \
-F "file=@orders.csv" \
-F "format=x12"
{
"id": "doc_01HX7Z6M9F8V2",
"status": "validated",
"format": "x12",
"document_type": "850"
}
/tokens
Returns metadata for the active account API token.
{
"data": {
"id": "tok_01HX7Z6M9F8V2",
"status": "active",
"last_used_at": "2026-05-06T09:30:00Z"
}
}
/tokens
Issues the account token used for API and MCP access.
{
"data": {
"id": "tok_01HX7Z6M9F8V2",
"token": "xedi_ai_api_key_here"
}
}
/tokens/{token_id}
Revokes the active account API token.
/documents/import
Import a document through a configured format driver.
curl -X POST https://api.xedi.ai/1/documents/import \
-H "Authorization: Bearer xedi_ai_api_key_here" \
-F "file=@invoice.csv" \
-F "partnership_id=ptn_01HX7Z6"
/documents/importcsv
Import a CSV file through a mapping collection.
curl -X POST https://api.xedi.ai/documents/import-csv \
-H "Authorization: Bearer xedi_ai_api_key_here" \
-H "Content-Type: multipart/form-data" \
-F "file=@orders.csv" \
-F "format=x12"
{
"id": "doc_01HX7Z6M9F8V2",
"status": "validated",
"format": "x12",
"document_type": "850"
}
/documents/{document_id}
Return document metadata, status and processing details.
{
"data": {
"id": "doc_01HX7Z6M9F8V2",
"status": "validated",
"direction": "inbound"
}
}
/documents/{document_id}/raw
Download the raw source file attached to a document.
/documents/{document_id}/convert
Convert a document into a supported output representation.
/partners
Return trading partner records available to the account.
/partners/{partner_id}
Return partner metadata and supported document details.
/partnerships
Return configured trading relationships and routing context.
/documenttypes
Return supported document types for EDI processing.
/schemas
Return available schema records and versions.
/schemas/{message}
Return the message definition for a schema.
/files
Upload a file for document processing or later retrieval.
curl -X POST https://api.xedi.ai/1/files \
-H "Authorization: Bearer xedi_ai_api_key_here" \
-F "file=@orders.csv"
/files/{file_id}
Return or download a stored file by identifier.
/tasks
Return queued, running and completed processing tasks.
/tasks/{task_id}
Return task status, operation metadata and any result links.
/usages
Return usage records for document processing and validation.
Use the raw YAML file to generate client types or internal API notes.