Support

The support endpoints allow you to manage support tickets, including opening, listing, and replying to tickets.


GET/support/departments

List Departments

This endpoint allows you to list all support departments.

Request

GET
/support/departments
curl -G https://api.puregpu.com/support/departments \
  -H "X-API-Key: {token}"

Response

{
  "result": "success",
  "departments": [
      {
          "id": 1,
          "name": "General Inquiries"
      }
  ]
}

GET/support/tickets

List Tickets

This endpoint allows you to list all support tickets.

Request

GET
/support/tickets
curl -G https://api.puregpu.com/support/tickets \
  -H "X-API-Key: {token}"

Response

{
  "result": "success",
  "tickets": [
    {
        "id": 12,
        "tid": "DSA-093242",
        "deptid": 1,
        "deptname": "General Inquiries",
        "name": "test",
        "email": "test@test.com",
        "date": "2024-06-05 13:32:15",
        "subject": "test",
        "status": "Open",
        "lastreply": "2024-06-05 13:32:15",
        "service": "S2"
    },
  ]
}

POST/support/tickets

Open Ticket

This endpoint allows you to open a new support ticket.

Required attributes

  • Name
    message
    Type
    string
    Description

    The message of the support ticket.

  • Name
    subject
    Type
    string
    Description

    The subject of the support ticket.

  • Name
    departmentId
    Type
    integer
    Description

    The ID of the department for the support ticket, fetched from the List Departments endpoint.

Optional attributes

  • Name
    serviceId
    Type
    string
    Description

    The ID of the service related to the support ticket, fetched from the List Services endpoint.

Request

POST
/support/tickets
curl -X POST https://api.puregpu.com/support/tickets \
  -H "X-API-Key: {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Test Message",
    "subject": "Test Subject",
    "departmentId": 1
  }'

Response

{
  "result": "success",
  "message": "Ticket opened successfully",
  "ticketId": 14
}

GET/support/tickets/:ticketId

Get Ticket

This endpoint allows you to get details of a specific support ticket.

Required attributes

  • Name
    id
    Type
    integer
    Description

    The ID of the support ticket to retrieve, fetched from the List Tickets endpoint.

Request

GET
/support/tickets/:ticketId
curl -G https://api.puregpu.com/support/tickets/14 \
  -H "X-API-Key: {token}"

Response

{
  "result": "success",
  "ticket": {
      "id": 14,
      "tid": "VUK-269658",
      "deptid": 1,
      "deptname": "General Inquiries",
      "name": "test",
      "email": "test@test.com",
      "date": "2024-06-09 14:31:37",
      "subject": "Test Subject",
      "status": "Open",
      "lastreply": "2024-06-09 14:31:37",
      "service": "",
      "replies": [
          {
              "id": "0",
              "name": "test@test.com N/A",
              "email": "test@test.com",
              "type": "Owner",
              "date": "2024-06-09 14:31:37",
              "message": "Test Message"
          }
      ]
  }
}

POST/support/tickets/:ticketId/reply

Reply to Ticket

This endpoint allows you to reply to an existing support ticket.

Required attributes

  • Name
    ticketId
    Type
    integer
    Description

    The ID of the ticket to reply to, fetched from the List Tickets endpoint.

  • Name
    message
    Type
    string
    Description

    The reply message.

Request

POST
/support/tickets/:ticketId/reply
curl -X POST https://api.puregpu.com/support/tickets/14/reply \
  -H "X-API-Key: {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Test Message2",
  }'

Response

{
  "result": "success",
  "message": "Ticket reply sent"
}