POST /v1/investigations
Create a new investigation record. An investigation represents a ghost hunting session at a specific location.
This endpoint is currently under development and returns a placeholder response.
Request Body
ID of the user conducting the investigation
ID of the location being investigated
Description of the paranormal phenomena being investigated
Emergency contact information for the investigation team
Whether the investigation is public (true) or private (false)
Array of evidence items collected during the investigation
Unique identifier for the evidence
ID of the parent investigation
ID of the location where evidence was collected
Whether the evidence is public or private
Response
Unique identifier for the created investigation
ID of the user conducting the investigation
ID of the investigation location
Description of the paranormal phenomena
Emergency contact information
ISO 8601 timestamp of when the investigation was created
Array of evidence items associated with this investigation
Example Request
curl -X POST http://localhost:4000/v1/investigations \
-H "Content-Type: application/json" \
-d '{
"user_id": 1,
"location_id": 42,
"phenomena": "Unexplained cold spots and shadow figures in the east wing",
"emergency_contact": "John Doe - (555) 123-4567",
"visibility": true,
"evidence": []
}'
Error Responses
Error details when the request fails
400 Bad Request
Returned when the request body is malformed or contains invalid JSON.
{
"error": "body contains badly-formed JSON (at position 15)"
}
404 Not Found
Returned when the requested resource does not exist.
{
"error": "the requested resource could not be found"
}
422 Unprocessable Entity
Returned when validation fails on the provided data.
{
"error": {
"phenomena": "must be provided",
"emergency_contact": "must be provided"
}
}
500 Internal Server Error
Returned when the server encounters an unexpected error.
{
"error": "the server encountered a problem and could not process your request"
}