> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.withpersona.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpersona.com/_mcp/server.

# Get all relations for an Account

GET https://api.withpersona.com/api/v1/accounts/{account-id}/relations

Gets relations for an Account by key

Reference: https://docs.withpersona.com/api-reference/accounts/list-all-relations

## Authentication

- `Authorization` header (bearer token, required)

## Request

### Path parameters

- `account-id` (string, required)

### Query parameters

- `include` (string, optional) — A comma-separated list of relationship paths. This can be used to customize which related resources will be fully serialized in the `included` key in the response. See [Serialization](https://docs.withpersona.com/serialization#inclusion-of-related-resources) for more details.
- `fields` (map from string to string, optional) — Comma-separated list(s) of attributes to include in the response. This can be used to customize which attributes will be serialized in the response. See [Serialization](https://docs.withpersona.com/serialization#sparse-fieldsets) for more details.
- `filter` (object, required)
  - `key` (string, required) — Filter relations by relation key.
  - `created-at-start` (string, optional) — Filter relations by creation date.
  - `created-at-end` (string, optional) — Filter relations by creation date.

### Headers

- `Key-Inflection` (enum, optional) — Determines casing for the API response.
  - Allowed values: `camel`, `kebab`, `snake`
- `Idempotency-Key` (string, optional) — Ensures the request is idempotent.
- `Persona-Version` (enum, optional) — Server API version. More info on versioning can be found [here](https://docs.withpersona.com/versioning).
  - Allowed values: `2025-12-08`, `2025-10-27`, `2023-01-05`, `2022-09-01`, `2021-08-18`, `2021-07-05`, `2021-02-21`, `2020-05-18`

## Response

### 200

This endpoint returns a collection of Account relations.

- `data` (list of object or object, required) — List of relations for the Account. The type of the returned objects is determined by the key query parameter.
  - account
    - `id` (string, optional)
    - `attributes` (object, optional)
      - `reference-id` (string, optional, nullable)
      - `account-type-name` (string, optional)
      - `created-at` (datetime, optional)
      - `updated-at` (datetime, optional)
      - `redacted-at` (datetime, optional, nullable)
      - `fields` (object, optional) — JSON key-value pairs of field name to field value. Exact schema depends on the configuration of the Account Type for this Account. Keys in `fields` are **not** key inflected.
        - `name` (object, optional)
          - `type` (string, optional)
          - `value` (object, optional)
            - `first` (object, optional)
            - `middle` (object, optional)
            - `last` (object, optional)
        - `address` (object, optional)
          - `type` (string, optional)
          - `value` (object, optional)
            - `street_1` (object, optional)
            - `street_2` (object, optional)
            - `subdivision` (object, optional)
            - `city` (object, optional)
            - `postal_code` (object, optional)
            - `country_code` (object, optional)
        - `identification_numbers` (object, optional)
          - `type` (string, optional)
          - `value` (list of object, optional)
            - `type` (string, optional)
            - `value` (object, optional)
        - `birthdate` (object, optional)
          - `type` (string, optional)
          - `value` (string, optional, nullable)
        - `phone_number` (object, optional)
          - `type` (string, optional)
          - `value` (string, optional, nullable)
        - `email_address` (object, optional)
          - `type` (string, optional)
          - `value` (string, optional, nullable)
        - `selfie_photo` (object, optional)
          - `type` ("file", optional)
          - `value` (object, optional, nullable)
            - `filename` (string, optional)
            - `url` (string, optional)
            - `byte-size` (integer, optional)
      - `tags` (list of string, optional)
      - `account-status` (string, optional)
    - `relationships` (object, optional)
      - `account-type` (object, optional)
        - `data` (object, optional)
          - `id` (string, optional)
          - `type` ("account-type", optional)
  - transaction
    - `id` (string, optional) — Unique identifier for this Transaction. Starts with `txn_`.
    - `attributes` (object, optional)
      - `status` (string, optional)
      - `reference-id` (string, optional, nullable)
      - `fields` (map from string to any, optional) — JSON key-value pairs of field name to field value. Exact schema depends on the configuration of the Transaction Type for this Transaction. Keys in `fields` are **not** key inflected.
      - `tags` (list of string, optional)
      - `created-at` (datetime, optional)
      - `updated-at` (datetime, optional, nullable)
    - `relationships` (object, optional)
      - `reviewer` (object, optional) — The entity that reviewed the transaction
        - `data` (object, optional, nullable)
          - `type` (string, optional)
          - `id` (string, optional)
      - `transaction-label` (object, optional)
        - `data` (object, optional, nullable)
          - `type` ("transaction-label", optional)
          - `id` (string, optional) — Unique identifier for this Transaction Label. Starts with `txnl_`.
      - `transaction-type` (object, optional)
        - `data` (object, optional)
          - `type` ("transaction-type", optional)
          - `id` (string, optional) — Unique identifier for this Transaction Type. Starts with `txntp_`.
      - `related-objects` (object, optional) — Objects involved in this Transaction's related Workflow runs. Will include a maximum of 100 related objects.
        - `data` (list of object, optional)
          - `type` (string, optional)
          - `id` (string, optional) — Unique identifier for this object.
- `links` (object, required)
  - `prev` (string, required, nullable) — URL pointing to the previous page of data, or null if on the first page.
  - `next` (string, required, nullable) — URL pointing to the next page of data, or null if on the last page.

## Examples

**Response**

```json
{
  "data": [
    {
      "attributes": {
        "account-type-name": "User",
        "created-at": "2023-09-22T17:13:49.000Z",
        "fields": {
          "address": {
            "type": "hash",
            "value": {
              "city": {
                "type": "string",
                "value": "San Francisco"
              },
              "country_code": {
                "type": "string",
                "value": "US"
              },
              "postal_code": {
                "type": "string",
                "value": "94111"
              },
              "street_1": {
                "type": "string",
                "value": "123 Main St"
              },
              "street_2": {
                "type": "string",
                "value": null
              },
              "subdivision": {
                "type": "string",
                "value": "California"
              }
            }
          },
          "birthdate": {
            "type": "date",
            "value": "1994-12-30"
          },
          "email_address": {
            "type": "string",
            "value": "jane@doe.com"
          },
          "identification_numbers": {
            "type": "array",
            "value": [
              {
                "type": "hash",
                "value": {
                  "identification_class": {
                    "type": "string",
                    "value": "visa"
                  },
                  "identification_number": {
                    "type": "string",
                    "value": "12345678"
                  },
                  "issuing_country": {
                    "type": "string",
                    "value": "US"
                  }
                }
              },
              {
                "type": "hash",
                "value": {
                  "identification_class": {
                    "type": "string",
                    "value": "visa"
                  },
                  "identification_number": {
                    "type": "string",
                    "value": "87654321"
                  },
                  "issuing_country": {
                    "type": "string",
                    "value": "UK"
                  }
                }
              },
              {
                "type": "hash",
                "value": {
                  "identification_class": {
                    "type": "string",
                    "value": "cct"
                  },
                  "identification_number": {
                    "type": "string",
                    "value": "A12345678"
                  },
                  "issuing_country": {
                    "type": "string",
                    "value": "AF"
                  }
                }
              }
            ]
          },
          "name": {
            "type": "hash",
            "value": {
              "first": {
                "type": "string",
                "value": "Jane"
              },
              "last": {
                "type": "string",
                "value": "Doe"
              },
              "middle": {
                "type": "string",
                "value": "Marie"
              }
            }
          },
          "phone_number": {
            "type": "string",
            "value": "111-222-3333"
          },
          "selfie_photo": {
            "type": "file"
          }
        },
        "redacted-at": null,
        "reference-id": "abc-123",
        "tags": [
          "tag1",
          "tag2"
        ],
        "updated-at": "2023-09-23T00:22:19.000Z"
      },
      "id": "act_hpNqyAbEG4HeVjZoBRNCMKkA",
      "relationships": {
        "account-type": {
          "data": {
            "id": "acttp_7X5W5w9GMtQntE6oPtKnj44c",
            "type": "account-type"
          }
        }
      },
      "type": "account"
    }
  ],
  "links": {
    "prev": null,
    "next": "/api/v1/accounts?page%5Bafter%5D=act_hpNqyAbEG4HeVjZoBRNCMKkA"
  }
}
```

**SDK Code**

```python Success
import requests

url = "https://api.withpersona.com/api/v1/accounts/account-id/relations"

querystring = {"filter":"{\"key\":\"string\"}"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Success
const url = 'https://api.withpersona.com/api/v1/accounts/account-id/relations?filter=%7B%22key%22%3A%22string%22%7D';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.withpersona.com/api/v1/accounts/account-id/relations?filter=%7B%22key%22%3A%22string%22%7D"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success
require 'uri'
require 'net/http'

url = URI("https://api.withpersona.com/api/v1/accounts/account-id/relations?filter=%7B%22key%22%3A%22string%22%7D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.withpersona.com/api/v1/accounts/account-id/relations?filter=%7B%22key%22%3A%22string%22%7D")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Success
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.withpersona.com/api/v1/accounts/account-id/relations?filter=%7B%22key%22%3A%22string%22%7D', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Success
using RestSharp;

var client = new RestClient("https://api.withpersona.com/api/v1/accounts/account-id/relations?filter=%7B%22key%22%3A%22string%22%7D");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.withpersona.com/api/v1/accounts/account-id/relations?filter=%7B%22key%22%3A%22string%22%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```