1 get:
2 operationId: GetUsersId
3 summary: Get a User
4 description: >-
5 Retrieve a user by its ID. You can expand the user's relations or select the
6 fields that should be returned.
7 x-authenticated: true
8 parameters:
9 - name: id
10 in: path
11 description: The user's ID.
12 required: true
13 schema:
14 type: string
15 - name: fields
16 in: query
17 description: >-
18 Comma-separated fields that should be included in the returned data. if
19 a field is prefixed with `+` it will be added to the default fields,
20 using `-` will remove it from the default fields. without prefix it will
21 replace the entire default fields.
22 required: false
23 schema:
24 type: string
25 title: fields
26 description: >-
27 Comma-separated fields that should be included in the returned data.
28 if a field is prefixed with `+` it will be added to the default
29 fields, using `-` will remove it from the default fields. without
30 prefix it will replace the entire default fields.
31 externalDocs:
32 url: '#select-fields-and-relations'
33 x-codeSamples:
34 - lang: JavaScript
35 label: JS SDK
36 source:
37 $ref: ../code_samples/JavaScript/admin_users_{id}/get.js
38 - lang: Shell
39 label: cURL
40 source:
41 $ref: ../code_samples/Shell/admin_users_{id}/get.sh
42 tags:
43 - Users
44 responses:
45 '200':
46 description: OK
47 content:
48 application/json:
49 schema:
50 $ref: ../components/schemas/AdminUserResponse.yaml
51 '400':
52 $ref: ../components/responses/400_error.yaml
53 '401':
54 $ref: ../components/responses/unauthorized.yaml
55 '404':
56 $ref: ../components/responses/not_found_error.yaml
57 '409':
58 $ref: ../components/responses/invalid_state_error.yaml
59 '422':
60 $ref: ../components/responses/invalid_request_error.yaml
61 '500':
62 $ref: ../components/responses/500_error.yaml
63 security:
64 - cookie_auth: []
65 - jwt_token: []
66 post:
67 operationId: PostUsersId
68 summary: Update a User
69 description: Update a user's details.
70 x-authenticated: true
71 parameters:
72 - name: id
73 in: path
74 description: The user's ID.
75 required: true
76 schema:
77 type: string
78 - name: fields
79 in: query
80 description: >-
81 Comma-separated fields that should be included in the returned data. if
82 a field is prefixed with `+` it will be added to the default fields,
83 using `-` will remove it from the default fields. without prefix it will
84 replace the entire default fields.
85 required: false
86 schema:
87 type: string
88 title: fields
89 description: >-
90 Comma-separated fields that should be included in the returned data.
91 if a field is prefixed with `+` it will be added to the default
92 fields, using `-` will remove it from the default fields. without
93 prefix it will replace the entire default fields.
94 externalDocs:
95 url: '#select-fields-and-relations'
96 requestBody:
97 content:
98 application/json:
99 schema:
100 $ref: ../components/schemas/AdminUpdateUser.yaml
101 x-codeSamples:
102 - lang: JavaScript
103 label: JS SDK
104 source:
105 $ref: ../code_samples/JavaScript/admin_users_{id}/post.js
106 - lang: Shell
107 label: cURL
108 source:
109 $ref: ../code_samples/Shell/admin_users_{id}/post.sh
110 tags:
111 - Users
112 responses:
113 '200':
114 description: OK
115 content:
116 application/json:
117 schema:
118 $ref: ../components/schemas/AdminUserResponse.yaml
119 '400':
120 $ref: ../components/responses/400_error.yaml
121 '401':
122 $ref: ../components/responses/unauthorized.yaml
123 '404':
124 $ref: ../components/responses/not_found_error.yaml
125 '409':
126 $ref: ../components/responses/invalid_state_error.yaml
127 '422':
128 $ref: ../components/responses/invalid_request_error.yaml
129 '500':
130 $ref: ../components/responses/500_error.yaml
131 x-workflow: updateUsersWorkflow
132 security:
133 - cookie_auth: []
134 - jwt_token: []
135 x-events:
136 - name: user.updated
137 payload: |-
138 ```ts
139 {
140 id, // The ID of the user
141 }
142 ```
143 description: Emitted when users are updated.
144 deprecated: false
145 delete:
146 operationId: DeleteUsersId
147 summary: Delete a User
148 description: Delete a user.
149 x-authenticated: true
150 parameters:
151 - name: id
152 in: path
153 description: The user's ID.
154 required: true
155 schema:
156 type: string
157 x-codeSamples:
158 - lang: JavaScript
159 label: JS SDK
160 source:
161 $ref: ../code_samples/JavaScript/admin_users_{id}/delete.js
162 - lang: Shell
163 label: cURL
164 source:
165 $ref: ../code_samples/Shell/admin_users_{id}/delete.sh
166 tags:
167 - Users
168 responses:
169 '200':
170 description: OK
171 content:
172 application/json:
173 schema:
174 $ref: ../components/schemas/AdminUserDeleteResponse.yaml
175 '400':
176 $ref: ../components/responses/400_error.yaml
177 '401':
178 $ref: ../components/responses/unauthorized.yaml
179 '404':
180 $ref: ../components/responses/not_found_error.yaml
181 '409':
182 $ref: ../components/responses/invalid_state_error.yaml
183 '422':
184 $ref: ../components/responses/invalid_request_error.yaml
185 '500':
186 $ref: ../components/responses/500_error.yaml
187 x-workflow: removeUserAccountWorkflow
188 security:
189 - cookie_auth: []
190 - jwt_token: []
191 x-events:
192 - name: user.deleted
193 payload: |-
194 ```ts
195 {
196 id, // The ID of the user
197 }
198 ```
199 description: Emitted when users are deleted.
200 deprecated: false