REST Tools API Reference
Direct HTTP JSON API endpoints for invoking agent tools programmatically.
In addition to MCP and the CLI, auto-social.io provides direct REST endpoints to execute agent tools from scripts, webhooks, or backend services.
Base URL
All requests must be POST requests and include:
Authorization: Bearer <API_KEY>header.Content-Type: application/jsonheader.
Endpoints
1. List Available Tools
Retrieve tool specifications, schemas, and descriptions.
- Endpoint:
GET /api/v1/tools - Response: JSON array of available tools and parameter definitions.
2. Invoke a Tool
Execute an individual tool by name.
- Endpoint:
POST /api/v1/tools/:toolName - Body: JSON object containing tool arguments and optional metadata.
Example: List Campaigns
Example: List Posts
Example: Publish Post
Example: Generate image on a draft post
Example: Search product docs
Example: List brands
Media generation tools: generate_social_copy, generate_image_asset, generate_video_asset, generate_audio_asset. All require an existing post_id from create_post or list_posts. They consume credits (no confirmation_code). Docs search: search_docs (read-only RAG over /docs). Brand tools: see Brands.
Compact response for image, video, or audio:
Set "detailed": true for model metadata, dimensions, and billing fields.
OpenAPI (full schemas): GET /api/v1/openapi.json.
Confirmation codes
Sensitive tools (publish_post, campaign create/update/pause/resume, live update/delete, delete_brand, and similar) respond once with:
Retry the same JSON body with "confirmation_code": "123456". Optional "idempotency_key" makes safe retries for mutations.
Standard Error Responses
Errors return standard HTTP status codes with a JSON error payload:
400 Bad Request: Missing required arguments or malformed JSON payload.401 Unauthorized: Missing, expired, or invalid API key.403 Forbidden: Insufficient permissions or action confirmation required.404 Not Found: Target resource does not exist in your account.429 Too Many Requests: Account rate limit exceeded.
Related: Agent guide, MCP server, CLI.