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-08-02T07:15:45Z",
"id": "bot_2k5okzSVSod8uyxwRSxtEBYuUub",
"name": "new bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2k5okzSVSod8uyxwRSxtEBYuUub"
}

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_2k5okzSVSod8uyxwRSxtEBYuUub

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_2k5okzSVSod8uyxwRSxtEBYuUub

Response

Returns a 200 response on success

Example Response

{
"active": true,
"created_at": "2024-08-02T07:15:45Z",
"id": "bot_2k5okzSVSod8uyxwRSxtEBYuUub",
"name": "new bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2k5okzSVSod8uyxwRSxtEBYuUub"
}

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": true,
"created_at": "2024-08-02T07:15:45Z",
"id": "bot_2k5ol4lHRodaV34O3fH46VCyESC",
"name": "API example bot user",
"uri": "https://api.ngrok.com/bot_users/bot_2k5ol4lHRodaV34O3fH46VCyESC"
}
],
"next_page_uri": "https://api.ngrok.com/bot_users?before_id=bot_2k5ol4lHRodaV34O3fH46VCyESC&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,"name":"inactive bot user from API"}' \
https://api.ngrok.com/bot_users/bot_2k5okzSVSod8uyxwRSxtEBYuUub

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-08-02T07:15:45Z",
"id": "bot_2k5okzSVSod8uyxwRSxtEBYuUub",
"name": "inactive bot user from API",
"uri": "https://api.ngrok.com/bot_users/bot_2k5okzSVSod8uyxwRSxtEBYuUub"
}

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