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

# Responses

> Familiarize on response formats and common responses

The MeetBit Public API has a standard response format and standard response status codes. This page will guide you through those as well as common errors you may encounter.

## Response Format

The MeetBit Public API wraps resource objects returned in responses in a base response format.

```http theme={null}
200 OK
Content-Type: application/json
{
  "message": "Successfully fetched User.",
  "data": { "id": 123 }
}
```

<ParamField body="message" type="string" required>
  A short response message
</ParamField>

<ParamField body="data" type="any" required>
  The resource object/s returned
</ParamField>

## Response Codes

We follow [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes) in using HTTP status codes to indicate success or failure of your requests.

In general, 2xx HTTP codes correspond to success, 4xx codes are for client-side errors, and 5xx codes are for server-side issues.

| Status Code | Description                                     |
| ----------- | ----------------------------------------------- |
| 200         | Successful request.                             |
| 202         | Successful request without content in response. |
| 400         | Invalid input parameters.                       |
| 401         | Invalid access key or permissions.              |
| 404         | Resource not found.                             |
| 429         | Rate limit exceeded.                            |
| 500         | Server error.                                   |

## Common Errors

### Validation Error

This error is returned when the request parameter/s are invalid or malformed.

```http theme={null}
400 Bad Request
Content-Type: application/json
{
  "message": "The first_name field must not be greater than 255 characters. (and 1 more error)",
  "errors": {
    "first_name": [
      "The first_name field must not be greater than 255 characters."
    ],
    "email": [
      "The email field is required."
    ]
  }
}
```

<ResponseField name="message" type="string">
  A short response message
</ResponseField>

<ResponseField name="errors" type="ValidationError">
  <Expandable title="properties">
    <ResponseField name="field_name" type="string[]">
      List of errors for the field.
    </ResponseField>
  </Expandable>
</ResponseField>

If encountered, inspect the response body for the errors thrown. The response body will have an `errors` object with keys that correspond to input fields. Each key's value is an array of strings describing the errors encountered in validating that field.

### Resource Object Not Found

This error is returned when the specified resource object is not found.

```http theme={null}
404 Not Found
Content-Type: text/plain
Resource object does not exist.
```

If encountered, verify that the resource object does infact exist.

### Unauthenticated Error

This error is returned when the request has invalid or is missing access keys.

```http theme={null}
401 Unauthorized
Content-Type: text/plain
Invalid or missing access keys.
```

If encountered, verify that the Access Key ID and Secret were attached to the request headers as indicated in [Authentication & Authorization](/basics/auth#authentication). If these are attached, verify that the values are valid.

### Unauthorized Error

This error is returned when the Client does not have the necessary permissions to perform the action.

```http theme={null}
401 Unauthorized
Content-Type: text/plain
Access denied.
```

If encountered, verify that the Role of your Access Key's Client was granted with the necessary permissions.

### Rate Limited Error

This error is returned when the rate limit has been exceeded.

```http theme={null}
429 Too Many Requests
Content-Type: text/plain
Retry-After: 60
Too many requests.
```

<ParamField header="Retry-After" type="integer" required>
  Number of seconds to wait before making another request.
</ParamField>

If encountered, handle this error by following the instructions indicated in [Rate Limiting](/basics/rate-limiting#handling-rate-limit-errors).

### Server Error

This error is returned when an unexpected error has been encountered on the server.

```http theme={null}
500 Internal Server Error
Content-Type: text/plain
An unexpected error occurred.
```

If encountered, handle this error by reporting the issue as indicated in [Tracking Errors](/basics/errors#reporting-errors).
