API-Referenz
Aktionen
Eine Aktion ist ein Tool des MCP-Servers, über REST. Jede hat den Namen, die Eingabe und das Ergebnis ihres MCP-Tools, also führt ein Skript aus, was ein KI-Assistent ausführen würde, mit einem API-Schlüssel und ohne MCP-Client.
Die meisten sind auf den anderen Seiten auch ein eigener Endpoint. Nimm eine Aktion für ein Tool ohne Endpoint, oder um jedes Tool auf dieselbe Weise aufzurufen.
Das Aktion-Objekt
Ein Tool des MCP-Servers, so wie dein Schlüssel es sieht.
Attribute
- objectstringImmer
action. - namestringIhr Name, derselbe wie der des MCP-Tools, etwa
search_leads. - titlestringIhr Titel in wenigen Worten.
- descriptionstringWas sie tut und was sie zurückgibt, die Worte, die ein KI-Assistent liest.
- scopestring
write, wenn sie Daten ändert. Ein Schlüssel mitreadführt nur die anderen aus.readwrite - input_schemaobjectDas JSON Schema des Bodys, den sie annimmt, seine Felder und die Pflichtfelder.
{
"object": "action",
"name": "get_lead",
"title": "Get lead",
"description": "One lead by id: X profile, score and reason, hot, status, persona, campaign, conversation id, locked_to (the one X account of the owner allowed to contact this person, when a campaign or a conversation holds it), your metadata.",
"scope": "read",
"input_schema": {
"type": "object",
"properties": {
"lead_id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "From search_leads."
}
},
"required": ["lead_id"],
"additionalProperties": false
}
}Aktionen auflisten
readGibt jede Aktion, die dein Schlüssel ausführen kann, nach Namen zurück.
Rückgabe
Eine Liste von Aktion-Objekten, alle auf einer Seite.
curl https://gemlead.ai/api/v1/actions \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"object": "list",
"data": [
{
"object": "action",
"name": "get_lead",
"title": "Get lead",
"description": "One lead by id: X profile, score and reason, hot, status, persona, campaign, conversation id, locked_to (the one X account of the owner allowed to contact this person, when a campaign or a conversation holds it), your metadata.",
"scope": "read",
"input_schema": {
"type": "object",
"properties": {
"lead_id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "From search_leads."
}
},
"required": ["lead_id"],
"additionalProperties": false
}
}
],
"has_more": false
}Aktion abrufen
readGibt eine Aktion zurück, mit dem Schema des Bodys, den sie annimmt.
Pfadparameter
- namestringErforderlichDer Name der Aktion, etwa
search_leads.
Rückgabe
Ein Aktion-Objekt.
Fehler
- Keine Aktion mit diesem Namen für deinen Schlüssel. Aktionen auflisten nennt ihre Namen.
curl https://gemlead.ai/api/v1/actions/get_lead \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"object": "action",
"name": "get_lead",
"title": "Get lead",
"description": "One lead by id: X profile, score and reason, hot, status, persona, campaign, conversation id, locked_to (the one X account of the owner allowed to contact this person, when a campaign or a conversation holds it), your metadata.",
"scope": "read",
"input_schema": {
"type": "object",
"properties": {
"lead_id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "From search_leads."
}
},
"required": ["lead_id"],
"additionalProperties": false
}
}Aktion ausführen
readFührt eine Aktion aus, so wie der MCP-Server sein Tool ausführt. Der Body ist ihre Eingabe, die Felder, die ihr input_schema aufführt, oder leer für eine Aktion, die nichts annimmt. Eine Aktion mit dem Scope write braucht einen Schlüssel mit write.
Pfadparameter
- namestringErforderlichDer Name der Aktion, etwa
search_leads.
Rückgabe
Ein Aktionsergebnis-Objekt. Die eigenen Fehler der Aktion kommen unverändert, etwa resource_missing für einen Lead, der nicht im Konto ist.
Fehler
- Keine Aktion mit diesem Namen für deinen Schlüssel. Aktionen auflisten nennt ihre Namen.
- Der Scope der Aktion ist
writeund der Schlüssel hatread. - Ein Feld, das die Aktion verlangt, fehlt.
paramnennt es. - Der Body passt nicht zum
input_schemader Aktion. - Die Aktion ist bei uns fehlgeschlagen. An der Anfrage ist nichts zu ändern, versuch es gleich noch einmal.
curl -X POST https://gemlead.ai/api/v1/actions/get_lead \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lead_id": "msgOtJ8dvT"
}'{
"object": "action_result",
"action": "get_lead",
"result": {
"id": "msgOtJ8dvT",
"object": "lead",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"score": 86,
"score_reason": "Runs a paid trading community and asks how to collect payments for it.",
"hot": true,
"status": "scored",
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"campaign": null,
"conversation_id": null,
"locked_to": null,
"found_at": "2026-11-05T14:02:11.482Z",
"scored_at": "2026-11-05T14:03:40.117Z",
"updated_at": "2026-11-05T14:03:40.117Z",
"metadata": {},
"contact": null
}
}Das Aktionsergebnis-Objekt
Was eine Aktion zurückgegeben hat, als du sie ausgeführt hast.
Attribute
- objectstringImmer
action_result. - actionstringDer Name der Aktion.
- resultanyIhr Ergebnis, dasselbe wie das des MCP-Tools, etwa ein Lead-Objekt für
get_lead.null, wenn sie nichts zurückgibt.
{
"object": "action_result",
"action": "get_lead",
"result": {
"id": "msgOtJ8dvT",
"object": "lead",
"profile": {
"x_user_id": "1460283925",
"username": "jane_builds",
"name": "Jane Doe",
"bio": "Runs a paid trading community. Daily setups, no hype.",
"followers_count": 12400,
"following_count": 380,
"location": "Austin, TX",
"website": "https://janedoe.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1460283925/jane_400x400.jpg",
"verified": true,
"url": "https://x.com/jane_builds"
},
"score": 86,
"score_reason": "Runs a paid trading community and asks how to collect payments for it.",
"hot": true,
"status": "scored",
"persona": {
"id": "lvWBPnytpS",
"name": "Tipsters"
},
"campaign": null,
"conversation_id": null,
"locked_to": null,
"found_at": "2026-11-05T14:02:11.482Z",
"scored_at": "2026-11-05T14:03:40.117Z",
"updated_at": "2026-11-05T14:03:40.117Z",
"metadata": {},
"contact": null
}
}