About Corvo Nfse
Corvo Nfse is an MCP server published by corvo-technology in the Cloud category: open-source API to issue Brazilian invoices (NFS-e, NF-e and NFC-e). Self-hosted or cloud, with REST, webhooks and an MCP server for AI agents. Conduid read 57 tools from its source: accountant_package_send, billing_usage, certificate_upload, cnpj_lookup, company_create, company_fiscal_status and 51 more. No package is published for it, so it installs from a source checkout.
The repository has 176 stars and 23 forks, and its last commit was on 30 Nov 2026. Conduid has no tagged release on record for it. Its topics include api, brazil, corvo, e-invoicing, emissor-nfse and invoice.
Install
git clone https://github.com/corvo-technology/corvo-nfseTools (57)
accountant_package_sendSend the month package (ZIP with XML, PDF and resumo.csv of the notes of the month) to the accountant email saved on the company. Without confirm: true nothing is sent: it returns a preview with the month, the recipient email and the note count. Show the preview to the user and only call again with confirm: true after they agree. Sends in the live environment only; the month defaults to the previous one.| Parameter | Type | Description |
|---|---|---|
| company_id | string | UUID of the company. Use this or tax_id. |
| confirm | boolean | Must be true to really send. Without it only a preview. |
| month | string | Competence month, YYYY-MM. Defaults to the previous month. |
| tax_id | string | CNPJ of the company (punctuation optional). |
billing_usageGet the current plan quota and whether the workspace can emit another NFS-e.certificate_uploadUpload the A1 digital certificate (.pfx/.p12, base64) and its password for a company that already exists in the connected environment. The password comes from the agent's secret vault: never ask the user to paste it in chat if you can avoid it. Corvo stores both encrypted and never returns them. Replaces the company's previous certificate. Afterwards call company_fiscal_status to confirm the company is ready.| Parameter | Type | Description |
|---|---|---|
| password * | string | Password of the certificate file. |
| pfx_base64 * | string | The .pfx/.p12 file encoded in base64 (up to 50 KB decoded). A data:...;base64, prefix and line breaks are accepted. |
| tax_id * | string | CNPJ of the company. |
cnpj_lookupLook up the public registration data of any CNPJ (legal name, trade name, address, IBGE municipality code, whether it is Simples Nacional or MEI, whether it is active, and its main activity (CNAE)). When the activity clearly matches a service code it also returns suggested_service_code: only a suggestion, confirm it with the person before using it as default_service_code. Use it to pre-fill a company or a customer before nfse_issue or company_create. It reads the public registry, not this workspace: use company_get for companies already registered here. Fails when the CNPJ is invalid, when the registry does not know it (CNPJ_NOT_FOUND) or when the registry has no answer right now (CNPJ_LOOKUP_UNAVAILABLE, try again later). Next step of onboarding: company_create.| Parameter | Type | Description |
|---|---|---|
| cnpj * | string | CNPJ; punctuation is optional. |
company_createCreate an issuing company in the connected environment. A certificate is deliberately not accepted here: after the company is created, upload it with certificate_upload (needs the certificate permission granted when connecting). Do not pick default_service_code on your own: if cnpj_lookup returned suggested_service_code, show it to the person and set default_service_code only after they confirm it; otherwise leave it out.| Parameter | Type | Description |
|---|---|---|
| address | object | |
| default_service_code | string | Six-digit cTribNac service code. |
| legal_name * | string | |
| municipal_reg | string | |
| municipality_code * | string | Seven-digit IBGE municipality code. |
| send_municipal_reg | boolean | |
| simple_national | boolean | |
| simples_iss_rate | string | Simples Nacional only, optional: effective ISS rate (%) of your bracket; needed only when a customer withholds ISS. |
| simples_rate | string | Required for Simples Nacional (ignored for MEI): effective total rate (%) of your DAS, e.g. "6.54". |
| special_regime | string | |
| tax_id * | string | CNPJ; punctuation is optional. |
| tax_regime * | string | Corvo serves MEI (mei) and Simples Nacional (simple_national) only. |
| trade_name | string |
company_fiscal_statusRead-only fiscal situation of one company: the current fiscal profile (tax regime, Simples Nacional, review status), the service tax profiles in effect today, the digital certificate status (active or expired and its expiry date; never the certificate file or password) and the DPS numbering (series and last number used). Use it to answer "meu certificado está válido?", "qual meu regime?" or "em que número de DPS estou?". Pass company_id or tax_id (CNPJ). When the company is ready to issue, the next step is nfse_issue; if the certificate is missing, call certificate_upload.| Parameter | Type | Description |
|---|---|---|
| company_id | string | Company id (UUID). |
| tax_id | string | CNPJ; punctuation is optional. |
company_getGet one company by CNPJ in the connected environment. Returns company null when the CNPJ is not registered in this workspace.| Parameter | Type | Description |
|---|---|---|
| tax_id * | string | CNPJ; punctuation is optional. |
company_listList the companies (issuers) of the workspace in the connected environment. Use it to find the company_id or the CNPJ to pass to nfse_issue, and to check whether a company is ready to issue (setup_gaps empty). Pass tax_id to look one up by CNPJ.| Parameter | Type | Description |
|---|---|---|
| cursor | string | Pagination cursor from previous response |
| limit | number | |
| tax_id | string | Find a single company by CNPJ (punctuation optional). |
company_numbering_checkChecks with the government whether the next note numbers (DPS) of a company were already used, for example when the company issued before on the government portal or in another system. Read-only: it issues nothing and never changes the numbering. It is informational: nfse_issue already skips numbers the government confirms as used on the first note of a company, so there is no need to call this before issuing. Pass company_id or tax_id (CNPJ).| Parameter | Type | Description |
|---|---|---|
| company_id | string | Company id (UUID). |
| tax_id | string | CNPJ; punctuation is optional. |
company_updateUpdate the safe registration data of a company: trade name, address, default service code and municipality code. Send only what changes. It does NOT change the CNPJ, legal name, tax regime, rates, certificate (use certificate_upload) or DPS numbering, and it cannot delete the company: those stay in the dashboard or the Companies API. Changing the municipality code changes the place of service of future invoices, so confirm it with the user.| Parameter | Type | Description |
|---|---|---|
| address | object | |
| company_id * | string | UUID (see company_list) |
| default_service_code | any | Six-digit cTribNac service code; null removes the default. |
| municipality_code | string | Seven-digit IBGE municipality code. |
| trade_name | string |
credits_balanceCredit balance of the workspace (notes left in the plan plus avulso notes) and, optionally, the recent credit history. Use it to answer "quantas notas ainda posso emitir?" or "onde foram meus créditos?". Pass include_history=true to also get the latest credit transactions, paginated with limit and cursor. When the balance is too low, buy more with credits_purchase.| Parameter | Type | Description |
|---|---|---|
| cursor | string | Pagination cursor from previous response |
| include_history | boolean | Also return recent credit transactions. |
| limit | number |
credits_purchaseCreate a charge to buy avulso invoice credits (R$ ${(AVULSO_UNIT_CENTS / 100).toFixed(2)} per note, minimum ${AVULSO_MIN_UNITS} notes, they never expire).Unit price is ${AVULSO_UNIT_CENTS / 100} BRL: before calling, confirm the quantity and the total amount with the person.method "pix" returns a QR Code image, the copy-and-paste code and a payment link; method "card" returns a Stripe checkout link. The person always completes the payment: show the QR Code or the link, then follow it with payment_status. This tool only creates the charge.| Parameter | Type | Description |
|---|---|---|
| confirm | any | |
| method * | string | How the person will pay. |
| name | string | Pix only: name of the buyer. Omit to use the company name. |
| tax_id | string | Pix only: CPF or CNPJ of the buyer, who receives the invoice for these credits. Omit to use the first company of the workspace. |
| units * | integer | Number of invoices to buy (at least ${AVULSO_MIN_UNITS}). |
customer_deleteForget a saved customer. Invoices already issued do not change; the name is no longer filled in for that CPF/CNPJ.| Parameter | Type | Description |
|---|---|---|
| confirm | any |
customer_listList the customers saved from earlier invoices, most recently used first. Use it to find the CPF/CNPJ of a customer by name before issuing: an invoice for a saved customer needs only the tax_id, the name is filled in.| Parameter | Type | Description |
|---|---|---|
| limit | number | 1 to 100 (default 20) |
| offset | number | Items to skip (default 0) |
| search | string | Part of the name, or the first digits of the CPF/CNPJ |
customer_updateCorrect the name, email, NF-e address or state registration (IE) of a saved customer. Applies to the next invoices only; invoices already issued do not change. Send a field as null to remove it. An NF-e for a saved customer is filled from this address and IE.| Parameter | Type | Description |
|---|---|---|
| address | any | Recipient address for NF-e; null removes it |
| any | ||
| ind_ie_dest | any | 1 contributor, 2 exempt, 9 non-contributor |
| name | string | |
| state_registration | any |
import_createStart an import of invoices from a spreadsheet. Send the file as text: `content` with the CSV (header in the first line, columns such as cnpj_prestador, tomador_documento, tomador_nome, tomador_email, descricao, valor, codigo_servico, data_competencia), or `content_base64` with an .xlsx. Up to 2,000 rows and 1 MB here (bigger files: POST /v1/imports). Reading is asynchronous: poll import_get until status is "ready", review with import_rows, then call import_emit. The issuing company comes from the CNPJ column or from `company_id`.| Parameter | Type | Description |
|---|---|---|
| company_id | string | UUID of the company that issues rows without a CNPJ |
| content | string | The CSV text |
| content_base64 | string | An .xlsx file encoded in base64 (CSV in `content` is preferred) |
| file_name | string | Defaults to import.csv, or import.xlsx with content_base64 |
import_discardDiscard an import that has not been emitted yet. Nothing is issued. Not possible once emitting or done.import_emitIssue every valid row of the import, in chunks. Safe to call twice. If credits ran out, rows are left awaiting_credits: top up, then call import_emit again and only those rows are sent. Follow progress with import_get. Issuing many notes cannot be undone.| Parameter | Type | Description |
|---|---|---|
| confirm | any |
import_fix_rowCorrect one row of an import that is ready, and check it again. Send the invoice fields that change in `item` (amount, competenceDate, customer {name, taxId, email}, service {description, code}); customer and service are merged field by field, so sending only the e-mail keeps the name. The company of a row (companyId, companyTaxId) cannot be changed. Returns the row, valid or still invalid with the reason.| Parameter | Type | Description |
|---|---|---|
| item * | object | Invoice fields to change |
| line * | number | Line of the row (as in import_rows) |
import_getStatus and counters of an import: processing, ready (to review), emitting, done or failed. Counters: total, valid, invalid, accepted, authorized, awaiting_credits (turned away for lack of credits, not errors), failed, pending, and valid_amount in BRL. While processing, rows_expected tells how many rows the file has.import_listList the recent imports in the connected environment, newest first, with their counters. Use it to find an import again, for example one waiting for credits.| Parameter | Type | Description |
|---|---|---|
| limit | number | 1 to 20, default 10 |
import_rowsRows of an import, one page at a time (at most 200). Filter with status valid, invalid, queued, accepted or rejected; "invalid" lists the rows with problems and the reason. Pass next_cursor to get the next page.| Parameter | Type | Description |
|---|---|---|
| cursor | string | next_cursor of the previous page |
| limit | number | 1 to 200, default 50 |
| status | string |
invoices_overviewDashboard summary of the workspace ("Visão geral") for the last 7 or 30 calendar days (America/Sao_Paulo, today included): how many notes (NFS-e, NF-e and NFC-e together) were authorized, rejected or still processing, the number of authorized notes per day, and the 5 most recent notes, each with its `type` (nfse, nfe or nfce). Use it to answer "como estão minhas notas?", "quantas notas emiti este mês?" or "tem alguma nota rejeitada?". It returns counts, not revenue totals: for the amount of specific notes use nfse_list or nfse_get.| Parameter | Type | Description |
|---|---|---|
| period | string | Window ending today: 7d (default) or 30d. |
nfe_correctSend a correction letter (CC-e) for an authorized NF-e. It cannot change values, taxes, the parties or the dates. 15 to 1000 characters. The letter is sent to the SEFAZ and starts as pending: check its final status with nfse_get and type "nfe" (invoice.fiscalEvents: sequence, text, status, protocol, date). A NFC-e has no correction letter: this tool answers INVOICE_OPERATION_NOT_SUPPORTED for it (cancel within 30 minutes and issue another).| Parameter | Type | Description |
|---|---|---|
| correction * | string | The correction text. |
| invoice_id * | string | UUID of the NF-e |
nfe_inutilizeInutilize a range of NF-e (model 55, default) or NFC-e (model 65) numbers that will never be used (for example the gaps from nfe_number_gaps). It cannot be undone. At most 1000 numbers per request, and the range may not start more than 1000 numbers after the last number used. Justification of 15 to 255 characters.| Parameter | Type | Description |
|---|---|---|
| company_id * | string | UUID of the issuing company |
| confirm | any | |
| end * | number | |
| idempotency_key | string | Repeat the same key to avoid doing it twice. |
| justification * | string | |
| model | number | 55 for NF-e (default), 65 for NFC-e. |
| series * | number | |
| start * | number |
nfe_number_gapsList the skipped NF-e (model 55, default) or NFC-e (model 65) numbers (gaps) per company and series. Use nfe_inutilize to close a gap the person confirms will never be used.| Parameter | Type | Description |
|---|---|---|
| company_id | string | Only this company (UUID). Omit for all. |
| model | number | 55 for NF-e (default), 65 for NFC-e. |
nfe_repeatIssue a new NF-e or NFC-e copying a previous one: same company, recipient, items, payments, nature of operation and additional information. Use it for "emit the same note as last time": find the previous note with nfse_list (type "nfe" or "nfce"), then pass its invoice_id and the same type. It never copies the number, access key, protocol or date: the new note is numbered and dated when it is issued, and goes through the same checks as nfse_issue (run nfe_validate first when the data may have changed, such as prices). Optional additional_info replaces the copied text. It uses a credit like nfse_issue and returns immediately with the queued status; follow it with nfse_get. Homologação (test) only for now. Confirm the recipient and the amount with the user before calling.| Parameter | Type | Description |
|---|---|---|
| additional_info | string | New additional information. Defaults to the copied one. |
| idempotency_key * | string | Repeat the same key to avoid issuing twice. |
| invoice_id * | string | UUID of the NF-e or NFC-e to copy |
| type | string | Kind of the note to copy: "nfe" (default) or "nfce". |
nfe_settings_getNF-e and NFC-e settings of a company (state registration, CRT, default series, NFC-e series, nature of operation and tax defaults) and what is still missing (missing) before it can issue an NF-e. `readiness` says whether the company can issue NF-e and NFC-e: by default it is the last answer kept (null if never checked); with check_sefaz=true it asks the SEFAZ now (Consulta Cadastro, with the company certificate) which state registrations (IE) the CNPJ has and whether they are enabled, and answers `status`, a plain pt-BR `message` and `suggestedStateRegistration` (the IE to save with nfe_settings_update). Run it with check_sefaz=true BEFORE the first NF-e or NFC-e of a company, and again after a 245 rejection ("CNPJ Emitente não cadastrado"): a company with no IE (service-only) cannot issue NF-e or NFC-e. `unavailable` means the state has no consulta or the SEFAZ did not answer: nothing is known.| Parameter | Type | Description |
|---|---|---|
| check_sefaz | boolean | Ask the SEFAZ now and fill `readiness` with the live answer. Default false: no SEFAZ call. |
| company_id * | string | UUID of the company |
nfe_settings_updateSet the NF-e and NFC-e settings of a company: state registration (IE, validated for the state of the company; leave it out to use the IE the SEFAZ has for the CNPJ when there is exactly one enabled) plus optional defaults (default_series for the NF-e, nfce_default_series for the NFC-e). The CRT follows the tax regime of the company (Simples Nacional 1, MEI 4); send `crt` only to override it. Returns the settings, what is still missing and `registrationWarning` when the SEFAZ cadastro says the IE will be refused.| Parameter | Type | Description |
|---|---|---|
| company_id * | string | UUID of the company |
| crt | number | |
| default_csosn | string | |
| default_nat_op | string | |
| default_origin | number | |
| default_series | number | |
| nfce_default_series | number | |
| state_registration | string | IE, digits. Optional: left out, the IE found at the SEFAZ is used (when there is exactly one enabled) |
nfe_validateDry-run of an NF-e or a NFC-e: checks the data and returns the problems field by field (issues), without numbering, sending or charging anything. Always run it before nfse_issue with type "nfe" or "nfce". `valid` only says the data is fine: `warnings` (when present) comes from the last SEFAZ check kept for the company and says it may not be able to issue (for example the SEFAZ answered 257, no state registration or not enabled), or that it was never checked (run nfe_settings_get with check_sefaz=true). Warnings do not block. Homologação (test) only for now.| Parameter | Type | Description |
|---|---|---|
| company_id * | string | UUID of the issuing company (company_list). |
| nfe * | any | |
| type | string | Which note to check: "nfe" (default) or "nfce" (consumer sale). |
nfse_calculateCalculate taxes before issuing, without issuing a document, reserving credits or creating a DPS. By default it is for an NFS-e (amount, service_code...). With type "nfe" or "nfce" it previews the taxes of goods for a Simples Nacional company: send company_id and the nfe object with items[] {ncm, cfop, quantity, unitPrice, origin?, tax? {csosn, pCredSN?}} (recipient and payments are not needed). Per item it returns vTotTrib and approximateTaxes (Lei 12.741/2012, IBPT table of the UF of the issuer: federal, state, municipal, total, percent, source, version), icmsSn with the credit of CSOSN 101 (pCredSN, vCredICMSSN; the company rate is set in nfe_settings_update) and ibsCbs (null while the NF-e does not require it), then totals and warnings. An NCM missing in the IBPT table gives a warning and no vTotTrib: Corvo never guesses a rate. nfse_issue and nfe_validate fill the same values in the note; values you send in the item win.| Parameter | Type | Description |
|---|---|---|
| amount | number | |
| company_id | string | |
| company_tax_id | string | |
| competence_date | string | |
| deduction | number | Deduction from the ISS tax base in BRL, declared by the issuer. |
| description | string | |
| municipality_code | string | |
| nfe | object | Only with type "nfe" or "nfce": items[] {ncm, cfop, quantity, unitPrice, discount?, freight?, insurance?, other?, vTotTrib?, origin?, tax? {csosn, origin?, pCredSN?, vCredICMSSN?}}, same fields as the note; recipient and payments are optional here. |
| service_code | string | |
| type | string | What to calculate: "nfse" (default, a service), "nfe" (goods, model 55) or "nfce" (sale to the consumer, model 65). |
nfse_cancelCancel an invoice. A queued (scheduled or not yet issued) invoice is cancelled immediately; an authorized NFS-e returns status "cancelling" while the cancellation event is sent to the Sefin. An invoice still being issued (status "processing") registers the request and stays "processing" with the request recorded; if it is authorized it is cancelled automatically at the Sefin and the credit is not refunded, and if the emission is rejected or fails the request is discarded. Issued NFS-e and invoices being issued require a ${CANCELLATION_DESCRIPTION_MIN}-${CANCELLATION_DESCRIPTION_MAX} character description. With type "nfe" it cancels an authorized NF-e at the SEFAZ: send only invoice_id and description (the justification, 15 to 255 characters); reason is not used. The same for type "nfce" (a NFC-e is cancelled within 30 minutes of the authorization). Cancelling cannot be undone.${CONFIRM_NOTE}| Parameter | Type | Description |
|---|---|---|
| confirm | any | |
| description | string | Free-text justification; required (${CANCELLATION_DESCRIPTION_MIN}-${CANCELLATION_DESCRIPTION_MAX} chars) for an authorized NFS-e or an invoice being issued (processing) |
| invoice_id * | string | UUID of the invoice |
| reason | string | |
| type | any |
nfse_download_pdfGet the PDF of an authorized NFS-e invoice, by invoice_id or by access_key. By default it returns a temporary signed download link (valid for one hour), the same as nfse_get_download_url: the link is preferred, because the PDF itself is large for an agent to carry. Pass inline: true only when you really need the file content as a base64-encoded string. With type "nfe" or "nfce" send invoice_id (the DANFE or DANFCE comes only as a link).| Parameter | Type | Description |
|---|---|---|
| access_key | string | The NFS-e access key. Use it or invoice_id (required for NFS-e when there is no invoice_id). |
| inline | boolean | true returns pdf_base64 instead of a link. Default false (link). |
| invoice_id | string | UUID of the invoice (NFS-e, NF-e or NFC-e). Use it or access_key. |
| type | any |
nfse_email_resendResend an authorized NFS-e, NF-e or NFC-e (PDF and XML) by email. By default it goes to the customer email on the invoice; pass email to send to another address. Fails when the invoice is not authorized yet, is cancelled, or has no customer email and none is given. Confirm the destination with the user before calling.| Parameter | Type | Description |
|---|---|---|
| string | Optional destination address, instead of the customer email on the invoice | |
| invoice_id * | string | UUID of the authorized invoice |
| type | any |
nfse_getGet one NFS-e by its internal invoice id (the id returned by nfse_issue and nfse_list), including status, amounts, customer and the events timeline (every status change with its reason and time). Use it to explain why a note was rejected or what happened to it. To look a note up by access key use nfse_query. Instead of invoice_id you can pass external_id, your own reference sent when issuing: it searches NFS-e, NF-e and NFC-e (type is not needed) and returns the note; since an external_id is not unique, when more than one note has it you get ambiguous: true with the matches (id, type, status, createdAt) and call again with the invoice_id you want. Fails when the id does not exist in this workspace and environment. With type "nfe" or "nfce" it returns the NF-e or NFC-e and its timeline (states and fiscal events); the NFC-e also has qrCode and urlChave.| Parameter | Type | Description |
|---|---|---|
| external_id | string | Your own reference of the note (the external_id sent when issuing), exact match, any type. Use it instead of invoice_id. |
| invoice_id | string | Internal invoice id (UUID). Required unless external_id is given. |
| type | any |
nfse_get_download_urlGenerate a temporary signed download URL for the PDF or XML of an authorized NFS-e invoice, by invoice_id or by access_key. The URL expires in one hour. With type "nfe" or "nfce" send invoice_id (the XML is the authorized nfeProc; the PDF is the DANFE, or the DANFCE of 80 mm for a NFC-e).| Parameter | Type | Description |
|---|---|---|
| access_key | string | The NFS-e access key. Use it or invoice_id (required for NFS-e when there is no invoice_id). |
| format * | string | Document format to download |
| invoice_id | string | UUID of the invoice (NFS-e, NF-e or NFC-e). Use it or access_key. |
| type | any |
nfse_get_package_urlGenerate a temporary download link for the month package of one company: a ZIP with the XML and PDF of every authorized or cancelled NFS-e whose competence is in the month, plus resumo.csv for the accountant. The link opens without login and expires in 7 days. Fails when the month has no notes or more than 500.| Parameter | Type | Description |
|---|---|---|
| month * | string | Competence month, YYYY-MM |
| tax_id * | string | CNPJ of the company (punctuation optional) |
nfse_issueEmit a new NFS-e (Nota Fiscal de Serviços Eletrônica). Identify the issuing company with company_tax_id (its CNPJ) or company_id; call company_list if you do not know it. Minimal call: company_tax_id + amount. The customer is optional (omit it for an anonymous consumer invoice), and the competence date, service code and municipality default to today and to the company settings. Returns immediately with the queued status; use nfse_query to follow it. With emission_type SCHEDULE or RECURRING nothing is issued yet: it returns the schedule (schedule_id) instead. If it fails for lack of credits, check credits_balance and then credits_purchase. With type "nfe" it emits an NF-e (goods, model 55, homologação only) instead: send company_id, the nfe object and a required idempotency_key; run nfe_validate first; follow it with nfse_get and type "nfe". An NF-e can also be scheduled: with emission_type SCHEDULE or RECURRING (and competence_date, recurrence_frequency like an NFS-e) the nfe object is checked now and stored as it is; each run issues it on its day, with the items and prices as they were saved (Corvo does not control stock). It returns schedule_id; manage it with the schedule_* tools. With type "nfce" it emits a NFC-e (sale to the consumer, model 65, homologação only): same fields, the NFC-e body goes in the nfe object (no natOp; the consumer CPF is optional; it cannot be scheduled: it is a sale at the counter); run nfe_validate with type "nfce" first; follow it with nfse_get and type "nfce".| Parameter | Type | Description |
|---|---|---|
| nfe | any | |
| type | any |
nfse_issue_batchEmit up to 50 NFS-e in one call, for one company or several. Use it for spreadsheets or any list of invoices instead of calling nfse_issue repeatedly; split longer lists into batches of 50. Each item takes the same fields as nfse_issue (company_tax_id or company_id, plus amount or services; customer, competence_date, service_code etc. are optional). ALWAYS send a stable idempotency_key per item (for example "<file>-row-<n>"): if the call times out, repeat the same batch and nothing is issued twice. Items are checked one by one: invalid items come back rejected with an error and are not saved, the valid ones are saved together. Read results by index (the item position, starting at 0), report the rejected rows with their error.message so the user can fix them, and resend only those. Accepted items are already saved: never resend them as new invoices. Items with replayed true were already saved by an earlier call with the same idempotency_key. Issuance is asynchronous: follow each invoice with nfse_query.| Parameter | Type | Description |
|---|---|---|
| confirm | any | |
| invoices * | array | Invoices to issue (1 to 50). Each item has the same fields as nfse_issue; items may belong to different companies. |
nfse_listList NFS-e invoices for the tenant with optional status and origin filters and cursor pagination. With type "nfe" it lists NF-e, with type "nfce" NFC-e; with type "all", NFS-e, NF-e and NFC-e together (newest first); they take only the status, company_id, external_id, limit and cursor filters. To find a note by your own reference (the external_id you sent when issuing) pass external_id: exact match, any type, and it is not unique, so more than one note can come back.| Parameter | Type | Description |
|---|---|---|
| company_id | string | Only this company (UUID). Only with type "nfe", "nfce" or "all". |
| cursor | string | Pagination cursor from previous response |
| external_id | string | Your own reference of the note (the external_id sent when issuing), exact match. Works for NFS-e, NF-e, NFC-e and "all". Not unique: it can return more than one note. |
| limit | number | |
| origin | string | Filter by where the invoice came from (${INVOICE_ORIGINS.join(', ')}): dashboard = issued in the web app, integration = a sale from a connected payment platform, schedule, import, api = sent by a client or AI agent |
| status | string | Filter by status (${INVOICE_STATUSES.join(', ')}) |
| type | any |
nfse_queryQuery the status of an NFS-e invoice by its access key. Only for NFS-e (50-digit key): for an NF-e or NFC-e (44-digit key) use nfse_get with type "nfe" or "nfce" and the invoice_id (find it with nfse_list).| Parameter | Type | Description |
|---|---|---|
| access_key * | string | The NFS-e access key (chave de acesso) |
nfse_repeatIssue a new NFS-e copying a previous one: same company, customer, service description, service code, municipality, amount, discount, deduction, purchase order and notes. Use it for "emit the same invoice as last month for customer X": find the previous note with nfse_list or nfse_query, then pass its invoice_id or access_key. Optional amount, description and competence_date replace the copied values (a new amount drops the copied discount and deduction); competence_date defaults to today (America/Sao_Paulo). It uses a credit like nfse_issue and returns immediately with the queued status; use nfse_query to follow it. Confirm amount and customer with the user before calling.| Parameter | Type | Description |
|---|---|---|
| access_key | string | Access key of the note to copy. Use this or invoice_id. |
| amount | number | New total in BRL. Defaults to the copied amount. |
| competence_date | string | YYYY-MM-DD. Defaults to today (America/Sao_Paulo). |
| description | string | New service description. Defaults to the copied one. |
| idempotency_key | string | Repeat the same key to avoid issuing twice. |
| invoice_id | string | UUID of the note to copy. Use this or access_key. |
nfse_reviewResolve one invoice stuck in status "manual_review" (the portal did not confirm whether the NFS-e exists). Only valid in that status; otherwise it fails and tells the current status. Actions: "retry" sends the invoice back to reconciliation with the same DPS: the portal is asked for that DPS before anything is sent, so it never issues a second NFS-e; it ends authorized, rejected, or back in review if the portal is still silent. It is safe. "discard" asks the portal about the DPS: if the NFS-e exists the invoice becomes authorized; only when the portal confirms it was never registered is the invoice rejected (credit refunded); otherwise it stays in review. A discarded invoice leaves its number (DPS) skipped. When the invoice error code is DPS_NUMBER_USED_BY_OTHER_NFSE the portal already has that DPS number on ANOTHER NFS-e (error_message says which one): this invoice was never issued, "retry" is refused, and "discard" rejects it and refunds the credit; then the sale can be issued again with nfse_repeat (the new invoice gets a new number) after the person confirms. Before discard, explain to the person that the invoice number will be skipped and ask for confirmation. Otherwise prefer retry first. The platform also checks the portal automatically every 30 minutes. The result is asynchronous: call nfse_get later to see the final status. With type "nfe" or "nfce": "retry" asks the SEFAZ for the note by its access key (for an NF-e in reconciliation_required or manual_review) and "discard" drops a rejected NF-e so it can be fixed and sent again.| Parameter | Type | Description |
|---|---|---|
| action * | string | "retry" (safe, same DPS) or "discard" (skips the number) |
| invoice_id * | string | UUID of the invoice in manual_review |
| type | any |
nfse_substituteCorrect an authorized invoice by issuing a substitute. Only the service description, the purchase order and the notes can change: the customer, the competence date and the amount stay as issued (the tax authority refuses a substitute that changes them for MEI and Simples Nacional; to correct those, cancel the invoice and issue another). The original stays authorized until the substitute is authorized and only then becomes cancelled. The substitute uses a credit.${CONFIRM_NOTE}| Parameter | Type | Description |
|---|---|---|
| confirm | any | |
| description * | string | Why the invoice is being substituted (${CANCELLATION_DESCRIPTION_MIN}-${CANCELLATION_DESCRIPTION_MAX} chars) |
| invoice_id * | string | UUID of the authorized invoice to substitute |
| notes | string | New notes; an empty text removes them |
| purchase_order | string | New purchase order; an empty text removes it |
| service_description | string | New service description |
payment_statusFollow a credit purchase created with credits_purchase. Pass exactly one of payment_id (Pix or card) or session_id (card). Returns pending, paid (with the new credit balance), expired or cancelled. Poll every few seconds while the person pays; never assume it was paid. Once it is paid, go back to nfse_issue.| Parameter | Type | Description |
|---|---|---|
| payment_id | string | payment_id returned by credits_purchase. |
| session_id | string | session_id returned by credits_purchase for card. |
schedule_cancelCancel a schedule. This is final. Notes already issued stay.schedule_getGet one schedule: status, next run date, attempts and the invoice body it issues.schedule_listList scheduled (SCHEDULE) and recurring (RECURRING) invoices (NFS-e or NF-e, see type) in the connected environment. ${RUN_RULE}| Parameter | Type | Description |
|---|---|---|
| company_id | string | UUID of a company |
| status | string |
schedule_pausePause an active schedule. It stops running until resumed.schedule_resumeResume a paused schedule (for example one paused after 3 failed attempts). It continues at its next occurrence; runs missed meanwhile are not issued.schedule_runsLog of every attempt to run a schedule, newest first: the due date, the day it ran, the result, the invoice it issued or the error.schedule_updateChange a schedule. Applies to the next runs only; notes already issued do not change. Send only what changes. Changing frequency or first_date recomputes the next run.| Parameter | Type | Description |
|---|---|---|
| amount | number | New total in BRL |
| customer | object | |
| deduction | number | |
| description | string | |
| discount | number | |
| ends_on | any | YYYY-MM-DD last day, or null to run until paused or cancelled |
| first_date | string | YYYY-MM-DD the count of runs starts from |
| frequency | string | |
| municipality_code | string | |
| nfe | object | Only for an NF-e schedule (type "nfe"): the NF-e fields to change, such as items, payments, recipient or additionalInfo. Each field sent replaces the stored one as a whole (send the full items list, not one item). The company cannot change. The other note fields below are for NFS-e schedules. |
| notes | string | Free text printed on the next notes. Send an empty text to remove it. |
| purchase_order | string | Purchase order printed on the next notes. Send an empty text to remove it. |
| send_email | boolean | |
| service_code | string |
service_favorite_createSave a favorite for a company so it can be reused on later invoices. A service (default kind, up to 50 per company) needs label, description and service_code. With kind "product" (up to 500; the same description updates the saved one) send description, ncm and unit_price, and optionally code, gtin, cest, cfop, unit, csosn and origin. Corvo only estimates the taxes: the person informs NCM and, when needed, CFOP and CSOSN.| Parameter | Type | Description |
|---|---|---|
| amount_cents | any | Default amount in cents (R$ 150,00 = 15000), optional |
| cest | any | Product: CEST, 7 digits |
| cfop | any | Product: default CFOP |
| code | string | Product: your code |
| company_id * | any | |
| csosn | any | Product: 102, 101, 400 or 500 |
| description * | string | Service description printed on the invoice |
| gtin | any | Product: barcode |
| kind | string | Default service |
| label | string | Short name (service only) |
| municipality_code | any | IBGE place of service (7 digits), optional |
| ncm | string | Product: NCM, 8 digits |
| origin | any | Product: origin, 0 to 8 |
| service_code | string | National service code (cTribNac), 6 digits |
| unit | string | Product: unit, default UN |
| unit_price | number | Product: price of one unit in reais |
service_favorite_deleteRemove a favorite (service or product) of a company. It does not touch invoices already issued.| Parameter | Type | Description |
|---|---|---|
| company_id * | any | |
| favorite_id * | string | UUID of the favorite |
service_favorite_listList the favorites saved for a company. The default kind is "service": label, description, service code, optional default amount and municipality, to fill nfse_issue quickly. With kind "product": description, code, barcode, NCM, CEST, default CFOP, unit and unit price, to fill the items of nfse_issue with type "nfe" or "nfce".| Parameter | Type | Description |
|---|---|---|
| company_id * | any | |
| kind | string | Default service |
webhook_deliveries_listList the notices (webhooks) Corvo sent to the customer's system, newest first. Use it to answer "did my system get the notice for this invoice?". Each item has the event, the invoice, the status (${WEBHOOK_DELIVERY_STATUS_FILTERS.join(', ')}), the HTTP code the customer's system answered, how many attempts were made, the next attempt and a short error. "failed" means every attempt failed and Corvo stopped; offer webhook_delivery_retry. Never shows the secret, the signature or the event body.| Parameter | Type | Description |
|---|---|---|
| cursor | string | Pagination cursor from previous response |
| event_type | string | Only this event, e.g. nfse.invoice.authorized |
| hours | number | Look back this many hours (at most ${MAX_DELIVERY_HOURS}, 30 days) |
| invoice_id | string | UUID of an invoice: only notices about it |
| limit | number | |
| status | string | Only deliveries in this status |
webhook_delivery_retrySend one notice (webhook) again to the customer's system, with the exact same event. Use it for a delivery that is "failed" or "delayed" after the customer says their system is working again. A delivery sent more than 30 days ago has its content erased and answers WEBHOOK_DELIVERY_CONTENT_ERASED. It is queued and sent within about a minute; call webhook_deliveries_list later to see the result.| Parameter | Type | Description |
|---|---|---|
| delivery_id * | string | UUID of the delivery, from webhook_deliveries_list |
Security checks
6 checks have not been run yet.