Raw
1 get:
2 operationId: GetInvites
3 summary: List Invites
4 description: >-
5 Retrieve a list of invites. The invites can be filtered by fields such as
6 `id`. The invites can also be sorted or paginated.
7 x-authenticated: true
8 parameters:
9 - name: fields
10 in: query
11 description: >-
12 Comma-separated fields that should be included in the returned data. if
13 a field is prefixed with `+` it will be added to the default fields,
14 using `-` will remove it from the default fields. without prefix it will
15 replace the entire default fields.
16 required: false
17 schema:
18 type: string
19 title: fields
20 description: >-
21 Comma-separated fields that should be included in the returned data.
22 if a field is prefixed with `+` it will be added to the default
23 fields, using `-` will remove it from the default fields. without
24 prefix it will replace the entire default fields.
25 externalDocs:
26 url: '#select-fields-and-relations'
27 - name: offset
28 in: query
29 description: The number of items to skip when retrieving a list.
30 required: false
31 schema:
32 type: number
33 title: offset
34 description: The number of items to skip when retrieving a list.
35 externalDocs:
36 url: '#pagination'
37 - name: limit
38 in: query
39 description: Limit the number of items returned in the list.
40 required: false
41 schema:
42 type: number
43 title: limit
44 description: Limit the number of items returned in the list.
45 externalDocs:
46 url: '#pagination'
47 - name: order
48 in: query
49 description: >-
50 The field to sort the data by. By default, the sort order is ascending.
51 To change the order to descending, prefix the field name with `-`.
52 required: false
53 schema:
54 type: string
55 title: order
56 description: >-
57 The field to sort the data by. By default, the sort order is
58 ascending. To change the order to descending, prefix the field name
59 with `-`.
60 - name: q
61 in: query
62 description: Search term to apply on an invite's searchable properties.
63 required: false
64 schema:
65 type: string
66 title: q
67 description: Search term to apply on an invite's searchable properties.
68 - name: id
69 in: query
70 required: false
71 schema:
72 oneOf:
73 - type: string
74 title: id
75 description: Filter by an invite's ID.
76 - type: array
77 description: Filter by invite IDs.
78 items:
79 type: string
80 title: id
81 description: An invite's ID.
82 - name: email
83 in: query
84 required: false
85 schema:
86 oneOf:
87 - type: string
88 title: email
89 description: Filter by an invite's email.
90 format: email
91 - type: array
92 description: Filter by invite emails.
93 items:
94 type: string
95 title: email
96 description: An email.
97 format: email
98 - name: created_at
99 in: query
100 description: Filter by the invite's creation date.
101 required: false
102 schema:
103 type: object
104 description: Filter by the invite's creation date.
105 properties:
106 $and:
107 type: array
108 description: >-
109 Join query parameters with an AND condition. Each object's content
110 is the same type as the expected query parameters.
111 items:
112 type: object
113 title: $and
114 $or:
115 type: array
116 description: >-
117 Join query parameters with an OR condition. Each object's content
118 is the same type as the expected query parameters.
119 items:
120 type: object
121 title: $or
122 $eq:
123 oneOf:
124 - type: string
125 title: $eq
126 description: Filter by an exact match.
127 - type: array
128 description: Filter by an exact match.
129 items:
130 type: string
131 title: $eq
132 description: Filter by an exact match.
133 $ne:
134 type: string
135 title: $ne
136 description: Filter by values not equal to this parameter.
137 $in:
138 type: array
139 description: Filter by values in this array.
140 items:
141 type: string
142 title: $in
143 description: Filter by values in this array.
144 $nin:
145 type: array
146 description: Filter by values not in this array.
147 items:
148 type: string
149 title: $nin
150 description: Filter by values not in this array.
151 $not:
152 oneOf:
153 - type: string
154 title: $not
155 description: >-
156 Filter by values not matching the conditions in this
157 parameter.
158 - type: object
159 description: >-
160 Filter by values not matching the conditions in this
161 parameter.
162 - type: array
163 description: >-
164 Filter by values not matching the conditions in this
165 parameter.
166 items:
167 type: string
168 title: $not
169 description: >-
170 Filter by values not matching the conditions in this
171 parameter.
172 $gt:
173 type: string
174 title: $gt
175 description: >-
176 Filter by values greater than this parameter. Useful for numbers
177 and dates only.
178 $gte:
179 type: string
180 title: $gte
181 description: >-
182 Filter by values greater than or equal to this parameter. Useful
183 for numbers and dates only.
184 $lt:
185 type: string
186 title: $lt
187 description: >-
188 Filter by values less than this parameter. Useful for numbers and
189 dates only.
190 $lte:
191 type: string
192 title: $lte
193 description: >-
194 Filter by values less than or equal to this parameter. Useful for
195 numbers and dates only.
196 $like:
197 type: string
198 title: $like
199 description: Apply a `like` filter. Useful for strings only.
200 $re:
201 type: string
202 title: $re
203 description: Apply a regex filter. Useful for strings only.
204 $ilike:
205 type: string
206 title: $ilike
207 description: Apply a case-insensitive `like` filter. Useful for strings only.
208 $fulltext:
209 type: string
210 title: $fulltext
211 description: Filter to apply on full-text properties.
212 $overlap:
213 type: array
214 description: Filter arrays that have overlapping values with this parameter.
215 items:
216 type: string
217 title: $overlap
218 description: Filter arrays that have overlapping values with this parameter.
219 $contains:
220 type: array
221 description: Filter arrays that contain some of the values of this parameter.
222 items:
223 type: string
224 title: $contains
225 description: Filter arrays that contain some of the values of this parameter.
226 $contained:
227 type: array
228 description: Filter arrays that contain all values of this parameter.
229 items:
230 type: string
231 title: $contained
232 description: Filter arrays that contain all values of this parameter.
233 $exists:
234 type: boolean
235 title: $exists
236 description: Filter by whether a value for this parameter exists (not `null`).
237 title: created_at
238 - name: updated_at
239 in: query
240 description: Filter by the invite's update date.
241 required: false
242 schema:
243 type: object
244 description: Filter by the invite's update date.
245 properties:
246 $and:
247 type: array
248 description: >-
249 Join query parameters with an AND condition. Each object's content
250 is the same type as the expected query parameters.
251 items:
252 type: object
253 title: $and
254 $or:
255 type: array
256 description: >-
257 Join query parameters with an OR condition. Each object's content
258 is the same type as the expected query parameters.
259 items:
260 type: object
261 title: $or
262 $eq:
263 oneOf:
264 - type: string
265 title: $eq
266 description: Filter by an exact match.
267 - type: array
268 description: Filter by an exact match.
269 items:
270 type: string
271 title: $eq
272 description: Filter by an exact match.
273 $ne:
274 type: string
275 title: $ne
276 description: Filter by values not equal to this parameter.
277 $in:
278 type: array
279 description: Filter by values in this array.
280 items:
281 type: string
282 title: $in
283 description: Filter by values in this array.
284 $nin:
285 type: array
286 description: Filter by values not in this array.
287 items:
288 type: string
289 title: $nin
290 description: Filter by values not in this array.
291 $not:
292 oneOf:
293 - type: string
294 title: $not
295 description: >-
296 Filter by values not matching the conditions in this
297 parameter.
298 - type: object
299 description: >-
300 Filter by values not matching the conditions in this
301 parameter.
302 - type: array
303 description: >-
304 Filter by values not matching the conditions in this
305 parameter.
306 items:
307 type: string
308 title: $not
309 description: >-
310 Filter by values not matching the conditions in this
311 parameter.
312 $gt:
313 type: string
314 title: $gt
315 description: >-
316 Filter by values greater than this parameter. Useful for numbers
317 and dates only.
318 $gte:
319 type: string
320 title: $gte
321 description: >-
322 Filter by values greater than or equal to this parameter. Useful
323 for numbers and dates only.
324 $lt:
325 type: string
326 title: $lt
327 description: >-
328 Filter by values less than this parameter. Useful for numbers and
329 dates only.
330 $lte:
331 type: string
332 title: $lte
333 description: >-
334 Filter by values less than or equal to this parameter. Useful for
335 numbers and dates only.
336 $like:
337 type: string
338 title: $like
339 description: Apply a `like` filter. Useful for strings only.
340 $re:
341 type: string
342 title: $re
343 description: Apply a regex filter. Useful for strings only.
344 $ilike:
345 type: string
346 title: $ilike
347 description: Apply a case-insensitive `like` filter. Useful for strings only.
348 $fulltext:
349 type: string
350 title: $fulltext
351 description: Filter to apply on full-text properties.
352 $overlap:
353 type: array
354 description: Filter arrays that have overlapping values with this parameter.
355 items:
356 type: string
357 title: $overlap
358 description: Filter arrays that have overlapping values with this parameter.
359 $contains:
360 type: array
361 description: Filter arrays that contain some of the values of this parameter.
362 items:
363 type: string
364 title: $contains
365 description: Filter arrays that contain some of the values of this parameter.
366 $contained:
367 type: array
368 description: Filter arrays that contain all values of this parameter.
369 items:
370 type: string
371 title: $contained
372 description: Filter arrays that contain all values of this parameter.
373 $exists:
374 type: boolean
375 title: $exists
376 description: Filter by whether a value for this parameter exists (not `null`).
377 title: updated_at
378 - name: deleted_at
379 in: query
380 description: Filter by the invite's deletion date.
381 required: false
382 schema:
383 type: object
384 description: Filter by the invite's deletion date.
385 properties:
386 $and:
387 type: array
388 description: >-
389 Join query parameters with an AND condition. Each object's content
390 is the same type as the expected query parameters.
391 items:
392 type: object
393 title: $and
394 $or:
395 type: array
396 description: >-
397 Join query parameters with an OR condition. Each object's content
398 is the same type as the expected query parameters.
399 items:
400 type: object
401 title: $or
402 $eq:
403 oneOf:
404 - type: string
405 title: $eq
406 description: Filter by an exact match.
407 - type: array
408 description: Filter by an exact match.
409 items:
410 type: string
411 title: $eq
412 description: Filter by an exact match.
413 $ne:
414 type: string
415 title: $ne
416 description: Filter by values not equal to this parameter.
417 $in:
418 type: array
419 description: Filter by values in this array.
420 items:
421 type: string
422 title: $in
423 description: Filter by values in this array.
424 $nin:
425 type: array
426 description: Filter by values not in this array.
427 items:
428 type: string
429 title: $nin
430 description: Filter by values not in this array.
431 $not:
432 oneOf:
433 - type: string
434 title: $not
435 description: >-
436 Filter by values not matching the conditions in this
437 parameter.
438 - type: object
439 description: >-
440 Filter by values not matching the conditions in this
441 parameter.
442 - type: array
443 description: >-
444 Filter by values not matching the conditions in this
445 parameter.
446 items:
447 type: string
448 title: $not
449 description: >-
450 Filter by values not matching the conditions in this
451 parameter.
452 $gt:
453 type: string
454 title: $gt
455 description: >-
456 Filter by values greater than this parameter. Useful for numbers
457 and dates only.
458 $gte:
459 type: string
460 title: $gte
461 description: >-
462 Filter by values greater than or equal to this parameter. Useful
463 for numbers and dates only.
464 $lt:
465 type: string
466 title: $lt
467 description: >-
468 Filter by values less than this parameter. Useful for numbers and
469 dates only.
470 $lte:
471 type: string
472 title: $lte
473 description: >-
474 Filter by values less than or equal to this parameter. Useful for
475 numbers and dates only.
476 $like:
477 type: string
478 title: $like
479 description: Apply a `like` filter. Useful for strings only.
480 $re:
481 type: string
482 title: $re
483 description: Apply a regex filter. Useful for strings only.
484 $ilike:
485 type: string
486 title: $ilike
487 description: Apply a case-insensitive `like` filter. Useful for strings only.
488 $fulltext:
489 type: string
490 title: $fulltext
491 description: Filter to apply on full-text properties.
492 $overlap:
493 type: array
494 description: Filter arrays that have overlapping values with this parameter.
495 items:
496 type: string
497 title: $overlap
498 description: Filter arrays that have overlapping values with this parameter.
499 $contains:
500 type: array
501 description: Filter arrays that contain some of the values of this parameter.
502 items:
503 type: string
504 title: $contains
505 description: Filter arrays that contain some of the values of this parameter.
506 $contained:
507 type: array
508 description: Filter arrays that contain all values of this parameter.
509 items:
510 type: string
511 title: $contained
512 description: Filter arrays that contain all values of this parameter.
513 $exists:
514 type: boolean
515 title: $exists
516 description: Filter by whether a value for this parameter exists (not `null`).
517 title: deleted_at
518 - name: $and
519 in: query
520 required: false
521 schema:
522 type: array
523 description: >-
524 Join query parameters with an AND condition. Each object's content is
525 the same type as the expected query parameters.
526 items:
527 type: object
528 title: $and
529 - name: $or
530 in: query
531 required: false
532 schema:
533 type: array
534 description: >-
535 Join query parameters with an OR condition. Each object's content is
536 the same type as the expected query parameters.
537 items:
538 type: object
539 title: $or
540 - name: with_deleted
541 in: query
542 description: Whether to include deleted records in the result.
543 required: false
544 schema:
545 type: boolean
546 title: with_deleted
547 description: Whether to include deleted records in the result.
548 x-codeSamples:
549 - lang: JavaScript
550 label: JS SDK
551 source:
552 $ref: ../code_samples/JavaScript/admin_invites/get.js
553 - lang: Shell
554 label: cURL
555 source:
556 $ref: ../code_samples/Shell/admin_invites/get.sh
557 tags:
558 - Invites
559 responses:
560 '200':
561 description: OK
562 content:
563 application/json:
564 schema:
565 allOf:
566 - type: object
567 description: The paginated list of invites.
568 required:
569 - limit
570 - offset
571 - count
572 properties:
573 limit:
574 type: number
575 title: limit
576 description: The maximum number of items retrieved.
577 offset:
578 type: number
579 title: offset
580 description: The number of items skipped before the returned items.
581 count:
582 type: number
583 title: count
584 description: The total number of items.
585 - type: object
586 description: The paginated list of invites.
587 required:
588 - invites
589 properties:
590 invites:
591 type: array
592 description: The list of invites.
593 items:
594 $ref: ../components/schemas/AdminInvite.yaml
595 '400':
596 $ref: ../components/responses/400_error.yaml
597 '401':
598 $ref: ../components/responses/unauthorized.yaml
599 '404':
600 $ref: ../components/responses/not_found_error.yaml
601 '409':
602 $ref: ../components/responses/invalid_state_error.yaml
603 '422':
604 $ref: ../components/responses/invalid_request_error.yaml
605 '500':
606 $ref: ../components/responses/500_error.yaml
607 security:
608 - api_token: []
609 - cookie_auth: []
610 - jwt_token: []
611 post:
612 operationId: PostInvites
613 summary: Create Invite
614 description: Create a invite.
615 x-authenticated: true
616 parameters:
617 - name: fields
618 in: query
619 description: >-
620 Comma-separated fields that should be included in the returned data. if
621 a field is prefixed with `+` it will be added to the default fields,
622 using `-` will remove it from the default fields. without prefix it will
623 replace the entire default fields.
624 required: false
625 schema:
626 type: string
627 title: fields
628 description: >-
629 Comma-separated fields that should be included in the returned data.
630 if a field is prefixed with `+` it will be added to the default
631 fields, using `-` will remove it from the default fields. without
632 prefix it will replace the entire default fields.
633 externalDocs:
634 url: '#select-fields-and-relations'
635 requestBody:
636 content:
637 application/json:
638 schema:
639 type: object
640 description: The invite's details.
641 required:
642 - email
643 properties:
644 email:
645 type: string
646 title: email
647 description: The email of the user to invite.
648 format: email
649 metadata:
650 type: object
651 description: The invite's metadata. Can be custom data in key-value pairs.
652 roles:
653 type: array
654 description: The invited user's roles.
655 x-featureFlag: rbac
656 items:
657 type: string
658 title: roles
659 description: The invited user's role.
660 x-codeSamples:
661 - lang: JavaScript
662 label: JS SDK
663 source:
664 $ref: ../code_samples/JavaScript/admin_invites/post.js
665 - lang: Shell
666 label: cURL
667 source:
668 $ref: ../code_samples/Shell/admin_invites/post.sh
669 tags:
670 - Invites
671 responses:
672 '200':
673 description: OK
674 content:
675 application/json:
676 schema:
677 $ref: ../components/schemas/AdminInviteResponse.yaml
678 '400':
679 $ref: ../components/responses/400_error.yaml
680 '401':
681 $ref: ../components/responses/unauthorized.yaml
682 '404':
683 $ref: ../components/responses/not_found_error.yaml
684 '409':
685 $ref: ../components/responses/invalid_state_error.yaml
686 '422':
687 $ref: ../components/responses/invalid_request_error.yaml
688 '500':
689 $ref: ../components/responses/500_error.yaml
690 x-workflow: createInvitesWorkflow
691 security:
692 - api_token: []
693 - cookie_auth: []
694 - jwt_token: []
695 x-events:
696 - name: invite.created
697 payload: |-
698 ```ts
699 {
700 id, // The ID of the invite
701 }
702 ```
703 description: |-
704 Emitted when invites are created. You can listen to this event
705 to send an email to the invited users, for example.
706 deprecated: false