> 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/set-active-civilian.md).

# Set Active Civilian

This endpoint allows you to set the active civilian for a user in their civilian panel.

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

{% hint style="warning" %}
This endpoint requires **an Advanced** ImperialCAD subscription or higher.
{% endhint %}

### setActiveCivilian(data, callback)

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

***

#### Request Body

| Name              | Type   | Description             |
| ----------------- | ------ | ----------------------- |
| `commId`          | string | Your Community ID       |
| `users_discordID` | string | Target users discord ID |
| `ssn`             | string | Target civilian profile |

***

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

```lua
exports["ImperialCAD"]:setActiveCivilian({
   "commId": "1752961351157x732778435805184000",
   "users_discordID": "601892764086435851",
   "ssn": "890833813"
  }, 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",
  "response": {
    "Char Name": "John  Doe"
  }
}
```

{% endtab %}
{% endtabs %}
