v4

latestOpenAPI 3.1.1Apache 2.02026-07-31107278570.4 KB
Connected Accounts

List connected accounts

Retrieves a paginated list of connected accounts for third-party integrations. Filter by organization, user, connector type, provider, or identifier. Returns OAuth tokens, API keys, and connection status for each account. Use pagination tokens to navigate through large result sets.

get/api/v1/connected_accounts

Query parameters

organization_idstring

Filter by organization ID. Returns only connected accounts associated with this organization.

user_idstring

Filter by user ID. Returns only connected accounts associated with this user.

connectorstring

Filter by connector type (e.g., 'notion', 'slack', 'google'). Alphanumeric characters, spaces, hyphens, underscores, and colons are allowed.

identifierstring

Filter by account identifier. The unique identifier for the connected account within the third-party service (e.g., email address, workspace ID).

providerstring

Filter by OAuth provider. The authentication provider name such as 'google', 'microsoft', 'github', etc.

page_sizeinteger

Maximum number of connected accounts to return per page. Must be between 0 and 100. Default is typically 10.

page_tokenstring

Pagination token from a previous response. Use the next_page_token value from ListConnectedAccountsResponse to fetch the next page.

querystring

Text search query to filter connected accounts by name, identifier, or other searchable fields. Case-insensitive.

connection_namesstring[]

Filter by one or more connection names (exact match). Returns connected accounts belonging to any of the specified connections. Max 20 names per request. Cannot be combined with the connector field.

Response

Successfully retrieved the list of connected accounts with their authentication details and status

next_page_tokenstring

Pagination token for retrieving the next page. Empty if this is the last page. Pass this value to page_token in the next request.

prev_page_tokenstring

Pagination token for retrieving the previous page. Empty if this is the first page. Pass this value to page_token to go back.

total_sizeinteger

Total count of connected accounts matching the filter criteria across all pages. Use for calculating pagination.

Example response

{
  "connected_accounts": [
    {
      "connection_id": "conn_24834495392086178",
      "connector": "notion",
      "id": "ca_24834495392086178",
      "identifier": "user@example.com",
      "last_used_at": "2024-03-20T14:30:00Z",
      "provider": "google",
      "token_expires_at": "2024-12-31T23:59:59Z",
      "updated_at": "2024-03-20T15:04:05Z"
    }
  ],
  "next_page_token": "eyJvZmZzZXQiOjIwfQ==",
  "prev_page_token": "eyJvZmZzZXQiOjB9",
  "total_size": 100
}