GuíaEjemplosReferencia API
apisunat.netIngresar

Cuenta

  • GETComprobar la clave
  • GETPlan y consumo del mes

Emisores

  • GETListar RUC
  • POSTRegistrar un RUC
  • GETConsultar un RUC
  • PATCHActivar o desactivar un RUC
  • PUTGuardar credenciales SUNAT
  • POSTValidar el RUC con SUNAT
  • POSTPasar el RUC a producción

Series y establecimientos

  • GETListar series
  • GETListar establecimientos
  • POSTCrear o actualizar un establecimiento

Utilidades

  • POSTCalcular totales e IGV
  • GETListar catálogos SUNAT
  • GETBuscar en el catálogo 25 (productos SUNAT)
  • GETConsultar un catálogo

Documentos

  • GETListar documentos
  • POSTEmitir factura, boleta, nota o retención
  • GETConsultar un documento
  • GETDescargar PDF, XML, ZIP o CDR
  • POSTReenviar a SUNAT
  • POSTConsultar el ticket en SUNAT
  • GETHistorial de correos
  • POSTEnviar por correo
  • POSTReintentar un correo

Anulaciones

  • POSTAnular documentos
  • GETConsultar una anulación

GRE

  • POSTEmitir una guía de remisión (GRE)
  • GETConsultar una guía

Recursos

  • GETEspecificación OpenAPI
  • GETColección Postman
  • GETResumen para asistentes de IA
POST/issuer/documents/{id}/emails

Enviar por correo

Send request

Use the documented inputs to call this endpoint directly.

API serverbase URL
Bearer tokenBearerAuthoptional
Stored only in this browser for the BearerAuth security scheme and reused on every API page in this group.

Parameters

Values are applied to the request and the example on the right.

idpath · string · uuidrequired

Request body

application/jsonrequired
formatenumoptional

Values: "a4" · "a5" · "ticket80" · "ticket58" · "ticket50"

recipientstringoptional

Responses

202application/json

Aceptado; SUNAT puede seguir procesando.

{
  "attempts": 1.5,
  "createdAt": "string",
  "errorMessage": "string",
  "id": "",
  "recipient": "string",
  "sentAt": "string",
  "status": "string"
}
attemptsnumberrequired
createdAtobjectrequired
errorMessageobjectrequired
idstringrequired
recipientstringrequired
sentAtobjectrequired
statusstringrequired
400application/json

VALIDATION_ERROR: El cuerpo, los parámetros o una regla del comprobante no son válidos. fields indica el campo.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
401application/json

UNAUTHENTICATED: Falta la clave API o no es válida.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
402application/json

TRIAL_EXPIRED: La prueba gratuita venció.

TRIAL_EXHAUSTED: La prueba gratuita consumió sus operaciones.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
403application/json

WORKSPACE_SUSPENDED: El workspace está suspendido.

TEST_KEY_IN_PRODUCTION: La clave no corresponde: un documento emitido con asu_live_ solo se opera con asu_live_ (y uno de prueba con asu_test_).

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
404application/json

NOT_FOUND: El recurso no existe en el workspace.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
409application/json

FILES_NOT_AVAILABLE: El XML, ZIP o PDF todavía no está disponible.

EMAIL_IN_PROGRESS: Ya hay un envío de correo en curso para el documento.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
422application/json

INVALID_EMAIL: El destinatario no es un correo válido.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
429application/json

RATE_LIMITED: Se superó el límite de peticiones. Respeta el header Retry-After.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
500application/json

INTERNAL_ERROR: Error interno. Reintenta y comparte el requestId con soporte.

{
  "error": {
    "code": "string",
    "fields": {},
    "message": "string",
    "requestId": "",
    "retryable": true
  }
}
errorrequired
Historial de correos< PreviousReintentar un correoNext >

Powered by heyo

curl --request POST \
  'https://api.apisunat.net/api/v1/issuer/documents/{id}/emails' \
  --header 'Content-Type: application/json' \
  --data '{
  "recipient": "[email protected]",
  "format": "a4"
}'
{
  "attempts": 1.5,
  "createdAt": "string",
  "errorMessage": "string",
  "id": "",
  "recipient": "string",
  "sentAt": "string",
  "status": "string"
}