> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abusix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Submitting data via the API to Data Channels

> A step-by-step guide to submitting abuse reports via the Abusix API using the XARF format, including setup, payload structure, and response handling.

# Overview

In this article, you will find information about submitting data via the Abusix API Data Channel.

All data submitted via our RESTful API is mapped to the XARF format, short for the **eXtended Abuse Reporting Format**. [XARF is a standardized set of schemas](https://github.com/xarf/xarf-spec/tree/main/schemas/v4) developed by the XARF community and Abusix for describing abusive behavior or content.

The effort started as an [open, community-driven initiative](https://github.com/abusix/xarf) and has become an industry standard for sharing network abuse reports. The GitHub project provides free specifications to support end-to-end automation of abuse reporting.

***

## Reporting Abusive Behavior to Abusix

When completing the Data Channel configuration steps in [app.abusix.com](https://app.abusix.com/), you may select **Report Abusive Behavior to Abusix** to both report abuse to the appropriate network owner and [send data to your Guardian Ops instance](https://docs.abusix.com/docs/portal/submit-data/API).

Examples of this use case include using AbuseHQ to manage abuse:

* within your own hosted mail platform
* user or admin authentication interfaces
* hitting your firewalls
* or other edge systems

***

## Mapping Your Data with Our API

Our backbone uses the [XARF schemas to route and process information](https://github.com/xarf/xarf-spec/tree/main/schemas/v4). While most of the field names are intuitive, you can refer to the examples in the [XARF GitHub Project](https://github.com/abusix/xarf) to map your data correctly.

If you need help with data mapping, contact us via chat or at [support@abusix.com](mailto:support@abusix.com).

***

## POST Your Data to the API

After completing the Data Channel configuration steps in [app.abusix.com](https://app.abusix.com/), you may **POST** your data.

Our systems and support team will receive the data and take care of the rest.

### Steps:

1. Go to [https://app.abusix.com/data-channels](https://app.abusix.com/data-channels)
2. Create a Data Channel
3. Send data into your AbuseHQ instance

***

### Example: Send data using the XARF API

![Send data using the XARF API](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F4ce1f6b7-7887-49bf-b5b7-913dd2f353b2%2FUntitled.png?table=block\&id=e44079f6-aa8f-4426-9b19-568acd0c7a2a\&cache=v2)

### Example: Name your Data Channel

![Name your data channel](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F69cbb0c0-c4d3-4a80-9aa6-adfe3bafff5c%2FUntitled.png?table=block\&id=78d279fa-bab6-4cd8-974f-57c364f85b73\&cache=v2)

### Example: Access Credentials

![Access credentials](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F2da9ce0b-a317-43fa-a3d0-5e579da26f3a%2FUntitled.png?table=block\&id=eaf047b3-11ff-472b-b0e2-1ac5f294ea83\&cache=v2)

> ⚠️ Replace any configuration pointing to `https://abusix.abusehq.net/xarf/deliver` with your new access credentials.

***

## Example: `curl` Command

```bash theme={null}
curl -vX POST https://datachannels.abusix.com/data/xarf \
     -d @copyright.json \
     --header "Content-Type: application/json" \
     --header "x-api-key: $YOURKEY"
```

## Example XARF JSON Payload (copyright.json)

```bash theme={null}
{
  "Version": "2",
  "ReporterInfo": {
    "ReporterOrg": "ExampleOrg",
    "ReporterOrgDomain": "example.com",
    "ReporterOrgEmail": "reports@example.com"
  },
  "OnBehalfOf": {
    "ComplainantOrg": "ExampleComplainantOrg",
    "ComplainantOrgDomain": "complainant.example.com",
    "ComplainantOrgEmail": "complainant@complainant.example.com",
    "ComplainantContactEmail": "legal@complainant.example.com",
    "ComplainantContactName": "Legal Team",
    "ComplainantContactPhone": "0012345678"
  },
  "Disclosure": true,
  "Report": {
    "ReportType": "Copyright",
    "ReportClass": "Content",
    "FirstSeen": "2018-02-05T14:17:10Z",
    "Date": "2018-02-05T18:17:10Z",
    "SourceIp": "192.0.2.55",
    "SourcePort": 54321,
    "InfringedMaterial": "Example - Mr. Example",
    "SourceUrl": "http://www.badexample.com/badexapmplesong.mp3",
    "MaterialType": "Music",
    "FileName": "badexamplesong.mp3",
    "CourtOrder": "https://court.example.com/courtorder.pdf",
    "FileSize": 56,
    "FileHash": "somehashhere"
  }
}
```

## API Responses

### Status - 201 Created

```bash theme={null}
{
  "state": "success",
  "id": "c8ee626c-add6-454d-a6ec-5302bd21fc37"
}
```

### Status - 403 Forbidden

```bash theme={null}
{
  "state": "error",
  "error": "permission denied"
}
```

### Status - 400 Bad Request

```bash theme={null}
{
  "state": "error",
  "error": "validation failed"
}
```

### Status - 503 Service Unavailable

```bash theme={null}
{
  "state": "error",
  "error": "The service is currently unavailable. Please try again later."
}
```

## Need Help?

Having trouble with your setup or running into technical issues? Get in touch with our team of Abusix experts.

* Click the chat button at the bottom of the screen
* Or email us at [support@abusix.com](mailto:support@abusix.com)
