---
title: "Get Messagesessions for User"
method: GET
path: "/domains/{domain}/users/{user}/messagesessions"
tags: ["Messages"]
---

# Get Messagesessions for User

`GET /domains/{domain}/users/{user}/messagesessions`

## Path parameters

- `domain` string, required — This is the main organization name. This is used to link resource to its group/tenant/organization/enterprise. Then using in path for GET you can set to "~" to use the domain name linked to your token/key instead of the domain name itself when reading for your own domain.
- `user` string, required — This is the main user extension for the user account. ~ can be used to mean "my account" which will extract the user from the token/key used for authentication.

## Query parameters

- `limit` number — This is the limit of the number of objects that will be returned in the read/list API call. This can be used with pagination to help retrieve smaller chunks of data. Should be used in conjunction with Start.

## Response `200`

- Messagesession[]
  - `user` string, required — This is the main user extension for the user account.
  - `domain` string, required — This is the main organization name. This is used to link resource to its group/tenant/organization/enterprise. ~ and * can be used alone in special cases to mean My Domain (~) and All Domains (\*).
  - `messagesession-remote` union, required — This is the UserID (ie, 1234@portal) or the phonenumber of the recipient(s) of the messages. If more than one, will be comma seperated
    - string
    - integer
  - `messagesession-muted` string, required — This is whether or not the message session is muted or not. "yes" or "no"
  - `messagesession-id` string, required — This is the identifier for the session
  - `messagesession-sms-number` union, required — This is the SMS number used to send outbound. Will be null if not an SMS message session
    - string
    - number
  - `messagesession-last-datetime` string, nullable, required — This is the last time the session had an inbound or outbound message
  - `messagesession-start-datetime` string, nullable, required — This is the when the message session started
  - `messagesession-last-message` union, required — This is the last message in the messagesession
    - string
    - integer
  - `messagesession-last-sender` string, nullable, required — This shows the UID or the phonenumber of who was the last message sender
  - `messagesession-last-status` string, nullable, required — This is the last status of the messagesession. Will contain read/unread status
  - `messagesession-last-email-reminder-datetime` string, nullable, required — This is when the last email reminder was sent out notifiying the user of a missed message
  - `messagesession-reciever-hostname` string, required — This is the hostname of the last received message
  - `messagesession-queue-termination` string, nullable, required — This is which SMS queue the messagesession is assigned to
  - `messagesession-queue-status` string, nullable, required — This is the queue status of the messagesession
  - `messagesession-queue-session-id` string, nullable, required — This is the queue session id placed on the messagesession
  - `messagesession-agent-start-datetime` string, nullable, required — This is when the messagesession was started by the agent
  - `messagesession-last-type` string, required
  - `messagesession-last-media-type` string, nullable, required — This is the last media type of the messagesession
  - `messagesession-last-media-size` integer, nullable, required — This is the size of the last media of the messagesession
  - `messagesession-type` string, required — This is the type of messagesession
  - `messagesession-name` string, nullable — This is the name of the messagesession. Names can be assigned to group chats
  - `messagesession-participants` string, nullable — This is a comma seperated list of participants within a group chat or group sms messagesession

## Other responses

- `400`
- `401`
- `404`

---

[API](https://skmtc.net/ns-api/apis/netsapiens-api-v2.md) · [All operations](https://skmtc.net/ns-api/apis/netsapiens-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ns-api/netsapiens-api-v2/versions/d37f65b5b886/schema)
