Call an app tool
const url = 'https://qinto-api.blotout.io/teams/7b8d1a52-6c1e-4b6f-9a30-2f8a54d1c3e9/domains/3f2a9c81-5d47-4e0b-8c66-91b2a7f04d15/apps/facebook-capi/tools/emqReport';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"installId":"8d7c6b5a-4938-4271-a605-9e8f7a6b5c4d","arguments":{}}'};
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://qinto-api.blotout.io/teams/7b8d1a52-6c1e-4b6f-9a30-2f8a54d1c3e9/domains/3f2a9c81-5d47-4e0b-8c66-91b2a7f04d15/apps/facebook-capi/tools/emqReport \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "installId": "8d7c6b5a-4938-4271-a605-9e8f7a6b5c4d", "arguments": {} }'Runs one of an installed app’s tools against a site and returns what the app answered. The arguments are validated against the schema the version that site actually serves declares, so a tool is always called on the contract in front of it.
How it works
The call runs as the caller, on the named site, in an app that site already installed. The caller’s app role on that site must reach the tool’s minimum role; an app they have no access to, or a tool above their role, answers not_found like one that does not exist. installId is required only where the app is installed more than once; install_required names the choices. A repeat is a new call: the platform neither retries nor deduplicates one. Every call is written to the team’s activity log, without its arguments. Requires an OAuth access token.
Required permissions
domain:readon all domains, or on the addressed domain when its id is in the route
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Unique id (UUID) of the team that owns the addressed resources, as shown in the team settings on the Blotout platform.
Example
7b8d1a52-6c1e-4b6f-9a30-2f8a54d1c3e9Unique id (UUID) of the team that owns the addressed resources, as shown in the team settings on the Blotout platform.
Unique id (UUID) of the site, as returned by the site operations.
Example
3f2a9c81-5d47-4e0b-8c66-91b2a7f04d15Unique id (UUID) of the site, as returned by the site operations.
Immutable slug of the app, as shown by the list operation.
Example
facebook-capiImmutable slug of the app, as shown by the list operation.
The tool’s own name as the app’s manifest declares it, without the app-slug prefix.
Example
emqReportThe tool’s own name as the app’s manifest declares it, without the app-slug prefix.
Request Bodyrequired
Section titled “Request Bodyrequired”Which installation to act on, and the tool’s own arguments.
Which installation to act on, and the tool’s own arguments.
object
Which installation to run the tool against. Required only where the app is installed more than once.
Example
8d7c6b5a-4938-4271-a605-9e8f7a6b5c4dThe tool’s own arguments, validated against the schema its serving version declares.
object
Example
{}Responses
Section titled “Responses”What the tool answered.
What the tool answered.
object
How the call ended: ok the app answered, failed it declined and content is its own message, error the platform could not complete it.
The app’s answer, as text.
The app’s structured answer, when it returned one.
object
Example
{ "outcome": "ok", "content": "Resent 12 events.", "data": { "sent": 12 }}invalid_params — A path parameter failed validation (for example a malformed UUID); details pinpoints the offending parameter. invalid_body — The JSON body is unparseable or failed schema validation; details pinpoints the offending fields when the body could be parsed. invalid_arguments — The arguments do not match the schema the version this site serves declares; message names the offending property. Read the tool’s current schema before retrying.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Field-level validation errors: a tree keyed by input property, each node carrying an errors array of human-readable messages. Render it to help the caller correct the request.
object
Example
{ "error": "invalid_params", "details": { "errors": [], "properties": { "teamId": { "errors": [ "Invalid UUID" ] } } }}unauthenticated — The Authorization: Bearer token is missing, malformed, or no longer valid. Generate a team API token or obtain a new OAuth access token.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "unauthenticated"}forbidden — The bearer credential lacks the required permission or belongs to another team, or its user lacks the organization role a developer operation needs. Update its policies, use a credential bound to the addressed team, or ask an organization owner for the role; message states the reason when one is known.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Human-readable reason for this specific failure, intended for display — do not parse it programmatically.
Example
{ "error": "forbidden", "message": "The Cloudflare API token is invalid or expired."}not_found — The addressed resource does not exist within this team; check the id and retry.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "not_found"}not_deployed — The site has never been deployed, so it has no host to describe yet. Deploy it, then retry. tool_disabled — A site manager has switched this tool off for the site, so assistants may not call it there. Nothing ran. app_suspended — Blotout has suspended this app, so nothing ran and nothing changed. The call works again once the suspension is lifted. install_required — The app is installed more than once on this site, so the call must name which installation to act on; message lists them with their ids. install_inactive — The named installation is switched off, so nothing was dispatched to it. Turn it on, then retry.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Human-readable reason for this specific failure, intended for display — do not parse it programmatically.
Example
{ "error": "not_deployed", "message": "The Cloudflare API token is invalid or expired."}rate_limited — Too many requests for this API token or site in a short window; wait a minute and retry.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "rate_limited"}internal — Unexpected server error. Nothing is guaranteed to have been persisted; idempotent operations are safe to retry.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "internal"}