> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sonoransoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload Debug

> Upload CAD FiveM debug output directly to an open support ticket.

## Upload Debug

`POST` `https://api.sonoransoftware.com/v2/upload/debug/{ticketId}`

This endpoint allows a CAD FiveM integration to upload debug output directly into an existing support ticket.

The `ticketId` path parameter must be the short support ticket ID, not the ticket UUID.

Debug uploads are only accepted after a support team member has enabled debug uploads for that ticket.

#### Request Body

Send the request body as plain text. The body should contain the raw debug output you want attached to the ticket.

> [tab] OpenAPI
>
> ```yaml theme={null}
> openapi: 3.0.3
> info:
>   title: Sonoran Support API
>   version: "1.0"
> paths:
>   /v2/upload/debug/{ticketId}:
>     post:
>       summary: Upload CAD debug output to a support ticket
>       parameters:
>         - in: path
>           name: ticketId
>           required: true
>           schema:
>             type: integer
>           description: Short support ticket ID
>       requestBody:
>         required: true
>         content:
>           text/plain:
>             schema:
>               type: string
>             example: |
>               [sonorancad] Debug session started
>               [sonorancad] Player cache refreshed
>               [sonorancad] Completed sync in 42ms
>       responses:
>         "200":
>           description: Debug uploaded successfully
>         "400":
>           description: Empty body or invalid non-CAD ticket
>         "403":
>           description: Debug upload is not enabled for this ticket
>         "404":
>           description: Ticket not found
> ```

> [tab] cURL
>
> ```bash theme={null}
> curl -X POST "https://api.sonoransoftware.com/v2/upload/debug/12345" \
>   -H "Content-Type: text/plain" \
>   --data-binary @debug.txt
> ```

### Response Body

> [tab] 200 A successful call will be met with the following response:
>
> ```json theme={null}
> {
>   "success": true,
>   "ticketId": 12345
> }
> ```

> [tab] 403 Debug upload is not enabled for this ticket:
>
> ```json theme={null}
> {
>   "success": false,
>   "error": "Debug upload is not enabled for this ticket."
> }
> ```

> [tab] 404 Ticket not found:
>
> ```json theme={null}
> {
>   "success": false,
>   "error": "Ticket not found."
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.