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:
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Title of the request |
instructions | string | Yes | Instructions to fulfill the request |
objective | string | Yes | Objective of the request |
max_minutes | number | No | Maximum minutes to fulfill the request |
relaxed | boolean | No | If the request is relaxed |
callback_meta | object | No | Opaque metadata echoed back in webhook callbacks |
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"
}'{
"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,
"metadata": null,
"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.