# /addkey

Gives a key with the number you pick. The game's help: Give a key to a player. If no username is given then you will receive the item yourself. Key name is optional. Use: /addkey "username" "keyId" "name". Example: /addkey "rj" "7295

Source page: https://zomboiddb.com/commands/addkey/

Command

`/addkey`

Who can use it

gm and above

Capability

`AddItem`

Single player

No, it needs a server

## What you type

`/addkey "username" keyId ["name"]`

`/addkey keyId ["name"]`

## Examples

- `/addkey "rj" 7295` a key with number 7295 for rj
- `/addkey 7295 "Front door"` a key for you with a name on it

rj is the name the game's own help uses. Put your player's name in its place.

[Build this line with your own values](https://zomboiddb.com/commands/?cmd=addkey#builder)

## What the game answers

- Pass username
- No such user
- Key ... Added in ...'s inventory.
- User ... not found.

## Which access levels can use it

| Capability | banned | user | priority | observer | gm | moderator | admin |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `AddItem` | | | | | yes | yes | yes |

These are the roles the game makes for a new server. An admin can change them in the admin panel. [What each level may do](https://zomboiddb.com/access-levels/).

## More commands like this one

[/additem](https://zomboiddb.com/commands/additem/) [/removeitem](https://zomboiddb.com/commands/removeitem/)
