Saltar al contenido principal
POST
/
agent
/
{projectId}
/
job
/
{id}
/
message
Send message to agent job
curl --request POST \
  --url https://api.mintlify.com/v2/agent/{projectId}/job/{id}/message \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>"
}
'
{
  "id": "<string>",
  "status": "active",
  "source": {
    "repository": "<string>",
    "ref": "<string>"
  },
  "model": "<string>",
  "prLink": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "archivedAt": "2023-11-07T05:31:56Z"
}
Este endpoint envía un mensaje adicional a una sesión de tarea de agente existente. Úselo para continuar una conversación con el agente, proporcionar aclaraciones o solicitar cambios adicionales.

Cuándo usar

  • Solicitar cambios adicionales de documentación después de la tarea inicial
  • Proporcionar aclaraciones o correcciones al agente
  • Hacer preguntas de seguimiento sobre los cambios realizados
  • Solicitar modificaciones a un borrador de pull request

Notas de uso

  • El agente procesa el mensaje en segundo plano
  • Consulte el endpoint Obtener tarea de agente para ver el estado actualizado
  • La sesión debe estar active para recibir mensajes
  • Enviar un mensaje a una tarea completed o failed devuelve un error

Autorizaciones

Authorization
string
header
requerido

The Authorization header expects a Bearer token. Use an admin API key (prefixed with mint_). This is a server-side secret key. Generate one on the API keys page in your dashboard.

Parámetros de ruta

projectId
string
requerido

Your project ID. Can be copied from the API keys page in your dashboard.

id
string
requerido

The unique identifier of the agent job to send a message to.

Cuerpo

application/json
prompt
string
requerido

The message content to send to the agent.

Respuesta

Message sent successfully. The agent processes it in the background.

id
string

Unique identifier for the agent job.

status
enum<string>

Current status of the agent job.

Opciones disponibles:
active,
completed,
archived,
failed
source
object

Information about the source repository.

model
string

The AI model used for this job.

URL of the pull request created by the agent. Null until the PR is created.

createdAt
string<date-time>

Timestamp when the job was created.

archivedAt
string<date-time> | null

Timestamp when the job was archived. Null if still active.