{
  "info": {
    "_postman_id": "7b18a7be-14be-54f1-a3ae-d3eb093fd94d",
    "name": "Qlara API - Conversation assignment",
    "description": "The Conversation assignment section of API Reference in the Qlara documentation.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "id": "7bb21711-b386-5849-a6e6-d2e727471d31",
      "name": "Get a single conversation",
      "request": {
        "name": "Get a single conversation",
        "description": {
          "content": "Returns one conversation with its current assignee, unread counter, last message preview and channel information.\n\nUse it to refresh one conversation without listing the whole inbox again, for example after assigning or unassigning it.",
          "type": "text/plain"
        },
        "url": {
          "path": [
            "api",
            "partner-gateway",
            "inbox",
            "conversations",
            ":chatId"
          ],
          "host": [
            "{{baseUrl}}"
          ],
          "query": [],
          "variable": [
            {
              "disabled": false,
              "type": "any",
              "value": "98765",
              "key": "chatId",
              "description": "(Required) ID of the conversation."
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "method": "GET",
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "key",
              "value": "X-API-Key"
            },
            {
              "key": "value",
              "value": "{{apiKey}}"
            },
            {
              "key": "in",
              "value": "header"
            }
          ]
        }
      },
      "response": [
        {
          "id": "9110b88b-138d-5998-ab7a-e99e5b93106f",
          "name": "The conversation.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "{\n  \"id\": 500,\n  \"companyId\": 9353,\n  \"hasUnreadMessages\": true,\n  \"lastCheckedAt\": \"2025-03-10 14:30:00.000+0100\",\n  \"userName\": \"string\",\n  \"phoneNumber\": \"+39333123456\",\n  \"externalUserId\": \"1309399970616060\",\n  \"profilePicture\": \"string\",\n  \"unreadCount\": 323,\n  \"lastMessageText\": \"Thanks for your help!\",\n  \"lastMessageDate\": \"2025-03-10 14:30:00.000+0100\",\n  \"socialMedia\": \"whatsapp\",\n  \"channelId\": 1308,\n  \"companyProfileName\": \"string\",\n  \"companyProfilePicture\": \"string\",\n  \"companyProfileId\": \"string\",\n  \"companyPhoneNumber\": \"string\",\n  \"companyPhoneNumberType\": \"string\",\n  \"whatsappWindowExpire\": \"2025-03-10 14:30:00.000+0100\",\n  \"assignedUserId\": 3353,\n  \"status\": \"OPEN\",\n  \"visibility\": \"ACTIVE\"\n}",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "5e1539de-194c-5b38-a3de-86e918e9f773",
          "name": "The API key is missing, invalid, or lacks the `INBOX` operation.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "Unauthorized",
          "code": 401,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "2c2f7e15-2c47-5c6f-aa77-9b2ebb510da0",
          "name": "No conversation with this ID in your account.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "Not Found",
          "code": 404,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        }
      ],
      "event": [],
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      }
    },
    {
      "id": "952b40b1-1d19-50ee-a58d-2567b5fb44fd",
      "name": "List users assignable to conversations",
      "request": {
        "name": "List users assignable to conversations",
        "description": {
          "content": "Returns the team members of your company that a conversation can be assigned to.\n\n- **Each entry** carries the user ID that `POST /inbox/conversations/{chatId}/assignee` takes, the display name and, when there is one, an avatar URL.\n- **Typical use**: fill an assignee picker in your application before assigning a conversation.",
          "type": "text/plain"
        },
        "url": {
          "path": [
            "api",
            "partner-gateway",
            "inbox",
            "conversations",
            "assignable-users"
          ],
          "host": [
            "{{baseUrl}}"
          ],
          "query": [],
          "variable": []
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "method": "GET",
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "key",
              "value": "X-API-Key"
            },
            {
              "key": "value",
              "value": "{{apiKey}}"
            },
            {
              "key": "in",
              "value": "header"
            }
          ]
        }
      },
      "response": [
        {
          "id": "3b82f3bd-aaed-5445-a0d3-c1a02c6b3148",
          "name": "The assignable users.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                "assignable-users"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "[\n  {\n    \"id\": 4521,\n    \"fullName\": \"Anna Bianchi\",\n    \"profilePicture\": \"https://cdn.example.com/users/4521/avatar.png\"\n  },\n  {\n    \"id\": 4521,\n    \"fullName\": \"Anna Bianchi\",\n    \"profilePicture\": \"https://cdn.example.com/users/4521/avatar.png\"\n  }\n]",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "3d511716-dce5-508a-a5bc-eba8c903744a",
          "name": "The API key is missing, invalid, or lacks the `INBOX` operation.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                "assignable-users"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "Unauthorized",
          "code": 401,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "4a287856-f285-5edb-a737-86ce784b9404",
          "name": "The user-profile service is temporarily unavailable. Retry after a short delay.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                "assignable-users"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "body": {}
          },
          "status": "Bad Gateway",
          "code": 502,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        }
      ],
      "event": [],
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      }
    },
    {
      "id": "b0c7c705-ec30-50d3-a55a-941d32c32941",
      "name": "Assign a conversation to a team member",
      "request": {
        "name": "Assign a conversation to a team member",
        "description": {
          "content": "Assigns a conversation to a user of your company, who becomes its owner.\n\n- **One assignee at most**: the call replaces any existing assignment. To remove the assignee without replacing it, use `DELETE /inbox/conversations/{chatId}/assignee`.\n- **Same company only**: the user must belong to your company. `GET /inbox/conversations/assignable-users` lists the valid IDs.\n- **No notification is sent to the assignee.** Notifications about new inbound messages go to every user of your company, whether or not the conversation is assigned. The exception is a conversation handled by a chatbot, where they start only once it has an assignee.",
          "type": "text/plain"
        },
        "url": {
          "path": [
            "api",
            "partner-gateway",
            "inbox",
            "conversations",
            ":chatId",
            "assignee"
          ],
          "host": [
            "{{baseUrl}}"
          ],
          "query": [],
          "variable": [
            {
              "disabled": false,
              "type": "any",
              "value": "98765",
              "key": "chatId",
              "description": "(Required) ID of the conversation."
            }
          ]
        },
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "method": "POST",
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "key",
              "value": "X-API-Key"
            },
            {
              "key": "value",
              "value": "{{apiKey}}"
            },
            {
              "key": "in",
              "value": "header"
            }
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"userId\": 4521\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": [
        {
          "id": "43aee07a-fa4d-5fb9-a142-f1a830370ac4",
          "name": "Conversation assigned. No response body.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId",
                "assignee"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": 4521\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "status": "No Content",
          "code": 204,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "e237e10f-0331-52d6-a1de-efa1c66bf7bb",
          "name": "The body is missing or `userId` is null.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId",
                "assignee"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": 4521\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "status": "Bad Request",
          "code": 400,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "c228fa99-d554-55b4-a20b-48e7a21fdddc",
          "name": "The API key is missing, invalid, or lacks the `INBOX` operation.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId",
                "assignee"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": 4521\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "status": "Unauthorized",
          "code": 401,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "7bc6caa6-4e8e-53bc-a552-b834902c64c3",
          "name": "The conversation or the user does not exist in your account.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId",
                "assignee"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": 4521\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "status": "Not Found",
          "code": 404,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "6d2281f8-a926-5299-a7a0-f7ee45eab535",
          "name": "The user-profile service, used to check the user, is temporarily unavailable. Retry after a short delay.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId",
                "assignee"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"userId\": 4521\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "status": "Bad Gateway",
          "code": 502,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        }
      ],
      "event": [],
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      }
    },
    {
      "id": "95c95c9f-555e-5deb-a952-f36b9c5edffc",
      "name": "Remove the assignee from a conversation",
      "request": {
        "name": "Remove the assignee from a conversation",
        "description": {
          "content": "Removes the assignee of a conversation, leaving it unassigned.\n\n- **Only the assignment changes**: the conversation stays active and keeps appearing in the inbox.\n- **Idempotent**: on a conversation without an assignee it still answers `204`.",
          "type": "text/plain"
        },
        "url": {
          "path": [
            "api",
            "partner-gateway",
            "inbox",
            "conversations",
            ":chatId",
            "assignee"
          ],
          "host": [
            "{{baseUrl}}"
          ],
          "query": [],
          "variable": [
            {
              "disabled": false,
              "type": "any",
              "value": "98765",
              "key": "chatId",
              "description": "(Required) ID of the conversation."
            }
          ]
        },
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "method": "DELETE",
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "key",
              "value": "X-API-Key"
            },
            {
              "key": "value",
              "value": "{{apiKey}}"
            },
            {
              "key": "in",
              "value": "header"
            }
          ]
        }
      },
      "response": [
        {
          "id": "96f9a01f-d6dc-5a88-a911-57c842b48b75",
          "name": "Assignee removed. No response body.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId",
                "assignee"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "DELETE",
            "body": {}
          },
          "status": "No Content",
          "code": 204,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "b6eae9e3-0038-544c-aa8c-6fa721e11d8b",
          "name": "The API key is missing, invalid, or lacks the `INBOX` operation.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId",
                "assignee"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "DELETE",
            "body": {}
          },
          "status": "Unauthorized",
          "code": 401,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        },
        {
          "id": "5f674301-9086-5a82-af7a-1220665144c5",
          "name": "No conversation with this ID in your account.",
          "originalRequest": {
            "url": {
              "path": [
                "api",
                "partner-gateway",
                "inbox",
                "conversations",
                ":chatId",
                "assignee"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "98765",
                  "key": "chatId",
                  "description": "(Required) ID of the conversation."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "DELETE",
            "body": {}
          },
          "status": "Not Found",
          "code": 404,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "body": "\"\"",
          "cookie": [],
          "_postman_previewlanguage": "json"
        }
      ],
      "event": [],
      "protocolProfileBehavior": {
        "disableBodyPruning": true
      }
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-Api-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{apiKey}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.qlara.ai",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "YOUR_API_KEY",
      "type": "string"
    }
  ]
}
