# API and MCP for AI agents

> Connect your AI agent to BotMarketing.pro: set up your company, catalog, loyalty, availability and automatic messages through MCP or the REST API.

BotMarketing.pro provides a Streamable HTTP MCP server and a customer REST API. An agent can configure your business from a compatible chat or application using the permissions you grant for your company.

## Connection endpoints
- Protected MCP: https://botmarketing.pro/mcp
- Public registration and reference MCP: https://botmarketing.pro/mcp/onboarding
- REST API: https://botmarketing.pro/api/v1
- OpenAPI contract: https://botmarketing.pro/api/v1/openapi.json
- MCP resource discovery: https://botmarketing.pro/.well-known/oauth-protected-resource/mcp
- OAuth server discovery: https://botmarketing.pro/.well-known/oauth-authorization-server
- API keys and OAuth connections: https://botmarketing.pro/agents

## What an agent can configure

Configuration follows the company’s current subscription features and limits. There is no separate paid API/MCP access flag.

- Owner profile without credential changes; company details, contacts, currency, time zone, images and public business card.
- Categories, products and services: prices, stock, booking and delivery settings, catalog order, covers and galleries.
- Loyalty programs and levels, rules, images and activation.
- Working hours and product or service availability.
- Telegram bot, menu, greeting, assistant and company documents; automatic reminders and Instagram reply rules.
- File uploads, available plans, countries, cities, currencies, time zones and remaining setup steps.

## Connect a chat or your own agent

Send the message above to your agent and describe your task. The agent uses the connection guide, registration and configuration methods itself. Your chat needs external connections or authenticated HTTP execution support.

- Sign in to your existing BotMarketing.pro account, review the requested permissions and approve the connection. OAuth uses Authorization Code with PKCE S256.
- Your own agent can use a permanent scoped key from the additional API and agents section, or POST /api/v1/auth/token after email verification. Keys work until revoked. Send keys only in Authorization: Bearer; keep them out of URLs and public text.
- For a new account, public /mcp/onboarding offers register_account and reference data. Verify your email on the website, then connect protected MCP and create your company. Company access is unavailable before verification.
- Use DeepSeek through your own function-calling agent or MCP client. Direct integration in the DeepSeek web chat is not advertised.
- After connecting, call get_setup_status for granted permissions, available features, limits and next steps. Connect Instagram through the existing browser authorization flow.

## Permissions and changes

Connections require a verified owner. Each account has one owned company. Read and write permissions are separate for company, catalog, loyalty, schedule, messages and channels.

- Ownership, permissions and subscription limits are checked on every request. Staff cannot authorize a company connection on the owner’s behalf.
- Creation requires a stable idempotency_key in MCP or Idempotency-Key header in REST. Repeating the same key and body does not create a duplicate; a changed body returns a conflict.
- Activating a bot, reminder or reply rule can start sending messages. Agents should activate features only when requested by the owner.
- Revoke a key or OAuth connection in API and agents.
- Version one excludes CRM operations, order and reservation processing, staff management, financial transactions, customer balance adjustments, one-off bulk messages and Instagram post publication.

## Agent workflow

```json
{
    "discovery_url": "https://botmarketing.pro/llms.txt",
    "reference_url": "https://botmarketing.pro/en/developers/mcp.md",
    "mcp_url": "https://botmarketing.pro/mcp",
    "onboarding_mcp_url": "https://botmarketing.pro/mcp/onboarding",
    "api_url": "https://botmarketing.pro/api/v1",
    "openapi_url": "https://botmarketing.pro/api/v1/openapi.json",
    "authentication": {
        "preferred": "oauth_pkce",
        "metadata_url": "https://botmarketing.pro/.well-known/oauth-authorization-server",
        "api_key_expiration": null,
        "native_loopback_callbacks_supported": true
    },
    "steps": [
        {
            "action": "discover",
            "agent": "Read the reference and tool schemas. Configure the MCP connection yourself when your host permits it. If the host requires user setup, explain only that minimum connection step. Never claim a connection or mutation succeeded without a tool result."
        },
        {
            "action": "register_if_needed",
            "agent": "For a new account use public register_account or POST /api/v1/auth/register. Ask only for missing required information; do not create another account for an existing owner. Never request an existing password in a chat when OAuth is available."
        },
        {
            "action": "authorize",
            "owner": "Confirm email for a new account, then sign in and approve the agent connection on the website. These actions require the owner; public registration grants no company access."
        },
        {
            "action": "inspect",
            "agent": "On authenticated /mcp call get_setup_status. Use list_countries, list_cities, list_timezones, list_currencies, list_subscriptions and list_types for real IDs. Do not invent values."
        },
        {
            "action": "configure",
            "agent": "Create the owner company only if missing, then perform the requested catalog, loyalty, schedule and channel operations yourself. Do not ask the owner to fill business forms. Keep creation idempotency keys stable across retries. Preserve omitted fields and existing data. Respect scopes and subscription limits. Activate sending only when the owner requested it."
        },
        {
            "action": "verify",
            "agent": "Read back changed resources. Report what actually changed and any required owner action. If the host has no MCP or authenticated HTTP execution, explain the limitation instead of claiming completion."
        }
    ]
}
```

## OAuth scopes

company:read, company:write, catalog:read, catalog:write, loyalty:read, loyalty:write, schedule:read, schedule:write, messages:read, messages:write, channels:read, channels:write

## MCP tool catalog

### get_connection_guide

Start here when asked to register or configure a business. Read the agent-led workflow, endpoints, and the minimum owner actions for email confirmation and authorization. No account or credentials required.

### list_countries

List available countries. Use returned identifiers and enum values when configuring a company.

### list_cities

List available cities. Use returned identifiers and enum values when configuring a company.

### list_timezones

List available timezones. Use returned identifiers and enum values when configuring a company.

### list_currencies

List available currencies. Use returned identifiers and enum values when configuring a company.

### list_subscriptions

List available subscriptions. Use returned identifiers and enum values when configuring a company.

### list_types

List available types. Use returned identifiers and enum values when configuring a company.

### register_account

Register a new company owner using email and password. Email confirmation is required before connecting the protected /mcp server. Existing accounts must sign in; this tool never grants access to an existing account.

### get_setup_status

Read granted abilities, company setup steps, subscription features and remaining limits.

### get_channel_context

Read the company channel identifiers, connected Instagram accounts and cached Instagram media for targeting and automation configuration. Requires channels:read.

### list_categories

List categories in the connected owner company. Requires catalog:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### get_category

Get categories in the connected owner company. Requires catalog:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### create_category

Create categories in the connected owner company. Requires catalog:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### update_category

Update categories in the connected owner company. Requires catalog:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### delete_category

Delete categories in the connected owner company. Requires catalog:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### list_items

List items in the connected owner company. Requires catalog:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### get_item

Get items in the connected owner company. Requires catalog:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### create_item

Create items in the connected owner company. Requires catalog:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### update_item

Update items in the connected owner company. Requires catalog:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### delete_item

Delete items in the connected owner company. Requires catalog:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### list_schedules

List schedules in the connected owner company. Requires schedule:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### get_schedule

Get schedules in the connected owner company. Requires schedule:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### create_schedule

Create schedules in the connected owner company. Requires schedule:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### update_schedule

Update schedules in the connected owner company. Requires schedule:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### delete_schedule

Delete schedules in the connected owner company. Requires schedule:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### list_loyalty_programs

List loyalty-programs in the connected owner company. Requires loyalty:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### get_loyalty_program

Get loyalty-programs in the connected owner company. Requires loyalty:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### create_loyalty_program

Create loyalty-programs in the connected owner company. Requires loyalty:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### update_loyalty_program

Update loyalty-programs in the connected owner company. Requires loyalty:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### delete_loyalty_program

Delete loyalty-programs in the connected owner company. Requires loyalty:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### list_loyalty_levels

List loyalty-levels in the connected owner company. Requires loyalty:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### get_loyalty_level

Get loyalty-levels in the connected owner company. Requires loyalty:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### create_loyalty_level

Create loyalty-levels in the connected owner company. Requires loyalty:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### update_loyalty_level

Update loyalty-levels in the connected owner company. Requires loyalty:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### delete_loyalty_level

Delete loyalty-levels in the connected owner company. Requires loyalty:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### list_engagement_reminders

List engagement-reminders in the connected owner company. Requires messages:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### get_engagement_reminder

Get engagement-reminders in the connected owner company. Requires messages:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### create_engagement_reminder

Create engagement-reminders in the connected owner company. Requires messages:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### update_engagement_reminder

Update engagement-reminders in the connected owner company. Requires messages:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### delete_engagement_reminder

Delete engagement-reminders in the connected owner company. Requires messages:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### list_instagram_rules

List instagram-rules in the connected owner company. Requires messages:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### get_instagram_rule

Get instagram-rules in the connected owner company. Requires messages:read. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### create_instagram_rule

Create instagram-rules in the connected owner company. Requires messages:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### update_instagram_rule

Update instagram-rules in the connected owner company. Requires messages:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### delete_instagram_rule

Delete instagram-rules in the connected owner company. Requires messages:write. Existing subscription limits apply. PATCH keeps omitted fields. Creation requires a stable idempotency_key; reuse it after an interrupted response.

### remove_categories_file

Remove a file attached to this company resource. Requires write access to its area.

### remove_items_file

Remove a file attached to this company resource. Requires write access to its area.

### remove_loyalty_programs_file

Remove a file attached to this company resource. Requires write access to its area.

### remove_engagement_reminders_file

Remove a file attached to this company resource. Requires write access to its area.

### remove_instagram_rules_file

Remove a file attached to this company resource. Requires write access to its area.

### get_company

Read the connected owner company. Requires company:read.

### create_company

Create the owner company after email confirmation. One company per account. Requires company:write.

### update_company

Update the public company card, contacts, location and settings. Requires company:write.

### get_profile

Read profile configuration without secret credentials.

### update_profile

Update profile configuration. Requires company:write.

### get_bot

Read bot configuration without secret credentials.

### update_bot

Update bot configuration. Requires channels:write. Changes can activate Telegram automation; subscription features apply.

### get_settings

Read settings configuration without secret credentials.

### update_settings

Update settings configuration. Requires channels:write. Changes can activate Telegram automation; subscription features apply.

### get_assistant

Read assistant configuration without secret credentials.

### update_assistant

Update assistant configuration. Requires channels:write. Changes can activate Telegram automation; subscription features apply.

### get_menu

Read menu configuration without secret credentials.

### update_menu

Update menu configuration. Requires channels:write. Changes can activate Telegram automation; subscription features apply.

### upload_file

Upload a file from base64 or a public HTTPS URL. Maximum 20 MiB; redirects and private networks are rejected. Requires write permission for the declared area. Use the returned ID in cover_file_id, image_file_ids or another file field.

### reorder_items

Reorder the visible catalog page using the order_version from list_items. Requires catalog:write. Concurrent catalog changes return a conflict.
