# Email

## groupEmailNotify

> This method creates a new email group or updates details of an existing one.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/notify-group":{"post":{"description":"This method creates a new email group or updates details of an existing one.","tags":["email"],"operationId":"groupEmailNotify","summary":"groupEmailNotify","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupEmail"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupEmailResponse"}}}},"202":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupEmailResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"GroupEmail":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"description":"Name of the group","type":"string"},"enabled":{"description":"Enable or disable the send email service for this group.","type":"boolean"},"emails":{"description":"array of e-mails","type":"array","items":{"type":"string"}}}}}},"CreateGroupEmailResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"name":{"description":"Name of the group","type":"string"},"enabled":{"description":"Enable or disable the send email service for this group.","type":"boolean"},"emails":{"description":"array of e-mails","type":"array","items":{"type":"string"}}}}}},"InternalError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["INTERNAL_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["DRIVER_OFFLINE","CREDENTIAL_SERVER_CONNECTION_ERROR","CLIENT_NOT_INITIALIZE","TRUSTED_ENROLL_WITH_PENDING_STATUS","SUBJECT_NOT_SET","UNKNOWN"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}}}}}
```

## getGroupEmail

> This method retrieves the group and its e-mail list.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/notify-group/{group}":{"get":{"description":"This method retrieves the group and its e-mail list.","tags":["email"],"operationId":"getGroupEmail","summary":"getGroupEmail","parameters":[{"name":"group","description":"Group name to be retrieved.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupEmail"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"GroupEmail":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"description":"Name of the group","type":"string"},"enabled":{"description":"Enable or disable the send email service for this group.","type":"boolean"},"emails":{"description":"array of e-mails","type":"array","items":{"type":"string"}}}}}},"InternalError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["INTERNAL_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["DRIVER_OFFLINE","CREDENTIAL_SERVER_CONNECTION_ERROR","CLIENT_NOT_INITIALIZE","TRUSTED_ENROLL_WITH_PENDING_STATUS","SUBJECT_NOT_SET","UNKNOWN"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}}}}}
```

## userEmailNotify

> This method inserts a user and update their groups.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/notify-user":{"post":{"description":"This method inserts a user and update their groups.","tags":["email"],"operationId":"userEmailNotify","summary":"userEmailNotify","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserEmailResponse"}}}},"202":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserEmailResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"UserGroup":{"type":"object","properties":{"data":{"type":"object","properties":{"username":{"description":"Name of the user.","type":"string"},"groups":{"description":"Array of group name objects.","type":"array","items":{"type":"object","properties":{"name":{"type":"string"}}}}}}}},"CreateUserEmailResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"username":{"description":"Name of the user.","type":"string"},"groups":{"description":"Array of objects of groups","type":"array","items":{"type":"object","properties":{"name":{"type":"string"}}}}}}}},"InternalError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["INTERNAL_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["DRIVER_OFFLINE","CREDENTIAL_SERVER_CONNECTION_ERROR","CLIENT_NOT_INITIALIZE","TRUSTED_ENROLL_WITH_PENDING_STATUS","SUBJECT_NOT_SET","UNKNOWN"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}}}}}
```

## getUserEmail

> This method retrieves a user and its email groups.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/notify-user/{user}":{"get":{"description":"This method retrieves a user and its email groups.","tags":["email"],"operationId":"getUserEmail","summary":"getUserEmail","parameters":[{"name":"user","description":"User to be retrieved.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}},"components":{"schemas":{"UserGroup":{"type":"object","properties":{"data":{"type":"object","properties":{"username":{"description":"Name of the user.","type":"string"},"groups":{"description":"Array of group name objects.","type":"array","items":{"type":"object","properties":{"name":{"type":"string"}}}}}}}},"InternalError":{"type":"object","properties":{"type":{"description":"Type of the Error","type":"string","enum":["INTERNAL_ERROR"]},"code":{"description":"Internal error code.","type":"string","enum":["DRIVER_OFFLINE","CREDENTIAL_SERVER_CONNECTION_ERROR","CLIENT_NOT_INITIALIZE","TRUSTED_ENROLL_WITH_PENDING_STATUS","SUBJECT_NOT_SET","UNKNOWN"]},"message":{"description":"Message detailing the nature of the Error","type":"string"},"meta":{"description":"Contains extra information about the API call.","type":"object"}}}}}}
```


---

# 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.griaule.com/apis/gbds-4/email.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.
