Actions
Actions are the core of the ToolCharm API. They are the natural language requests you can make to interact with the services your users have authenticated with.
Perform an Action
POST /actions
Body Parameters
- endUserId (string, required) - The ID of the end user you want to perform the action for.
- action (string, required) - The action you want to perform. This should be a natural language request.
{
"endUserId": "00QHn000024LD2JMAW",
"action": "Create a new lead named John Doe who works at Acme Inc.",
}
Sample Response
{
"serviceName": "Salesforce",
"statusCode": 200,
"apiResponse": {
"id": "00QHn000024LD2JMAW",
"firstName": "John",
"lastName": "Doe",
"company": "Acme Inc."
},
"textExtraction": {
"firstName": "John",
"lastName": "Doe",
"company": "Acme Inc."
},
"timing": 2.43
}
Code Sample
curl -X POST https://api.toolcharm.com/actions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"endUserId": "00QHn000024LD2JMAW",
"action": "Create a new lead named John Doe who works at Acme Inc."
}'