---
agentTools:
  projectIndex: https://docs.xkit.co/llms.txt
---

# List Connections

List all of a platform user's enabled connections to 3rd Party Applications

This endpoint can be used by your server to retrieve all the enabled connections associated with a context. It will include for those connections the status of their current authorization to the 3rd party application.

The endpoint does not return access credentials for the 3rd party APIs (e.g. OAuth access tokens). To get the credentials, you should get a specific connection instead, for example via [Get Connection by slug](https://docs.xkit.co/reference/get-context-connection-by-slug).

If the context does not exist, the endpoint will return a `404` status code.

If a connection has been enabled for this context, but the connection is in an error state (e.g. it has been deauthorized), the `enabled` parameter will be `true`, but the `authorization` will have a `status` which is `error`. An authorization in a good state will have a status of `active`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Platform API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://app.xkit.co/api/platform"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/contexts/{external_id}/connections": {
      "get": {
        "summary": "List Connections",
        "description": "List all of a platform user's enabled connections to 3rd Party Applications",
        "operationId": "list-connections",
        "parameters": [
          {
            "name": "external_id",
            "in": "path",
            "description": "The unique context identifier provided to Xkit when the context was created.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Active connection": {
                    "value": "{\n  \"connections\": [\n    {\n      \"id\": \"unique-id\",\n      \"enabled\": true,\n      \"connector\": {\n        \"name\": \"Slack\",\n        \"slug\": \"slack\",\n        \"about\": \"Slack is a cloud-based team...\",\n        \"short_description\": \"Slack brings the team together, wherever you are\",\n        \"mark_url\": \"https://app.xkit.co/marks/slack.png\",\n        \"authorizer_prototype_slug\": \"slack\"\n      },\n\t\t\t\"context\": {\n        \"external_id\": \"your_context_id\"\n      },\n      \"authorization\": {\n        \"id\": 1,\n        \"status\": \"active\"\n      }\n    }\n  ]\n}"
                  },
                  "No connections": {
                    "value": "{\n  \"connections\": []\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Active connection",
                      "type": "object",
                      "properties": {
                        "connections": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "unique-id"
                              },
                              "enabled": {
                                "type": "boolean",
                                "example": true,
                                "default": true
                              },
                              "connector": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "example": "Slack"
                                  },
                                  "slug": {
                                    "type": "string",
                                    "example": "slack"
                                  },
                                  "about": {
                                    "type": "string",
                                    "example": "Slack is a cloud-based team..."
                                  },
                                  "short_description": {
                                    "type": "string",
                                    "example": "Slack brings the team together, wherever you are"
                                  },
                                  "mark_url": {
                                    "type": "string",
                                    "example": "https://app.xkit.co/marks/slack.png"
                                  },
                                  "authorizer_prototype_slug": {
                                    "type": "string",
                                    "example": "slack"
                                  }
                                }
                              },
                              "context": {
                                "type": "object",
                                "properties": {
                                  "external_id": {
                                    "type": "string",
                                    "example": "your_context_id"
                                  }
                                }
                              },
                              "authorization": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 1,
                                    "default": 0
                                  },
                                  "status": {
                                    "type": "string",
                                    "example": "active"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "No connections",
                      "type": "object",
                      "properties": {
                        "connections": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "No provisioned user": {
                    "value": "{\"error\": \"Not Found\"}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Not Found"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "shell",
              "code": "curl --user publishable_key:secret_key \\\n     https://app.xkit.co/api/platform/users/your_context_id/connections"
            }
          ],
          "samples-languages": [
            "shell"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "5f08b14b1dd58e029e169b30:60e514aaabaa3e0037015ac9"
}
```