# Retrieve the marketing settings (/docs/api-reference/topics/get-marketing-settings)

The API key's environment's sender name and the postal address its marketing emails carry.

`GET https://api.coss.com/v1/marketing_settings`

Authenticate with your API key as a bearer token (`Authorization: Bearer coss_test_…`). Responses are JSON with snake_case fields; errors are `{ error: { type, code, message, param?, issues?, request_id } }` (https://coss.com/docs/api-reference/errors.md).

## Example request

TypeScript (the `coss` package):

```ts
import { Coss } from "coss";

const coss = new Coss({
  apiKey: process.env.COSS_API_KEY,
  baseUrl: "https://api.coss.com",
});

const { data, error } = await coss.email.marketingSettings.get();
```

HTTP:

```sh
curl -X GET "https://api.coss.com/v1/marketing_settings" \
  -H "Authorization: Bearer $COSS_API_KEY"
```

Python:

```python
from coss import Coss

client = Coss()  # api_key= or COSS_API_KEY

client.email.marketing_settings.get()
```

Go:

```go
import (
	"context"

	cossclient "github.com/cosscom/coss-go/client"
)

client := cossclient.NewClient() // option.WithAPIKey(…) or COSS_API_KEY

client.Email.MarketingSettings.Get(
    context.TODO(),
)
```

Ruby:

```ruby
require "coss"

client = Coss::Client.new # api_key: or COSS_API_KEY

client.email.marketing_settings.get
```

PHP:

```php
<?php

use Coss\Coss;

$client = new Coss(); // apiKey: or COSS_API_KEY

$client->email->marketingSettings->get();
```

Java:

```java
import com.coss.Coss;

Coss client = Coss.builder().build(); // .apiKey(…) or COSS_API_KEY

client.email().marketingSettings().get();
```

.NET:

```csharp
using Coss;

var client = new CossClient(); // apiKey: or COSS_API_KEY

await client.Email.MarketingSettings.GetAsync();
```

## Response 200

The settings.

- `object` ("marketing_settings", required)
- `display_name` (string | null, required): The sender's name in the preference center (default: the organization's).
- `mailing_address` (string | null, required): The postal address every marketing email carries (CAN-SPAM). Marketing emails can't be sent without one.
- `double_opt_in_default` (boolean, required): Whether contacts upserted without `double_opt_in` must confirm first.
- `confirmation_from` (string | null, required): The sender of confirmation emails (a verified domain's address for live keys).
- `confirmation_subject` (string | null, required): `null`: coss.com's default.
- `confirmation_html` (string | null, required): `null`: coss.com's default. Must contain `{{{confirmation_url}}}`.
- `confirmation_text` (string | null, required): `null`: coss.com's default. Must contain `{{{confirmation_url}}}`.
- `confirmed_redirect_url` (string | null, required): Where confirming sends the contact (https); `null`: a coss.com confirmation page.

Example:

```json
{
  "object": "marketing_settings",
  "display_name": "Acme",
  "mailing_address": "Acme Inc., 548 Market St, San Francisco, CA 94104, USA",
  "double_opt_in_default": true,
  "confirmation_from": "Acme <news@acme.com>",
  "confirmation_subject": null,
  "confirmation_html": null,
  "confirmation_text": null,
  "confirmed_redirect_url": "https://acme.com/welcome"
}
```

## Errors

- `400`: The `Coss-Version` header names an unknown API version (`invalid_api_version`).
- `401`: The API key is missing, invalid, revoked or expired (`authentication_error`).
- `403`: The API key lacks the permission this endpoint needs (`permission_error`), or its organization is suspended (`organization_suspended`).
- `429`: Too many requests with this API key (`rate_limited`), or too many requests with invalid keys from this address (`too_many_failed_authentications`). Retry after `Retry-After` seconds. Successful responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds until the limit is fully restored).
- `500`: Unexpected server error (`api_error` / `internal_error`).
- `503`: The API key could not be verified right now; retry (`service_unavailable`).