Key-value storage

The key-value storage keeps the parameters (such as text color or company name) and their values that define the email templates for client notifications. The parameters and their values are stored as key-value pairs.

GET[host]/api/v2/my/storage/values

Get a list of key-value pairs

GET[host]/api/v2/my/storage/values/{valueId}

Get key-value pair details

Get a list of key-value pairs

Use this method to obtain a list of key-value pairs defined in the B2Core UI.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Query parameters:

The following filter parameters are for this method:

keys

The name of a key.

tags

The name of a tag.

value

The value assigned to a key.

type

The value type. Possible values:

  • string

  • html

  • mail

  • url

The following sorting parameter is available for this method:

createTime

The date and time when a key-value pair was created.

GET[host]/api/v2/my/storage/values

curl --location -g 'https://host.name/api/v2/my/storage/values?limit=10&offset=0&sort_order=desc&sort_by=createTime&filter[keys][0]=support_email&filter[keys][1]=mail&filter[tags][0]=1&filter[tags][1]=1&filter[value]=suppor@exmaple.com&filter[type]=string' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'

Response

A response contains an array of Key-Value Pair objects providing information about the key-value pairs matching the request parameters.


Get key-value pair details

Use this method to obtain detailed information about a specific key-value pair.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

valueId required

The identifier of a key-value pair.

GET[host]/api/v2/my/storage/values/{valueId}

curl --location --request GET 'https://host.name/api/v2/my/storage/values/1' \
--header 'Authorization: Bearer <token>'

Response

A response contains a Key-Value Pair object providing information about the specified key-value pair.