Get all conversation the authenticated user has created or has access to
GET/v2/ conversations/
API version
v2
Request method
GET
Operation ID
conversation-list-conversations
Request
Responses
Response-Header
- X-Pagination-Limitinteger
The limit used to select the resources for the response
- X-Pagination-Skipinteger
The number of skipped items
- X-Pagination-Pagenumber
The calculate page of the list response. Refer to parameters to learn more.
- X-Pagination-TotalCountinteger
The total amount of items available in the remote ressource. Use this value in combination with the limit to calculate the available pages.
Format
application/json
Beschreibung
The conversations list ordered by creation date
- Schema-Dokumentation
- Beispiel
- JSON Schema
- Array[
- *
]
Content-Type: application/json
[
null
]
{
"items": {
"allOf": [
{
"properties": {
"category": {
"properties": {
"categoryId": {
"format": "uuid",
"type": "string"
},
"name": {
"type": "string"
},
"referenceType": {
"items": {
"enum": [
"unspecified",
"server",
"project",
"organisation",
"extensionInstance"
],
"type": "string"
},
"type": "array"
}
},
"required": [
"categoryId",
"name",
"referenceType"
],
"type": "object"
},
"conversationId": {
"format": "uuid",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"lastMessageAt": {
"format": "date-time",
"type": "string"
},
"mainUser": {
"properties": {
"active": {
"type": "boolean"
},
"avatarRefId": {
"type": "string"
},
"clearName": {
"type": "string"
},
"isEmployee": {
"type": "boolean"
},
"userId": {
"type": "string"
}
},
"required": [
"userId"
],
"type": "object"
},
"notificationRoles": {
"items": {
"enum": [
"customer_owner",
"customer_accountant",
"customer_member",
"project_owner",
"project_emailadmin",
"project_external"
],
"type": "string"
},
"type": "array"
},
"relatedTo": {
"oneOf": [
{
"properties": {
"aggregate": {
"enum": [
"user"
],
"type": "string"
},
"domain": {
"enum": [
"user"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
},
{
"properties": {
"aggregate": {
"enum": [
"customer"
],
"type": "string"
},
"domain": {
"enum": [
"customer"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
},
{
"properties": {
"aggregate": {
"enum": [
"project"
],
"type": "string"
},
"domain": {
"enum": [
"project"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
},
{
"properties": {
"aggregate": {
"enum": [
"appinstallation"
],
"type": "string"
},
"domain": {
"enum": [
"app"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
},
{
"properties": {
"aggregate": {
"enum": [
"placementgroup"
],
"type": "string"
},
"domain": {
"enum": [
"project"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
},
{
"properties": {
"aggregate": {
"enum": [
"extensionInstance"
],
"type": "string"
},
"domain": {
"enum": [
"extension"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
},
{
"properties": {
"aggregate": {
"enum": [
"container"
],
"type": "string"
},
"domain": {
"enum": [
"container"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
}
]
},
"relations": {
"items": {
"properties": {
"aggregate": {
"type": "string"
},
"domain": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
},
"type": "array"
},
"sharedWith": {
"oneOf": [
{
"properties": {
"aggregate": {
"enum": [
"user"
],
"type": "string"
},
"domain": {
"enum": [
"user"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
},
{
"properties": {
"aggregate": {
"enum": [
"customer"
],
"type": "string"
},
"domain": {
"enum": [
"customer"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
},
{
"properties": {
"aggregate": {
"enum": [
"project"
],
"type": "string"
},
"domain": {
"enum": [
"project"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
},
{
"properties": {
"aggregate": {
"enum": [
"placementgroup"
],
"type": "string"
},
"domain": {
"enum": [
"project"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"aggregate",
"domain"
],
"type": "object"
}
]
},
"shortId": {
"type": "string"
},
"status": {
"enum": [
"open",
"closed",
"answered",
"inProgress",
"waiting"
],
"type": "string"
},
"title": {
"type": "string"
},
"visibility": {
"enum": [
"shared",
"private"
],
"type": "string"
}
},
"required": [
"conversationId",
"shortId",
"title",
"createdAt",
"status",
"visibility",
"mainUser"
],
"type": "object"
},
{
"properties": {
"createdBy": {
"properties": {
"active": {
"type": "boolean"
},
"avatarRefId": {
"type": "string"
},
"clearName": {
"type": "string"
},
"isEmployee": {
"type": "boolean"
},
"userId": {
"type": "string"
}
},
"required": [
"userId"
],
"type": "object"
},
"lastMessage": {
"properties": {
"createdAt": {
"format": "date-time",
"type": "string"
},
"createdBy": {
"properties": {
"active": {
"type": "boolean"
},
"avatarRefId": {
"type": "string"
},
"clearName": {
"type": "string"
},
"isEmployee": {
"type": "boolean"
},
"userId": {
"type": "string"
}
},
"required": [
"userId"
],
"type": "object"
}
},
"required": [
"createdAt"
],
"type": "object"
},
"lastMessageBy": {
"properties": {
"active": {
"type": "boolean"
},
"avatarRefId": {
"type": "string"
},
"clearName": {
"type": "string"
},
"isEmployee": {
"type": "boolean"
},
"userId": {
"type": "string"
}
},
"required": [
"userId"
],
"type": "object"
}
},
"type": "object"
}
]
},
"type": "array"
}
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/conversations?fullTextSearch=string&status=open&limit=50&page=1&sort=createdAt&order=asc
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.conversation.listConversations({
"queryParameters": {
"fullTextSearch": "string",
"status": [
"open"
],
"limit": 50,
"page": 1,
"sort": [
"createdAt"
],
"order": [
"asc"
]
}
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Conversation\ListConversations\ListConversationsRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new ListConversationsRequest())
->withFullTextSearch("string")
->withStatus(["open"])
->withLimit(50)
->withPage(1)
->withSort(["createdAt"])
->withOrder(["asc"]);
$response = $client->conversation()->listConversations($request);
var_dump($response->getBody();