Projekty
APIReports

Create report

Reports a ride or a user to the moderation queue.

POST
/api/reports

Reports a ride or a user to the moderation queue.

Authorization

sessionAuth
cookiebetter-auth.session_token<token>

Better Auth session cookie (on HTTPS: __Secure-better-auth.session_token), forwarded to the login server's /api/auth/get-session

Request Body

application/json
  1. body
targetType*string
Value in"ride""user"
targetId*string
Length1 <= length
reason*string
Length5 <= length <= 1000

Response Body

OK

application/json
  1. response
success*boolean
id*string
Example Request
curl -X POST 'https://example.com/api/reports' \  -H 'Content-Type: application/json' \  -d '{  "targetType": "ride",  "targetId": "string",  "reason": "string"}'
Example Response
{  "success": true,  "id": "string"}