TF Fiscal

Companies

POST/api/company/v2/create

Register company by certificate

Simplified version of /api/company/create: the API validates the digital certificate and automatically extracts company name, IE, address and other data via internal lookup. Only cnpj, cert_content and cert_pwd are required.

Required headers

tokenstringstringDistributor token (b2b — the account must have isb2b=true)
signstringstringMD5 signature
timestampstringstringUnix timestamp in seconds

Body

cnpj*stringstringIssuing company CNPJ
cert_content*stringstringContents of the A1 certificate file (.pfx/.p12), Base64-encoded
cert_filestringstringDeprecated — rejected from 2026-09-01.
cert_pwd*stringstringCertificate password
serie_mdfeintintMDF-e series
number_mdfeintintMDF-e starting number (where numbering begins)
serie_cteintintCT-e series
number_cteintintCT-e starting number (where numbering begins)
serie_dceintintDC-e series
number_dceintintDC-e starting number (where numbering begins)
serie_nfcomintintNFCom series
number_nfcomintintNFCom starting number (where numbering begins)
serie_nf3eintintNF3e series
number_nf3eintintNF3e starting number (where numbering begins)
is_create_category_templatebooleanbooleanAuto-create the default tax categories.

 * Required field. The CNPJ in the certificate must match cnpj. The endpoint does not check whether the CNPJ is already registered; a repeated call creates another company. The tax regime (invoice_type) is derived from the registry data; the NF-e series and starting number are fixed at 1 and 1. For other values, call /api/company/edit after creation with both serie and number.

Examples

# sign = md5(token + path + body + timestamp)
# Template generated from the endpoint path; replace the placeholders
curl -X POST "https://api.tffiscal.com/api/company/v2/create" \
  -H "Content-Type: application/json" \
  -H "token: $TOKEN" \
  -H "timestamp: $TIMESTAMP" \
  -H "sign: $SIGN" \
  -d @body.json