Skip to main content

Contact APIs (1)

Download OpenAPI specification:Download

A collection of APIs used to get and set contact related data

Contact

Get Contacts

An end point that returns the list of contacts

query Parameters
email
string <email>
Example: email=john@example.com

An email value to filter the returned contacts

firstName
string <= 50 characters
Example: firstName=Ryan

A first name value to filter the returned contacts

lastName
string

A last name value to filter the returned contacts

pageNumber
required
integer >= 1
Default: 1

The current page number of the selected data

pageSize
required
integer >= 1
Default: 200

The maximum amount of data to return in one request

orderBy
required
string
Default: "email"

The field to order the records by

Responses

Response samples

Content type
application/json
{
  • "pageNumber": 1,
  • "pageSize": 0,
  • "recordsTotal": 0,
  • "recordsFiltered": 0,
  • "data": [
    ]
}

Create Contact

Add a new contact

Request Body schema: application/json
firstName
string <= 50 characters
lastName
string <= 50 characters
phoneNumber
string <= 15 characters ^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]...
email
required
string <email>

The email address of the contact

isSubscribed
required
boolean
Default: true
addressLine1
string <= 50 characters
addressLine2
string <= 50 characters
city
string <= 50 characters
state
string <= 50 characters
countryCode
string <= 50 characters
postalCode
string [ 5 .. 9 ] characters
companyName
string <= 50 characters
title
string <= 50 characters
reason
required
string
Default: "business"
Enum: "business" "question" "other" "project" "interest" "subscription"

The type of contact request

details
string <= 2000 characters
url
string <uri>

Responses

Request samples

Content type
application/json
{
  • "firstName": "string",
  • "lastName": "string",
  • "phoneNumber": "string",
  • "email": "user@example.com",
  • "isSubscribed": true,
  • "addressLine1": "string",
  • "addressLine2": "string",
  • "city": "string",
  • "state": "string",
  • "countryCode": "string",
  • "postalCode": "string",
  • "companyName": "string",
  • "title": "string",
  • "reason": "business",
  • "details": "string",
}

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000"
}

Get Contact By Id

An end point that returns data for a specific contact

path Parameters
id
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The records guid

Responses

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000",
  • "createdOn": "2022-03-19 04:24:02.190",
  • "createdBy": "PSUL",
  • "updatedOn": "2022-10-12 14:01:13.000",
  • "updatedBy": "PSUL",
  • "firstName": "string",
  • "lastName": "string",
  • "phoneNumber": "string",
  • "email": "user@example.com",
  • "isSubscribed": true,
  • "addressLine1": "string",
  • "addressLine2": "string",
  • "city": "string",
  • "state": "string",
  • "countryCode": "string",
  • "postalCode": "string",
  • "details": [
    ]
}

Update Contact

An end point that updates an existing contact

path Parameters
id
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The records guid

Request Body schema: application/json
firstName
string <= 50 characters
lastName
string <= 50 characters
phoneNumber
string <= 15 characters ^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]...
email
required
string <email>

The email address of the contact

isSubscribed
required
boolean
Default: true
addressLine1
string <= 50 characters
addressLine2
string <= 50 characters
city
string <= 50 characters
state
string <= 50 characters
countryCode
string <= 50 characters
postalCode
string [ 5 .. 9 ] characters

Responses

Request samples

Content type
application/json
{
  • "firstName": "string",
  • "lastName": "string",
  • "phoneNumber": "string",
  • "email": "user@example.com",
  • "isSubscribed": true,
  • "addressLine1": "string",
  • "addressLine2": "string",
  • "city": "string",
  • "state": "string",
  • "countryCode": "string",
  • "postalCode": "string"
}

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000"
}

Get Contact Details

An end point that returns detail data for a specific contact

path Parameters
id
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The records guid

query Parameters
reason
string
Enum: "business" "question" "other" "project" "interest"

An reason type value to filter the returned contact details

pageNumber
required
integer >= 1
Default: 1

The current page number of the selected data

pageSize
required
integer >= 1
Default: 200

The maximum amount of data to return in one request

orderBy
required
string
Default: "details"

The field to filter data by

Responses

Response samples

Content type
application/json
{
  • "pageNumber": 1,
  • "pageSize": 0,
  • "recordsTotal": 0,
  • "recordsFiltered": 0,
  • "data": [
    ]
}

Create Contact Detail

An end point that adds a new detail to an existing contact

path Parameters
id
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

The records guid

Responses

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000"
}

Get Subscriptions

An end point that returns a list of emails on the subscription list

query Parameters
pageNumber
required
integer >= 1
Default: 1

The current page number of the selected data

pageSize
required
integer >= 1
Default: 200

The maximum amount of data to return in one request

orderBy
required
string
Default: "email"

The field to order the data by

Responses

Response samples

Content type
application/json
{
  • "pageNumber": 1,
  • "pageSize": 0,
  • "recordsTotal": 0,
  • "recordsFiltered": 0,
  • "data": [
    ]
}

Get Subscription By Email

An end point that returns a boolean value indicating if the specified email is on the subscription list

path Parameters
email
required
string <email>
Example: example@abc.com

The email of the subscription

Responses

Response samples

Content type
application/json
false

Subscribe

Add a new email address to the subcription list

path Parameters
email
required
string <email>
Example: example@abc.com

The email of the subscription

Responses

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000"
}

Unsubscribe

Remove an existing email address from the subcription list

path Parameters
email
required
string <email>
Example: example@abc.com

The email of the subscription

Responses

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000"
}