# Quick Start

{% hint style="info" %}
**Good to know:** This QuickStart guide will help you get started with Safe-e by populating your environment with test data, allowing you to explore the basic concepts of users, risk scores, and behavioral signals.&#x20;
{% endhint %}

## Get your API keys

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

You will receive your API key shortly after completing the registration in your registration email.

## Install and configure the library

The best way to do the initial tests with our API is using simple requests, you can do this using any programming language that works with HTTP requests, in the example below we will use Python.

{% tabs %}
{% tab title="Python" %}
{% code overflow="wrap" lineNumbers="true" %}

```python
# Install via pip
pip install httpx


# Import httpx library
import httpx

# Define example data
example_data = {
	"type": "$login",
	"status": "$succeeded",
	"user_headers": {
		"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15",
		"host": "site.customer.com",
		"accept_language": "en-US",
		"accept_encoding": "gzip, deflate, br",
		"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
	},
	"product": "Safee-Login",
	"user": {
		"user_id": "098080381",
		"user_email": "user@customer.com",
		"user_ip": "156.146.48.12"
	}
}

# Define Headers
headers = {'Content-Type': 'application/json', 'Authorization-API': 'xxx.xxx.xxx.xxx'}

```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Good to know:** Change the xxx.xxx.xxx.xxx to the API key you received after activating your account.
{% endhint %}

## Send a custom event

Sending custom events is the first way for you to interact with the platform, viewing the result that presents the risk of the event that was sent.

{% tabs %}
{% tab title="Python" %}
{% code overflow="wrap" %}

```python
# Make sample request
req = httpx.post('https://api.safe-e.com/api/v1/risk/login', headers=headers, json=example_data)
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Viewing the result

As soon as the request is sent, the Safe-e engines analyze the context of the event sent and returns the Score with the possible risks and signals found.

{% tabs %}
{% tab title="JSON Response" %}
{% code overflow="wrap" %}

```json
{
	"risk": 25.0,
	"account_abuse": 33.75,
	"account_takeover": 27.75,
	"bot": 27.75,
	"signals": [
		"proxy_ip"
	],
	"policy": {
		"name": "Policy Default",
		"action": "Deny"
	}
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Good to know:** Now that you've done the simple integration test, we recommend reading the rest of the documentation to understand how the integration works.
{% endhint %}


---

# 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://docs.safe-e.com/quick-start.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.
