Skip to main content

Bot Users

Create Bot User

Create a new bot user

Request

POST /bot_users

Example Request

curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"name":"new bot user from API"}' \
https://api.ngrok.com/bot_users

Parameters

NameTypeDescription
namestringhuman-readable name used to identify the bot
activebooleanwhether or not the bot is active

Response

Returns a 201 response on success

Example Response

{
"active": true,
"created_at": "2024-04-29T18:29:43Z",
"id": "bot_2fmnzZilKWDzyGYuDr7nRNhoVWw",
"name": "new bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2fmnzZilKWDzyGYuDr7nRNhoVWw"
}

Fields

NameTypeDescription
idstringunique API key resource identifier
uristringURI to the API resource of this bot user
namestringhuman-readable name used to identify the bot
activebooleanwhether or not the bot is active
created_atstringtimestamp when the api key was created, RFC 3339 format

Delete Bot User

Delete a bot user by ID

Request

DELETE /bot_users/{id}

Example Request

curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/bot_users/bot_2fmnzZilKWDzyGYuDr7nRNhoVWw

Response

Returns a 204 response with no body on success

Get Bot User

Get the details of a Bot User by ID.

Request

GET /bot_users/{id}

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/bot_users/bot_2fmnzZilKWDzyGYuDr7nRNhoVWw

Response

Returns a 200 response on success

Example Response

{
"active": true,
"created_at": "2024-04-29T18:29:43Z",
"id": "bot_2fmnzZilKWDzyGYuDr7nRNhoVWw",
"name": "new bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2fmnzZilKWDzyGYuDr7nRNhoVWw"
}

Fields

NameTypeDescription
idstringunique API key resource identifier
uristringURI to the API resource of this bot user
namestringhuman-readable name used to identify the bot
activebooleanwhether or not the bot is active
created_atstringtimestamp when the api key was created, RFC 3339 format

List Bot Users

List all bot users in this account.

Request

GET /bot_users

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/bot_users?limit=1

Response

Returns a 200 response on success

Example Response

{
"bot_users": [
{
"active": false,
"created_at": "2024-04-29T18:29:43Z",
"id": "bot_2fmnzZilKWDzyGYuDr7nRNhoVWw",
"name": "new bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2fmnzZilKWDzyGYuDr7nRNhoVWw"
}
],
"next_page_uri": "https://api.ngrok.com/bot_users?before_id=bot_2fmnzZilKWDzyGYuDr7nRNhoVWw&limit=1",
"uri": "https://api.ngrok.com/bot_users"
}

Fields

NameTypeDescription
bot_usersBotUserthe list of all bot users on this account
uristringURI of the bot users list API resource
next_page_uristringURI of the next page, or null if there is no next page

BotUser fields

NameTypeDescription
idstringunique API key resource identifier
uristringURI to the API resource of this bot user
namestringhuman-readable name used to identify the bot
activebooleanwhether or not the bot is active
created_atstringtimestamp when the api key was created, RFC 3339 format

Update Bot User

Update attributes of a bot user by ID.

Request

PATCH /bot_users/{id}

Example Request

curl \
-X PATCH \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"active":false}' \
https://api.ngrok.com/bot_users/bot_2fmnzZilKWDzyGYuDr7nRNhoVWw

Parameters

NameTypeDescription
idstring
namestringhuman-readable name used to identify the bot
activebooleanwhether or not the bot is active

Response

Returns a 200 response on success

Example Response

{
"active": false,
"created_at": "2024-04-29T18:29:43Z",
"id": "bot_2fmnzZilKWDzyGYuDr7nRNhoVWw",
"name": "new bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2fmnzZilKWDzyGYuDr7nRNhoVWw"
}

Fields

NameTypeDescription
idstringunique API key resource identifier
uristringURI to the API resource of this bot user
namestringhuman-readable name used to identify the bot
activebooleanwhether or not the bot is active
created_atstringtimestamp when the api key was created, RFC 3339 format