Create a new goal achievement
Create a new goal achievement via inbound event. The goal type, agent, session, and customer are created automatically if they do not exist.
POST
/v1/goalsAuthorizationBearer <token>
In: header
Header Parameters
x-idempotency-key?string
Unique idempotency key to prevent duplicate goal events
goalKeystring
Goal key/type (creates goal type automatically if not exists)
agentKey?string
Agent key (creates agent automatically if not exists)
sessionKey?string
Session key (creates session automatically if not exists)
customerKey?string
Customer key (creates customer automatically if not exists)
metadata?object
Additional goal context metadata
Response Body
application/json
curl -X POST "https://api.getlens.ai/v1/goals" \ -H "Content-Type: application/json" \ -d '{ "goalKey": "customer_issue_resolved" }'{
"created": true
}