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

# Manage Support Tickets

> Create partner tickets, reply to tickets, and upload support attachments

Use support endpoints to manage partner support tickets and respond to customer support tickets visible to your partner organization.

Required permissions depend on the action:

| Action                       | Permission      |
| ---------------------------- | --------------- |
| List, detail, download URL   | `SUPPORT_READ`  |
| Create, reply, upload drafts | `SUPPORT_WRITE` |

## Create a partner ticket

You can create a partner ticket directly with `POST /api/v1/support/partner-tickets`. If you do not need attachments, `draftId` is optional.

```json theme={null}
{
  "actorEmail": "ops@example.com",
  "subject": "Question about payment review",
  "bodyHtml": "<p>Can you review payment <strong>pay_123</strong>?</p>"
}
```

```bash theme={null}
BODY='{"actorEmail":"ops@example.com","subject":"Question about payment review","bodyHtml":"<p>Can you review payment <strong>pay_123</strong>?</p>"}'
TOKEN="<signed-request-jwt>"

curl https://rest-api.nuvera.global/api/v1/support/partner-tickets \
  -H "x-api-key: $NUVERA_API_KEY" \
  -H "Authorization: Bearer $TOKEN" \
  -H "content-type: application/json" \
  --data "$BODY"
```

Optional fields:

| Field      | Required? | Notes                                                                      |
| ---------- | --------- | -------------------------------------------------------------------------- |
| `draftId`  | Optional  | Required only when you created a draft first, for example to attach files. |
| `bodyText` | Optional  | Plain-text version of the message body.                                    |

## Add attachments to a new partner ticket

Attachments require a draft. Create the draft first, upload attachments to that draft, then submit the ticket with the same `draftId`.

```bash theme={null}
TOKEN="<signed-request-jwt>"

curl https://rest-api.nuvera.global/api/v1/support/partner-ticket-drafts \
  -X POST \
  -H "x-api-key: $NUVERA_API_KEY" \
  -H "Authorization: Bearer $TOKEN"
```

```bash theme={null}
DRAFT_ID="<draft-id>"
TOKEN="<signed-multipart-request-jwt>"

curl "https://rest-api.nuvera.global/api/v1/support/partner-ticket-drafts/$DRAFT_ID/attachments" \
  -H "x-api-key: $NUVERA_API_KEY" \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@./support-context.pdf;type=application/pdf"
```

The multipart field name must be exactly `file`. Multipart requests use Nuvera's canonical multipart body hash. See [Multipart body hash](/get-started/partner-api/request-signing#multipart-body-hash) before implementing uploads.

## List and read partner tickets

Use `GET /api/v1/support/partner-tickets` to list partner tickets and `GET /api/v1/support/partner-tickets/{ticketId}` to read one ticket.

```bash theme={null}
TOKEN="<signed-request-jwt>"

curl "https://rest-api.nuvera.global/api/v1/support/partner-tickets?limit=25&unreadOnly=false&status=OPEN" \
  -H "x-api-key: $NUVERA_API_KEY" \
  -H "Authorization: Bearer $TOKEN"
```

Query fields:

| Field        | Required? | Notes                                                      |
| ------------ | --------- | ---------------------------------------------------------- |
| `limit`      | Required  | Page size from 1 to 100.                                   |
| `unreadOnly` | Required  | Use `true` to show only unread tickets, otherwise `false`. |
| `cursor`     | Optional  | Cursor returned by the previous page.                      |
| `status`     | Optional  | `OPEN` or `CLOSED`.                                        |
| `subStatus`  | Optional  | `ON_US` or `ON_CUSTOMER`.                                  |
| `search`     | Optional  | Search text, from 1 to 200 characters.                     |

For attachments already on a partner ticket, request a download URL with `GET /api/v1/support/partner-tickets/{ticketId}/attachments/{attachmentId}/download-url`.

## Reply to a partner ticket

Replies require a reply draft. Create the reply draft, optionally upload attachments to it, then submit the reply with that `draftId`.

```bash theme={null}
TICKET_ID="<ticket-id>"
TOKEN="<signed-request-jwt>"

curl "https://rest-api.nuvera.global/api/v1/support/partner-tickets/$TICKET_ID/reply-drafts" \
  -X POST \
  -H "x-api-key: $NUVERA_API_KEY" \
  -H "Authorization: Bearer $TOKEN"
```

```json theme={null}
{
  "draftId": "<draft-id>",
  "actorEmail": "ops@example.com",
  "bodyHtml": "<p>Thanks, attaching the missing context.</p>"
}
```

```bash theme={null}
TICKET_ID="<ticket-id>"
BODY='{"draftId":"<draft-id>","actorEmail":"ops@example.com","bodyHtml":"<p>Thanks, attaching the missing context.</p>"}'
TOKEN="<signed-request-jwt>"

curl "https://rest-api.nuvera.global/api/v1/support/partner-tickets/$TICKET_ID/replies" \
  -H "x-api-key: $NUVERA_API_KEY" \
  -H "Authorization: Bearer $TOKEN" \
  -H "content-type: application/json" \
  --data "$BODY"
```

Optional reply field:

| Field      | Required? | Notes                                   |
| ---------- | --------- | --------------------------------------- |
| `bodyText` | Optional  | Plain-text version of the message body. |

## Reply to customer tickets

Partner REST can list, read, and reply to customer tickets for the partner organization. It does not expose an endpoint to create a customer ticket.

```bash theme={null}
TOKEN="<signed-request-jwt>"

curl "https://rest-api.nuvera.global/api/v1/support/customer-tickets?limit=25&unreadOnly=false&status=OPEN" \
  -H "x-api-key: $NUVERA_API_KEY" \
  -H "Authorization: Bearer $TOKEN"
```

Customer ticket list supports the same query fields as partner ticket list, plus optional `customerId` and optional `customerMatchState` with values `MATCHED`, `UNMATCHED`, or `AMBIGUOUS`.

To reply, create a reply draft with `POST /api/v1/support/customer-tickets/{ticketId}/reply-drafts`, optionally upload attachments with `POST /api/v1/support/customer-tickets/{ticketId}/reply-drafts/{draftId}/attachments`, then submit the reply with `POST /api/v1/support/customer-tickets/{ticketId}/replies`.

For complete support endpoint details, open the [API Reference](/api-reference/introduction).
