109 lines
2.1 KiB
Markdown
109 lines
2.1 KiB
Markdown
[Skip to content](https://coolify.io/docs/api-reference/api/operations/enable-api#VPContent)
|
||
|
||
Return to top
|
||
|
||
Enable API[](https://coolify.io/docs/api-reference/api/operations/enable-api#enable-api)
|
||
|
||
==========================================================================================
|
||
|
||
GET
|
||
|
||
/enable
|
||
|
||
Enable API (only with root permissions).
|
||
|
||
Authorizations[](https://coolify.io/docs/api-reference/api/operations/enable-api#authorizations)
|
||
|
||
--------------------------------------------------------------------------------------------------
|
||
|
||
bearerAuth
|
||
|
||
Go to `Keys & Tokens` / `API tokens` and create a new token. Use the token as the bearer token.
|
||
|
||
Type
|
||
|
||
HTTP (bearer)
|
||
|
||
Responses[](https://coolify.io/docs/api-reference/api/operations/enable-api#responses)
|
||
|
||
----------------------------------------------------------------------------------------
|
||
|
||
200400401403
|
||
|
||
Enable API.
|
||
|
||
Content-Type
|
||
|
||
application/json
|
||
|
||
SchemaJSON
|
||
|
||
JSON
|
||
|
||
{
|
||
|
||
"message": "API enabled."
|
||
|
||
}
|
||
|
||
GET
|
||
|
||
/enable
|
||
|
||
Playground[](https://coolify.io/docs/api-reference/api/operations/enable-api#playground)
|
||
|
||
------------------------------------------------------------------------------------------
|
||
|
||
Authorization
|
||
|
||
bearerAuth
|
||
|
||
Try it out
|
||
|
||
Samples[](https://coolify.io/docs/api-reference/api/operations/enable-api#samples)
|
||
|
||
------------------------------------------------------------------------------------
|
||
|
||
BrunocURLJavaScriptPHPPython
|
||
|
||
Bruno
|
||
|
||
GET https://app.coolify.io/api/v1/enable
|
||
|
||
Headers
|
||
authorization: Token
|
||
|
||
|
||
cURL
|
||
|
||
curl https://app.coolify.io/api/v1/enable \
|
||
--header 'Authorization: Token'
|
||
|
||
JavaScript
|
||
|
||
fetch('https://app.coolify.io/api/v1/enable', {
|
||
headers: {
|
||
Authorization: 'Token'
|
||
}
|
||
})
|
||
|
||
PHP
|
||
|
||
$ch = curl_init("https://app.coolify.io/api/v1/enable");
|
||
|
||
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Token']);
|
||
|
||
curl_exec($ch);
|
||
|
||
curl_close($ch);
|
||
|
||
Python
|
||
|
||
requests.get("https://app.coolify.io/api/v1/enable",
|
||
headers={
|
||
"Authorization": "Token"
|
||
}
|
||
)
|
||
|
||
Powered by [VitePress OpenAPI](https://github.com/enzonotario/vitepress-openapi)
|