API REST Documentation

Integra SmartDocs AI en tus aplicaciones

Endpoints

Autenticación

POST/api/auth/login

Iniciar sesión

Body

{
  "email": "string",
  "password": "string"
}

Respuesta

{
  "token": "string",
  "user": "object"
}
POST/api/auth/register

Registrar nuevo usuario

Body

{
  "email": "string",
  "password": "string",
  "name": "string",
  "company": "string"
}

Ejemplo de uso

// Autenticación
const response = await fetch('https://api.smartdocsai.com/api/auth/login', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    email: 'usuario@ejemplo.com',
    password: 'contraseña'
  })
});

const { token } = await response.json();

// Usar token en siguientes peticiones
const documents = await fetch('https://api.smartdocsai.com/api/documents', {
  headers: {
    'Authorization': `Bearer ${token}`
  }
});

Límites de API

  • • Starter: 100 peticiones/hora
  • • Professional: 1,000 peticiones/hora
  • • Enterprise: Sin límites