# Providers

> The apps your app users can connect now, with what each one reads and how far back.

`POST /v2/connections/providers`

- Auth: read key (project)
- Cost: free; never refused for your plan

Lists every app that can be connected now, to show your app users before they [connect one](/api/connections/connect).
An app that cannot be connected today is not listed, so ask for this list rather than keeping one of your own.
See [Connect your users' apps](/guides/connect-apps).

It is about your project, not one app user, so it takes no `X-Alexein-User`. It takes no arguments; send `{}`.

## Headers

- `Authorization` (string, required): `Bearer ax_…`, an API key. A read key is enough.
- `X-Request-Id` (string): Your id for this request, echoed on the response.

## Body

- `{}` (object, required): An empty object.

## Response

- `providers` (object[]): One entry per app that can be connected.
- `providers[].id` (string): The app's id, such as `google-gmail` or `slack`: the `provider` to send to
  [`connect`](/api/connections/connect).
- `providers[].name` (string): The app's name, to show your users.
- `providers[].sources` (object[]): What within the app is read, each with an `id` and a `description` to show your users.
- `providers[].history` (object): How far back it reads when connected: `default_days`, and `max_days`, the most
  [`connect`](/api/connections/connect)'s `history_days` may ask for. Both are `90`.

## Errors

- `401` (unauthorized): The bearer is not a key this service issued.
- `403` (forbidden): A [personal key](/concepts/personal-memory#personal-keys): your own apps connect under My memory ›
  Connectors, not with a key. Or the organisation has been closed in the console.
- `429` (too many requests): Past your organisation's rate limits. Retry after `Retry-After` seconds. See
  [Limits](/concepts/limits#rate-limits).
- `503` (unavailable): Connecting apps cannot be reached just now. Retry after `Retry-After` seconds.
```bash title="Request"
curl https://api.alexein.ai/v2/connections/providers \
  -H "Authorization: Bearer $ALEXEIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

```json title="200 OK"
{
  "providers": [
    {
      "id": "google-gmail",
      "name": "Gmail",
      "sources": [
        {
          "id": "messages",
          "description": "Mail you receive and send, with each message's text and the text of its attachments"
        }
      ],
      "history": { "default_days": 90, "max_days": 90 }
    },
    {
      "id": "github",
      "name": "GitHub",
      "sources": [
        { "id": "events", "description": "Your own activity - commits, branches, issues, pull requests, reviews, releases" },
        { "id": "pull-activity", "description": "Reviews and comments others leave on pull requests you opened, review or follow" },
        { "id": "workflow-failures", "description": "Workflow runs you started that failed or were cancelled" },
        { "id": "items", "description": "Issues and pull requests you are involved in, as they stand now, with others' comments on issues" }
      ],
      "history": { "default_days": 90, "max_days": 90 }
    },
    {
      "id": "slack",
      "name": "Slack",
      "sources": [
        { "id": "messages", "description": "Messages in channels and conversations you belong to" },
        { "id": "mentions", "description": "Messages anywhere in the workspace that @-mention you" },
        { "id": "reactions", "description": "Reactions to your messages, and the ones you add" }
      ],
      "history": { "default_days": 90, "max_days": 90 }
    }
  ]
}
```
