Skip to content

Commit 5fa01c4

Browse files
committed
Users API
1 parent 8b1c9ec commit 5fa01c4

File tree

3 files changed

+154
-3
lines changed

3 files changed

+154
-3
lines changed

docs/api/users.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# API Endpoints: Users
2+
3+
## Invite User
4+
5+
* Requires [authentication](/api/about.html#api-key)
6+
* Requires Administrator user type
7+
8+
#### Request
9+
10+
**POST** `https://webhook.site/users/invite`
11+
12+
* `name` (string) The name of the user.
13+
* `email` (string) The user's email, and where the invite is sent.
14+
* `user_type_id` (int) One of: `100` (Administrator), `200` (Member), `300` (Viewer)
15+
16+
```json
17+
{
18+
"name": "Elijah Craig",
19+
"email": "[email protected]",
20+
"user_type_id": 300,
21+
"role_id": 20001
22+
}
23+
```
24+
25+
#### Response
26+
27+
```json
28+
{
29+
"id": 30001
30+
"name": "Elijah Craig",
31+
"email": "[email protected]",
32+
"user_type_id": 300
33+
"team_id": 10001,
34+
"roles": [
35+
{
36+
"id": 20001,
37+
"team_id": 10001,
38+
"name": "Test Role",
39+
"created_at": "2024-10-15T10:19:07.000000Z",
40+
"updated_at": "2025-02-17T12:00:48.000000Z"
41+
}
42+
]
43+
"updated_at": "2025-09-29T08:18:56.000000Z",
44+
"created_at": "2025-09-29T08:18:56.000000Z"
45+
}
46+
```
47+
48+
## Get all Users
49+
50+
* Requires [authentication](/api/about.html#api-key)
51+
* Requires Administrator user type
52+
53+
#### Request
54+
55+
**GET** `https://webhook.site/users`
56+
57+
#### Response
58+
59+
```json
60+
{
61+
"current_page": 1,
62+
"data": [
63+
{
64+
"id": 1001,
65+
"name": "Jim Beam",
66+
"email": "[email protected]",
67+
"two_factor_enabled": 0,
68+
"created_at": "2020-01-08T21:34:25.000000Z",
69+
"updated_at": "2025-02-27T10:50:13.000000Z",
70+
"last_login_at": "2025-09-29T07:59:15.000000Z",
71+
"team_id": 10001,
72+
"user_type_id": 100
73+
},
74+
{
75+
"id": 30001
76+
"name": "Elijah Craig",
77+
"email": "[email protected]",
78+
"two_factor_enabled": 0,
79+
"created_at": "2025-02-13T13:22:48.000000Z",
80+
"updated_at": "2025-08-01T16:05:20.000000Z",
81+
"last_login_at": "2025-09-23T07:52:15.000000Z",
82+
"team_id": 10001,
83+
"user_type_id": 300
84+
}
85+
],
86+
"first_page_url": "https:\/\/webhook.site\/users?page=1",
87+
"from": 1,
88+
"last_page": 1,
89+
"last_page_url": "https:\/\/webhook.site\/users?page=1",
90+
"links": [
91+
{
92+
"url": null,
93+
"label": "« Previous",
94+
"active": false
95+
},
96+
{
97+
"url": "https:\/\/webhook.site\/users?page=1",
98+
"label": "1",
99+
"active": true
100+
},
101+
{
102+
"url": null,
103+
"label": "Next »",
104+
"active": false
105+
}
106+
],
107+
"next_page_url": null,
108+
"path": "https:\/\/webhook.site\/users",
109+
"per_page": 15,
110+
"prev_page_url": null,
111+
"to": 2,
112+
"total": 2
113+
}
114+
```
115+
116+
## Update User
117+
118+
#### Request
119+
120+
**PUT** <code>https://webhook.site/users/<span class="url-param">userId</span></code>
121+
122+
* `name` (string) The name of the user.
123+
* `email` (string)
124+
* `user_type_id` (int) One of: `100` (Administrator), `200` (Member), `300` (Viewer)
125+
126+
```json
127+
{
128+
"name": "Elijah Craig",
129+
"email": "[email protected]",
130+
"user_type_id": 300,
131+
"role_id": 20001,
132+
}
133+
```
134+
135+
#### Response
136+
137+
(See *Create User* above for response.)
138+
139+
## Delete User
140+
141+
#### Request
142+
143+
**DELETE** <code>https://webhook.site/users/<span class="url-param">userId</span></code>
144+
145+
#### Response
146+
147+
`204 No content`

docs/news.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ Subscribe below to receive updates about improvements and new features on Webhoo
2424
</form>
2525
</div>
2626

27+
## 29 September
28+
29+
* Added [Users API](/api/users.html) for inviting and managing users.
30+
2731
## 22 September
2832

2933
* Added `$error.[action]$` variable that is automatically created whenever an action result in an error.

mkdocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ nav:
9292
- WebSocket: api/websocket.md
9393
- Tokens (URLs): api/tokens.md
9494
- Requests: api/requests.md
95-
- Groups: api/groups.md
9695
- Custom Actions: api/custom-actions.md
96+
- Global Variables: api/global-variables.md
9797
- Templates: api/templates.md
9898
- Schedules: api/schedules.md
99-
- Global Variables: api/global-variables.md
100-
99+
- Users: api/users.md
100+
- Groups: api/groups.md

0 commit comments

Comments
 (0)