Base de conhecimento GetMyBot

API Quickstart

Get a list of your bots and create a reaction through the API. Your first request, access token, and curl examples.

Nesta página

API lets your program perform actions in GetMyBot: list bots, create reactions, or retrieve data. This example is for developers building an integration. To set up a bot without code, use the visual builder.

First create an access key, called a personal token. Then send an HTTP request to an operation address, called an endpoint. The examples use curl in a terminal. Replace https://your-domain with the address of your GetMyBot installation.

Step 1. Create a personal token

Open the account dashboard, go to the personal tokens section, and create a new token (PAT). Copy its value immediately: it is shown only once and starts with the mbp_ prefix. When creating it, choose scopes, the permissions for only the operations you need; see the authorization guide for details.

Step 2. Base URL and format

All REST endpoints live under the /api prefix. There is no version segment in the path. Request and response bodies are JSON; include the Content-Type: application/json header for requests with a body. The token is passed via the Authorization: Bearer <PERSONAL_TOKEN> header: replace <PERSONAL_TOKEN> (with the angle brackets) with the whole token, including its mbp_ prefix. Do not add the prefix separately.

Step 3. First request: list bots

Verify the token by requesting your list of bots. This requires the bots:read scope (or *):

curl -H "Authorization: Bearer <PERSONAL_TOKEN>" https://your-domain/api/bots

The response is a JSON array of bots. If the token is invalid or expired, a 401 is returned with the body {"error":"..."} (see errors).

Step 4. First mutation: create a reaction

A mutation is a request that changes data. This example creates a reaction on the selected bot. Run it in a project where you actually want that reaction.

Creating a reaction requires the reactions:write scope. Substitute the bot ID from step 3:

curl -X POST https://your-domain/api/bots/BOT_ID/reactions \
  -H "Authorization: Bearer <PERSONAL_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"name":"Hello","trigger":{"type":"command","value":"/start"}}'

A successful response returns the created reaction with its id. For exact request body fields, see the interactive reference: it generates ready-to-use examples in curl, JavaScript, and Python for every endpoint.

Step 5. Continue with the reference

Once the token is working, the rest is easier to explore in the interactive reference: it shows the full endpoint list, required scopes, body schemas, and a "Try it" button.

Managed AI quick request

Create a PAT with the managed_ai:invoke scope. Idempotency-Key distinguishes one operation from another: keep the same key and request body when retrying, and use a new key for a new operation:

curl -X POST https://your-domain/api/v1/ai/responses \
  -H "Authorization: Bearer <PERSONAL_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ai-demo-0001" \
  -d '{"profile":"balanced","provider":"auto","input":[{"role":"user","content":[{"type":"input_text","text":"Summarize this conversation"}]}],"max_output_tokens":300}'

If your integration displays Managed AI or Meta features, request /api/public/capabilities first. The response tells you whether each feature is enabled on this installation. A disabled feature does not mean a network failure: hide it or show an unavailable state.

What's next