Create HTTP Response Backend

Request

POST /backends/http_response

Example Request

curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"body":"I'm a teapot","description":"acme http response","headers":{"Content-Type":"text/plain"},"metadata":"{\"environment\": \"staging\"}","status_code":418}' \
https://api.ngrok.com/backends/http_response

Parameters

NameTypeDescription
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
bodystringbody to return as fixed content
headersMap<string, string>headers to return
status_codeint32status code to return

Response

Returns a 201 response on success

Example Response

{
  "body": "I'm a teapot",
  "created_at": "2025-09-04T10:11:37Z",
  "description": "acme http response",
  "headers": {
    "content-type": "text/plain"
  },
  "id": "bkdhr_32ELHbfllc7fdX99DEBe3QekZ6H",
  "metadata": "{\"environment\": \"staging\"}",
  "status_code": 418,
  "uri": "https://api.ngrok.com/backends/http_response/bkdhr_32ELHbfllc7fdX99DEBe3QekZ6H"
}

Fields

NameTypeDescription
idstring
uristringURI of the HTTPResponseBackend API resource
created_atstringtimestamp when the backend was created, RFC 3339 format
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
bodystringbody to return as fixed content
headersMap<string, string>headers to return
status_codeint32status code to return

Delete HTTP Response Backend

Request

DELETE /backends/http_response/{id}

Example Request

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

Response

Returns a 204 response with no body on success

Get HTTP Response Backend

Request

GET /backends/http_response/{id}

Example Request

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

Response

Returns a 200 response on success

Example Response

{
  "body": "I'm a teapot",
  "created_at": "2025-09-04T10:11:37Z",
  "description": "acme http response",
  "headers": {
    "content-type": "text/plain"
  },
  "id": "bkdhr_32ELHbfllc7fdX99DEBe3QekZ6H",
  "metadata": "{\"environment\": \"staging\"}",
  "status_code": 418,
  "uri": "https://api.ngrok.com/backends/http_response/bkdhr_32ELHbfllc7fdX99DEBe3QekZ6H"
}

Fields

NameTypeDescription
idstring
uristringURI of the HTTPResponseBackend API resource
created_atstringtimestamp when the backend was created, RFC 3339 format
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
bodystringbody to return as fixed content
headersMap<string, string>headers to return
status_codeint32status code to return

List HTTP Response Backends

Request

GET /backends/http_response

Example Request

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

Response

Returns a 200 response on success

Example Response

{
  "backends": [
    {
      "body": "I'm a teapot",
      "created_at": "2025-09-04T10:11:37Z",
      "description": "acme http response",
      "headers": {
        "content-type": "text/plain"
      },
      "id": "bkdhr_32ELHbfllc7fdX99DEBe3QekZ6H",
      "metadata": "{\"environment\": \"staging\"}",
      "status_code": 418,
      "uri": "https://api.ngrok.com/backends/http_response/bkdhr_32ELHbfllc7fdX99DEBe3QekZ6H"
    },
    {
      "body": "one",
      "created_at": "2025-09-04T10:11:37Z",
      "headers": null,
      "id": "bkdhr_32ELHaq3qpFhdAOKQmnc9x8ewyl",
      "status_code": 200,
      "uri": "https://api.ngrok.com/backends/http_response/bkdhr_32ELHaq3qpFhdAOKQmnc9x8ewyl"
    },
    {
      "body": "one",
      "created_at": "2025-09-04T10:11:30Z",
      "headers": null,
      "id": "bkdhr_32ELGgXUzPOhWmKlLNqtSxcNCdz",
      "status_code": 200,
      "uri": "https://api.ngrok.com/backends/http_response/bkdhr_32ELGgXUzPOhWmKlLNqtSxcNCdz"
    }
  ],
  "next_page_uri": null,
  "uri": "https://api.ngrok.com/backends/http_response"
}

Fields

NameTypeDescription
backendsHTTPResponseBackend
uristring
next_page_uristring

HTTPResponseBackend fields

NameTypeDescription
idstring
uristringURI of the HTTPResponseBackend API resource
created_atstringtimestamp when the backend was created, RFC 3339 format
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
bodystringbody to return as fixed content
headersMap<string, string>headers to return
status_codeint32status code to return

Update HTTP Response Backend

Request

PATCH /backends/http_response/{id}

Example Request

curl \
-X PATCH \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"metadata":"{\"environment\": \"production\"}"}' \
https://api.ngrok.com/backends/http_response/bkdhr_32ELHbfllc7fdX99DEBe3QekZ6H

Parameters

NameTypeDescription
idstring
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
bodystringbody to return as fixed content
headersMap<string, string>headers to return
status_codeint32status code to return

Response

Returns a 200 response on success

Example Response

{
  "body": "I'm a teapot",
  "created_at": "2025-09-04T10:11:37Z",
  "description": "acme http response",
  "headers": {
    "content-type": "text/plain"
  },
  "id": "bkdhr_32ELHbfllc7fdX99DEBe3QekZ6H",
  "metadata": "{\"environment\": \"production\"}",
  "status_code": 418,
  "uri": "https://api.ngrok.com/backends/http_response/bkdhr_32ELHbfllc7fdX99DEBe3QekZ6H"
}

Fields

NameTypeDescription
idstring
uristringURI of the HTTPResponseBackend API resource
created_atstringtimestamp when the backend was created, RFC 3339 format
descriptionstringhuman-readable description of this backend. Optional
metadatastringarbitrary user-defined machine-readable data of this backend. Optional
bodystringbody to return as fixed content
headersMap<string, string>headers to return
status_codeint32status code to return