Skip to main content

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

user_id
integer
required
ID of the user conducting the investigation
location_id
integer
required
ID of the location being investigated
phenomena
string
required
Description of the paranormal phenomena being investigated
emergency_contact
string
required
Emergency contact information for the investigation team
visibility
boolean
required
Whether the investigation is public (true) or private (false)
evidence
array
Array of evidence items collected during the investigation

Response

id
integer
Unique identifier for the created investigation
user_id
integer
ID of the user conducting the investigation
location_id
integer
ID of the investigation location
phenomena
string
Description of the paranormal phenomena
emergency_contact
string
Emergency contact information
visibility
boolean
Public or private status
created_at
string
ISO 8601 timestamp of when the investigation was created
evidence
array
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
object
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"
}

Build docs developers (and LLMs) love