Create Vault

Create a new Vault

Request

POST /vaults

Example Request

curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"description":"Production Vault","metadata":"env=prod","name":"prod-vault"}' \
https://api.ngrok.com/vaults

Parameters

NameTypeDescription
namestringName of vault
metadatastringArbitrary user-defined metadata for this Vault
descriptionstringdescription of Vault

Response

Returns a 201 response on success

Example Response

{
  "created_at": "2025-09-04T10:11:43Z",
  "created_by": "usr_32ELAUA7XkJHRP2DgH2JjDRLp81",
  "description": "Production Vault",
  "id": "vault_32ELIL9nzEhwlvjSpNSI6xXGNcE",
  "last_updated_by": "usr_32ELAUA7XkJHRP2DgH2JjDRLp81",
  "metadata": "env=prod",
  "name": "prod-vault",
  "updated_at": "2025-09-04T10:11:43Z",
  "uri": "https://api.ngrok.com/vaults/vault_32ELIL9nzEhwlvjSpNSI6xXGNcE"
}

Fields

NameTypeDescription
idstringidentifier for Vault
uristringURI of this Vault API resource
created_atstringTimestamp when the Vault was created (RFC 3339 format)
updated_atstringTimestamp when the Vault was last updated (RFC 3339 format)
namestringName of vault
descriptionstringdescription of Vault
metadatastringArbitrary user-defined metadata for this Vault
created_bystringReference to who created this Vault
last_updated_bystringReference to who created this Vault

Update Vault

Update an existing Vault by ID

Request

PATCH /vaults/{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/vaults/vault_32ELIL9nzEhwlvjSpNSI6xXGNcE

Parameters

NameTypeDescription
idstringidentifier for Vault
namestringName of vault
metadatastringArbitrary user-defined metadata for this Vault
descriptionstringdescription of Vault

Response

Returns a 200 response on success

Example Response

{
  "created_at": "2025-09-04T10:11:43Z",
  "created_by": "usr_32ELAUA7XkJHRP2DgH2JjDRLp81",
  "description": "Production Vault",
  "id": "vault_32ELIL9nzEhwlvjSpNSI6xXGNcE",
  "last_updated_by": "usr_32ELAUA7XkJHRP2DgH2JjDRLp81",
  "metadata": "{\"environment\": \"production\"}",
  "name": "prod-vault",
  "updated_at": "2025-09-04T10:11:43Z",
  "uri": "https://api.ngrok.com/vaults/vault_32ELIL9nzEhwlvjSpNSI6xXGNcE"
}

Fields

NameTypeDescription
idstringidentifier for Vault
uristringURI of this Vault API resource
created_atstringTimestamp when the Vault was created (RFC 3339 format)
updated_atstringTimestamp when the Vault was last updated (RFC 3339 format)
namestringName of vault
descriptionstringdescription of Vault
metadatastringArbitrary user-defined metadata for this Vault
created_bystringReference to who created this Vault
last_updated_bystringReference to who created this Vault

Delete Vault

Delete a Vault

Request

DELETE /vaults/{id}

Example Request

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

Response

Returns a 204 response with no body on success

Get Vault

Get a Vault by ID

Request

GET /vaults/{id}

Example Request

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

Response

Returns a 200 response on success

Example Response

{
  "created_at": "2025-09-04T10:11:43Z",
  "created_by": "usr_32ELAUA7XkJHRP2DgH2JjDRLp81",
  "description": "Production Vault",
  "id": "vault_32ELIL9nzEhwlvjSpNSI6xXGNcE",
  "last_updated_by": "usr_32ELAUA7XkJHRP2DgH2JjDRLp81",
  "metadata": "env=prod",
  "name": "prod-vault",
  "updated_at": "2025-09-04T10:11:43Z",
  "uri": "https://api.ngrok.com/vaults/vault_32ELIL9nzEhwlvjSpNSI6xXGNcE"
}

Fields

NameTypeDescription
idstringidentifier for Vault
uristringURI of this Vault API resource
created_atstringTimestamp when the Vault was created (RFC 3339 format)
updated_atstringTimestamp when the Vault was last updated (RFC 3339 format)
namestringName of vault
descriptionstringdescription of Vault
metadatastringArbitrary user-defined metadata for this Vault
created_bystringReference to who created this Vault
last_updated_bystringReference to who created this Vault

GetSecretsByVault Vault

Get Secrets by Vault ID

Request

GET /vaults/{id}/secrets

Example Request

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

Response

Returns a 200 response on success

Example Response

{
  "next_page_uri": null,
  "secrets": [],
  "uri": "https://api.ngrok.com/vaults/vault_32ELIL9nzEhwlvjSpNSI6xXGNcE/secrets"
}

Fields

NameTypeDescription
secretsSecretThe list of Secrets for this account
uristring
next_page_uristringURI of the next page of results, or null if there is no next page

Secret fields

NameTypeDescription
idstringidentifier for Secret
uristringURI of this Secret API resource
created_atstringTimestamp when the Secret was created (RFC 3339 format)
updated_atstringTimestamp when the Secret was last updated (RFC 3339 format)
namestringName of secret
descriptionstringdescription of Secret
metadatastringArbitrary user-defined metadata for this Secret
created_byRefReference to who created this Secret
last_updated_byRefReference to who created this Secret
vaultRefReference to the vault the secret is stored in

Ref fields

NameTypeDescription
idstringa resource identifier
uristringa uri for locating a resource

List Vaults

List all Vaults owned by account

Request

GET /vaults

Example Request

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

Response

Returns a 200 response on success

Example Response

{
  "next_page_uri": null,
  "uri": "https://api.ngrok.com/vaults",
  "vaults": [
    {
      "created_at": "2025-09-04T10:11:43Z",
      "created_by": "usr_32ELAUA7XkJHRP2DgH2JjDRLp81",
      "description": "Production Vault",
      "id": "vault_32ELIL9nzEhwlvjSpNSI6xXGNcE",
      "last_updated_by": "usr_32ELAUA7XkJHRP2DgH2JjDRLp81",
      "metadata": "env=prod",
      "name": "prod-vault",
      "updated_at": "2025-09-04T10:11:43Z",
      "uri": "https://api.ngrok.com/vaults/vault_32ELIL9nzEhwlvjSpNSI6xXGNcE"
    }
  ]
}

Fields

NameTypeDescription
vaultsVaultThe list of Vaults for this account
uristring
next_page_uristringURI of the next page of results, or null if there is no next page

Vault fields

NameTypeDescription
idstringidentifier for Vault
uristringURI of this Vault API resource
created_atstringTimestamp when the Vault was created (RFC 3339 format)
updated_atstringTimestamp when the Vault was last updated (RFC 3339 format)
namestringName of vault
descriptionstringdescription of Vault
metadatastringArbitrary user-defined metadata for this Vault
created_bystringReference to who created this Vault
last_updated_bystringReference to who created this Vault