Requests
Create
Requests

Requests

A request is a task that needs to be completed by a human assistant. In order to create a request through the API you have to specify a few details. Take this example:

Definitions

FieldTypeRequiredDescription
titlestringYesTitle of the request
instructionsstringYesInstructions to fulfill the request
objectivestringYesObjective of the request
max_minutesnumberNoMaximum minutes to fulfill the request
relaxedbooleanNoIf the request is relaxed
curl -XPOST https://console.api.getmagic.com/api/v1/request \
-H "x-api-key: <API_KEY>" \
-d '{
  "title": "My first request",
  "instructions": "Instructions to fulfill the request",
  "objective": "Objective of the request"
}'

Output

{
    "id": "12345-67890-12345-67890",
    "status": "PENDING",
    "result": "Request Result",
    "completed_at": "2025-01-01T00:00:00.000Z",
    "internal_id": "123456-7890-123456-7890",
    "project_id": "123456-7890-123456-7890",
    "title": "Request Title",
    "instructions": "Request Instructions",
    "objective": "Request Objective",
    "relaxed": true,
    "max_minutes": 60,
    "created_at": "2025-01-01T00:00:00.000Z",
    "updated_at": "2025-01-01T00:00:00.000Z",
    "conversation": []
}

Once the request has been created you will be able to find it in the project page requests list.