> For the complete documentation index, see [llms.txt](https://docs.welkinhealth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.welkinhealth.com/api-reference/unrecognized-emails.md).

# Unrecognized Emails

## GET /{tenantName}/{instanceName}/unrecognized-patients/emails

> Get all unrecognized emails

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Unrecognized Emails","description":""}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}}},"schemas":{"EmailPage":{"allOf":[{"$ref":"#/components/schemas/PaginatedResponse"},{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/Email"}}}}]},"PaginatedResponse":{"type":"object","description":"Standard paginated response wrapper.","properties":{"content":{"type":"array","items":{"type":"object"}},"pageable":{"$ref":"#/components/schemas/PageableInfo"},"totalElements":{"type":"integer","description":"Total number of matching records"},"totalPages":{"type":"integer","description":"Total number of pages"},"last":{"type":"boolean"},"first":{"type":"boolean"},"number":{"type":"integer","description":"Current page number (zero-based)"},"size":{"type":"integer","description":"Page size"},"numberOfElements":{"type":"integer","description":"Number of elements on the current page"},"empty":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortInfo"}}},"PageableInfo":{"type":"object","properties":{"sort":{"$ref":"#/components/schemas/SortInfo"},"pageSize":{"type":"integer"},"pageNumber":{"type":"integer"},"offset":{"type":"integer"},"unpaged":{"type":"boolean"},"paged":{"type":"boolean"}}},"SortInfo":{"type":"object","properties":{"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"},"empty":{"type":"boolean"}}},"Email":{"type":"object","required":["sender","body"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"sendNow":{"type":"boolean"},"sentAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"careTeam":{"type":"string","nullable":true},"patientInfo":{"type":"string","nullable":true},"sender":{"type":"string","format":"uuid"},"senderType":{"$ref":"#/components/schemas/ActorType"},"senderName":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"receiver":{"type":"string","format":"uuid","nullable":true},"receiverType":{"$ref":"#/components/schemas/ActorType"},"receiverName":{"type":"string","nullable":true},"to":{"type":"string","nullable":true},"direction":{"$ref":"#/components/schemas/Direction"},"externalId":{"type":"string","nullable":true},"starred":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true},"assignedBy":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"assignedByName":{"type":"string","readOnly":true,"nullable":true},"hasHistory":{"type":"boolean","readOnly":true},"unrecognized":{"type":"boolean","readOnly":true},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"emailEditorJson":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EmailStatus"},"secure":{"type":"boolean","default":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"},"readOnly":true},"attachmentsFromTemplate":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"bodyAttachments":{"type":"array","items":{"$ref":"#/components/schemas/SignedFile"}},"messageType":{"$ref":"#/components/schemas/MessageType","default":"CARE_TEAM"},"bodyType":{"$ref":"#/components/schemas/EmailBodyType","default":"PLAIN_TEXT"},"inReplyTo":{"type":"string","nullable":true},"messageId":{"type":"string","nullable":true},"skipEvent":{"type":"boolean"}}},"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]},"Direction":{"type":"string","enum":["OUT","IN"]},"EmailStatus":{"type":"string","enum":["SCHEDULED","ACCEPTED","SENT","DELIVERED","REJECTED","FAILED","UNRECOGNISED","DELETED","CLICKED","OPENED"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}},"SignedFile":{"allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","properties":{"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri","nullable":true}}}]},"MessageType":{"type":"string","enum":["CARE_TEAM","SYSTEM_TO_USER","SYSTEM_TO_PATIENT"]},"EmailBodyType":{"type":"string","enum":["PLAIN_TEXT","HTML"]}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/unrecognized-patients/emails":{"get":{"summary":"Get all unrecognized emails","tags":["Unrecognized Emails"],"operationId":"Get_all_unrecognized_emails","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"sender","in":"query","required":false,"schema":{"type":"string"}},{"name":"receiver","in":"query","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","default":20}},{"name":"starred","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"deletedAtLessOrEqual","in":"query","required":false,"schema":{"type":"string"}},{"name":"assigned","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"startDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"email","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of emails","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## GET /{tenantName}/{instanceName}/unrecognized-patients/emails/{uuid}

> Get unrecognized email by id

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Unrecognized Emails","description":""}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"Uuid":{"name":"uuid","in":"path","required":true,"description":"UUID of the resource","schema":{"type":"string","format":"uuid"}}},"schemas":{"Email":{"type":"object","required":["sender","body"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"createdBy":{"type":"string","format":"uuid","readOnly":true},"updatedBy":{"type":"string","format":"uuid","readOnly":true},"createdByName":{"type":"string","readOnly":true},"updatedByName":{"type":"string","readOnly":true},"sendNow":{"type":"boolean"},"sentAt":{"type":"string","format":"date-time","nullable":true},"receivedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"careTeam":{"type":"string","nullable":true},"patientInfo":{"type":"string","nullable":true},"sender":{"type":"string","format":"uuid"},"senderType":{"$ref":"#/components/schemas/ActorType"},"senderName":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"receiver":{"type":"string","format":"uuid","nullable":true},"receiverType":{"$ref":"#/components/schemas/ActorType"},"receiverName":{"type":"string","nullable":true},"to":{"type":"string","nullable":true},"direction":{"$ref":"#/components/schemas/Direction"},"externalId":{"type":"string","nullable":true},"starred":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true},"assignedBy":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"assignedByName":{"type":"string","readOnly":true,"nullable":true},"hasHistory":{"type":"boolean","readOnly":true},"unrecognized":{"type":"boolean","readOnly":true},"subject":{"type":"string","nullable":true},"body":{"type":"string"},"emailEditorJson":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/EmailStatus"},"secure":{"type":"boolean","default":false},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/File"},"readOnly":true},"attachmentsFromTemplate":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"bodyAttachments":{"type":"array","items":{"$ref":"#/components/schemas/SignedFile"}},"messageType":{"$ref":"#/components/schemas/MessageType","default":"CARE_TEAM"},"bodyType":{"$ref":"#/components/schemas/EmailBodyType","default":"PLAIN_TEXT"},"inReplyTo":{"type":"string","nullable":true},"messageId":{"type":"string","nullable":true},"skipEvent":{"type":"boolean"}}},"ActorType":{"type":"string","enum":["CS_TOOL_CLIENT","USER","API_CLIENT","PATIENT","CONTACT","SYSTEM","WEBHOOK","INTERNAL_SERVICE","ANONYMOUS","UNRECOGNISED"]},"Direction":{"type":"string","enum":["OUT","IN"]},"EmailStatus":{"type":"string","enum":["SCHEDULED","ACCEPTED","SENT","DELIVERED","REJECTED","FAILED","UNRECOGNISED","DELETED","CLICKED","OPENED"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"originalName":{"type":"string"},"size":{"type":"integer","description":"Bytes"},"contentType":{"type":"string"},"storageKey":{"type":"string"}}},"SignedFile":{"allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","properties":{"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri","nullable":true}}}]},"MessageType":{"type":"string","enum":["CARE_TEAM","SYSTEM_TO_USER","SYSTEM_TO_PATIENT"]},"EmailBodyType":{"type":"string","enum":["PLAIN_TEXT","HTML"]}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/unrecognized-patients/emails/{uuid}":{"get":{"summary":"Get unrecognized email by id","tags":["Unrecognized Emails"],"operationId":"Get_unrecognized_email_by_id","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/Uuid"}],"responses":{"200":{"description":"Email record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Email"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## GET /{tenantName}/{instanceName}/unrecognized-patients/emails/{uuid}/attachments/{fileUuid}

> Get attachments for Emails

```json
{"openapi":"3.0.3","info":{"title":"Welkin Health API","version":"1.0.0"},"tags":[{"name":"Unrecognized Emails","description":""}],"servers":[{"url":"https://api.live.welkincloud.io","description":"Welkin Health production API"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token obtained from `POST /{tenantName}/admin/api_clients/{clientName}`. Valid for 60 minutes."}},"parameters":{"TenantName":{"name":"tenantName","in":"path","required":true,"description":"Your organization (tenant) name, e.g. `acme-health`","schema":{"type":"string"}},"InstanceName":{"name":"instanceName","in":"path","required":true,"description":"Your environment name: `live`, `sandbox`, or a custom name","schema":{"type":"string"}},"Uuid":{"name":"uuid","in":"path","required":true,"description":"UUID of the resource","schema":{"type":"string","format":"uuid"}}},"responses":{"BadRequest":{"description":"Bad request — the request could not be understood or was missing required parameters."},"Unauthorized":{"description":"Unauthorized — the Bearer token is missing, expired, or invalid."},"Forbidden":{"description":"Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin."},"NotFound":{"description":"Not found — the requested resource does not exist."},"TooManyRequests":{"description":"Too many requests — rate limit exceeded. Implement exponential backoff."},"InternalError":{"description":"Internal server error."}}},"paths":{"/{tenantName}/{instanceName}/unrecognized-patients/emails/{uuid}/attachments/{fileUuid}":{"get":{"summary":"Get attachments for Emails","tags":["Unrecognized Emails"],"operationId":"Get_attachments_for_Emails","parameters":[{"$ref":"#/components/parameters/TenantName"},{"$ref":"#/components/parameters/InstanceName"},{"$ref":"#/components/parameters/Uuid"},{"name":"fileUuid","in":"path","required":true,"description":"`fileUuid` path parameter","schema":{"type":"string"}}],"responses":{"200":{"description":"Binary attachment file."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.welkinhealth.com/api-reference/unrecognized-emails.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
