Know of an official OpenAPI document? Contribute it →
For Agents
Download one NF-e, CT-e, NFC-e, or NFS-e XML from SIEG by its access key and XML type, optionally with the document's linked events.
Use for: Download the XML for this NF-e access key, Get the CT-e XML for a freight document, Retrieve an NFS-e XML along with its events, Check whether a fiscal document key is valid in SIEG
Not supported: Does not issue invoices, list documents in bulk, or file tax returns. Use for downloading one fiscal document XML by its access key only.
The SIEG BaixarXml API downloads a single Brazilian electronic fiscal document XML, such as an NF-e, CT-e, NFC-e, or NFS-e, from a SIEG account by its access key. A request names the document with ChaveXml and its type with TipoXml (1 for NF-e, 2 for CT-e, 3 for NFS-e, among other codes), and setting BaixarEventos to true also returns the events linked to that document. Responses carry a Status, Codigo, and Mensagens list describing the result.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the BaixarXml, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fsieg.com%2Fbaixar-xml" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fsieg.com%2Fbaixar-xml" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with BaixarXml API.
Download the XML of a single NF-e, CT-e, NFC-e, or NFS-e by its ChaveXml access key
Select the document type with TipoXml codes such as 1 for NF-e, 2 for CT-e, and 3 for NFS-e
Include the document's linked fiscal events in the same download by setting BaixarEventos to true
Read the Status, Codigo, and Mensagens fields to tell a successful download from an invalid key
Patterns agents use BaixarXml API for, with concrete tasks.
★ Agent that fetches a fiscal document on request
An accounting assistant often gets asked for the XML of one specific invoice. Through Jentic the agent searches for 'download an NF-e XML', loads the baixarXml operation, and sends the 44-digit ChaveXml with TipoXml 1, while the SIEG JWT and access key are injected at call time. The agent returns the XML or the Mensagens explaining why the key was rejected.
Call POST /api/v1/baixar-xml with ChaveXml set to the 44-digit NF-e key, TipoXml 1, and BaixarEventos false, then return the XML to the user
Document plus events for audit checks
Before booking an invoice, a finance team checks whether it was cancelled or corrected. Setting BaixarEventos to true returns the events tied to the document together with the XML, so a cancellation or correction letter is visible in the same response. This avoids a second lookup for the events of a single key.
Call POST /api/v1/baixar-xml with ChaveXml for the invoice, TipoXml 1, and BaixarEventos true, then flag the invoice if a cancellation event is present
Freight and service document retrieval
Logistics and service companies handle CT-e transport documents and NFS-e service invoices alongside NF-e. The same operation retrieves any of these by changing TipoXml, so one integration covers goods, freight, and services documents stored in SIEG.
Call POST /api/v1/baixar-xml with the CT-e ChaveXml and TipoXml 2 and save the returned XML to the freight record
1 endpoints — the sieg baixarxml api downloads a single brazilian electronic fiscal document xml, such as an nf-e, ct-e, nfc-e, or nfs-e, from a sieg account by its access key.
METHOD
PATH
DESCRIPTION
/api/v1/baixar-xml
Download one fiscal document XML by key
/api/v1/baixar-xml
Download one fiscal document XML by key
This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.
Base layer of spec validity and structural soundness.
Aggregated quality score from linter diagnostics, weighted by severity.
Percentage of `$ref` references that resolve successfully.
Checks whether the API description parses successfully and conforms to its declared specification (e.g., OpenAPI).
Structural correctness score based on schema issues using logarithmic dampening.
Clarity, completeness, and ingestion readiness for developers and tooling.
How richly the API is illustrated with examples.
Percentage of examples that conform to their schemas.
Percentage of operations with complete response definitions (success, client error, server error).
Health of API ingestion, bundling, and resolution within Jentic pipelines.
Semantic breadth, depth, and agent comprehension for AI systems.
Coverage of descriptions across API elements.
Coverage of RFC 9457 Problem Details for error responses.
Coverage, uniqueness, and casing consistency of operationIds for AI inference.
Coverage of summaries across operations/tags/info.
Functional utility, complexity comfort, and AI orchestration readiness.
Agent comfort level based on API operational and structural complexity.
Trust, risk posture, and security compliance.
Average quality of security schemes based on authentication method strength (weakest link for OAuth2).
Findability, semantic richness, and reasoning readiness.
Clarity and depth of descriptions across API elements.
Score it yourself
Every API in the directory is allowlisted, so you can re-score it with no key required.
npx @jentic/api-scorecard-cli score <openapi-url>What agents get from Jentic-routed access to this vendor.
Setup
Wiring BaixarXml by hand means obtaining a SIEG JWT from a separate authentication endpoint and sending it with an X-API-Key or X-OAuth-Token header on every download. Through Jentic you install once, import BaixarXml from the API Directory, store the credentials once, and your agent calls it.
Permission scoping
BaixarXml carries the document key inside the request body, so rules bound which operations your agent may call, not which documents. Limit the agent to the operations it needs, such as downloading a single XML, and keep other SIEG operations out unless you add them.
Credential isolation
Your SIEG JWT and access key are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'download an NF-e XML' or 'get a CT-e by access key', and Jentic returns the matching SIEG operation with its input schema so the agent sends ChaveXml and TipoXml correctly.
Alternatives and complements available in the Jentic catalogue.
Specific to using BaixarXml API through Jentic.
What authentication does the SIEG BaixarXml API use?
Per its OpenAPI spec, each call needs two credentials together: a JWT sent as an HTTP bearer token, plus either an X-API-Key header or an X-OAuth-Token header carrying a SIEG OAuth 2.0 token. The JWT comes from SIEG's authentication endpoint, which is not part of this spec. Through Jentic both credentials are stored by your own instance and attached at call time, so the agent never sees them.
Which document types can I download with BaixarXml?
TipoXml selects the type. The spec lists codes including 1 for NF-e, 2 for CT-e, and 3 for NFS-e, with further codes such as 4 through 8, 10, 99, and 100 for other document types. ChaveXml and TipoXml are required, and BaixarEventos is optional.
What are the rate limits for the SIEG BaixarXml API?
The OpenAPI spec does not specify rate limits. Check your SIEG plan and the documentation at https://sieg.com for current limits.
Is there a SIEG BaixarXml MCP server?
You don't need an MCP server to give your agent the BaixarXml API. Jentic connects it directly from the API Directory: import it, store your SIEG JWT and access key once, and your agent calls the download operation when it needs a document, discovered on demand rather than held in its context.
How do I download an NF-e XML through Jentic?
Search Jentic for 'download an NF-e XML by access key', load the POST /api/v1/baixar-xml operation, and send ChaveXml with the 44-digit key and TipoXml 1. Add BaixarEventos true if you also want the document's events. To run it on your own infrastructure, install Jentic One from its GitHub repo.
Can I limit what my agent is allowed to do with the SIEG BaixarXml API?
Yes, at the operation level. If the agent should only search and count documents through other SIEG APIs, leave this download operation out of its rule and it cannot pull document XML at all; if you include it, every call is logged. The rule cannot narrow which access keys or companies it requests, because ChaveXml is sent in the request body.
GET STARTED