# Users

## GET /v1/partner-portals/{portalId}/users

>

```json
{"openapi":"3.0.0","info":{"title":"Whaly API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Pass a Service Account Key as the Bearer token to authenticate. e.g. 'sk:xxxxxxx'"}},"schemas":{"PaginatedListWrapper":{"type":"object","properties":{"paging":{"$ref":"#/components/schemas/PagingInfo"}},"required":["paging"]},"PagingInfo":{"type":"object","properties":{"next":{"$ref":"#/components/schemas/PagingNext"}},"required":["next"]},"PagingNext":{"type":"object","properties":{"after":{"type":"string"}},"required":["after"]},"PartnerPortalUserDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for the Portal User."},"first_name":{"type":"string","description":"First name of the User."},"last_name":{"type":"string","description":"Last name of the User."},"email":{"type":"string","description":"Email of the User."},"last_logged_at":{"type":"string","description":"Last login date and time of the user (ISO 8601 format)"}},"required":["id","first_name","last_name","email","last_logged_at"]}}},"paths":{"/v1/partner-portals/{portalId}/users":{"get":{"operationId":"PortalsController_listAllPortalUsers","parameters":[{"name":"after","required":false,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"portalId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedListWrapper"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PartnerPortalUserDto"}}}}]}}}}}}}}}
```

## GET /v1/partner-portals/{portalId}/users/{userId}

>

```json
{"openapi":"3.0.0","info":{"title":"Whaly API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Pass a Service Account Key as the Bearer token to authenticate. e.g. 'sk:xxxxxxx'"}},"schemas":{"PartnerPortalUserDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for the Portal User."},"first_name":{"type":"string","description":"First name of the User."},"last_name":{"type":"string","description":"Last name of the User."},"email":{"type":"string","description":"Email of the User."},"last_logged_at":{"type":"string","description":"Last login date and time of the user (ISO 8601 format)"}},"required":["id","first_name","last_name","email","last_logged_at"]}}},"paths":{"/v1/partner-portals/{portalId}/users/{userId}":{"get":{"operationId":"PortalsController_findOnePortalUser","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}},{"name":"portalId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerPortalUserDto"}}}}}}}}}
```

## POST /v1/partner-portals/{portalId}/users

>

```json
{"openapi":"3.0.0","info":{"title":"Whaly API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Pass a Service Account Key as the Bearer token to authenticate. e.g. 'sk:xxxxxxx'"}},"schemas":{"CreatePartnerPortalUserDto":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"password":{"type":"string","description":"When set, this will be the password of the User that he/she can use at the first connection."},"roles":{"description":"Contains the list of Role Ids that should be granted to this Portal User","type":"array","items":{"type":"string"}},"locale":{"type":"string","default":"en_US","description":"User locale, used for time and numbers formatting."},"attributes":{"type":"array","description":"When set, this will define the user attributes on its creation.","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}}}}},"required":["first_name","last_name","email","roles"]},"PartnerPortalUserDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for the Portal User."},"first_name":{"type":"string","description":"First name of the User."},"last_name":{"type":"string","description":"Last name of the User."},"email":{"type":"string","description":"Email of the User."},"last_logged_at":{"type":"string","description":"Last login date and time of the user (ISO 8601 format)"}},"required":["id","first_name","last_name","email","last_logged_at"]}}},"paths":{"/v1/partner-portals/{portalId}/users":{"post":{"operationId":"PortalsController_createPortalUsers","parameters":[{"name":"portalId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartnerPortalUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerPortalUserDto"}}}}}}}}}
```

## DELETE /v1/partner-portals/{portalId}/users/{userId}

>

```json
{"openapi":"3.0.0","info":{"title":"Whaly API","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Pass a Service Account Key as the Bearer token to authenticate. e.g. 'sk:xxxxxxx'"}},"schemas":{"PartnerPortalUserDeleteResultDto":{"type":"object","properties":{"id":{"type":"string"},"isDeleted":{"type":"boolean"}},"required":["id","isDeleted"]}}},"paths":{"/v1/partner-portals/{portalId}/users/{userId}":{"delete":{"operationId":"PortalsController_deleteOnePortalUser","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}},{"name":"portalId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerPortalUserDeleteResultDto"}}}}}}}}}
```


---

# 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://developers.whaly.io/api-reference/partner-portals/users.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.
