---
title: "POST /api/v1/affiliate/marketing-domains"
method: POST
path: "/api/v1/affiliate/marketing-domains"
tags: ["Affiliation"]
---

# POST /api/v1/affiliate/marketing-domains

`POST /api/v1/affiliate/marketing-domains`

Creates a Marketing Domain and starts its revisioned Cloudflare Workflow.

## Cookies

- `billing_session` string

## Request body

- union
  - object
    - `domain` string, required
    - `subdomain` string, required
    - `accountId` string, required
    - `authenticationType` 'api_token', required
    - `token` string, required
  - object
    - `domain` string, required
    - `subdomain` string, required
    - `accountId` string, required
    - `authenticationType` 'global_api_key', required
    - `email` string, email, required
    - `globalApiKey` string, required

## Response `202`

The idempotent setup Workflow was started.

- object
  - `id` integer, required
  - `operationVersion` integer, required
  - `status` 'pending' | 'configuring' | 'waiting_dns' | 'active' | 'action_required' | 'deleting' | 'inactive', required

## Other responses

- `400` — The Marketing Domain request is invalid.
- `401` — No valid Affiliate session exists.
- `403` — The request did not originate from this portal.
- `409` — The hostname is already registered or is still being removed.
- `422` — Cloudflare rejected the supplied credentials or account.

---

[API](https://skmtc.dev/expertshelp/apis/billing-core-api.md) · [All operations](https://skmtc.dev/expertshelp/apis/billing-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/expertshelp/billing-core-api/revisions/7de83259abe9/schema)
