Create a goal
Save a pageview or event conversion goal, with wildcard matching and the same fifty-goal limit as the dashboard.
On this page
create_goalAccess & permissions
Use POST with an explicitly writable credential. Current membership and the operation's workspace role are still enforced. Review the exact action before executing it.
API keys default to their bound site. For multi-site OAuth connections, call list_projects and pass the intended projectId. Only approved sites are accessible.
Arguments
projectIdOptionalstring · uuid
Weeveo project id. Defaults to the key's project.
Validation pattern: see complete JSON Schema
nameRequiredstring
min length 1; max length 120
typeRequired"pageview" | "event"
valueRequiredstring
min length 1; max length 200
Nested fields are listed with dotted paths; array item fields use []. Defaults apply to omitted arguments. For unions and all validation details, use the complete schema below.
HTTP request
POST https://weeveo.com/api/v1/tools/create_goal
Authorization: Bearer <YOUR_CREDENTIAL>
Content-Type: application/json
<JSON_ARGUMENT_OBJECT>Replace the placeholders with your server-side credential and a JSON object satisfying the schema. GET is rejected for writes. Do not retry a change blindly after an uncertain network response. These documentation pages never execute a request.
Complete input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"projectId": {
"description": "Weeveo project id. Defaults to the key's project.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"type": {
"type": "string",
"enum": [
"pageview",
"event"
]
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"name",
"type",
"value"
]
}Download all tool schemas or query authenticated GET /api/v1/tools for runtime discovery.
Response & errors
{
"tool": "create_goal",
"result": "<tool-specific value>"
}The result placeholder above describes the response envelope, not a literal returned string or a universal result schema. Results vary by tool. Fields named Cents are minor currency units; use returned currency labels. Secrets from creation tools are one-time results and must be saved securely immediately.
Failures return an HTTP error status with an error message. See errors, limits and retries, common analytics arguments and permissions.
Still looking for an answer? Try troubleshooting or get in touch.