Get a list with Contacts.
GET
https://api.usetrust.app/v1/contacts/all/{workspaceId}
Path Parameters
- workspaceIdstringrequiredDescription
Responses
200
- Contact[]
- idstring<uuid>
- createdstring<date-time>
- firstNamestring
- lastNamestring
- phonestring
- emailstring
- imageUrlstring
204
400
- string
500
- string
curl
curl --request GET \
--url https://api.usetrust.app/v1/contacts/all/{workspaceId} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.usetrust.app/v1/contacts/all/{workspaceId}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.usetrust.app/v1/contacts/all/{workspaceId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.usetrust.app/v1/contacts/all/{workspaceId}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
csharp
var options = new RestClientOptions("https://api.usetrust.app")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/v1/contacts/all/{workspaceId}", Method.Get);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);200
// Returns a list with all contacts.
[
{
"id": "",
"created": "",
"firstName": "",
"lastName": "",
"phone": "",
"email": "",
"imageUrl": ""
}
]204
// No Content
400
// Bad Request
""500
// Internal Server Error
""