Authentication and first call
Before calling the Reinf API, create the API key in the portal, exchange that key for an access token and use the bearer token in the playground or in your HTTP client.
1. Create the API key in the portal
Go to Administration > Access Control > API Integrations ("API keys" screen), create the key and copy the value shown. The API key is displayed only once, on creation; keep it safe. Each key has a prefix visible in the listing, used only for identification.
To replace a key, revoke the current one and create another. Revoking blocks new access, but tokens already issued remain valid until they expire.
API key: YOUR_API_KEY
2. Obtain the access token
Send the API key in the Authorization: Bearer header to POST /api/integracao/token. The request has no body and no form parameters: the only credential is the API key in the header.
POST /api/integracao/token
Authorization: Bearer YOUR_API_KEY
Expected response (minimal token payload):
{
"access_token": "eyJ...",
"token_type": "Bearer",
"expires_in": 900
}
The access_token normally expires in about 15 minutes (expires_in in seconds). Exchange the key again when it expires.
3. Use the token and validate the context
Once you have the token, send Authorization: Bearer and start with GET /v1/integracao/contexto.
Authorization: Bearer <access_token>
GET /v1/integracao/contexto
Environments
The fiscal flows keep the environment explicit for registrations, transmission, webhooks and reports. Separate Production and Restricted production.
TipoAmbienteCodigo: 1 or 2
Continue to Reinf API coverage or go back to the overview.