Tyk v2.2 Documentation Components

HomeTyk v2.2 Documentation ComponentsCreate a Dashboard User (API)

Create a Dashboard User (API)

To create a dashboard user with the API, we will first need some Dashboard API Credentials, these can be found in your user detail page, near the bottom of the page:

enter image description here

(you will need 1. API Key)

Once you have your dashboard API Credentials, you can create a user very easily using the API, the following Curl command will generate a user:

curl -H "Authorization: {YOUR-API-KEY}"
 -H "Content-Type: application/json"
 -d '{
    "first_name": "Test",
    "last_name": "User",
    "email_address": "[email protected]",
    "active": true,
    "user_permissions": {
        "IsAdmin": "admin"
    "password": "thisisatest"
 }' http://{your-dashboard-host}:{port}/api/users | python -mjson.tool

The fields are quite self explanatory, in this case, we have given the user an Admin permission. To see a detailed breakdown of permission objects, please see below.

You will see the following response if all has gone to plan:

    "Message": "User created",
    "Meta": null,
    "Status": "OK"

The user is now active.

Was this article helpful to you? Yes No