API-referentie
Acties
Een actie is een tool van de MCP-server, via REST. Elke actie heeft de naam, de invoer en het resultaat van haar MCP-tool, dus een script voert uit wat een AI-assistent zou uitvoeren, met een API-sleutel en zonder MCP-client.
De meeste zijn op de andere pagina's ook een eigen endpoint. Gebruik een actie voor een tool zonder endpoint, of om elke tool op dezelfde manier aan te roepen.
Het actie-object
Een tool van de MCP-server, zoals je sleutel die ziet.
Attributen
- objectstringAltijd
action. - namestringHaar naam, dezelfde als die van de MCP-tool, zoals
search_leads. - titlestringHaar titel in een paar woorden.
- descriptionstringWat ze doet en wat ze teruggeeft, de woorden die een AI-assistent leest.
- scopestring
writeals ze gegevens wijzigt. Een sleutel metreadvoert alleen de andere uit.readwrite - input_schemaobjectHet JSON Schema van de body die ze aanneemt, de velden ervan en welke verplicht zijn.
{
"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
}
}Acties opvragen
readGeeft elke actie die je sleutel kan uitvoeren terug, op naam.
Resultaat
Een lijst met actie-objecten, allemaal op één pagina.
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
}Een actie ophalen
readGeeft één actie terug, met het schema van de body die ze aanneemt.
Padparameters
- namestringVerplichtDe naam van de actie, zoals
search_leads.
Resultaat
Een actie-object.
Fouten
- Geen actie met deze naam voor je sleutel. Acties opvragen geeft hun 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
}
}Een actie uitvoeren
readVoert één actie uit zoals de MCP-server zijn tool uitvoert. De body is haar invoer, de velden die haar input_schema noemt, of leeg voor een actie die niets aanneemt. Een actie met scope write heeft een sleutel met write nodig.
Padparameters
- namestringVerplichtDe naam van de actie, zoals
search_leads.
Resultaat
Een actieresultaat-object. De eigen fouten van de actie komen zoals ze zijn, zoals resource_missing voor een lead die niet op het account staat.
Fouten
- Geen actie met deze naam voor je sleutel. Acties opvragen geeft hun namen.
- De scope van de actie is
writeen de sleutel heeftread. - Een veld dat de actie vereist ontbreekt.
paramnoemt het. - De body past niet bij het
input_schemavan de actie. - De actie is aan onze kant mislukt. Er hoeft niets aan het request te veranderen, probeer het zo opnieuw.
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
}
}Het actieresultaat-object
Wat een actie teruggaf toen je haar uitvoerde.
Attributen
- objectstringAltijd
action_result. - actionstringDe naam van de actie.
- resultanyHaar resultaat, hetzelfde als dat van de MCP-tool, zoals een lead-object voor
get_lead.nullals ze niets teruggeeft.
{
"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
}
}