# AddinAction

## Get addin action.

> Use this endpoint to get addin action.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"AddinAction"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"AddinActionApplication2":{"type":"integer"}}},"paths":{"/v1/AddinAction/Get/{companyId}":{"get":{"tags":["AddinAction"],"summary":"Get addin action.","description":"Use this endpoint to get addin action.","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"application","in":"query","schema":{"$ref":"#/components/schemas/AddinActionApplication2"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Create addin action.

> Use this endpoint to create addin action.\
> \
> Required roles: Admin, Moderator.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"AddinAction"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateAddinActionViewModel":{"required":["name","prompt","icon"],"type":"object","properties":{"name":{"type":"string","description":"Gets or sets the Name."},"tooltip":{"type":"string","description":"Gets or sets the Tooltip.","nullable":true},"prompt":{"type":"string","description":"Gets or sets the Prompt."},"icon":{"type":"string","description":"Gets or sets the Icon."},"addinActionApplication":{"$ref":"#/components/schemas/AddinActionApplication"}},"description":"Represents the view model CreateAddinActionViewModel."},"AddinActionApplication":{"type":"integer","description":"Gets or sets the Addin Action Application."}}},"paths":{"/v1/AddinAction/Create/{companyId}":{"post":{"tags":["AddinAction"],"summary":"Create addin action.","description":"Use this endpoint to create addin action.\n\nRequired roles: Admin, Moderator.","parameters":[{"name":"companyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAddinActionViewModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateAddinActionViewModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateAddinActionViewModel"}}},"required":true},"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Update addin action.

> Use this endpoint to update addin action.\
> \
> Required roles: Admin, Moderator.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"AddinAction"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateAddinActionViewModel":{"required":["name","prompt","icon"],"type":"object","properties":{"name":{"type":"string","description":"Gets or sets the Name."},"tooltip":{"type":"string","description":"Gets or sets the Tooltip.","nullable":true},"prompt":{"type":"string","description":"Gets or sets the Prompt."},"icon":{"type":"string","description":"Gets or sets the Icon."}},"description":"Represents the view model UpdateAddinActionViewModel."}}},"paths":{"/v1/AddinAction/Update/{addinId}":{"put":{"tags":["AddinAction"],"summary":"Update addin action.","description":"Use this endpoint to update addin action.\n\nRequired roles: Admin, Moderator.","parameters":[{"name":"addinId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAddinActionViewModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateAddinActionViewModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateAddinActionViewModel"}}},"required":true},"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Delete addin action.

> Use this endpoint to delete addin action.\
> \
> Required roles: Admin, Moderator.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"AddinAction"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/v1/AddinAction/Delete/{addinId}":{"delete":{"tags":["AddinAction"],"summary":"Delete addin action.","description":"Use this endpoint to delete addin action.\n\nRequired roles: Admin, Moderator.","parameters":[{"name":"addinId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Executes an add-in action for the current user and returns transformed content.

> The execution flow depends on the selected : Enhance returns improved text, Translate returns translated text, Anonymize returns masked text, and Custom runs the configured custom action. All operations are performed in the context of the authenticated user, and usage is logged for analytics.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"AddinAction"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"AddinActionViewModel":{"required":["prompt"],"type":"object","properties":{"prompt":{"type":"string","description":"Gets or sets the Prompt."},"languageCode":{"type":"string","description":"Gets or sets the Language Code.","nullable":true},"addinActionId":{"type":"integer","description":"Gets or sets the Addin Action Id.","format":"int32"},"addinActionApplication":{"$ref":"#/components/schemas/AddinActionApplication"}},"description":"Represents the view model AddinActionViewModel."},"AddinActionApplication":{"type":"integer","description":"Gets or sets the Addin Action Application."},"AddinActionExecuteResultDTO":{"required":["content"],"type":"object","properties":{"content":{"type":"string","description":"Gets or sets the Content."}},"description":"Represents the data transfer object AddinActionExecuteResultDTO."},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}}}}},"paths":{"/v1/AddinAction/Execute":{"post":{"tags":["AddinAction"],"summary":"Executes an add-in action for the current user and returns transformed content.","description":"The execution flow depends on the selected : Enhance returns improved text, Translate returns translated text, Anonymize returns masked text, and Custom runs the configured custom action. All operations are performed in the context of the authenticated user, and usage is logged for analytics.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddinActionViewModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/AddinActionViewModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/AddinActionViewModel"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AddinActionExecuteResultDTO"}},"application/json":{"schema":{"$ref":"#/components/schemas/AddinActionExecuteResultDTO"}},"text/json":{"schema":{"$ref":"#/components/schemas/AddinActionExecuteResultDTO"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```


---

# 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.safegpt.nl/api-en/endpoints/addinaction.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.
