Skip to main content

Comms API (1.0)

Consumer Health Platform - Comms API - Open API docs

Authentication

bearer

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "jwt"

Messages

/messages/send-email

Endpoint to send emails

Request Body schema: application/json
categories
Array of strings
Default: []

Email category for reporting e.g ["transactional", "update"]

object
Default: {"userId":null,"orderId":null}
required
object

Labels to tag the message with

required
object (From)
required
object (To)
required
object (Template)

Responses

Request samples

Content type
application/json
{
  • "categories": [ ],
  • "upstreamReferences": {
    },
  • "labels": {
    },
  • "from": {
    },
  • "to": {
    },
  • "template": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string"
}

/messages/send-sms

Endpoint to send sms

Request Body schema: application/json
from
required
string

The sending phone number

to
required
string

The recipient phone number

body
required
string

The content string that makes up the sms message

required
object

Labels to tag the message with

categories
Array of strings
Default: []

Sms category for reporting e.g ["transactional", "update"]

object or null
Default: {}
object or null

Responses

Request samples

Content type
application/json
{
  • "from": "string",
  • "to": "string",
  • "body": "string",
  • "labels": {
    },
  • "categories": [ ],
  • "upstreamReferences": { },
  • "question": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string"
}

/messages/{id}/resend

Endpoint to re-send emails and sms

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string"
}

/messages

Endpoint to retrieve emails and sms

query Parameters
orderId
string
userId
string
emailAddress
string
phoneNumber
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 0
}

Preferences

/preferences

Endpoint to create communication preferences

Request Body schema: application/json
required
object (Labels)
required
object (Labels)

Responses

Request samples

Content type
application/json
{
  • "sms": {
    },
  • "email": {
    }
}

Response samples

Content type
application/json
{
  • "token": "string"
}

/preferences/{token}

Endpoint to update communication preferences

path Parameters
token
required
string
Request Body schema: application/json
required
object (Labels)
required
object (Labels)

Responses

Request samples

Content type
application/json
{
  • "sms": {
    },
  • "email": {
    }
}

Response samples

Content type
application/json
{
  • "token": "string"
}

/preferences/{token}

Endpoint to get communication preferences

path Parameters
token
required
string

Responses

Response samples

Content type
application/json
{
  • "sms": {
    },
  • "email": {
    },
  • "token": "string",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Health

/healthz

Endpoint for healthcheck

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "info": {
    },
  • "error": { },
  • "details": {
    }
}

/healthz/ready

Endpoint for readyness

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "info": {
    },
  • "error": { },
  • "details": {
    }
}