# Quick Start

This guide helps you start using the Sprinto Developer API with minimal setup. It introduces the prerequisites, explains how to authenticate, shows how to explore the GraphQL schema, and walks you through making your first API request.

The Sprinto Developer API is designed to be developer-friendly. Where new concepts are introduced, references are provided to help you explore them in more detail.

***

### Prerequisites

Before you begin, ensure that you have:

* A Sprinto account with **administrator privileges**
* A basic understanding of **GraphQL**

If you are new to GraphQL or need a refresher, review the official GraphQL learning resources before proceeding.

All access to the Sprinto Developer API is authenticated using an API key.

***

### Step 1: Generate an API key

Every request to the Sprinto Developer API must be authenticated using an API key.

* Only Sprinto users with administrator privileges can generate API keys.
* API keys are generated from the Sprinto web application.
* Currently, all API keys have full access to the available GraphQL schema.

As the Developer API evolves, Sprinto will introduce scoped API keys with restricted permissions.

For detailed instructions, refer to the guide on generating an API key.

***

### Step 2: Explore the API

The Sprinto Developer API is built using GraphQL and supports **introspection**. Introspection allows the API to describe its schema, including available queries, mutations, and response types.

To make exploration easier, Sprinto provides an **API Playground** that runs directly in your browser. No installation or setup is required.

Use the appropriate playground based on your data residency region:

* **United States:** Sprinto API Playground
* **Europe:** Sprinto API Playground
* **India:** Sprinto API Playground

The playground allows you to:

* Inspect the GraphQL schema
* Test queries and mutations
* Validate responses interactively

***

### Step 3: Begin using the API

Although you can write raw GraphQL queries manually, Sprinto recommends using a GraphQL client library to simplify development. Popular options include:

* Python
* JavaScript
* cURL
* Other GraphQL-compatible clients

Regardless of the client you choose, all API requests require:

* A base URL
* An authentication mechanism

#### Base URL

All Sprinto GraphQL API requests use the following base URL:

```
https://app.sprinto.com/dev-api/graphql
```

#### Authentication

Authentication is handled using the API key generated from the Sprinto application.

**Security best practice:**\
Do not hardcode your API key in your application. Store it securely using environment variables or a secrets management solution.

***

### Make your first API request

Use one of the following examples to make a simple GraphQL request to the Sprinto Developer API.

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

```
curl 'https://app.sprinto.com/dev-api/graphql' \
  -H 'api-key: <your-api-key>' \
  -H 'content-type: application/json' \
  --data-raw '{
    "query": "query ExampleQuery { hello }",
    "variables": {},
    "operationName": "ExampleQuery"
  }'
```

{% endtab %}

{% tab title="Python" %}

```
pip install requests
import requests

url = "https://app.sprinto.com/dev-api/graphql"
api_key = "<your-api-key>"

headers = {
    "api-key": api_key,
    "content-type": "application/json"
}

data = {
    "query": "query ExampleQuery { hello }",
    "variables": {},
    "operationName": "ExampleQuery"
}

response = requests.post(url, json=data, headers=headers)

if response.status_code == 200:
    print("Response:")
    print(response.json())
else:
    print(f"Request failed with status code {response.status_code}")
    print(response.text)
```

{% endtab %}

{% tab title="Javascript" %}

```
npm install axios
const axios = require('axios');

const url = 'https://app.sprinto.com/dev-api/graphql';
const apiKey = '<your-api-key>';

const headers = {
  'api-key': apiKey,
  'content-type': 'application/json',
};

const data = {
  query: 'query ExampleQuery { hello }',
  variables: {},
  operationName: 'ExampleQuery',
};

axios.post(url, data, { headers })
  .then(response => {
    console.log('Response:', response.data);
  })
  .catch(error => {
    console.error(
      'Request failed with status code',
      error.response?.status
    );
    console.error(error.response?.data);
  });
```

{% endtab %}
{% endtabs %}

***

### Verify the response

If the request is successful, the API returns the following response:

```json
{
  "data": {
    "hello": "Hello world"
  }
}
```

If you receive this response, your setup is complete and you are ready to start building with the Sprinto Developer API.

***

### Next steps

After completing the quick start, you can:

* Review the API structure to understand available queries and mutations
* Learn how pagination works when fetching large datasets
* Explore advanced use cases and integrations in the API documentation


---

# 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.sprinto.com/api-references/getting-started/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.
