# Monitoring

## Ingest Salesforce error email from console

> Receives a raw Salesforce error email (subject + body) forwarded by the provisioning console. Parses the email and writes structured error data to VictoriaLogs. Secured via shared MONITORING\_INGEST\_TOKEN and console IP validation.

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.3.0"},"paths":{"/sfp/api/monitoring/ingest":{"post":{"operationId":"MonitoringIngestController_ingest","summary":"Ingest Salesforce error email from console","description":"Receives a raw Salesforce error email (subject + body) forwarded by the provisioning console. Parses the email and writes structured error data to VictoriaLogs. Secured via shared MONITORING_INGEST_TOKEN and console IP validation.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawEmailIngestDto"}}}},"responses":{"201":{"description":"Email parsed and ingested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorLogsIngestResponseDto"}}}},"401":{"description":"Invalid monitoring token"},"403":{"description":"Source IP not allowed"}},"tags":["Monitoring"]}}},"components":{"schemas":{"RawEmailIngestDto":{"type":"object","properties":{"subject":{"type":"string","description":"Email subject line"},"body":{"type":"string","description":"Email body content"},"orgId":{"type":"string","description":"Optional org ID override"}},"required":["subject","body"]},"ErrorLogsIngestResponseDto":{"type":"object","properties":{"written":{"type":"number","description":"Number of log entries written"},"parseStatus":{"type":"string","description":"Parse status for email ingestion"},"message":{"type":"string","description":"Additional context message"}},"required":["written"]}}}}
```
