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

# Connecting

> General details on how to connect to the Lender API

Before you start sending queries and mutations, you need to know where to
send requests and what headers to include. This page covers the basics of
making a successful connection to the Ownright Lender API.

## API endpoint

All GraphQL requests are sent to a single HTTPS endpoint:

```
POST https://api.ownright.com/lenders/graphql
```

## Required headers

Every request to the Lender API must include the following headers:

| Header                           | Description                                     |
| -------------------------------- | ----------------------------------------------- |
| `Content-Type: application/json` | Indicates the request body is JSON              |
| `X-Ownright-Client-Id`           | Your unique API client ID                       |
| `X-Ownright-API-Key`             | Your long-lived API key used for authentication |
| `X-Ownright-Organization-Id`     | A constant identifier for the Ownright platform |

These headers are used to authenticate your requests and route them correctly.

## Example request

Here's an example of a basic GraphQL request using curl to fetch your lender
organization details:

```bash Example request theme={null}
curl -X POST https://api.ownright.com/lenders/graphql \
  -H "Content-Type: application/json" \
  -H "X-Ownright-Client-Id: your-client-id" \
  -H "X-Ownright-API-Key: your-api-key" \
  -H "X-Ownright-Organization-Id: ownright-prod-org" \
  -d '{
    "query": "query { lender { name members { id firstName lastName email } } }"
  }'
```

**Example response:**

```json Example response theme={null}
{
  "data": {
    "lender": {
      "name": "Example Lending Corp",
      "members": [
        {
          "id": "gid://ownright/TeamMember/1",
          "firstName": "Jane",
          "lastName": "Smith",
          "email": "jane.smith@examplelender.com"
        }
      ]
    }
  }
}
```

<Tip>
  Use tools like [Postman](https://www.postman.com/),
  [Insomnia](https://insomnia.rest/), or
  [GraphiQL](https://github.com/graphql/graphiql) for easier request building
  and testing.
</Tip>

## Differences from the Partner API

If you've already integrated with the Partner API, the Lender API works the same way — the
only difference is the endpoint URL:

| API         | Endpoint                                    |
| ----------- | ------------------------------------------- |
| Partner API | `https://api.ownright.com/partners/graphql` |
| Lender API  | `https://api.ownright.com/lenders/graphql`  |

Your authentication credentials (client ID, API key, organization ID) are issued per API.
Lender API credentials cannot be used with the Partner API endpoint and vice versa.

## Need help?

If you haven't received your client ID or API key yet, read the
[Authentication](/fundamentals/authentication) documentation or reach out to our
team at [developers@ownright.com](mailto:developers@ownright.com).
