# Partners

## This API can be used by registered partner accounts to create a new customer and generate DMARC Record

<mark style="color:green;">`POST`</mark> `https://app.kdmarc.com/api/auth/register/:partner-key`

#### Path Parameters

| Name                                          | Type   | Description                                |
| --------------------------------------------- | ------ | ------------------------------------------ |
| partner-key<mark style="color:red;">\*</mark> | String | This is the partner key provided by KDMARC |

#### Request Body

| Name                                     | Type   | Description                |
| ---------------------------------------- | ------ | -------------------------- |
| name<mark style="color:red;">\*</mark>   | String | Name of the client         |
| email<mark style="color:red;">\*</mark>  | String | Email Id of the client     |
| domain<mark style="color:red;">\*</mark> | String | Domain of the client       |
| apiKey<mark style="color:red;">\*</mark> | String | API-KEY provided by KDMARC |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "email": "test@example.com",
    "dmarcRecord": "example.com.702XJEyYOf.dmarc.kdmarc.com"
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "errors": [
        "Email is already in use"
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Error occurs when partner key doesn't match api key" %}

```javascript
{
    "errors": [
        "Invalid Referral Key"
    ]
}
```

{% endtab %}
{% endtabs %}

## This API can be used by partners to add new domain to existing customer

<mark style="color:green;">`POST`</mark> `https://app.kdmarc.com/api/domain/partner/:partner-key`

#### Path Parameters

| Name                                          | Type   | Description |
| --------------------------------------------- | ------ | ----------- |
| partner-key<mark style="color:red;">\*</mark> | String |             |

#### Request Body

| Name                                     | Type   | Description |
| ---------------------------------------- | ------ | ----------- |
| email<mark style="color:red;">\*</mark>  | String |             |
| domain<mark style="color:red;">\*</mark> | String |             |
| apiKey<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "success": true,
    "record": "example.com.pCEHJafdYV.dmarc.kdmarc.com",
    "domainName": "example.com"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.kdmarc.com/partners.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
