# API reference: Requests

[Guide index](../../v1.md) · [API reference](../api-reference.md) · [Developer API](../api.md)

## `GET /v1/companies/{companyId}/relays`

| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
| `companyId` | path | string (uuid) | yes |  |
| `status` | query | string |  |  |
| `page` | query | integer (int32) |  |  |
| `size` | query | integer (int32) |  |  |

Answers 200 with list of RelayResponse.

## `POST /v1/companies/{companyId}/relays`

| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
| `companyId` | path | string (uuid) | yes |  |

Body (application/json): `CreateRelayRequest`

Answers 202 with `RelayResponse`.

## `GET /v1/companies/{companyId}/relays/{requestId}`

| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
| `companyId` | path | string (uuid) | yes |  |
| `requestId` | path | string (uuid) | yes |  |

Answers 200 with `RelayResponse`.

## `POST /v1/companies/{companyId}/relays/{requestId}/cancel`

| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
| `companyId` | path | string (uuid) | yes |  |
| `requestId` | path | string (uuid) | yes |  |

Answers 200 with `RelayResponse`.

## Types

**RelayResponse**

| Field | Type | Required | Notes |
|---|---|---|---|
| `id` | string (uuid) | yes |  |
| `resourceId` | string (uuid) | yes |  |
| `originThreadId` | string (uuid) |  |  |
| `requestedBy` | string | yes |  |
| `channel` | string | yes |  |
| `to` | string | yes |  |
| `subject` | string |  |  |
| `text` | string | yes |  |
| `replyTo` | string |  |  |
| `awaitReply` | boolean | yes |  |
| `replyMethod` | string |  |  |
| `status` | string | yes |  |
| `reply` | string |  |  |
| `error` | string |  |  |
| `createdAt` | string (date-time) | yes |  |
| `sentAt` | string (date-time) |  |  |
| `repliedAt` | string (date-time) |  |  |

**CreateRelayRequest**

| Field | Type | Required | Notes |
|---|---|---|---|
| `resourceId` | string (uuid) | yes |  |
| `message` | RelayMessage | yes |  |
| `replyMethod` | string |  |  |

**RelayMessage**

| Field | Type | Required | Notes |
|---|---|---|---|
| `channel` | string | yes | at least 1 characters |
| `to` | string | yes | at most 254 characters |
| `text` | string | yes | at most 50000 characters |
| `subject` | string |  | at most 255 characters |
| `replyTo` | string |  | at most 254 characters |
| `awaitReply` | boolean |  |  |
| `via` | string |  | at most 64 characters |
