For the complete documentation index, see llms.txt. This page is also available as Markdown.

Email

Collection of all emails would be located at the following URL:

{{url}} / {{tenantName}} / {{instanceName}} / patients / {{patientId}} / emails

In our example it would be:

https://api.live.welkincloud.io/gh/sb-demo/patients/5da47c49-0c2b-4239-b438-7a826d407739/emails

Get all email drafts

get

Request to get drafts of an email for a patient. If a patient has a contact and you want to request drafts for them, you should specify the contact ID as the patient ID in the url request

Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
patientIdstring · uuidRequired

UUID of the patient record

Query parameters
unscheduledstringOptionalExample: true
searchstringOptional
patientstringOptional
prioritiesstring[]OptionalExample: ["NO_PRIORITY"]
sortstringOptionalExample: createdAt%2Cdesc
Responses
200

Paginated list of email drafts

application/json

Standard paginated response wrapper.

totalElementsintegerOptional

Total number of matching records

totalPagesintegerOptional

Total number of pages

lastbooleanOptional
firstbooleanOptional
numberintegerOptional

Current page number (zero-based)

sizeintegerOptional

Page size

numberOfElementsintegerOptional

Number of elements on the current page

emptybooleanOptional
get/{tenantName}/{instanceName}/patients/{patientId}/email-drafts
GET /{tenantName}/{instanceName}/patients/{patientId}/email-drafts HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "content": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "date": "2026-01-01T00:00:00.000Z",
      "subject": "text",
      "body": "text",
      "emailEditorJson": "text",
      "scheduledAt": "2026-01-01T00:00:00.000Z",
      "sender": "123e4567-e89b-12d3-a456-426614174000",
      "receiver": "123e4567-e89b-12d3-a456-426614174000",
      "patientEmail": "name@gmail.com",
      "secure": false,
      "attachments": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "originalName": "text",
          "size": 1,
          "contentType": "text",
          "storageKey": "text"
        }
      ],
      "attachmentsFromTemplate": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "originalName": "text",
          "size": 1,
          "contentType": "text",
          "storageKey": "text"
        }
      ],
      "bodyAttachments": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "originalName": "text",
          "size": 1,
          "contentType": "text",
          "storageKey": "text",
          "url": "https://example.com",
          "thumbnailUrl": "https://example.com"
        }
      ],
      "priority": "NO_PRIORITY",
      "source": "USER",
      "templateName": "text",
      "bodyType": "PLAIN_TEXT",
      "senderName": "text",
      "receiverName": "text",
      "status": "WAITING",
      "starred": true
    }
  ],
  "pageable": {
    "sort": {
      "sorted": true,
      "unsorted": true,
      "empty": true
    },
    "pageSize": 1,
    "pageNumber": 1,
    "offset": 1,
    "unpaged": true,
    "paged": true
  },
  "totalElements": 1,
  "totalPages": 1,
  "last": true,
  "first": true,
  "number": 1,
  "size": 1,
  "numberOfElements": 1,
  "empty": true,
  "sort": {
    "sorted": true,
    "unsorted": true,
    "empty": true
  }
}

Create email draft

post

Request to create an email draft for a patient. If a patient has a contact added and you want to create a draft for him/her, then the contact's id should be specified in the request url as the patient's id (and the contact's data should be specified as the recipient as well).

Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
patientIdstring · uuidRequired

UUID of the patient record

Body
idstring · uuidRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
datestring · date-time · nullableOptional
subjectstringRequired
bodystringRequired
emailEditorJsonstring · nullableOptional
scheduledAtstring · date-time · nullableOptional
senderstring · uuidRead-onlyOptional
receiverstring · uuid · nullableOptional
patientEmailstring · email · nullableOptional
securebooleanOptionalDefault: false
prioritystring · enumOptionalDefault: NO_PRIORITYPossible values:
sourcestring · enumOptionalDefault: USERPossible values:
templateNamestring · nullableOptional
bodyTypestring · enumOptionalDefault: PLAIN_TEXTPossible values:
senderNamestringRead-onlyOptional
receiverNamestringRead-onlyOptional
statusstring · enumRead-onlyOptionalDefault: WAITINGPossible values:
starredbooleanOptional
Responses
201

Email draft created

application/json
idstring · uuidRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
datestring · date-time · nullableOptional
subjectstringRequired
bodystringRequired
emailEditorJsonstring · nullableOptional
scheduledAtstring · date-time · nullableOptional
senderstring · uuidRead-onlyOptional
receiverstring · uuid · nullableOptional
patientEmailstring · email · nullableOptional
securebooleanOptionalDefault: false
prioritystring · enumOptionalDefault: NO_PRIORITYPossible values:
sourcestring · enumOptionalDefault: USERPossible values:
templateNamestring · nullableOptional
bodyTypestring · enumOptionalDefault: PLAIN_TEXTPossible values:
senderNamestringRead-onlyOptional
receiverNamestringRead-onlyOptional
statusstring · enumRead-onlyOptionalDefault: WAITINGPossible values:
starredbooleanOptional
post/{tenantName}/{instanceName}/patients/{patientId}/email-drafts
POST /{tenantName}/{instanceName}/patients/{patientId}/email-drafts HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 814

{
  "date": "2026-01-01T00:00:00.000Z",
  "subject": "text",
  "body": "text",
  "emailEditorJson": "text",
  "scheduledAt": "2026-01-01T00:00:00.000Z",
  "receiver": "123e4567-e89b-12d3-a456-426614174000",
  "patientEmail": "name@gmail.com",
  "secure": false,
  "attachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "attachmentsFromTemplate": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "bodyAttachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text",
      "url": "https://example.com",
      "thumbnailUrl": "https://example.com"
    }
  ],
  "priority": "NO_PRIORITY",
  "source": "USER",
  "templateName": "text",
  "bodyType": "PLAIN_TEXT",
  "starred": true
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "date": "2026-01-01T00:00:00.000Z",
  "subject": "text",
  "body": "text",
  "emailEditorJson": "text",
  "scheduledAt": "2026-01-01T00:00:00.000Z",
  "sender": "123e4567-e89b-12d3-a456-426614174000",
  "receiver": "123e4567-e89b-12d3-a456-426614174000",
  "patientEmail": "name@gmail.com",
  "secure": false,
  "attachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "attachmentsFromTemplate": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "bodyAttachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text",
      "url": "https://example.com",
      "thumbnailUrl": "https://example.com"
    }
  ],
  "priority": "NO_PRIORITY",
  "source": "USER",
  "templateName": "text",
  "bodyType": "PLAIN_TEXT",
  "senderName": "text",
  "receiverName": "text",
  "status": "WAITING",
  "starred": true
}

Get email draft by id

get

Request to get one draft of an email for a patient. If a patient has a contact and you want to request draft for them, you should specify the contact ID as the patient ID in the url request

Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
patientIdstring · uuidRequired

UUID of the patient record

uuidstring · uuidRequired

UUID of the resource

Responses
200

Email draft

application/json
idstring · uuidRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
datestring · date-time · nullableOptional
subjectstringRequired
bodystringRequired
emailEditorJsonstring · nullableOptional
scheduledAtstring · date-time · nullableOptional
senderstring · uuidRead-onlyOptional
receiverstring · uuid · nullableOptional
patientEmailstring · email · nullableOptional
securebooleanOptionalDefault: false
prioritystring · enumOptionalDefault: NO_PRIORITYPossible values:
sourcestring · enumOptionalDefault: USERPossible values:
templateNamestring · nullableOptional
bodyTypestring · enumOptionalDefault: PLAIN_TEXTPossible values:
senderNamestringRead-onlyOptional
receiverNamestringRead-onlyOptional
statusstring · enumRead-onlyOptionalDefault: WAITINGPossible values:
starredbooleanOptional
get/{tenantName}/{instanceName}/patients/{patientId}/email-drafts/{uuid}
GET /{tenantName}/{instanceName}/patients/{patientId}/email-drafts/{uuid} HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "date": "2026-01-01T00:00:00.000Z",
  "subject": "text",
  "body": "text",
  "emailEditorJson": "text",
  "scheduledAt": "2026-01-01T00:00:00.000Z",
  "sender": "123e4567-e89b-12d3-a456-426614174000",
  "receiver": "123e4567-e89b-12d3-a456-426614174000",
  "patientEmail": "name@gmail.com",
  "secure": false,
  "attachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "attachmentsFromTemplate": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "bodyAttachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text",
      "url": "https://example.com",
      "thumbnailUrl": "https://example.com"
    }
  ],
  "priority": "NO_PRIORITY",
  "source": "USER",
  "templateName": "text",
  "bodyType": "PLAIN_TEXT",
  "senderName": "text",
  "receiverName": "text",
  "status": "WAITING",
  "starred": true
}

Update attachments

post
Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
patientIdstring · uuidRequired

UUID of the patient record

uuidstring · uuidRequired

UUID of the resource

Body
attachmentsAsFilesstring · binary[]Optional
Responses
200

Email draft with attachments added

application/json
idstring · uuidRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
datestring · date-time · nullableOptional
subjectstringRequired
bodystringRequired
emailEditorJsonstring · nullableOptional
scheduledAtstring · date-time · nullableOptional
senderstring · uuidRead-onlyOptional
receiverstring · uuid · nullableOptional
patientEmailstring · email · nullableOptional
securebooleanOptionalDefault: false
prioritystring · enumOptionalDefault: NO_PRIORITYPossible values:
sourcestring · enumOptionalDefault: USERPossible values:
templateNamestring · nullableOptional
bodyTypestring · enumOptionalDefault: PLAIN_TEXTPossible values:
senderNamestringRead-onlyOptional
receiverNamestringRead-onlyOptional
statusstring · enumRead-onlyOptionalDefault: WAITINGPossible values:
starredbooleanOptional
post/{tenantName}/{instanceName}/patients/{patientId}/email-drafts/{uuid}
POST /{tenantName}/{instanceName}/patients/{patientId}/email-drafts/{uuid} HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 33

{
  "attachmentsAsFiles": [
    "binary"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "date": "2026-01-01T00:00:00.000Z",
  "subject": "text",
  "body": "text",
  "emailEditorJson": "text",
  "scheduledAt": "2026-01-01T00:00:00.000Z",
  "sender": "123e4567-e89b-12d3-a456-426614174000",
  "receiver": "123e4567-e89b-12d3-a456-426614174000",
  "patientEmail": "name@gmail.com",
  "secure": false,
  "attachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "attachmentsFromTemplate": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "bodyAttachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text",
      "url": "https://example.com",
      "thumbnailUrl": "https://example.com"
    }
  ],
  "priority": "NO_PRIORITY",
  "source": "USER",
  "templateName": "text",
  "bodyType": "PLAIN_TEXT",
  "senderName": "text",
  "receiverName": "text",
  "status": "WAITING",
  "starred": true
}

Delete email draft

delete
Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
patientIdstring · uuidRequired

UUID of the patient record

uuidstring · uuidRequired

UUID of the resource

Responses
200

Email draft deleted

No content

delete/{tenantName}/{instanceName}/patients/{patientId}/email-drafts/{uuid}
DELETE /{tenantName}/{instanceName}/patients/{patientId}/email-drafts/{uuid} HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update email draft

patch
Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
patientIdstring · uuidRequired

UUID of the patient record

uuidstring · uuidRequired

UUID of the resource

Body
idstring · uuidRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
datestring · date-time · nullableOptional
subjectstringRequired
bodystringRequired
emailEditorJsonstring · nullableOptional
scheduledAtstring · date-time · nullableOptional
senderstring · uuidRead-onlyOptional
receiverstring · uuid · nullableOptional
patientEmailstring · email · nullableOptional
securebooleanOptionalDefault: false
prioritystring · enumOptionalDefault: NO_PRIORITYPossible values:
sourcestring · enumOptionalDefault: USERPossible values:
templateNamestring · nullableOptional
bodyTypestring · enumOptionalDefault: PLAIN_TEXTPossible values:
senderNamestringRead-onlyOptional
receiverNamestringRead-onlyOptional
statusstring · enumRead-onlyOptionalDefault: WAITINGPossible values:
starredbooleanOptional
Responses
200

Updated email draft

application/json
idstring · uuidRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
datestring · date-time · nullableOptional
subjectstringRequired
bodystringRequired
emailEditorJsonstring · nullableOptional
scheduledAtstring · date-time · nullableOptional
senderstring · uuidRead-onlyOptional
receiverstring · uuid · nullableOptional
patientEmailstring · email · nullableOptional
securebooleanOptionalDefault: false
prioritystring · enumOptionalDefault: NO_PRIORITYPossible values:
sourcestring · enumOptionalDefault: USERPossible values:
templateNamestring · nullableOptional
bodyTypestring · enumOptionalDefault: PLAIN_TEXTPossible values:
senderNamestringRead-onlyOptional
receiverNamestringRead-onlyOptional
statusstring · enumRead-onlyOptionalDefault: WAITINGPossible values:
starredbooleanOptional
patch/{tenantName}/{instanceName}/patients/{patientId}/email-drafts/{uuid}
PATCH /{tenantName}/{instanceName}/patients/{patientId}/email-drafts/{uuid} HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 814

{
  "date": "2026-01-01T00:00:00.000Z",
  "subject": "text",
  "body": "text",
  "emailEditorJson": "text",
  "scheduledAt": "2026-01-01T00:00:00.000Z",
  "receiver": "123e4567-e89b-12d3-a456-426614174000",
  "patientEmail": "name@gmail.com",
  "secure": false,
  "attachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "attachmentsFromTemplate": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "bodyAttachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text",
      "url": "https://example.com",
      "thumbnailUrl": "https://example.com"
    }
  ],
  "priority": "NO_PRIORITY",
  "source": "USER",
  "templateName": "text",
  "bodyType": "PLAIN_TEXT",
  "starred": true
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "date": "2026-01-01T00:00:00.000Z",
  "subject": "text",
  "body": "text",
  "emailEditorJson": "text",
  "scheduledAt": "2026-01-01T00:00:00.000Z",
  "sender": "123e4567-e89b-12d3-a456-426614174000",
  "receiver": "123e4567-e89b-12d3-a456-426614174000",
  "patientEmail": "name@gmail.com",
  "secure": false,
  "attachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "attachmentsFromTemplate": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "bodyAttachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text",
      "url": "https://example.com",
      "thumbnailUrl": "https://example.com"
    }
  ],
  "priority": "NO_PRIORITY",
  "source": "USER",
  "templateName": "text",
  "bodyType": "PLAIN_TEXT",
  "senderName": "text",
  "receiverName": "text",
  "status": "WAITING",
  "starred": true
}

Get all Emails

get

Following Query Parameters can be used to sort or find approporiately

We can use any combination of this parameters in single request: Example: {{url}}/{{tenantName}}/{{instanceName}}/patients/{{patientId}}/emails?status=DELIVERED,FAILED&email=some-email@email.com&starred=true

Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
patientIdstring · uuidRequired

UUID of the patient record

Query parameters
sortstringOptional

Sort field and direction, e.g. lastName,asc or createdAt,desc

receiverstringOptional

When specified, search by receiver id

Example: 1971b659-5555-4146-af82-a780532e26cd
directionstringOptional

When specified, search by direction (IN or OUT)

Example: IN
pageintegerOptional

When specified, page number

Default: 0Example: 0
sizeintegerOptional

When specified, size per page

Default: 20Example: 20
starredbooleanOptional

When specified, search by starred (boolean value) field (as an important email)

Example: true
externalIdstringOptionalExample: CADxD4xc1w36r9VVyNxQTSuws+Zrqo_oswUJK+3mD4cdesTBbZw@mail.gmail.com
emailstringOptional

When specified, search by 'to' or 'from' email

fromDatestring · date-timeOptionalExample: 2021-10-14T15:32:17.296Z
toDatestring · date-timeOptionalExample: 2021-10-18T15:32:17.296Z
searchstringOptional

When specified, will execute a search based on subject and body fields

senderstringOptional

When specified, search by sender id

fromstringOptional

When specified, search by 'from' email

tostringOptional

When specified, search by 'to' email

senderNamestringOptional

When specified, search by sender name

receiverNamestringOptional

When specified, search by receiver name

statusstringOptional

When specified, search by status [SCHEDULED, ACCEPTED, DELIVERED, REJECTED, FAILED, UNRECOGNISED]

Responses
200

Paginated list of emails

application/json

Standard paginated response wrapper.

totalElementsintegerOptional

Total number of matching records

totalPagesintegerOptional

Total number of pages

lastbooleanOptional
firstbooleanOptional
numberintegerOptional

Current page number (zero-based)

sizeintegerOptional

Page size

numberOfElementsintegerOptional

Number of elements on the current page

emptybooleanOptional
get/{tenantName}/{instanceName}/patients/{patientId}/emails
GET /{tenantName}/{instanceName}/patients/{patientId}/emails HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "content": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z",
      "createdBy": "123e4567-e89b-12d3-a456-426614174000",
      "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
      "createdByName": "text",
      "updatedByName": "text",
      "sendNow": true,
      "sentAt": "2026-01-01T00:00:00.000Z",
      "receivedAt": "2026-01-01T00:00:00.000Z",
      "deletedAt": "2026-01-01T00:00:00.000Z",
      "date": "2026-01-01T00:00:00.000Z",
      "careTeam": "text",
      "patientInfo": "text",
      "sender": "123e4567-e89b-12d3-a456-426614174000",
      "senderType": "CS_TOOL_CLIENT",
      "senderName": "text",
      "from": "text",
      "receiver": "123e4567-e89b-12d3-a456-426614174000",
      "receiverType": "CS_TOOL_CLIENT",
      "receiverName": "text",
      "to": "text",
      "direction": "OUT",
      "externalId": "text",
      "starred": true,
      "errorMessage": "text",
      "assignedBy": "123e4567-e89b-12d3-a456-426614174000",
      "assignedByName": "text",
      "hasHistory": true,
      "unrecognized": true,
      "subject": "text",
      "body": "text",
      "emailEditorJson": "text",
      "status": "SCHEDULED",
      "secure": false,
      "attachments": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "originalName": "text",
          "size": 1,
          "contentType": "text",
          "storageKey": "text"
        }
      ],
      "attachmentsFromTemplate": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "originalName": "text",
          "size": 1,
          "contentType": "text",
          "storageKey": "text"
        }
      ],
      "bodyAttachments": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "originalName": "text",
          "size": 1,
          "contentType": "text",
          "storageKey": "text",
          "url": "https://example.com",
          "thumbnailUrl": "https://example.com"
        }
      ],
      "messageType": "CARE_TEAM",
      "bodyType": "PLAIN_TEXT",
      "inReplyTo": "text",
      "messageId": "text",
      "skipEvent": true
    }
  ],
  "pageable": {
    "sort": {
      "sorted": true,
      "unsorted": true,
      "empty": true
    },
    "pageSize": 1,
    "pageNumber": 1,
    "offset": 1,
    "unpaged": true,
    "paged": true
  },
  "totalElements": 1,
  "totalPages": 1,
  "last": true,
  "first": true,
  "number": 1,
  "size": 1,
  "numberOfElements": 1,
  "empty": true,
  "sort": {
    "sorted": true,
    "unsorted": true,
    "empty": true
  }
}

Get Email by ID

get

Getting an email by ID

Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
patientIdstring · uuidRequired

UUID of the patient record

uuidstring · uuidRequired

UUID of the resource

Responses
200

Email record

application/json
idstring · uuidRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
createdBystring · uuidRead-onlyOptional
updatedBystring · uuidRead-onlyOptional
createdByNamestringRead-onlyOptional
updatedByNamestringRead-onlyOptional
sendNowbooleanOptional
sentAtstring · date-time · nullableOptional
receivedAtstring · date-time · nullableOptional
deletedAtstring · date-time · nullableOptional
datestring · date-time · nullableOptional
careTeamstring · nullableOptional
patientInfostring · nullableOptional
senderstring · uuidRequired
senderTypestring · enumOptionalPossible values:
senderNamestring · nullableOptional
fromstring · nullableOptional
receiverstring · uuid · nullableOptional
receiverTypestring · enumOptionalPossible values:
receiverNamestring · nullableOptional
tostring · nullableOptional
directionstring · enumOptionalPossible values:
externalIdstring · nullableOptional
starredbooleanOptional
errorMessagestring · nullableOptional
assignedBystring · uuid · nullableRead-onlyOptional
assignedByNamestring · nullableRead-onlyOptional
hasHistorybooleanRead-onlyOptional
unrecognizedbooleanRead-onlyOptional
subjectstring · nullableOptional
bodystringRequired
emailEditorJsonstring · nullableOptional
statusstring · enumOptionalPossible values:
securebooleanOptionalDefault: false
messageTypestring · enumOptionalDefault: CARE_TEAMPossible values:
bodyTypestring · enumOptionalDefault: PLAIN_TEXTPossible values:
inReplyTostring · nullableOptional
messageIdstring · nullableOptional
skipEventbooleanOptional
get/{tenantName}/{instanceName}/patients/{patientId}/emails/{uuid}
GET /{tenantName}/{instanceName}/patients/{patientId}/emails/{uuid} HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z",
  "createdBy": "123e4567-e89b-12d3-a456-426614174000",
  "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
  "createdByName": "text",
  "updatedByName": "text",
  "sendNow": true,
  "sentAt": "2026-01-01T00:00:00.000Z",
  "receivedAt": "2026-01-01T00:00:00.000Z",
  "deletedAt": "2026-01-01T00:00:00.000Z",
  "date": "2026-01-01T00:00:00.000Z",
  "careTeam": "text",
  "patientInfo": "text",
  "sender": "123e4567-e89b-12d3-a456-426614174000",
  "senderType": "CS_TOOL_CLIENT",
  "senderName": "text",
  "from": "text",
  "receiver": "123e4567-e89b-12d3-a456-426614174000",
  "receiverType": "CS_TOOL_CLIENT",
  "receiverName": "text",
  "to": "text",
  "direction": "OUT",
  "externalId": "text",
  "starred": true,
  "errorMessage": "text",
  "assignedBy": "123e4567-e89b-12d3-a456-426614174000",
  "assignedByName": "text",
  "hasHistory": true,
  "unrecognized": true,
  "subject": "text",
  "body": "text",
  "emailEditorJson": "text",
  "status": "SCHEDULED",
  "secure": false,
  "attachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "attachmentsFromTemplate": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text"
    }
  ],
  "bodyAttachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "text",
      "size": 1,
      "contentType": "text",
      "storageKey": "text",
      "url": "https://example.com",
      "thumbnailUrl": "https://example.com"
    }
  ],
  "messageType": "CARE_TEAM",
  "bodyType": "PLAIN_TEXT",
  "inReplyTo": "text",
  "messageId": "text",
  "skipEvent": true
}

Download email attachment

get

Request to receive email attachment.

emailId - email ID

fileId - file id to be taken from the attachments block

Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
patientIdstring · uuidRequired

UUID of the patient record

emailIdstring · uuidRequired

emailId path parameter

fileIdstring · uuidRequired

UUID of the uploaded file

Responses
200

Binary attachment file.

No content

get/{tenantName}/{instanceName}/patients/{patientId}/emails/{emailId}/attachments/{fileId}
GET /{tenantName}/{instanceName}/patients/{patientId}/emails/{emailId}/attachments/{fileId} HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated

Was this helpful?