# Classification

## Retrieve classification for a source in domain list

<mark style="color:blue;">`GET`</mark> `https://api.kdmarc.com/api/v1/domain/{domain}/source/{source}`

Fetch the details of the sources classification.

#### Path Parameters

| Name          | Type   | Description                                                                                                                                                        |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| domain        | string | To fetch the details of the specific domain for e.g. example.com                                                                                                   |
| source        | string | To fetch the classification details of the specific source from the domain who is utilizing your domain for e.g. google.com                                        |
| Authorization | string | The HTTP Authorization request header contains the credentials to authenticate a user agent with a server, this can be generated through Dashboard within settings |

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

```
{
  "data": {
    "sourceId": "XXXXX",
    "sourceDisplay": "Sorcename",
    "classification": "valid",
    "status": {
      "spf": {
        "result": "pass"
      },
      "dkim": {
        "result": "pass"
      }
    },
    "reportStatus": {
      "spf": {
        "result": "pass"
      },
      "dkim": {
        "result": "pass"
      }
    },
    
  }
```

{% endtab %}

{% tab title="404 " %}

```
{
  "errors": [
    {
      "status": "404",
      "code": "domain-not-managed",
      "title": "Specified domain is not managed by this account.",

    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Update classification for a source in domain list

<mark style="color:purple;">`PATCH`</mark> `https://api.kdmarc.com/domain/{domain}/source/{source}`

Fetch the classification for the specific source of a domain

#### Path Parameters

| Name          | Type   | Description                                                                                                                                                        |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| source        | string | To fetch the classification details of the specific source from the domain who is utilizing your domain for e.g. google.com                                        |
| domain        | string | To fetch the details of the specific domain for e.g. example.com                                                                                                   |
| Authorization | string | The HTTP Authorization request header contains the credentials to authenticate a user agent with a server, this can be generated through Dashboard within settings |

#### Request Body

| Name   | Type   | Description                                                                                                                                                        |
| ------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| record | object | { "spfRecord":     " include:\_spf.example.com", "dkimSelector": "example.\_domainkey", "spfDomain":"example.com", "dkimDomain":"example.com", "type": "UnKnown" } |

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

```
{
  "data": {
    "sourceId": "XXXXX",
    "sourceDisplay": "Sorcename",
    "classification": "valid",
    "status": {
      "spf": {
        "result": "pass"
      },
      "dkim": {
        "result": "pass"
      }
    },
    "reportStatus": {
      "spf": {
        "result": "pass"
      },
      "dkim": {
        "result": "pass"
      }
    },
    
  }
```

{% endtab %}

{% tab title="404 " %}

```
{
  "errors": [
    {
      "status": "404",
      "code": "domain-not-managed",
      "title": "Specified domain is not managed by this account.",

    }
  ]
}
```

{% 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/classification.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.
