Prompts API Reference

Complete API reference for using AI prompts programmatically.

Base URL
https://wapify.me/api/team/prompts
Authentication

All requests require team token authentication. Include the token in the Authorization header:

Authorization: Bearer YOUR_API_TOKEN
Note: Prompts API uses Team Token authentication, not personal Bearer tokens. Ensure you are using a valid team token.
Available Endpoints
GET List Available Prompts
https://wapify.me/api/team/prompts

Retrieve a list of all AI prompts available for your team based on enabled modules.

Response Example
{
  "prompts": [
    {
      "id": 1,
      "section_key": "contact_suggestions",
      "section_label": "Sugerencias de Contacto",
      "module_name": "Contactos"
    },
    {
      "id": 2,
      "section_key": "task_description",
      "section_label": "Descripción de Tarea",
      "module_name": "Tareas"
    },
    {
      "id": 3,
      "section_key": "email_composer",
      "section_label": "Redacción de Email",
      "module_name": "Mensajería"
    }
  ]
}
Response Fields
Field Tipo Descripción
id integer Prompt ID (use for invoking)
section_key string Unique identifier for the prompt section
section_label string Human-readable name of the prompt
module_name string Module this prompt belongs to
POST Invoke Prompt
https://wapify.me/api/team/prompt

Execute an AI prompt with a user message and receive a generated response.

Request Body
Field Tipo Required Descripción
prompt_id integer Conditional ID from /prompts list. Required if prompt_name not provided
prompt_name string Conditional File-based prompt name. Required if prompt_id not provided
test_message string Yes User message/input to process with the prompt
Important: You must provide either prompt_id OR prompt_name, not both.
Request Example (Using Prompt ID)
{
  "prompt_id": 1,
  "test_message": "Necesito ideas para seguimiento de cliente potencial interesado en desarrollo web"
}
Request Example (Using Prompt Name)
{
  "prompt_name": "landing_suggestions",
  "test_message": "¿Cómo puedo mejorar la conversión de mi landing page?"
}
Response Example (Success)
{
  "success": true,
  "suggestion": "Aquí tienes algunas ideas para el seguimiento:\n\n1. Envía un email personalizado dentro de las 24 horas...\n2. Programa una llamada de seguimiento...\n3. Comparte casos de éxito relevantes...",
  "prompt_id": 1,
  "module": "Contactos"
}
Response Fields
Field Tipo Descripción
success boolean Whether the request was successful
suggestion string AI-generated response text
prompt_id integer ID of the prompt that was executed
module string Module name the prompt belongs to
Error Response Example
{
  "success": false,
  "message": "Prompt no encontrado o no disponible para tu equipo"
}
Common Use Cases
1. Contact Follow-up Suggestions

Generate personalized follow-up ideas for contacts based on their context.

2. Email Composition

Draft professional emails for various scenarios (proposals, follow-ups, introductions).

3. Task Descriptions

Expand brief task titles into detailed, actionable descriptions.

4. Content Ideas

Generate ideas for blog posts, social media, or marketing content.

5. Project Planning

Get suggestions for project milestones, tasks breakdown, or resource allocation.

Rate Limits & Best Practices
Rate Limits

AI prompt invocations may be subject to rate limits depending on your team plan:

  • Basic Plan: Up to 100 prompt calls per day
  • Professional Plan: Up to 500 prompt calls per day
  • Enterprise Plan: Unlimited prompt calls
Best Practices
  • Provide clear and specific context in your test_message
  • Use appropriate prompts for each module/context
  • Cache responses when possible to avoid duplicate calls
  • Handle errors gracefully and provide fallback options to users
  • Monitor your API usage to stay within rate limits
Error Codes
Código Descripción
400 Bad Request - Missing required parameters (test_message, prompt_id/prompt_name)
401 Unauthorized - Invalid or missing team token
403 Forbidden - Prompt not available for your team or module not enabled
404 Not Found - Prompt ID or name does not exist
429 Too Many Requests - Rate limit exceeded
500 Server Error - AI service unavailable or processing error