# Organization API: Customer Portal: Domains

> The 6 Organization API operations for domains.

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

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

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/domains`](#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains) | List domains |
| POST | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/domains`](#op-post-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains) | Add domain |
| DELETE | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/domains/{domain_id}`](#op-delete-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains-domain-id) | Remove domain |
| PATCH | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/domains/{domain_id}/dmarc`](#op-patch-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains-domain-id-dmarc) | Set DMARC |
| GET | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/domains/{domain_id}/records`](#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains-domain-id-records) | Domain records |
| POST | [`/api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/domains/{domain_id}/verify`](#op-post-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains-domain-id-verify) | Verify domain |

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

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

#### 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. |

### Add domain {#op-post-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains}

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

#### Parameters

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

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `domain` | string | yes |
| `primary` | boolean | no |

#### Responses

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

### Remove domain {#op-delete-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains-domain-id}

`DELETE /api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/domains/{domain_id}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `domain_id` | path | integer | yes |
| `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 DMARC {#op-patch-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains-domain-id-dmarc}

`PATCH /api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/domains/{domain_id}/dmarc`

#### Parameters

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

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `stage` | string or null | no |
| `pinned` | boolean or null | no |

#### Responses

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

### Domain records {#op-get-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains-domain-id-records}

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

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `domain_id` | path | integer | yes |
| `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. |

### Verify domain {#op-post-api-v1-orgs-org-slug-portal-smtp-relay-service-id-domains-domain-id-verify}

`POST /api/v1/orgs/{org_slug}/portal/smtp-relay/{service_id}/domains/{domain_id}/verify`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `domain_id` | path | integer | yes |
| `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. |
