---
title: "Fetch messages"
method: GET
path: "/messages"
tags: ["messages"]
---

# Fetch messages

`GET /messages`

## Request

- Base URL: `https://api.smartrecruiters.com`
- URL: `https://api.smartrecruiters.com/messages`
- Auth: one of:
  - API key in header `x-smarttoken`
  - OAuth 2
    - Authorization code: `https://www.smartrecruiters.com/identity/oauth/allow`
    - Token URL: `https://api.smartrecruiters.com/identity/oauth/token` scopes: `messages_read`

Search for messages of given candidate. Use jobId parameter to filter results to messages only for specific job application. Accessible only for users with ADMINISTRATOR role.

## Query parameters

- `candidateId` string, guid, required
- `jobId` string, guid
- `pageId` string
- `limit` integer

## Response `200`

Messages successfully fetched

- MessageView[]
  - `content` string
  - `createdOn` string, date-time
  - `visibility` 'PRIVATE' | 'DIRECT' | 'OPEN' | 'EVERYONE'
  - `authorId` string
  - `context` Context
    - `applications` Application[]
      - `candidateId` string, guid
      - `jobId` string, guid

## Other responses

- `400`: with codes: * **CANDIDATE_NOT_FOUND** when candidate with given id does not exist * **JOB_NOT_FOUND** when job with given id does not exist * **APPLICATION_NOT_FOUND** when candidate does not have application for given job
- `403`: No permission to access messages

---

[API](https://skmtc.dev/smartrecruiters/apis/messages-api.md) - [All operations](https://skmtc.dev/smartrecruiters/apis/messages-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartrecruiters/apis/messages-api/revisions/f20bfefc8b11?raw)
