Run an action of an application
OpenAPI JSONconst url = 'https://api.eu.apigami.com/v1/apps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/actions/example';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.eu.apigami.com/v1/apps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/actions/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'Runs the action named by its operationId, with the request body as its input, and relays what the code answered: its status, headers and bytes, plus X-Apigami-Run-Id and X-Apigami-Served-By (revision or sandbox). An answer without X-Apigami-Run-Id is Apigami refusing. X-Apigami-Version names a version to try, for an API key of an application of the owning team; a version never deployed runs in a sandbox. Past thirty seconds the answer is 202 { run_id, state: "running" }. An API key or a run token: a member’s token, agent token included, runs an action through the MCP tool app_run instead.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”The version to run instead of production’s.
With an API key: the person the run serves.
With an API key: one of that person’s browsers.
Request Body
Section titled “Request Body”The input the action’s own schema defines.
object
Examplegenerated
{}Responses
Section titled “Responses”What the action answered, relayed. Its status may be any other.
Still running after thirty seconds.
object
A trial of the same version still running ahead of this one: the trials of one version share one sandbox, so it may hold this one until it ends.
Example
{ "state": "running"}No API key or run token.
object
Present and true when the approval window is open and the user has not answered within 45 s.
Example
{ "error": "bad client credentials"}A version named by a caller outside the owning team, or the person named by X-Apigami-User-Ref not reached: not connected, their account disabled by Apigami, or out of the team of your private app.
object
Present and true when the approval window is open and the user has not answered within 45 s.
Examples
{ "error": "only a member of the owning group may name a version of an application"}{ "error": "not paired"}{ "error": "account disabled"}{ "error": "app is private"}