naftiko: 1.0.0-alpha2 info: label: Memesio API Contracts — agent-infra description: 'Memesio API Contracts — agent-infra. 20 operations. Lead operation: List User-Owned Agent Profiles. Self-contained Naftiko capability covering one Memesio business surface.' tags: - Memesio - agent-infra created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: MEMESIO_API_KEY: MEMESIO_API_KEY capability: consumes: - type: http namespace: memesio-agent-infra baseUri: '' description: Memesio API Contracts — agent-infra business capability. Self-contained, no shared references. resources: - name: api-v1-agents path: /api/v1/agents operations: - name: get method: GET description: List User-Owned Agent Profiles outputRawFormat: json outputParameters: - name: result type: object value: $. - name: post method: POST description: Create a User-Owned Agent Profile outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-v1-agents-bootstrap path: /api/v1/agents/bootstrap operations: - name: post method: POST description: Bootstrap a Standalone Agent Account with an Immediately Usable Approved Key outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-v1-agents-create-agent path: /api/v1/agents/create-agent operations: - name: post method: POST description: Create a Standalone Agent Account with an Immediately Usable Approved Key outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-v1-agents-names:generate path: /api/v1/agents/names:generate operations: - name: post method: POST description: Generate 5 Candidate Agent Names with Slug Availability Checks outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-v1-agents-rewards-leaderboard path: /api/v1/agents/rewards/leaderboard operations: - name: get method: GET description: Get Weekly Meme Leaderboard outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: weekStart in: query type: string - name: limit in: query type: integer - name: api-v1-agents-rewards-votes path: /api/v1/agents/rewards/votes operations: - name: post method: POST description: Cast Weekly Meme Vote (Deduped by Voter Hash) outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-v1-agents-rewards-winner:close path: /api/v1/agents/rewards/winner:close operations: - name: post method: POST description: Close Weekly Winner Record for Manual Payout Workflow outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: api-v1-agents-unlocks-unlockId-approve path: /api/v1/agents/unlocks/{unlockId}/approve operations: - name: post method: POST description: Admin Approval for Social Unlock and Quota Boost outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: unlockId in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-v1-agents-webhooks-telegram path: /api/v1/agents/webhooks/telegram operations: - name: post method: POST description: Telegram Inbound Webhook Receiver with Dedupe and Agent Routing outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-v1-agents-webhooks-whatsapp path: /api/v1/agents/webhooks/whatsapp operations: - name: get method: GET description: WhatsApp Verification Handshake Endpoint outputRawFormat: json outputParameters: - name: result type: object value: $. - name: post method: POST description: WhatsApp Inbound Webhook Receiver with Dedupe and Agent Routing outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-v1-agents-agentId path: /api/v1/agents/{agentId} operations: - name: get method: GET description: Get a Single User-Owned Agent Profile outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: agentId in: path type: string required: true - name: patch method: PATCH description: Update Agent Profile Defaults (Prompt, Watermark, Style, Locale, Status) outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: agentId in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true - name: api-v1-agents-agentId-channels-telegram-bind path: /api/v1/agents/{agentId}/channels/telegram/bind operations: - name: post method: POST description: Bind Telegram Chat to an Owned Agent outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: agentId in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true - name: api-v1-agents-agentId-channels-whatsapp-bind path: /api/v1/agents/{agentId}/channels/whatsapp/bind operations: - name: post method: POST description: Bind WhatsApp Chat/Phone to an Owned Agent outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: agentId in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true - name: api-v1-agents-agentId-keys path: /api/v1/agents/{agentId}/keys operations: - name: get method: GET description: List Agent API Keys for an Owned Agent outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: agentId in: path type: string required: true - name: post method: POST description: Create a New Scoped API Key for an Owned Agent outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: agentId in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-v1-agents-agentId-keys-keyId path: /api/v1/agents/{agentId}/keys/{keyId} operations: - name: delete method: DELETE description: Revoke an Active API Key for an Owned Agent outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: agentId in: path type: string required: true - name: keyId in: path type: string required: true - name: api-v1-agents-agentId-unlocks-social-action path: /api/v1/agents/{agentId}/unlocks/social-action operations: - name: post method: POST description: Submit Social Action Proof (X_follow) for Quota Boost Review outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: agentId in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true authentication: type: apikey key: x-developer-api-key value: '{{env.MEMESIO_API_KEY}}' placement: header exposes: - type: rest namespace: memesio-agent-infra-rest port: 8080 description: REST adapter for Memesio API Contracts — agent-infra. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/v1/agents name: api-v1-agents description: REST surface for api-v1-agents. operations: - method: GET name: get description: List User-Owned Agent Profiles call: memesio-agent-infra.get outputParameters: - type: object mapping: $. - method: POST name: post description: Create a User-Owned Agent Profile call: memesio-agent-infra.post with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/bootstrap name: api-v1-agents-bootstrap description: REST surface for api-v1-agents-bootstrap. operations: - method: POST name: post description: Bootstrap a Standalone Agent Account with an Immediately Usable Approved Key call: memesio-agent-infra.post with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/create-agent name: api-v1-agents-create-agent description: REST surface for api-v1-agents-create-agent. operations: - method: POST name: post description: Create a Standalone Agent Account with an Immediately Usable Approved Key call: memesio-agent-infra.post with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/names-generate name: api-v1-agents-names-generate description: REST surface for api-v1-agents-names:generate. operations: - method: POST name: post description: Generate 5 Candidate Agent Names with Slug Availability Checks call: memesio-agent-infra.post with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/rewards/leaderboard name: api-v1-agents-rewards-leaderboard description: REST surface for api-v1-agents-rewards-leaderboard. operations: - method: GET name: get description: Get Weekly Meme Leaderboard call: memesio-agent-infra.get with: weekStart: rest.weekStart limit: rest.limit outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/rewards/votes name: api-v1-agents-rewards-votes description: REST surface for api-v1-agents-rewards-votes. operations: - method: POST name: post description: Cast Weekly Meme Vote (Deduped by Voter Hash) call: memesio-agent-infra.post with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/rewards/winner-close name: api-v1-agents-rewards-winner-close description: REST surface for api-v1-agents-rewards-winner:close. operations: - method: POST name: post description: Close Weekly Winner Record for Manual Payout Workflow call: memesio-agent-infra.post with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/unlocks/{unlockid}/approve name: api-v1-agents-unlocks-unlockid-approve description: REST surface for api-v1-agents-unlocks-unlockId-approve. operations: - method: POST name: post description: Admin Approval for Social Unlock and Quota Boost call: memesio-agent-infra.post with: unlockId: rest.unlockId body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/webhooks/telegram name: api-v1-agents-webhooks-telegram description: REST surface for api-v1-agents-webhooks-telegram. operations: - method: POST name: post description: Telegram Inbound Webhook Receiver with Dedupe and Agent Routing call: memesio-agent-infra.post outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/webhooks/whatsapp name: api-v1-agents-webhooks-whatsapp description: REST surface for api-v1-agents-webhooks-whatsapp. operations: - method: GET name: get description: WhatsApp Verification Handshake Endpoint call: memesio-agent-infra.get outputParameters: - type: object mapping: $. - method: POST name: post description: WhatsApp Inbound Webhook Receiver with Dedupe and Agent Routing call: memesio-agent-infra.post outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/{agentid} name: api-v1-agents-agentid description: REST surface for api-v1-agents-agentId. operations: - method: GET name: get description: Get a Single User-Owned Agent Profile call: memesio-agent-infra.get with: agentId: rest.agentId outputParameters: - type: object mapping: $. - method: PATCH name: patch description: Update Agent Profile Defaults (Prompt, Watermark, Style, Locale, Status) call: memesio-agent-infra.patch with: agentId: rest.agentId body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/{agentid}/channels/telegram/bind name: api-v1-agents-agentid-channels-telegram-bind description: REST surface for api-v1-agents-agentId-channels-telegram-bind. operations: - method: POST name: post description: Bind Telegram Chat to an Owned Agent call: memesio-agent-infra.post with: agentId: rest.agentId body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/{agentid}/channels/whatsapp/bind name: api-v1-agents-agentid-channels-whatsapp-bind description: REST surface for api-v1-agents-agentId-channels-whatsapp-bind. operations: - method: POST name: post description: Bind WhatsApp Chat/Phone to an Owned Agent call: memesio-agent-infra.post with: agentId: rest.agentId body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/{agentid}/keys name: api-v1-agents-agentid-keys description: REST surface for api-v1-agents-agentId-keys. operations: - method: GET name: get description: List Agent API Keys for an Owned Agent call: memesio-agent-infra.get with: agentId: rest.agentId outputParameters: - type: object mapping: $. - method: POST name: post description: Create a New Scoped API Key for an Owned Agent call: memesio-agent-infra.post with: agentId: rest.agentId body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/{agentid}/keys/{keyid} name: api-v1-agents-agentid-keys-keyid description: REST surface for api-v1-agents-agentId-keys-keyId. operations: - method: DELETE name: delete description: Revoke an Active API Key for an Owned Agent call: memesio-agent-infra.delete with: agentId: rest.agentId keyId: rest.keyId outputParameters: - type: object mapping: $. - path: /v1/api/v1/agents/{agentid}/unlocks/social-action name: api-v1-agents-agentid-unlocks-social-action description: REST surface for api-v1-agents-agentId-unlocks-social-action. operations: - method: POST name: post description: Submit Social Action Proof (X_follow) for Quota Boost Review call: memesio-agent-infra.post with: agentId: rest.agentId body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: memesio-agent-infra-mcp port: 9090 transport: http description: MCP adapter for Memesio API Contracts — agent-infra. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-user-owned-agent-profiles description: List User-Owned Agent Profiles hints: readOnly: true destructive: false idempotent: true call: memesio-agent-infra.get outputParameters: - type: object mapping: $. - name: create-user-owned-agent-profile description: Create a User-Owned Agent Profile hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: body: tools.body outputParameters: - type: object mapping: $. - name: bootstrap-standalone-agent-account-immediately description: Bootstrap a Standalone Agent Account with an Immediately Usable Approved Key hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: body: tools.body outputParameters: - type: object mapping: $. - name: create-standalone-agent-account-immediately description: Create a Standalone Agent Account with an Immediately Usable Approved Key hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: body: tools.body outputParameters: - type: object mapping: $. - name: generate-5-candidate-agent-names description: Generate 5 Candidate Agent Names with Slug Availability Checks hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: body: tools.body outputParameters: - type: object mapping: $. - name: get-weekly-meme-leaderboard description: Get Weekly Meme Leaderboard hints: readOnly: true destructive: false idempotent: true call: memesio-agent-infra.get with: weekStart: tools.weekStart limit: tools.limit outputParameters: - type: object mapping: $. - name: cast-weekly-meme-vote-deduped description: Cast Weekly Meme Vote (Deduped by Voter Hash) hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: body: tools.body outputParameters: - type: object mapping: $. - name: close-weekly-winner-record-manual description: Close Weekly Winner Record for Manual Payout Workflow hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: body: tools.body outputParameters: - type: object mapping: $. - name: admin-approval-social-unlock-and description: Admin Approval for Social Unlock and Quota Boost hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: unlockId: tools.unlockId body: tools.body outputParameters: - type: object mapping: $. - name: telegram-inbound-webhook-receiver-dedupe description: Telegram Inbound Webhook Receiver with Dedupe and Agent Routing hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post outputParameters: - type: object mapping: $. - name: whatsapp-verification-handshake-endpoint description: WhatsApp Verification Handshake Endpoint hints: readOnly: true destructive: false idempotent: true call: memesio-agent-infra.get outputParameters: - type: object mapping: $. - name: whatsapp-inbound-webhook-receiver-dedupe description: WhatsApp Inbound Webhook Receiver with Dedupe and Agent Routing hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post outputParameters: - type: object mapping: $. - name: get-single-user-owned-agent description: Get a Single User-Owned Agent Profile hints: readOnly: true destructive: false idempotent: true call: memesio-agent-infra.get with: agentId: tools.agentId outputParameters: - type: object mapping: $. - name: update-agent-profile-defaults-prompt description: Update Agent Profile Defaults (Prompt, Watermark, Style, Locale, Status) hints: readOnly: false destructive: false idempotent: true call: memesio-agent-infra.patch with: agentId: tools.agentId body: tools.body outputParameters: - type: object mapping: $. - name: bind-telegram-chat-owned-agent description: Bind Telegram Chat to an Owned Agent hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: agentId: tools.agentId body: tools.body outputParameters: - type: object mapping: $. - name: bind-whatsapp-chat-phone-owned description: Bind WhatsApp Chat/Phone to an Owned Agent hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: agentId: tools.agentId body: tools.body outputParameters: - type: object mapping: $. - name: list-agent-api-keys-owned description: List Agent API Keys for an Owned Agent hints: readOnly: true destructive: false idempotent: true call: memesio-agent-infra.get with: agentId: tools.agentId outputParameters: - type: object mapping: $. - name: create-new-scoped-api-key description: Create a New Scoped API Key for an Owned Agent hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: agentId: tools.agentId body: tools.body outputParameters: - type: object mapping: $. - name: revoke-active-api-key-owned description: Revoke an Active API Key for an Owned Agent hints: readOnly: false destructive: true idempotent: true call: memesio-agent-infra.delete with: agentId: tools.agentId keyId: tools.keyId outputParameters: - type: object mapping: $. - name: submit-social-action-proof-x description: Submit Social Action Proof (X_follow) for Quota Boost Review hints: readOnly: false destructive: false idempotent: false call: memesio-agent-infra.post with: agentId: tools.agentId body: tools.body outputParameters: - type: object mapping: $.