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.
| Field | Type | Description |
|---|---|---|
idinteger | integer | ID of the workspace. |
keystring | string | The workspace key: 6 lowercase letters and digits. It is the apiKey of the JavaScript SDK. |
titlestring | string | Name of the workspace. |
array of objects | array of objects | Team members of the workspace. The list also includes removed team members and pending invitations. |
agents[].integer | integer | ID of the team member. |
agents[].string | string | Name of the team member. |
agents[].string | string | Email address of the team member. |
agents[].string | string | Role of the team member. Currently always agent, the workspace owner included. |
agents[].integer | integer | 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. |
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.