Skip to main content

POST /v1/evidence

Create a new evidence record with associated text notes, audio recordings, and photos from a paranormal investigation.
This endpoint is currently under development. The handler returns immediately and does not process or store evidence data yet.

Request Body

investigation_id
integer
required
ID of the investigation this evidence belongs to
location_id
integer
required
ID of the location where this evidence was collected
created_by_user_id
integer
required
ID of the user who created this evidence
visibility
boolean
required
Whether the evidence is public (true) or private (false)
text_notes
array
Array of text observations and notes
audio_notes
array
Array of audio recordings including EVPs (Electronic Voice Phenomena)
photos
array
Array of photographic evidence

Validation Rules

Text Notes

  • subject: Required, max 500 bytes
  • body: Required, max 10,000 bytes

Audio Notes

  • source_url: Required, max 2000 bytes
  • file_size_bytes: Must be between 1 byte and 5 MB (5,242,880 bytes)

Photos

  • source_url: Required, max 2000 bytes
  • file_type: Must be one of: jpeg, jpg, png, webp (case-insensitive)
  • file_size_bytes: Must be between 1 byte and 5 MB (5,242,880 bytes)
  • caption: Required, max 500 bytes

Response

id
integer
Unique identifier for the evidence record
investigation_id
integer
ID of the parent investigation
location_id
integer
ID of the location
created_by_user_id
integer
ID of the user who created the evidence
visibility
boolean
Public or private status
created_at
string
ISO 8601 timestamp of creation
version
integer
Version number for optimistic locking

Example Request

curl -X POST http://localhost:4000/v1/evidence \
  -H "Content-Type: application/json" \
  -d '{
    "investigation_id": 42,
    "location_id": 15,
    "created_by_user_id": 1,
    "visibility": true,
    "text_notes": [
      {
        "subject": "Strange cold spot detected",
        "body": "At approximately 2:15 AM, temperature dropped 15 degrees in the east hallway. EMF readings spiked to 4.2 mG. Duration: 3 minutes.",
        "location_id": 15
      }
    ],
    "audio_notes": [
      {
        "title": "EVP - Female voice",
        "source_url": "https://storage.example.com/audio/evp_20260301_0215.mp3",
        "duration": 180,
        "file_size_bytes": 2457600,
        "is_evp": true
      }
    ],
    "photos": [
      {
        "source_url": "https://storage.example.com/photos/orb_20260301_0215.jpg",
        "thumbnail_url": "https://storage.example.com/photos/thumbs/orb_20260301_0215.jpg",
        "caption": "Unexplained orb of light near staircase",
        "file_type": "jpg",
        "file_size_bytes": 3145728
      }
    ]
  }'

Example Response

{
  "evidence": {
    "id": 127,
    "investigation_id": 42,
    "location_id": 15,
    "created_by_user_id": 1,
    "visibility": true,
    "created_at": "2026-03-01T02:15:00Z",
    "version": 1
  }
}

GET /v1/evidence/:id

Retrieve a specific evidence record by its ID.
This endpoint is currently under development. The handler is commented out and does not return evidence data yet.

Path Parameters

id
integer
required
The unique identifier of the evidence record

Response

evidence
object
The evidence record

Example Request

curl http://localhost:4000/v1/evidence/127

Example Response

{
  "evidence": {
    "id": 127,
    "investigation_id": 42,
    "location_id": 15,
    "created_by_user_id": 1,
    "visibility": true,
    "created_at": "2026-03-01T02:15:00Z",
    "version": 1
  }
}

Error Responses

400 Bad Request

Returned when the ID parameter is invalid.
{
  "error": "invalid id parameter"
}

404 Not Found

Returned when the evidence record does not exist.
{
  "error": "the requested resource could not be found"
}

422 Unprocessable Entity

Returned when validation fails.
{
  "error": {
    "source_url": "must be provided",
    "file_size_bytes": "must be between 1 byte and 5 MB"
  }
}

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