POST
/api/company/createRegister a new issuing company
Registers an issuing company under a distributor (b2b) account. Use this endpoint when company data is already available. For automatic extraction from the digital certificate, use /api/company/v2/create. The CNPJ in the certificate must match cnpj, otherwise an error is returned. The endpoint does not check whether the CNPJ is already registered: a repeated call creates another company (new company_id and token). Each company receives its own token, used for its subsequent issuance and other calls.
Required headers
tokenstring | string | Distributor token (b2b — the account must have isb2b=true) |
signstring | string | MD5 signature |
timestampstring | string | Unix timestamp in seconds |
Body
| Identification | ||
cnpj*string | string | Issuing company CNPJ; must match the CNPJ in the certificate |
name*string | string | Company name |
ie*string | string | State Registration (Inscrição Estadual) |
invoice_*string | string | Tax regime, which sets the CRT in the XML: "simples_nacional" (CRT 1), "simples_nacional_excesso" (CRT 2), "lucro_normal" or "tributacao_normal" (CRT 3), "simples" (CRT 4, MEI); "1"–"4" are also accepted.Other values are not rejected and are treated as CRT 1 at issuance |
unit*string | string | Unit type |
emailstring | string | Company email |
| Address | ||
cep*string | string | ZIP code |
address*string | string | Street address |
house_*string | string | Address number |
town*string | string | Neighborhood |
city*string | string | City |
state*string | string | UF (state abbreviation) |
| Digital certificate | ||
cert_*string | string | Contents of the A1 certificate file (.pfx/.p12), Base64-encoded |
cert_string | string | Deprecated — rejected from 2026-09-01. Certificate HTTPS URL |
cert_*string | string | Certificate password |
| Numbering and settings | ||
serie*int | int | NF-e series |
number*int | int | Number used by the next NF-e in this series |
| Transport (MDF-e / CT-e / DC-e) | ||
serie_int | int | MDF-e series |
number_int | int | MDF-e starting number (where numbering begins) |
serie_int | int | CT-e series |
number_int | int | CT-e starting number (where numbering begins) |
serie_int | int | DC-e series |
number_int | int | DC-e starting number (where numbering begins) |
| Communication (NFCom) | ||
serie_int | int | NFCom series |
number_int | int | NFCom starting number (where numbering begins) |
| Energy (NF3e) | ||
serie_int | int | NF3e series |
number_int | int | NF3e starting number (where numbering begins) |
is_boolean | boolean | Auto-create the default tax categories. Created only for companies whose invoice_type is simples_nacional or simples; no category is created for other regimes. Default: true |
* Required field.
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/create" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"cnpj": "12345678000199",
"name": "Empresa Exemplo LTDA",
"ie": "123456789",
"invoice_type": "simples_nacional",
"unit": "matriz",
"email": "contato@empresa.com",
"cep": "01001000",
"address": "Rua Exemplo",
"house_number": "100",
"town": "Centro",
"city": "São Paulo",
"state": "SP",
"cert_content": "MIIOkAIBAzCC...(Base64)",
"cert_pwd": "senha_do_certificado",
"serie": 1,
"number": 1,
"serie_mdfe": 2,
"number_mdfe": 1,
"serie_cte": 3,
"number_cte": 1,
"serie_dce": 4,
"number_dce": 1,
"serie_nfcom": 5,
"number_nfcom": 1,
"serie_nf3e": 6,
"number_nf3e": 1
}
{
"success": true,
"data": {
"company_id": "10234",
"token": "3f9a1c7e5b2d4f6a8c0e1b3d5f7a9c2e"
}
}