Base Path: /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/addressbook
Version: 3.5.0
Client applications can view their Address Book, create new contacts, update or delete existing contacts and query for contacts that match specific criteria using the Address Book resource collection.
Authorization: OAuth 2.0 Bearer token is required to access the resources of this API. Once signed up, credentials and URL to access the OAuth API can be found on My Apps Page.
GET /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/addressbook/
Retrieves the address book of the user.
Name
Type
Data Type
Description
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully retrieved the address book.
401
Your API key or access token has expired or is invalid.
curl -X GET "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/addressbook/" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/addressbook/contact
Creates a new contact in the user's address book.
Name
Type
Data Type
Description
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"firstName": "test",
"lastName": "",
"email": "example.portal@example.com",
"title": "Mr",
"organisation": "Orion",
"specialisation": "Dermatology",
"contactGroupIds": []
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully created a contact.
400
Cannot create the contact, because we detected another contact with the same Direct email address.
401
Your API key or access token has expired or is invalid.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/addressbook/contact" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"firstName":"test","lastName":"","email":"example.portal@example.com","title":"Mr","organisation":"Orion","specialisation":"Dermatology","contactGroupIds":[]}'
GET /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/addressbook/contact/{contactId}
Retrieves a contact using the contact ID.
Name
Type
Data Type
Description
Name:
contactId
required
Type:
path
Data Type:
number
Description:
Unique identifier of the contact.
Sample Value: 12
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
We found contact with that unique identifier.
400
Your request was invalid. A parameter, or the data in a parameter, may be incorrect.
401
Your API key or access token has expired or is invalid.
404
Cannot find a contact with that unique identifier.
curl -X GET "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/addressbook/contact/12" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/addressbook/contact/{contactId}
Updates the details of an existing contact.
Name
Type
Data Type
Description
Name:
contactId
required
Type:
path
Data Type:
number
Description:
Unique identifier of the contact.
Sample Value: 12
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"contactId": 2,
"firstName": "test",
"lastName": "update",
"email": "example.portal@example.com",
"title": "Mr",
"organisation": "Orion",
"specialisation": "Dermatology",
"contactGroupIds": []
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully updated the contact's details.
400
Cannot update the contact, because we detected another contact with the same Direct email address.
401
Your API key or access token has expired or is invalid.
404
Cannot find a contact with that unique identifier.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/addressbook/contact/12" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"contactId":2,"firstName":"test","lastName":"update","email":"example.portal@example.com","title":"Mr","organisation":"Orion","specialisation":"Dermatology","contactGroupIds":[]}'
DELETE /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/addressbook/contact/{contactId}
Deletes a contact from the user's address book.
Name
Type
Data Type
Description
Name:
contactId
required
Type:
path
Data Type:
number
Description:
Unique identifier of the contact.
Sample Value: 1
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully deleted a contact with that unique identifier.
401
Your API key or access token has expired or is invalid.
404
Cannot find a contact with that unique identifier.
curl -X DELETE "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/addressbook/contact/1" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/addressbook/contactgroup
Creates a new contact group in the user's address book.
Name
Type
Data Type
Description
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"name": "Test Contact Group",
"description": "Test Contact Group Description",
"contacts": [
{
"contactId": 3,
"firstName": "User",
"lastName": "Test",
"email": "test@example.com",
"title": "Mr"
}
]
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully created a contact group.
400
Your request was invalid. A parameter, or the data in a parameter, may be incorrect.
401
Your API key or access token has expired or is invalid.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/addressbook/contactgroup" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"name":"Test Contact Group","description":"Test Contact Group Description","contacts":[{"contactId":3,"firstName":"User","lastName":"Test","email":"test@example.com","title":"Mr"}]}'
GET /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/addressbook/contactgroup/{contactGroupId}
Retrieves a contact group from the user's address book.
Name
Type
Data Type
Description
Name:
contactGroupId
required
Type:
path
Data Type:
number
Description:
Unique identifier of the contact group.
Sample Value: 3
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
We found a contact group with that unique identifier.
401
Your API key or access token has expired or is invalid.
404
Cannot find a contact group with that unique identifier.
curl -X GET "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/addressbook/contactgroup/3" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/addressbook/contactgroup/{contactGroupId}
Updates a contact group in the user's address book.
Name
Type
Data Type
Description
Name:
contactGroupId
required
Type:
path
Data Type:
number
Description:
Unique identifier of the contact group.
Sample Value: 3
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"contactId": 2,
"name": "Test Contact Group",
"description": "Test Contact Group Description",
"contacts": [
{
"contactId": 3,
"firstName": "User",
"lastName": "Test",
"email": "test@example.com",
"title": "Mr"
}
]
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully updated a contact group with that unique identifier.
400
Cannot update the contact group, because the name of the contact group or the contact you are trying to add to the group is invalid.
401
Your API key or access token has expired or is invalid.
404
Cannot find a contact group with that unique identifier.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/addressbook/contactgroup/3" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"contactId":2,"name":"Test Contact Group","description":"Test Contact Group Description","contacts":[{"contactId":3,"firstName":"User","lastName":"Test","email":"test@example.com","title":"Mr"}]}'
DELETE /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/addressbook/contactgroup/{contactGroupId}
Deletes a contact group in the user's address book.
Name
Type
Data Type
Description
Name:
contactGroupId
required
Type:
path
Data Type:
number
Description:
Unique identifier of the contact group.
Sample Value: 3
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully deleted a contact group with that unique identifier.
401
Your API key or access token has expired or is invalid.
404
Cannot find a contact group with that unique identifier.
curl -X DELETE "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/addressbook/contactgroup/3" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'