Endpoint
POST https://api.ugc.inc/org/name
Overview
Updates the name of your organization. Requires an org-scoped API key.Request Body
string
required
The new name for the organization
Response
object
curl -X POST https://api.ugc.inc/org/name \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My New Org Name"
}'
import requests
response = requests.post(
'https://api.ugc.inc/org/name',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'name': 'My New Org Name'
}
)
data = response.json()
if data['ok']:
print('Organization updated:', data['data'])
const response = await fetch('https://api.ugc.inc/org/name', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My New Org Name'
})
});
const data = await response.json();
if (data.ok) {
console.log('Organization updated:', data.data);
}
import { UGCClient } from 'ugcinc';
const client = new UGCClient({
apiKey: 'YOUR_API_KEY'
});
const response = await client.org.updateName({
name: 'My New Org Name'
});
if (response.ok) {
console.log('Updated org name:', response.data.name);
}
{
"ok": true,
"code": 200,
"message": "Success",
"data": {
"id": "org_123456",
"name": "My New Org Name"
}
}
{
"ok": false,
"code": 404,
"message": "Organization not found"
}
{
"ok": false,
"code": 400,
"message": "name is required"
}
