# Message

## Get Message Logging

This API endpoint retrieves logging information for a specific message.

### Endpoint

```
GET https://www.firsbot.tech/api/v1/messages/{id}
```

### Authentication

This endpoint requires API key authentication. Include your API key in the `Authorization` header of the request.

### Request Parameters

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| id        | string | Yes      | The ID of the message |

### Response

#### Success Response

* **Status Code:** 200 OK
* **Content-Type:** application/json

```json
{
  "id": "string",
  "messageId": "string",
  "input": {
    "message": "string"
  },
  "output": {
    "message": "string"
  },
  "createdAt": "string",
  "updatedAt": "string"
}
```

#### Error Responses

* **401 Unauthorized:** Missing or invalid API key
* **404 Not Found:** Message not found
* **405 Method Not Allowed:** Invalid HTTP method
* **500 Internal Server Error:** Server-side error

### Example Usage

#### cURL

```bash
curl -X GET 'https://www.firsbot.tech/api/v1/messages/03840332-b4c7-45b8-930d-4fd0af9d4699' \
  -H 'Authorization: your-api-key'
```

#### JavaScript (Axios)

```javascript
const axios = require('axios');

const apiKey = 'your-api-key';
const messageId = '03840332-b4c7-45b8-930d-4fd0af9d4699';

axios.get(`https://www.firsbot.tech/api/v1/messages/${messageId}`, {
  headers: {
    'Authorization': apiKey
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error('Error:', error.response.data);
});
```

### Notes

* Ensure you replace `your-api-key` with your actual API key.
* The response includes logging information for the specified message, including input and output data if available.

### Error Handling

The API returns appropriate HTTP status codes and error messages for different scenarios. Always check the HTTP status code and error message in the response to handle errors appropriately in your application.
