Cases

List cases

GET https://SUB_DOMAIN.hugery.com/api/external/v1/cases

This endpoint allows you to get cases.

Query Parameters

Name
Type
Description

view

string

Possible values are: "unassigned", "assigned_to_me", "closed", "all".

currentTeamMember

string

For which Team Member.

{
  "cursor": {
    "next": "YToyOntzOjQ6InNvcnQiO2E6Mzp7aTowO2Q6MDtpOjE7aToxNTg2MjY5NTQ1MDAwO2k6MjtzOjM2OiIzMTI3ZWNhYi0zZDA0LTRiMDUtYTk4Yi03NTE5M2VlOTQ2NGMiO31zOjk6ImRpcmVjdGlvbiI7YjoxO30=",
    "prev": "YToyOntzOjQ6InNvcnQiO2E6Mzp7aTowO2Q6MDtpOjE7aToxNTg4Njg4MDAxMDAwO2k6MjtzOjM2OiJjNDE0ZDQyZi03ZjA2LTQ2YTMtODk3Mi1lNDFkZTFlZWE4ZjkiO31zOjk6ImRpcmVjdGlvbiI7YjowO30="
  },
  "data": [
    {
      "aid": 50,
      "assignedTeamMember": {
        "avatar": "https://static.hugery.com/200x200/bucket/1586644129928170/4a460cb03ad82baf2dcf079acd549853/Screenshot_2020_03_18_at_22_17_33.png",
        "id": "d9033c86-a86e-474e-85a3-ccacc21ebc1d",
        "name": "Ivan Ivanov",
        "nameColor": "#9c791c",
        "updatedAt": 1586644134
      },
      "closedAt": 1588688004,
      "conversation": {
        "channel": {
          "id": "1220e87f-2d03-458b-8de1-7b71687d1839",
          "label": "WhatsApp",
          "title": "DialogHunt",
          "type": "whatsapp",
          "updatedAt": 1588259318
        },
        "id": "0f359eec-0877-4526-8a08-4848432d13a0"
      },
      "createdAt": 1588262074,
      "defaultSubject": null,
      "endUser": {
        "avatar": null,
        "avatarStub": false,
        "channelType": "whatsapp",
        "id": "656c4afb-dc13-419c-8804-f08f28caeb30",
        "name": "Boris",
        "nameColor": "#16835e",
        "updatedAt": 1588263000
      },
      "id": "c414d42f-7f06-46a3-8972-e41de1eea8f9",
      "lastMessage": {
        "id": "6b93125c-c8d3-400a-9be2-9056507af844",
        "preview": {
          "content": "Hello!",
          "type": "text"
        },
        "teamMember": null,
        "updatedAt": 1588688001
      },
      "status": "closed",
      "unread": false,
      "updatedAt": 1588688001
    },
  ],
  "status": 200
}

Show case

GET https://SUB_DOMAIN.hugery.com/api/external/v1/cases/:id

Path Parameters

Name
Type
Description

id

string

Case id

List messages

GET https://SUB_DOMAIN.hugery.com/api/external/v1/cases/:id/messages

Path Parameters

Name
Type
Description

id

string

Case id

Assign case

POST https://SUB_DOMAIN.hugery.com/api/external/v1/cases/:id/assign

Assign case to team or team member

Path Parameters

Name
Type
Description

id

string

Case id

Request Body

Name
Type
Description

currentTeamMember

string

team

string

teamMember

string

Unassign case

POST https://SUB_DOMAIN.hugery.com/api/external/v1/cases/:id/unassign

Path Parameters

Name
Type
Description

id

string

Case id

Request Body

Name
Type
Description

currentTeamMember

string

Close case

POST https://SUB_DOMAIN.hugery.com/api/external/v1/cases/:id/close

Path Parameters

Name
Type
Description

id

string

Case id

Request Body

Name
Type
Description

currentTeamMember

string

Send message

POST https://SUB_DOMAIN.hugery.com/api/external/v1/cases/:id/messages

Path Parameters

Name
Type
Description

id

string

Case id

Request Body

Name
Type
Description

teamMember

string

text

string

Send file

POST https://SUB_DOMAIN.hugery.com/api/external/v1/cases/:id/messages

Path Parameters

Name
Type
Description

id

string

Case id

Request Body

Name
Type
Description

teamMember

string

files

array

Array of file ids. See file uploading endpoint.

Send note

POST https://SUB_DOMAIN.hugery.com/api/external/v1/cases/:id/messages

Path Parameters

Name
Type
Description

id

string

Request Body

Name
Type
Description

teamMember

string

text

string

Last updated

Was this helpful?