API Criar Empresa
Estimated reading: 1 minute
258 views
Criar uma empresa em sua instância.
É necessário uso do TOKEN de uma conexão do Super Admin
Endpoint POST
https://Erro: valor 'backendurl' não encontrado./api/companies/add
API
Utilize o código em requisições HTTPS com ferramentas como cURL ou bibliotecas de integração.
'https://Erro: valor 'backendurl' não encontrado./api/companies/add',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"name": "EMPRESA DE TESTE API33",
"phone": "5511999999999",
"namecomplete": "NOME DA EMPRESA33",
"pais": "BR",
"indicator": "INDICADOR DA EMPRESA",
"email": "EMAIL33@EMAIL.COM",
"password": "SENHA DE ACESSO",
"status": true,
"planId": "1",
"dueDate": "2025/12/20",
"recurrence": "MENSAL"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer {seutokenaqui}' //Token cadastrado na conexão
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Retorno de API (Payload de Resposta)
Exemplo de retorno ao criar uma empresa:
{
"document": "",
"excluded": false,
"removido": false,
"id": 13,
"name": "EMPRESA DE TESTE API33",
"phone": "5511999999999",
"namecomplete": "NOME DA EMPRESA33",
"pais": "BR",
"indicator": "INDICADOR DA EMPRESA",
"email": "EMAIL33@EMAIL.COM",
"status": true,
"planId": 1,
"dueDate": "2025-03-29T14:36:22.000Z",
"recurrence": "MENSAL",
"importar": false,
"typebotName": "",
"typebotUrl": "",
"iframeUser": "",
"iframeUserUrl": "",
"iframeAdmin": "",
"iframeAdminUrl": "",
"blockGroups": true,
"blockRead": false,
"proxyURL": "",
"useProxy": "noproxy",
"updatedAt": "2025-03-26T14:36:22.489Z",
"createdAt": "2025-03-26T14:36:22.489Z",
"schedules": [],
"lastLogin": null,
"paymentMethod": "",
"messageCount": "",
"iframeUserUrlB": "",
"iframeUserB": "",
"keystorage": "postgres",
"apiUsada": "postgres",
"logar": true
}
Caso sua conexão não seja um Super Admin
{
"error": "Você não tem permissão para acessar este recurso!"
}