# Organization API: Customer Portal: Smtp relay

> The 8 Organization API operations for smtp relay.

Source: https://www.coritan.com/docs/api/reference/organizations/customer-portal/smtp-relay/

Part of [Customer Portal](/docs/api/reference/organizations/customer-portal/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/services`](#op-get-api-v1-orgs-org-slug-portal-smtp-relay-services) | List services |
| GET | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}`](#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id) | Get summary |
| PATCH | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/category`](#op-patch-api-v1-orgs-org-slug-portal-smtp-relay-service-id-category) | Set category |
| GET | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/events`](#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id-events) | List events |
| POST | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/limits/increase-request`](#op-post-api-v1-orgs-org-slug-portal-smtp-relay-service-id-limits-increase-request) | Request limit increase |
| POST | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/messages`](#op-post-api-v1-orgs-org-slug-portal-smtp-relay-service-id-messages) | Send message |
| GET | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/reputation`](#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id-reputation) | Reputation report |
| GET | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/usage`](#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id-usage) | Usage report |

### List services {#op-get-api-v1-orgs-org-slug-portal-smtp-relay-services}

`GET /api/v1/orgs/{org_slug}/portal/smtp-relay/services`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Get summary {#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id}

`GET /api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |
| `service_id` | path | integer | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Set category {#op-patch-api-v1-orgs-org-slug-portal-smtp-relay-service-id-category}

`PATCH /api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/category`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |
| `service_id` | path | integer | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `default_category` | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### List events {#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id-events}

`GET /api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/events`

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org_slug` | path | string | yes |  |
| `service_id` | path | integer | yes |  |
| `category` | query | string or null | no |  |
| `recipient` | query | string or null | no |  |
| `hours` | query | integer | no | Default: `24`. |
| `limit` | query | integer | no | Default: `100`. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Request limit increase {#op-post-api-v1-orgs-org-slug-portal-smtp-relay-service-id-limits-increase-request}

`POST /api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/limits/increase-request`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |
| `service_id` | path | integer | yes |

#### Request body

`application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `requested_per_hour` | integer | yes |  |
| `reason` | string | no | What the relay sends and why the volume is going up |

#### Responses

| Status | Meaning |
| --- | --- |
| `201` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Send message {#op-post-api-v1-orgs-org-slug-portal-smtp-relay-service-id-messages}

`POST /api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/messages`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |
| `service_id` | path | integer | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `from` | string | yes |
| `from_name` | string or null | no |
| `to` | array of string | yes |
| `cc` | array of string | no |
| `subject` | string | no |
| `text` | string or null | no |
| `html` | string or null | no |
| `reply_to` | string or null | no |
| `headers` | Headers | no |
| `category` | string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `202` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Reputation report {#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id-reputation}

`GET /api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/reputation`

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org_slug` | path | string | yes |  |
| `service_id` | path | integer | yes |  |
| `limit` | query | integer | no | Default: `50`. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Usage report {#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id-usage}

`GET /api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/usage`

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org_slug` | path | string | yes |  |
| `service_id` | path | integer | yes |  |
| `days` | query | integer | no | Default: `30`. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
