GET/ application/
Application info
Returns your workspace (application) and its team members.
Each team member comes with an id, name, email and status. You need a team member's id when you create records on their behalf, for example a message sent as an agent.
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/application/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"
const response = await fetch(
"https://<your_app_subdomain>.user.com/api/public/application/",
{
method: "GET",
headers: {
Authorization: "Token <your_64_char_api_key>",
Accept: "*/*; version=2",
},
},
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://<your_app_subdomain>.user.com/api/public/application/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Token <your_64_char_api_key>",
"Accept: */*; version=2",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
response = requests.get(
"https://<your_app_subdomain>.user.com/api/public/application/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
)
print(response.json())
Response examples
- 200 OK
{"id": 1,"key": "ab12cd","title": "My workspace","agents": [{"id": 2,"name": "Jane Agent","email": "agent@example.com","status": "agent","group_id": 2}]}Response fields
Fields returned in the 200 OK response body.
- id
- ID of the workspace.
- key
- The workspace key: 6 lowercase letters and digits. It is the
apiKeyof the JavaScript SDK. - title
- Name of the workspace.
- agents
- Team members of the workspace. The list also includes removed team members and pending invitations.
- agents[].
id - ID of the team member.
- agents[].
name - Name of the team member.
- agents[].
email - Email address of the team member.
- agents[].
status - Role of the team member. Currently always
agent, the workspace owner included. - agents[].
group_id - ID of the team member's own automatic group (every team member has one). It is not a team member group created in Settings. Not returned for removed team members.
- agents[].
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.