/v1/apps/{applicationId}/addressWhen to use
Assign or remove a custom address for a live app.
For agents
Requires app admin and a ready organization namespace. Use a single DNS label and expectedUrl from apps.address; a conflict requires reloading and reviewing the current address. Send address: null to remove it. Changes take effect without publishing or further DNS setup. The generated Permute URL and existing permissions remain; each hostname has its own sign-in session.
Example
import { PermuteClient } from '@permute/sdk';
const orgClient = new PermuteClient({
apiKey: process.env.PERMUTE_API_KEY!,
});
const client = orgClient.withWorkspace(process.env.PERMUTE_WORKSPACE_ID!);
const result = await client.apps.setAddress('appl_abcdefghijklmnopqrstuvwx', {
"address": {
"namespaceId": "domn_abcdefghijklmnopqrstuvwx",
"label": "crm"
},
"expectedUrl": null
});Request body
{
"address": {
"namespaceId": "domn_abcdefghijklmnopqrstuvwx",
"label": "crm"
},
"expectedUrl": null
}Response
{
"data": {
"address": {
"namespaceId": "domn_abcdefghijklmnopqrstuvwx",
"label": "crm",
"url": "https://crm.apps.example.com"
},
"canManage": true,
"namespaces": [
{
"id": "domn_abcdefghijklmnopqrstuvwx",
"hostname": "apps.example.com",
"status": "live"
}
]
}
}