Create a key
Creates a key. Needs the Manage API keys permission. A key acts for the person who created it, with their current role in the workspace. This change needs an owner or admin. A key never creates a key with a permission it does not hold itself (Visitor details and the raw export included) or a site outside its own; when this key expires, the new key must expire no later. The secret is in this answer once and never again.
Authorizations
An API key that starts with cs_sk_, created under API and MCP, API keys. A key covers every site of its workspace or a chosen list, and carries permissions per resource (Analytics, Revenue and payments, Goals and events, Funnels, Sites, Notes, Alerts) and extras (Visitor details, Raw events export, Team members, Workspace name, See API keys, Manage API keys). A change acts for the key's creator, with their current role. A request outside them answers 403 naming the missing permission.
Body
What the key may do: analytics:read, visitors:details, revenue:read, revenue:write, goals:read, goals:write, funnels:read, funnels:write, sites:read, sites:write, notes:read, notes:write, alerts:read, alerts:write, team:read, team:write, keys:read, keys:write, events:raw. Never more than the key making the request holds.
1 - 19 elements40When the key stops working. Required, and no later, when the requesting key itself expires.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$