registerPrivateApp
Requires permission settings:apps:manage.
Register a private app for this organization and get its OAuth client id and secret. The secret is shown only once. Never give an app token to an AI model or agent: AI must use the MCP surface and its approval flow.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation RegisterPrivateApp($input: RegisterPrivateAppInputGql!) {
registerPrivateApp(input: $input) {
clientId
clientSecret
app {
id
name
status
createdAt
appUrl
clientId
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RegisterPrivateApp($input: RegisterPrivateAppInputGql!) {\n registerPrivateApp(input: $input) {\n clientId\n clientSecret\n app {\n id\n name\n status\n createdAt\n appUrl\n clientId\n }\n }\n}",
"variables": {
"input": {
"handle": "string",
"name": "string",
"redirectUris": [
"string"
]
}
}
}
EOF
Variables:
{
"input": {
"handle": "string",
"name": "string",
"redirectUris": [
"string"
]
}
}
Response:
{
"data": {
"registerPrivateApp": {
"clientId": "string",
"clientSecret": "string",
"app": {
"id": "id",
"name": "string",
"status": "string",
"createdAt": "2025-01-15T00:00:00Z",
"appUrl": "string",
"clientId": "string"
}
}
}
}
registerPrivateApp(
input: RegisterPrivateAppInputGql!
): PrivateAppCredentialsResult!
Arguments
registerPrivateApp.input ● RegisterPrivateAppInputGql! non-null input
The app to register.
Type
PrivateAppCredentialsResult object
A new private app and its OAuth credentials. The client secret is shown only once.