Create a key
Mint a key, which acts as you and nobody else.
The readable value comes back in the token field, beside the object describing the key. This is the only time it exists in that form. Copy it now: it is not shown again, and a key you fail to copy is replaced rather than recovered.
Calling this with a key is deliberate, and it is how a key is rotated without opening the application. Every creation is written to your account log, so a key that mints other keys is visible afterwards.
Body parameters
Sent as JSON. Anything not listed here is ignored.
What the key is for, in a few words. Between 3 and 255 characters. Two keys may share a name; the id is what tells them apart.
What will use the key: script, which is what it is when left out, or assistant for an assistant connecting over MCP. It describes the key and restricts nothing.
Whether this key may read the values of fields marked sensitive. False when it is left out. Turn it on only for a device that needs them. A key can only give another key a scope it holds itself, so a key without this scope gets 422 on sensitive_fields.
Whether this key may work through the support queue of the whole instance. False when it is left out. Only an administrator of the instance may turn it on, and only with a key that holds the administration scope itself; anybody else gets 422 on administration.
Returns
The new key object, and the readable key beside it.
The key.
Always api_key. It names the kind of record, so a caller holding several kinds can tell them apart without looking at where they came from.
The id of this record, as a string even when it reads as a number. It is what every endpoint naming this record takes.
Everything the record holds.
What the key is for, between 3 and 255 characters, as the person who minted it wrote it. Two keys may share a name; the id is what tells them apart.
What the key was minted for: script for something you wrote yourself, assistant for an assistant connecting over MCP. It tells the two apart on the security screen and in your account log, and it restricts nothing: a key of either kind reaches exactly what you reach.
Whether the key reaches the values of fields marked sensitive. False unless that was chosen when the key was minted, because a key is handed to a device and an address book on a phone can be read by the other applications on it.
Whether the key reaches the support queue of the whole instance. Only an administrator of the instance can mint such a key, and only when it was chosen at that moment.
When the key last let something in, as a count of seconds, or null if it never has. A key with null here has been minted and never used.
When the key stops working, as a count of seconds, or null when it never does. Every key issued today is null: expiry is not something this API sets yet.
When the key was minted, as a count of seconds since 1970.
When the row last changed, as a count of seconds, or null. Using a key changes it, so in practice it tracks last_used_at.
Where to find this record.
The absolute address this record is read from.
The readable key, at the top of the answer rather than inside the object, because the shape describing a key is one that can never carry a secret. This is the only time it exists in this form: only a hash of it is kept, so a key you fail to copy has to be replaced rather than recovered.
Rate limit
Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.
Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.