0

Send Sign Up request

by
Published Oct 17, 2025

Send a Sign Up request containing the user information

Script qovery Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Send Sign Up request
4
 * Send a Sign Up request containing the user information
5
 */
6
export async function main(auth: RT.Qovery, body: Body) {
7
	const url = new URL(`https://api.qovery.com/admin/userSignUp`)
8

9
	const response = await fetch(url, {
10
		method: 'POST',
11
		headers: {
12
			'Content-Type': 'application/json',
13
			Authorization: 'Token ' + auth.apiKey
14
		},
15
		body: JSON.stringify(body)
16
	})
17
	if (!response.ok) {
18
		const text = await response.text()
19
		throw new Error(`${response.status} ${text}`)
20
	}
21
	return await response.text()
22
}
23

24
/* eslint-disable */
25
/**
26
 * This file was automatically generated by json-schema-to-typescript.
27
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
28
 * and run json-schema-to-typescript to regenerate this file.
29
 */
30

31
export interface Body {
32
	first_name: string
33
	last_name: string
34
	user_email: string
35
	type_of_use: 'PERSONAL' | 'SCHOOL' | 'WORK'
36
	qovery_usage: string
37
	company_name?: string
38
	company_size?: '1-10' | '11-50' | '51-200' | '201-500' | '500+'
39
	user_role?: string
40
	qovery_usage_other?: string
41
	user_questions?: string
42
	current_step?: string
43
	dx_auth?: boolean
44
	infrastructure_hosting?: string
45
	[k: string]: unknown
46
}
47