API reference
Actions
An action is one tool of the MCP server, over REST. Each one has the name, the input and the result of its MCP tool, so a script runs what an AI assistant would, with an API key and no MCP client.
Most of them are also an endpoint of their own on the other pages. Use an action for one that has no endpoint, or to call every tool the same way.
The action object
One tool of the MCP server, as your key sees it.
Attributes
- objectstringAlways
action. - namestringIts name, the same as the MCP tool's, like
search_leads. - titlestringIts title in a few words.
- descriptionstringWhat it does and what it returns, the words an AI assistant reads.
- scopestring
writewhen it changes data. A key withreadruns the others only.readwrite - input_schemaobjectThe JSON Schema of the body it takes, its fields and the required ones.
{
"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
}
}List actions
read scopeReturns every action your key can run, by name.
Returns
A list of action objects, all of them on one page.
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
}Retrieve an action
read scopeReturns one action, with the schema of the body it takes.
Path parameters
- namestringRequiredThe action's name, like
search_leads.
Returns
An action object.
Errors
- No action with this name for your key. List actions gives their names.
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
}
}Run an action
read scopeRuns one action as the MCP server runs its tool. The body is its input, the fields its input_schema lists, or empty for an action that takes nothing. An action whose scope is write needs a key with write.
Path parameters
- namestringRequiredThe action's name, like
search_leads.
Returns
An action result object. The action's own errors come as they are, like resource_missing for a lead that is not on the account.
Errors
- No action with this name for your key. List actions gives their names.
- The action's scope is
writeand the key hasread. - A field the action requires is missing.
paramnames it. - The body does not match the action's
input_schema. - The action failed on our side. Nothing to change in the request, try again in a moment.
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
}
}The action result object
What an action returned when you ran it.
Attributes
- objectstringAlways
action_result. - actionstringThe action's name.
- resultanyIts result, the same as the MCP tool's, like a lead object for
get_lead.nullwhen it returns nothing.
{
"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
}
}