> For the complete documentation index, see [llms.txt](https://docs.imperialcad.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imperialcad.app/api-and-integrations/api-integrations/civilian-endpoints/get-characters.md).

# Get Characters

This endpoint allows you to get a list of character's belonging to a user.

{% hint style="danger" %}
This endpoint has NOT been added as a in-game export yet.
{% endhint %}

{% hint style="warning" %}
This endpoint requires **any** ImperialCAD subscription.
{% endhint %}

### GetCharacters(data, callback)

<mark style="color:green;">`POST`</mark> `https://imperialcad.app/api/1.1/wf/getCharacters`

***

#### Request Body

| Name              | Type   | Description                            |
| ----------------- | ------ | -------------------------------------- |
| `commId`          | string | Your Community ID                      |
| `users_discordID` | string | Target users discord ID                |
| `page`            | number | [Desired page](#user-content-fn-1)[^1] |

***

{% tabs %}
{% tab title="Example" %}

```lua
exports["ImperialCAD"]:GetCharacters({
   "commId": "1717397682352x288894453408083100",
   "users_discordID": "123456789012345678",
   "page": 1
  }, function(success, data)
    if success then print(json.encode(data)) else print("Failed:", data) end
end)
```

{% endtab %}

{% tab title="Response of Example" %}

```lua
{
  "status": "success",
  "page": 1,
  "has_next_page": false,
  "data": [
    {
      "name": "Jon  Doe",
      "ssn": "614838274",
      "dob": "1/01/00"
    },
    {
      "name": "Johnny Doe",
      "ssn": "230516067",
      "dob": "1/01/00"
    },
    {
      "name": "Billy Doe",
      "ssn": "448398182",
      "dob": "1/01/00"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

[^1]: The API will return up to 15 civilian records per request, including only name, ssn, and dob, sorted by creation date (newest first). To use it, You'll include a page parameter (1, 2, or 3). Page 1 returns the first 15 results, page 2 returns the next 15, and page 3 returns the final 15 for a maximum of 45 total entries. Requests beyond page 3 will return an error or empty response.
