Skip to content
Connect an agent

Organisations

Make a new client secret for an organisation's app

Makes a new secret for a confidential app, shown once; the old one stops working at once.

POST/orgs/{org}/apps/{id}/secret

TL;DR

QuestionAnswer
What does it do?Make a new client secret for an organisation's app.
What does it take?org, id in the path.
What does it return?Status 200 with a body of type AppWithSecret.
What can go wrong?401 not signed in; 403 only the owner or an admin may (orgs.forbidden), or the origin may not make changes; 404 no such organisation or app; 422 the app is public and has no secret (apps.invalid); 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

Makes a new secret for a confidential app, shown once; the old one stops working at once. The owner and an admin may.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.
idstringyes

Responses

StatusMeaningBody
200The app with its new secret, shown once.AppWithSecret
401Not signed in.ErrorResponse
403Only the owner or an admin may (orgs.forbidden), or the origin may not make changes.ErrorResponse
404No such organisation or app.ErrorResponse
422The app is public and has no secret (apps.invalid).ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type AppWithSecret.

FieldTypeRequiredDescription
idstringyesThe app's id, which is its OAuth client_id.
namestringyesShown to people as a claim on the consent page.
homepagestring | nullyes
clientType"confidential" | "public"yesconfidential holds a client secret on its server; public (a page or a tool with no server) holds none.
redirectUrisstring[]yes
membersOnlybooleanyesFor an organisation's app: only its members may connect it, to the organisation.
hasSecretbooleanyes
createdAtintegeryesMilliseconds since the epoch.
updatedAtintegeryesMilliseconds since the epoch.
clientSecretstring | nullyesThe client secret (pws_...), shown once, or null for a public app. Store it on your server.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools