# Account management

You can List, Create, Edit and Delete Accounts using these endpoints.

## Model

A sample **Account** object is below

```json
{
    "organization":"1654740730258x343197985783152640",
    "building": "T2",
    "email": "cusnaresident2@gmail.com",
    "externalID": "1234456",
    "firstName": "Happy",
    "lastName": "Resident",
    "passphrase": "mypersonalpassphrase3",
    "phone": "4156234444",
    "stopDate": "2023-06-09T02:12:11.858Z",
    "tenantServiceStatus": "Active",
    "terminationMode": "Schedule stop date",
    "unit": "1112"
}
```

## Managing Accounts

List all Accounts

{% openapi src="/files/14CBoV09Nb7TlKGcf9Br" path="/obj/resident" method="get" %}
[cusna-Cusna-1.0-resolved (4).yaml](https://3426155342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDvdioCJduzKTpzAv3Sij%2Fuploads%2FHnJFiIa0HwCErcoZ9UKh%2Fcusna-Cusna-1.0-resolved%20\(4\).yaml?alt=media\&token=089cbcce-b8f5-429c-bce1-2c4d3d9b8a5b)
{% endopenapi %}

Create and activate new Accounts. The activation email is sent automatically on the service activation date.

{% openapi src="/files/HNtyCDQP9PnfdPqEe4En" path="/obj/resident" method="post" %}
[cusna-Cusna-1.0-resolved (4).yaml](https://3426155342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDvdioCJduzKTpzAv3Sij%2Fuploads%2FE3I6mzhAnY6oVas6X370%2Fcusna-Cusna-1.0-resolved%20\(4\).yaml?alt=media\&token=26baaa82-e328-4122-86c4-6cac3b9f067d)
{% endopenapi %}

Edit an Account

{% openapi src="/files/HNtyCDQP9PnfdPqEe4En" path="/obj/resident/{id}" method="patch" %}
[cusna-Cusna-1.0-resolved (4).yaml](https://3426155342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDvdioCJduzKTpzAv3Sij%2Fuploads%2FE3I6mzhAnY6oVas6X370%2Fcusna-Cusna-1.0-resolved%20\(4\).yaml?alt=media\&token=26baaa82-e328-4122-86c4-6cac3b9f067d)
{% endopenapi %}

Delete an Account and terminate automatically its service

{% openapi src="/files/HNtyCDQP9PnfdPqEe4En" path="/obj/resident/{id}" method="delete" %}
[cusna-Cusna-1.0-resolved (4).yaml](https://3426155342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDvdioCJduzKTpzAv3Sij%2Fuploads%2FE3I6mzhAnY6oVas6X370%2Fcusna-Cusna-1.0-resolved%20\(4\).yaml?alt=media\&token=26baaa82-e328-4122-86c4-6cac3b9f067d)
{% endopenapi %}

## Send activation email

Send again the activation email to an Account

{% openapi src="/files/IO47v5PpNzoZddocab6e" path="/sendactivationemail" method="post" %}
[cusna-Cusna-1.0-resolved.yaml](https://3426155342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDvdioCJduzKTpzAv3Sij%2Fuploads%2F6KtQmGjzqEo8BJRXqLhR%2Fcusna-Cusna-1.0-resolved.yaml?alt=media\&token=732ed60a-7b6e-47cf-9312-5be283f38f6d)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cusna.io/apis/account-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
