How do I create an API credential?
Download MarkdownOnly the account owner can mint one, and it happens at Settings -> API.
Only the account owner can mint one, and it happens at Settings -> API.
- Open Settings -> API and find the "Create scoped credential" panel.
- Type a credential name, up to 80 characters.
- Pick an Expires value: 30 days, 90 days, 1 year, or no expiration. It defaults to 90 days.
- Tick the scopes this integration needs. Nothing is selected by default, and "Select all read" and "Clear" are there to help.
- Click Create credential.
The new value appears once, in a locked dialog that says "This is the only time this credential will ever be shown." Copy it before you dismiss it. Afterward only its prefix and usage metadata are ever visible.
You will know you copied the credential and not something else by its shape. It begins cmk_, continues with 64 hexadecimal characters, and is 68 characters long in total:
http
Authorization: Bearer cmk_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefPaste that value straight into the integration, as the word Bearer, then one space, then the token. Never leave the example in place, and never wrap your own value in angle brackets or quotes of your own: the server compares what arrives against the stored credentials and refuses anything else.
Related Articles
- What can the CloseMagnet API do?It reads almost everything in your account, and what it writes is deliberately narrow. Its endpoints span 17 domains and the large majority are read-only. The ones that write do one of these things:
- What is the difference between my account API token and a scoped credential?Your account API token was minted automatically when the account was created. It sits pinned as the first row in Settings -> API with the type "Automatic", carries a fixed set of scopes, can be revealed again at any time, and can
- How do I rotate or revoke a credential?It depends which kind you have, and only the account owner can do either one.
- Which scopes should I pick?Select the fewest permissions your integration actually needs. Settings -> API shows the scopes an owner can choose. A registered system permission is not necessarily a selectable customer credential option, so follow the current