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

# How to Connect

> With an Inyett Account and a API key in hand

## Prerequisites

Before you begin calling the Inyett API, make sure you have the following:

* An **Inyett account** — [Create your Account](https://start.inyett.se/createaccount) if you don't have one yet.
* An **API Key** – Fetch your API Key connected to your Inyett Account.
* An **HTTP client** — Such as [curl](https://curl.se/), [Postman](https://www.postman.com/), or a library like [axios](https://axios-http.com/) for JavaScript.

## Steps

<Steps>
  <Step title="Make Your First Request">
    With your API key in hand, you're ready to make your first request. The example below retrieves basic company information for a swedish company by calling the endpoint /info in the Inyett Company Data scope. 

    ```bash theme={null}
    curl GET
    /3/{SE}/company-data/companies/{SE}/{5567804348}/info
      -H "Authorization: Bearer YOUR_API_KEY"
    ```

    A successful response will look like this:

    ```json theme={null}
    {
      "orgNumber": "5567804348",
      "name": "Inyett AB",
      "coAddress": "",
      "address": "Redaregatan 50",
      "zipCode": "25236",
      "phonenumber": "042-210007",
      "faxnumber": "",
      "email": "ekonomi@inyett.se",
      "community": "HELSINGBORG",
      "county": "SKÅNE",
      "legalGroup": "AB",
      "legalGroupText": "Privat aktiebolag",
      "registrationDate": "2009-04-06T00:00:00",
      "vatRegistered": true,
      "vatNr": "SE556780434801",
      "vatStartdate": "2009-04-01T00:00:00",
      "statusCode": "100",
      "statusDescription": "Aktivt",
      "statusName": "Aktivt",
      "statusDateFrom": "2009-04-06T00:00:00",
      "town": "Helsingborg",
      "specialInformations": [
        {
          "name": "Arb av reg",
          "code": "AARG",
          "value": "Yes"
        },
        {
          "name": "F-tax",
          "code": "FTAX",
          "value": "Yes"
        },
        {
          "name": "F-tax start date",
          "code": "FTXSD",
          "value": "2009-05-06"
        },
        {
          "name": "F-tax end date",
          "code": "FTXED",
          "value": ""
        },
        {
          "name": "F-tax registration specification",
          "code": "FTXRS",
          "value": "1"
        },
        {
          "name": "F-tax deregistration reason code",
          "code": "FTXDRC"
        },
        {
          "name": "Sni",
          "code": "SNIC",
          "value": "62100"
        },
        {
          "name": "Sni description",
          "code": "SNICD",
          "value": "Dataprogrammering"
        },
        {
          "name": "Number of employees interval",
          "code": "NREMI",
          "value": "20-49 anställda"
        },
        {
          "name": "Company is active by status code",
          "code": "CASC",
          "value": "Yes"
        }
      ]
    }
    ```

    The `data` array contains the returned records, while the `meta` object provides pagination information about the full result set.
  </Step>

  <Step title="Handle the Response">
    Every successful response from the Inyett API follows the same structure:

    * **`data`** — An array of resource objects matching your query. Each object contains the fields relevant to that resource type.
    * **`meta`** — An object containing pagination details: `total` (total number of records), `page` (the current page), and `per_page` (the number of records per page).

    Use the values in `meta` to implement pagination in your application — for example, by incrementing the `page` parameter until you've retrieved all records.
  </Step>
</Steps>

<Tip>
  Store your API key securely. Never commit it to source control. Use environment variables or a secrets manager like AWS Secrets Manager or HashiCorp Vault to keep your key safe.
</Tip>

## Code Examples

The following code group shows how to make the same request in multiple languages:

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.inyett.com/v1/users \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.inyett.com/v1/users", {
    method: "GET",
    headers: {
      Authorization: "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
  });

  const { data, meta } = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.inyett.com/v1/users"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
  }

  response = requests.get(url, headers=headers)
  payload = response.json()

  print(payload["data"])
  print(payload["meta"])
  ```
</CodeGroup>
