# How do I create an API credential?

Only the account owner can mint one, and it happens at Settings -> API.

1. Open Settings -> API and find the "Create scoped credential" panel.
2. Type a credential name, up to 80 characters.
3. Pick an Expires value: 30 days, 90 days, 1 year, or no expiration. It defaults to 90 days.
4. Tick the scopes this integration needs. Nothing is selected by default, and "Select all read" and "Clear" are there to help.
5. 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_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
```

Paste 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.

Read online: https://docs.closemagnet.com/articles/questions/how-do-i-create-an-api-credential
