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

# Step 1: Authentication

The API uses **Bearer (Token) Authentication** to authenticate requests. The value of this bearer token is a **JSON Web Token** (JWT), which is passed in the `Authorization` HTTP header and signed by your private API Key.

```bash theme={"dark"}
curl -X GET https://api.mattildapayments.com/transactions \
  -H "authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi..."
```

## Create a new API key

To use the API you will need to generate a new **API key**. Head over to
your dashboard and visit the **Integrations** page.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/mattilda/assets/images/api-keys/add-key.png" alt="API key dashboard" />

On this page, click the **Add API key** button and select a name for your key. The name is purely for you to track what key is for what integration.
You will need to store the downloaded key securely as we will not store this key for you.

<Tabs>
  <Tab title="Using an SDK">
    Using an SDK is the most simple way to call and authenticate with our API. When using one of our SDKs to call the API, authentication is handled by the SDK client.  You will
    only need to initialize the SDK with your private to handle authentication.

    <Snippet file="quickstarts/sdks.mdx" />
  </Tab>

  <Tab title="Without an SDK">
    If you would like to call the API without using an SDK, you will need to generate the JWT token yourself and pass it as a bearer token in your API requests. You can generate a signed JWT token either using a helper function in an SDK or by manually generating and signing it.

    Our [authentication guide](/guides/api/authentication) has details on using these options.
  </Tab>
</Tabs>

## Summary

In this step you:

* Learned about API authentication
* Created a new private key for the API
* Used an SDK to authenticate or manually created a token
