Update Application
curl --request PATCH \
--url https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}import requests
url = "https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_bodyAuth API (Programmatic)
Update Application
Rename an application, rotate its key, or update settings.
PATCH
/
v1
/
organizations
/
me
/
{org_id}
/
applications
/
{app_id}
Update Application
curl --request PATCH \
--url https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}import requests
url = "https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}"
response = requests.patch(url)
print(response.text)const options = {method: 'PATCH'};
fetch('https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://auth.contra.id/v1/organizations/me/{org_id}/applications/{app_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_bodyRequest
curl -X PATCH https://auth.contra.id/v1/organizations/me/$ORG_ID/applications/$APP_ID \
-H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \
-d '{ "name": "production-eu", "rotate_api_key": true }'
| Body | Type | Description |
|---|---|---|
name | string | New display name. |
rotate_api_key | boolean | true → generate a new api_key (old one immediately invalidated). |
environment | enum | Move between "live" and "test". |
Response · 200
{
"uuid": "app_5b9c…",
"api_key": "ctr_NEW_KEY_HERE",
"name": "production-eu",
"environment": "live"
}
If you rotate the
api_key, the old one stops working immediately — update every deployment before rotating.⌘I