# API Response Status Codes

### Success Responses

**200 OK**

* **Description:** Request successful, data returned as expected
* **When returned:** Successful GET, POST, PUT, or DELETE operations
* **Action:** Process the returned data normally

### Client Error Responses (4xx)

**400 Bad Request**

* **Description:** Invalid request format or parameters
* **When returned:** Missing required fields, malformed JSON, invalid data types, or parameter validation failures
* **Action:** Review request payload and ensure all required fields are present and properly formatted

**401 Unauthorized**

* **Description:** Authentication required or failed
* **When returned:** Missing authentication token, expired token, or invalid credentials
* **Action:** Authenticate or refresh your access token

**403 Forbidden**

* **Description:** Authenticated but lacks permission
* **When returned:** User attempting to access resources or perform actions outside their permission scope
* **Action:** Check user role and permissions for the requested resource

**404 Not Found**

* **Description:** Requested resource doesn't exist
* **When returned:** Invalid dataset ID, model ID, or endpoint URL
* **Action:** Verify the resource identifier and endpoint path

**405 Method Not Allowed**

* **Description:** HTTP method not supported for this endpoint
* **When returned:** Using GET on POST-only endpoints, or vice versa
* **Action:** Check API documentation for correct HTTP method

**409 Conflict**

* **Description:** Request conflicts with current resource state
* **When returned:** Attempting to create duplicate resources, concurrent modification conflicts
* **Action:** Check for existing resources or retry with updated data

**413 Request Entity Too Large**

* **Description:** Request payload exceeds size limits
* **When returned:** Dataset uploads or API requests exceeding size thresholds
* **Action:** Reduce payload size or upgrade Graphite Note licence

**429 API Rate Limit Exceeded**

* **Description:** Too many requests in given time period
* **When returned:** Exceeding rate limits defined in your subscription plan
* **Action:** Implement request throttling, check rate limit headers, wait before retrying

### Custom Business Logic Errors (44x)

**441 Subscription Plan Limit**

* **Description:** Action exceeds subscription plan limits
* **When returned:** Attempting operations beyond plan quotas (datasets, models, API calls)
* **Action:** Upgrade subscription plan or remove unused resources

**442 Email Already Exists**

* **Description:** Email address already registered
* **When returned:** User registration or email update with existing email
* **Action:** Use different email or attempt login/password recovery

**443 Free Trial Finished**

* **Description:** Free trial period has ended
* **When returned:** Attempting paid features after trial expiration
* **Action:** Subscribe to a paid plan to continue access

**445 Model Creation Limit**

* **Description:** Maximum model creation limit reached
* **When returned:** Creating models beyond plan allowance
* **Action:** Delete unused models or upgrade subscription plan

### Server Error Responses (5xx)

**500 Internal Server Error**

* **Description:** Unexpected server error occurred
* **When returned:** Server-side exceptions, database failures, or unhandled errors
* **Action:** Retry request, contact support if persists with request details

**501 Not Implemented**

* **Description:** Functionality not yet implemented
* **When returned:** Accessing beta or upcoming features not available in current version
* **Action:** Check API versioning or feature availability documentation


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.graphite-note.com/graphite-note-documentation/rest-api/api-response-status-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
