> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lifygo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Error Codes

> HTTP status codes and what they mean

# Error Codes

LifyGo uses standard HTTP status codes for every API response.

When an error occurs, the response body contains an `error` field describing the problem.

***

## Error Response Format

```json theme={null}
{
  "error": "A human-readable description of what went wrong."
}
```

***

## HTTP Status Codes

|  Status | Meaning                                                                                       |
| :-----: | --------------------------------------------------------------------------------------------- |
| **200** | Request completed successfully                                                                |
| **201** | Resource created successfully (API key, scheduled job, etc.)                                  |
| **400** | Missing or invalid request data                                                               |
| **401** | Missing or invalid API key                                                                    |
| **404** | Requested resource was not found                                                              |
| **422** | Request is valid, but required configuration is missing (for example, SMTP is not configured) |
| **429** | Rate limit exceeded (default: 100 requests per hour per API key)                              |
| **500** | Internal server error                                                                         |

***

## Common Error Examples

### Missing API Key

```json theme={null}
{
  "error": "missing API key"
}
```

### Invalid API Key

```json theme={null}
{
  "error": "invalid API key"
}
```

### Missing Required Field

```json theme={null}
{
  "error": "subject is required"
}
```

### SMTP Not Configured

```json theme={null}
{
  "error": "SMTP configuration not found"
}
```

### Rate Limit Exceeded

```json theme={null}
{
  "error": "rate limit exceeded"
}
```

***

## Troubleshooting

If you receive a **500 Internal Server Error**, check:

* API server logs
* SMTP server connectivity
* Database availability
* Redis availability
* Environment variable configuration
