0

Get organization billing external ID

by
Published Oct 17, 2025

This endpoint returns the external ID of the organization's billing account.

Script qovery Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Get organization billing external ID
4
 * This endpoint returns the external ID of the organization's billing account.
5

6
 */
7
export async function main(auth: RT.Qovery, organizationId: string) {
8
	const url = new URL(`https://api.qovery.com/organization/${organizationId}/billingExternalId`)
9

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