Contacts

Get a user's emails

get
Authorizations
Path parameters
user-idstringRequired

numeric user id

Responses
200
the response
application/json
get
GET /api/users/{user-id}/contacts/emails HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

the response

[
  {
    "id": 1,
    "target": "text",
    "status": "OK"
  }
]

Create a new email

post
Authorizations
Path parameters
user-idstringRequired

numeric user id

Body
targetstringOptional
Responses
201
the response
application/json
post
POST /api/users/{user-id}/contacts/emails HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "target": "text"
}
201

the response

{
  "id": 1,
  "target": "text",
  "status": "OK"
}

Get a specific email

get
Authorizations
Path parameters
user-idstringRequired

numeric user id

idnumberRequired

entity ID

Responses
200
the response
application/json
get
GET /api/users/{user-id}/contacts/emails/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

the response

{
  "id": 1,
  "target": "text",
  "status": "OK"
}

Update a user's email

put
Authorizations
Path parameters
user-idstringRequired

numeric user id

idnumberRequired

entity ID

Body
targetstringOptional
Responses
200
the response
application/json
put
PUT /api/users/{user-id}/contacts/emails/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "target": "text"
}
200

the response

{
  "id": 1,
  "target": "text",
  "status": "OK"
}

Delete the user's specified email

delete
Authorizations
Path parameters
user-idstringRequired

numeric user id

idnumberRequired

entity ID

Responses
204
if deletion was successful
delete
DELETE /api/users/{user-id}/contacts/emails/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
204

if deletion was successful

No content

Get a user's phone numbers

get
Authorizations
Path parameters
user-idstringRequired

numeric user id

Responses
200
the response
application/json
get
GET /api/users/{user-id}/contacts/phone-numbers HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

the response

[
  {
    "id": 1,
    "regionCode": "text",
    "target": "text",
    "primary": true,
    "status": "OK"
  }
]

Create a phone number

post
Authorizations
Path parameters
user-idstringRequired

numeric user id

Body
regionCodestringOptional
targetstringOptional
primarybooleanOptional

May only be enabled for a single phone number contact at a time

Responses
201
the response
application/json
post
POST /api/users/{user-id}/contacts/phone-numbers HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "regionCode": "text",
  "target": "text",
  "primary": true
}
201

the response

{
  "id": 1,
  "regionCode": "text",
  "target": "text",
  "primary": true,
  "status": "OK"
}

Get specific phone number

get
Authorizations
Path parameters
user-idstringRequired

numeric user id

idnumberRequired

entity ID

Responses
200
the response
application/json
get
GET /api/users/{user-id}/contacts/phone-numbers/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200

the response

{
  "id": 1,
  "regionCode": "text",
  "target": "text",
  "primary": true,
  "status": "OK"
}

Update a user's phone number

put
Authorizations
Path parameters
user-idstringRequired

numeric user id

idnumberRequired

entity ID

Body
regionCodestringOptional
targetstringOptional
primarybooleanOptional

May only be enabled for a single phone number contact at a time

Responses
200
the response
application/json
put
PUT /api/users/{user-id}/contacts/phone-numbers/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "regionCode": "text",
  "target": "text",
  "primary": true
}
200

the response

{
  "id": 1,
  "regionCode": "text",
  "target": "text",
  "primary": true,
  "status": "OK"
}

Delete the user's specified phone number

delete
Authorizations
Path parameters
user-idstringRequired

numeric user id

idnumberRequired

entity ID

Responses
204
if deletion was successful
delete
DELETE /api/users/{user-id}/contacts/phone-numbers/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
204

if deletion was successful

No content

Was this helpful?