Organization
Edit API Key
Update an API key’s name
curl -X POST https://api.ugc.inc/org/api-key/edit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"apiKeyId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated Production Key"
}'
import requests
response = requests.post(
'https://api.ugc.inc/org/api-key/edit',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'apiKeyId': '550e8400-e29b-41d4-a716-446655440000',
'name': 'Updated Production Key'
}
)
data = response.json()
if data['ok']:
print('API key updated:', data['data'])
const response = await fetch('https://api.ugc.inc/org/api-key/edit', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
apiKeyId: '550e8400-e29b-41d4-a716-446655440000',
name: 'Updated Production Key'
})
});
const data = await response.json();
if (data.ok) {
console.log('API key updated:', data.data);
}
import { UGCClient } from 'ugcinc';
const client = new UGCClient({
apiKey: 'YOUR_API_KEY'
});
const response = await client.org.editApiKey({
apiKeyId: '550e8400-e29b-41d4-a716-446655440000',
name: 'Updated Production Key'
});
if (response.ok) {
console.log('Updated API key:', response.data.name);
}
{
"ok": true,
"code": 200,
"message": "Success",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated Production Key",
"created_at": "2024-01-15T10:30:00.000Z"
}
}
{
"ok": false,
"code": 404,
"message": "API key not found"
}
{
"ok": false,
"code": 400,
"message": "name is required"
}
⌘I
curl -X POST https://api.ugc.inc/org/api-key/edit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"apiKeyId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated Production Key"
}'
import requests
response = requests.post(
'https://api.ugc.inc/org/api-key/edit',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'apiKeyId': '550e8400-e29b-41d4-a716-446655440000',
'name': 'Updated Production Key'
}
)
data = response.json()
if data['ok']:
print('API key updated:', data['data'])
const response = await fetch('https://api.ugc.inc/org/api-key/edit', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
apiKeyId: '550e8400-e29b-41d4-a716-446655440000',
name: 'Updated Production Key'
})
});
const data = await response.json();
if (data.ok) {
console.log('API key updated:', data.data);
}
import { UGCClient } from 'ugcinc';
const client = new UGCClient({
apiKey: 'YOUR_API_KEY'
});
const response = await client.org.editApiKey({
apiKeyId: '550e8400-e29b-41d4-a716-446655440000',
name: 'Updated Production Key'
});
if (response.ok) {
console.log('Updated API key:', response.data.name);
}
{
"ok": true,
"code": 200,
"message": "Success",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated Production Key",
"created_at": "2024-01-15T10:30:00.000Z"
}
}
{
"ok": false,
"code": 404,
"message": "API key not found"
}
{
"ok": false,
"code": 400,
"message": "name is required"
}
