---
title: "How many messages of the last days were delivered, are waiting or failed, and why"
method: GET
path: "/api/v1/workspaces/{workspaceId}/message-outcomes"
tags: ["Messages"]
---

# How many messages of the last days were delivered, are waiting or failed, and why

`GET /api/v1/workspaces/{workspaceId}/message-outcomes`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/workspaces/{workspaceId}/message-outcomes`
- Auth: HTTP bearer

## Path parameters

- `workspaceId` integer, required

## Query parameters

- `days` integer
- `slot_id` string: Only messages sent from this number

## Response `200`

OK

- OutcomesOutputBody
  - `days` integer, required
  - `items` MessageOutcomeBody[], nullable, required
    - `count` integer, required
    - `error_code` string, required: Why the message was not delivered, empty for delivered and unconfirmed messages
    - `last_at` string, date-time, required: When the latest message with this outcome was created
    - `outcome` 'delivered' | 'on_the_way' | 'retrying' | 'unconfirmed' | 'undecrypted' | 'not_delivered', required

## Other responses

- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
