NAV Navigation
HTTP cURL JavaScript PHP Ruby Python Java Go

Welcome

This documentation was last updated on Wed Jul 24 11:32:58 UTC 2024

Welcome to the Mambu Functions API Reference documentation.

Mambu Functions help you enhance your financial products by extending the functionality of the Mambu composable banking platform. Using Functions reduces the time it takes to create custom financial products and gives you the power to customize for your unique requirements by injecting your own code into existing business processes.

Base URLs

The base URL for requests to the API is:

https://TENANT_NAME.mambu.com/api/mambu-functions

You may also use the sandbox environment for testing. The sandbox environment is generally one version ahead of the production environment. The base URL for your sandbox environment is:

https://TENANT_NAME.sandbox.mambu.com/api/mambu-functions

HTTP verbs

Standard HTTP verbs are used to indicate the API request method.

Verb Function
GET To get a resource or a collection of resources
POST To create a resource
PUT To replace an existing resource
DELETE To delete a resource

Open API Specification

Use this link to get the latest Open API Specification.

This documentation is automatically generated from an OpenAPI Specification (OAS).

This OAS file can also be used to quickly scaffold client software development kits, in various languages, for interacting with our APIs using tools such as Swagger Editor.

Using the API

Authentication

Mambu supports two methods for authenticating API requests:

Basic Authentication

curl --location --request GET 'https://TENANT_NAME.mambu.com/api/users' \
--header 'Authorization: Basic U29tZVVzZXI6T3BlblNlc2FtZQ=='
GET /api/users HTTP/1.1
Host: TENANT_NAME.mambu.com
Authorization: Basic U29tZVVzZXI6T3BlblNlc2FtZQ==
var settings = {
  "url": "https://TENANT_NAME.mambu.com/api/users",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "Basic U29tZVVzZXI6T3BlblNlc2FtZQ=="
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
require "uri"
require "net/http"

url = URI("https://TENANT_NAME.mambu.com/api/users")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Basic U29tZVVzZXI6T3BlblNlc2FtZQ=="

response = https.request(request)
puts response.read_body
import requests

url = "https://TENANT_NAME.mambu.com/api/users"

payload={}
headers = {
  'Authorization': 'Basic U29tZVVzZXI6T3BlblNlc2FtZQ=='
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://TENANT_NAME.mambu.com/api/users")
  .method("GET", null)
  .addHeader("Authorization", "Basic U29tZVVzZXI6T3BlblNlc2FtZQ==")
  .build();
Response response = client.newCall(request).execute();
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://TENANT_NAME.mambu.com/api/users"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Basic U29tZVVzZXI6T3BlblNlc2FtZQ==")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}

For basic authorization, provide your username and password directly via the Authorization header in the format Basic {base64-encoded-string}, where base64-encoded-string is the base-64-encoded value of your username and password separated by a colon ':'.

For example, a user with the username SomeUser and the password OpenSesame would take the value SomeUser:OpenSesame and base-64 encode it, yielding U29tZVVzZXI6T3BlblNlc2FtZQ==. They would then provide an Authorization header for their request with the value Basic U29tZVVzZXI6T3BlblNlc2FtZQ==.

See the code samples for this section for sample GET requests to the /users endpoint using the above example.

Note that the login credentials must be for a user account with API access permissions. For more information, see Creating a User - Access Rights in our User Guide.

API Keys

API keys are tokens that you provide in an apiKey header to authenticate requests. They are generated by API consumers, which are an abstraction similar to an OAuth client.

API consumers are currently an Early Access feature. If you would like to request access to this feature, please get in touch with your Mambu Customer Success Manager to discuss your requirements.

For more information on API consumers and keys, see API Consumers in our User Guide.

Content types

The Mambu Functions API will only accept JSON content. The format should be specified in the Content-Type header with the value application/json. Check the parameters table for each request for the required value for the Content-Type header.

For certain requests, including some POST requests, there is no need to supply a request body. For these requests, the Content-Type header can be omitted.

Throttling

Example response

429 Response

{
    "errors": [
        {
            "errorCode": 300013,
            "errorSource": "Request rate limit exceeded. Please try again later.",
            "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
        }
    ]
}

API requests may be throttled if the request rate exceeds acceptable levels. When throttling occurs, the response will include a 429 Too Many Requests status code.

Handling Throttling Responses

To handle throttling effectively and minimize its impact on your application, follow these guidelines:

Functions

List Functions

Code samples

# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/mambu-functions \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://TENANT_NAME.mambu.com/api/mambu-functions HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json


const headers = {
  'Accept':'application/vnd.mambu.v2+json'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get 'https://TENANT_NAME.mambu.com/api/mambu-functions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('https://TENANT_NAME.mambu.com/api/mambu-functions', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://TENANT_NAME.mambu.com/api/mambu-functions', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://TENANT_NAME.mambu.com/api/mambu-functions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /mambu-functions

Gets a list of Mambu Functions, with optional filtering by extensionPointId and/or functionName patterns.

The following pattern symbols are supported:

This operation also supports pagination to help manage large lists.

Parameters

Name Type Description In
extensionPointId string The ID of the Extension Point (for example DEPOSIT_FEE_AMOUNT or DEPOSIT_FEE*) query
functionName string The name of the Mambu Function (for example, fee* or fee?) query
offset integer(int32) For pagination this defines the start index to search from when getting elements and is used in combination with limit to paginate results. query
limit integer(int32) For pagination this defines the number of elements to get and is used in combination with offset to paginate results. query
paginationDetails string Flag specifying whether the pagination details should be provided in response headers. Please note that this is disabled (OFF) by default. query

Enumerated Values

Parameter Value
paginationDetails ON
paginationDetails OFF

Example Responses

200 Response

[
  {
    "name": "my-func-1",
    "state": "ACTIVE",
    "version": "v1",
    "lastModifiedDate": "2023-05-08T06:53:52Z",
    "extensionPointId": "DEPOSIT_FEE_AMOUNT",
    "lastDeploymentStatus": "SUCCESS",
    "lastDeploymentFailureReason": ""
  }
]

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Returned Mambu Functions Inline
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Response Schema

Status Code 200

Name Type Description Restrictions
anonymous [MambuFunction] [Represents a Mambu Function.] none
» name string The name of the Mambu Function. none
» state string The current state of the Mambu Function. none
» version string The version of the Mambu Function. none
» lastModifiedDate string(date-time) The last date the Mambu Function was updated (in UTC). none
» extensionPointId string The ID of the extension point none
» lastDeploymentStatus string The status of the last asynchronous deployment none
» lastDeploymentFailureReason string The reason the last deployment failed if it did none

Enumerated Values

Property Value
state CREATE_PENDING
state UPDATE_PENDING
state ACTIVE
state FAILED
state REMOVING

Response Headers

Status Header Type Format Description
200 Items-Offset integer int32 The index of the first returned item.
200 Items-Limit integer int32 The size of the requested list.
200 Items-Total integer int32 The total number of available items.

Create Function

Code samples

# You can also use wget
curl -X POST https://TENANT_NAME.mambu.com/api/mambu-functions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Content-Type: string'

POST https://TENANT_NAME.mambu.com/api/mambu-functions HTTP/1.1
Host: tenant_name.mambu.com
Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Content-Type: string

const inputBody = '{
  "name": "my-func-1",
  "extensionPointId": "DEPOSIT_FEE_AMOUNT",
  "version": "v1",
  "functionCode": {
    "languageId": "es2020",
    "code": "ZXhwb3J0cy5kZWZhdWx0ID0gYXN5bmMgZnVuY3Rpb24oaW5wdXQpIHsgCiAgcmV0dXJuIGlucHV0LnRvdGFsQmFsYW5jZSAqIDAuMDE7IAp9"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Content-Type':'string'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Content-Type' => 'string'
}

result = RestClient.post 'https://TENANT_NAME.mambu.com/api/mambu-functions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Content-Type': 'string'
}

r = requests.post('https://TENANT_NAME.mambu.com/api/mambu-functions', headers = headers)

print(r.json())

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Content-Type' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://TENANT_NAME.mambu.com/api/mambu-functions', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Content-Type": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://TENANT_NAME.mambu.com/api/mambu-functions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /mambu-functions

Schedules a new function to be created and returns the Function, including its deployment state.

Depending on the outcome of this operation, the returned Function might be in one of these states:

State Description
CREATE_PENDING Mambu Function has been queued for deployment.
ACTIVE Mambu Function has been successfully deployed and is ready to be used.
FAILED Mambu Function deployment failed.

Example Request

{
  "name": "my-func-1",
  "extensionPointId": "DEPOSIT_FEE_AMOUNT",
  "version": "v1",
  "functionCode": {
    "languageId": "es2020",
    "code": "ZXhwb3J0cy5kZWZhdWx0ID0gYXN5bmMgZnVuY3Rpb24oaW5wdXQpIHsgCiAgcmV0dXJuIGlucHV0LnRvdGFsQmFsYW5jZSAqIDAuMDE7IAp9"
  }
}

Parameters

Name Type Description In
Content-Type (required) string application/json header
body CreateMambuFunction Represents an action to create a Mambu Function. body

Example Responses

202 Response

{
  "name": "my-func-1",
  "state": "ACTIVE",
  "version": "v1",
  "lastModifiedDate": "2023-05-08T06:53:52Z",
  "extensionPointId": "DEPOSIT_FEE_AMOUNT",
  "lastDeploymentStatus": "SUCCESS",
  "lastDeploymentFailureReason": ""
}

409 Response

{
  "errors": [
    {
      "errorCode": 30000,
      "errorSource": "A human-readable message",
      "errorReason": "MFUNCTION_ALREADY_EXISTS"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
202 Accepted Mambu Function created MambuFunction
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
409 Conflict Conflict - Validation: This code is returned when there is another concurrent operation on the same Function or a Function with the same name already exists. ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Get Function

Code samples

# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName} HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json


const headers = {
  'Accept':'application/vnd.mambu.v2+json'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /mambu-functions/{functionName}

Get the details of a specified Mambu Function, including its deployment state. You can use this operation to check a Function's deployment state.

Parameters

Name Type Description In
functionName (required) string The name of the Function to fetch. path

Example Responses

200 Response

{
  "name": "my-func-1",
  "state": "ACTIVE",
  "version": "v1",
  "lastModifiedDate": "2023-05-08T06:53:52Z",
  "extensionPointId": "DEPOSIT_FEE_AMOUNT",
  "lastDeploymentStatus": "SUCCESS",
  "lastDeploymentFailureReason": ""
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Mambu Function returned MambuFunction
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Mambu Function not found ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Update Function

Code samples

# You can also use wget
curl -X PUT https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Content-Type: string'

PUT https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName} HTTP/1.1
Host: tenant_name.mambu.com
Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Content-Type: string

const inputBody = '{
  "version": "v1",
  "functionCode": {
    "languageId": "es2020",
    "code": "ZXhwb3J0cy5kZWZhdWx0ID0gYXN5bmMgZnVuY3Rpb24oaW5wdXQpIHsgCiAgcmV0dXJuIGlucHV0LnRvdGFsQmFsYW5jZSAqIDAuMDE7IAp9"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Content-Type':'string'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Content-Type' => 'string'
}

result = RestClient.put 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Content-Type': 'string'
}

r = requests.put('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}', headers = headers)

print(r.json())

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Content-Type' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Content-Type": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /mambu-functions/{functionName}

Schedules a function to be updated and returns the current Function, including its deployment state.

Depending on the outcome of this operation, the returned Function might be in one of these states:

State Description
UPDATE_PENDING Mambu Function has been queued for update.
ACTIVE Mambu Function has been successfully deployed and is ready to be used.
FAILED Mambu Function deployment failed.

Example Request

{
  "version": "v1",
  "functionCode": {
    "languageId": "es2020",
    "code": "ZXhwb3J0cy5kZWZhdWx0ID0gYXN5bmMgZnVuY3Rpb24oaW5wdXQpIHsgCiAgcmV0dXJuIGlucHV0LnRvdGFsQmFsYW5jZSAqIDAuMDE7IAp9"
  }
}

Parameters

Name Type Description In
Content-Type (required) string application/json header
functionName (required) string The name of the Function to be updated. path
body UpdateMambuFunction Represents an action to update a Mambu Function. body

Example Responses

202 Response

{
  "name": "my-func-1",
  "state": "ACTIVE",
  "version": "v1",
  "lastModifiedDate": "2023-05-08T06:53:52Z",
  "extensionPointId": "DEPOSIT_FEE_AMOUNT",
  "lastDeploymentStatus": "SUCCESS",
  "lastDeploymentFailureReason": ""
}

409 Response

{
  "errors": [
    {
      "errorCode": 30003,
      "errorSource": "A human-readable message",
      "errorReason": "MFUNCTION_OPERATION_IN_PROGRESS"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
202 Accepted Mambu Function updated MambuFunction
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Mambu Function not found ErrorResponse
409 Conflict Conflict - Validation: This code is returned when there is another concurrent operation on the same Function. ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Delete Function

Code samples

# You can also use wget
curl -X DELETE https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName} \
  -H 'Accept: application/vnd.mambu.v2+json'

DELETE https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName} HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json


const headers = {
  'Accept':'application/vnd.mambu.v2+json'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.delete 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.delete('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /mambu-functions/{functionName}

Schedules the specified Mambu Function for removal, provided that it is not already bound to a product. The actual removal will happen after 24 hours.

If the removal is scheduled successfully, the Function will be in the REMOVING state. If the removal fails after the grace period the state will change to FAILED.

Parameters

Name Type Description In
functionName (required) string The name of the Function to be deleted. path

Example Responses

400 Response

{
  "errors": [
    {
      "errorCode": 30002,
      "errorSource": "A human-readable message",
      "errorReason": "MFUNCTION_INTERNAL_ERROR"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content Mambu Function deleted. None
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Mambu Function not found ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Subscriptions

List Function Subscriptions

Code samples

# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Content-Type: string'

GET https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json
Content-Type: string


const headers = {
  'Accept':'application/vnd.mambu.v2+json',
  'Content-Type':'string'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json',
  'Content-Type' => 'string'
}

result = RestClient.get 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json',
  'Content-Type': 'string'
}

r = requests.get('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
    'Content-Type' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Content-Type": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /mambu-functions/{functionName}/subscriptions

Lists the Mambu Function Subscriptions of a specific functionName.

Parameters

Name Type Description In
Content-Type (required) string application/json header
functionName (required) string The name of the Function to get Subscriptions for. path

Example Responses

200 Response

[
  {
    "name": "all_savings_withdrawal"
  }
]

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of Mambu Function Subscriptions Inline
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Response Schema

Status Code 200

Name Type Description Restrictions
anonymous [MambuFunctionSubscriptionListItem] [Represents an item in the list of returned Mambu Function Subscriptions.] none
» name string The name of the Mambu Function Subscription. none

Create Function Subscription

Code samples

# You can also use wget
curl -X POST https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Content-Type: string'

POST https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions HTTP/1.1
Host: tenant_name.mambu.com
Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Content-Type: string

const inputBody = '{
  "name": "all_savings_withdrawal",
  "event": "ACCOUNT_IN_ARREARS",
  "batchSize": 50,
  "batchWindow": 3
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Content-Type':'string'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Content-Type' => 'string'
}

result = RestClient.post 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Content-Type': 'string'
}

r = requests.post('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions', headers = headers)

print(r.json())

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Content-Type' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Content-Type": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /mambu-functions/{functionName}/subscriptions

Creates a new Mambu Function Subscription.

Example Request

{
  "name": "all_savings_withdrawal",
  "event": "ACCOUNT_IN_ARREARS",
  "batchSize": 50,
  "batchWindow": 3
}

Parameters

Name Type Description In
Content-Type (required) string application/json header
functionName (required) string The name of the Function whose subscription is to be created. path
body CreateMambuFunctionSubscription Represents an action to create a Mambu Function Subscription. body

Example Responses

201 Response

{
  "name": "all_savings_withdrawal",
  "state": "ACTIVE",
  "batchSize": 50,
  "batchWindow": 3,
  "event": "SAVINGS_WITHDRAWAL"
}

409 Response

{
  "errors": [
    {
      "errorCode": 30000,
      "errorSource": "A human-readable message",
      "errorReason": "MFUNCTION_ALREADY_EXISTS"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created Mambu Function Subscription created MambuFunctionSubscription
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
409 Conflict Conflict - Validation: This code is returned when there is another concurrent operation on the same subscription or the subscription with the same name already exists ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Get Function Subscription

Code samples

# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName} \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName} HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json


const headers = {
  'Accept':'application/vnd.mambu.v2+json'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /mambu-functions/{functionName}/subscriptions/{subscriptionName}

Get the details of a specific subscription of one function. This operation can be used to check the binding state of subscription

Parameters

Name Type Description In
functionName (required) string The name of the function. path
subscriptionName (required) string The name of the subscription to fetch the details. path

Example Responses

200 Response

{
  "name": "all_savings_withdrawal",
  "state": "ACTIVE",
  "batchSize": 50,
  "batchWindow": 3,
  "event": "SAVINGS_WITHDRAWAL"
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Mambu Function Subscription returned MambuFunctionSubscription
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Mambu Function Subscription not found ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Update Function Subscription

Code samples

# You can also use wget
curl -X PUT https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Content-Type: string'

PUT https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName} HTTP/1.1
Host: tenant_name.mambu.com
Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Content-Type: string

const inputBody = '{
  "batchSize": 50,
  "batchWindow": 10
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Content-Type':'string'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Content-Type' => 'string'
}

result = RestClient.put 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Content-Type': 'string'
}

r = requests.put('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}', headers = headers)

print(r.json())

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Content-Type' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Content-Type": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /mambu-functions/{functionName}/subscriptions/{subscriptionName}

Updates an existing Mambu Function Subscription with the provided changes.

Example Request

{
  "batchSize": 50,
  "batchWindow": 10
}

Parameters

Name Type Description In
Content-Type (required) string application/json header
functionName (required) string The name of the Function whose subscription is to be updated. path
subscriptionName (required) string The name of the Subscription to be updated. path
body UpdateMambuFunctionSubscription Represents an action to update a Mambu Function Subscription. body

Example Responses

200 Response

{
  "name": "all_savings_withdrawal",
  "state": "ACTIVE",
  "batchSize": 50,
  "batchWindow": 3,
  "event": "SAVINGS_WITHDRAWAL"
}

409 Response

{
  "errors": [
    {
      "errorCode": 30000,
      "errorSource": "A human-readable message",
      "errorReason": "MFUNCTION_OPERATION_IN_PROGRESS"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Mambu Function Subscription updated MambuFunctionSubscription
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Mambu Function Subscription not found ErrorResponse
409 Conflict Conflict - Validation: This code is returned when there is another concurrent operation on the same function ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Delete Function Subscription

Code samples

# You can also use wget
curl -X DELETE https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName} \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Content-Type: string'

DELETE https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName} HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json
Content-Type: string


const headers = {
  'Accept':'application/vnd.mambu.v2+json',
  'Content-Type':'string'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json',
  'Content-Type' => 'string'
}

result = RestClient.delete 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json',
  'Content-Type': 'string'
}

r = requests.delete('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
    'Content-Type' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Content-Type": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /mambu-functions/{functionName}/subscriptions/{subscriptionName}

Deletes the specified Mambu Function Subscription.

Parameters

Name Type Description In
Content-Type (required) string application/json header
functionName (required) string The name of the Function whose subscription is to be deleted. path
subscriptionName (required) string The name of the subscription to be deleted. path

Example Responses

400 Response

{
  "errors": [
    {
      "errorCode": 30002,
      "errorSource": "A human-readable message",
      "errorReason": "MFUNCTION_INTERNAL_ERROR"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content Mambu Function Subscription deleted None
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Mambu Function Subscription not found ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Disable Function Subscription

Code samples

# You can also use wget
curl -X PUT https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/disable \
  -H 'Accept: application/vnd.mambu.v2+json'

PUT https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/disable HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json


const headers = {
  'Accept':'application/vnd.mambu.v2+json'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/disable',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.put 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/disable',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.put('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/disable', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/disable', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/disable");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/disable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /mambu-functions/{functionName}/subscriptions/{subscriptionName}/disable

Disables a Mambu Function Subscription.

Parameters

Name Type Description In
functionName (required) string The name of the Function. path
subscriptionName (required) string The name of the subscription to disable. path

Example Responses

200 Response

{
  "name": "all_savings_withdrawal",
  "state": "ACTIVE",
  "batchSize": 50,
  "batchWindow": 3,
  "event": "SAVINGS_WITHDRAWAL"
}

409 Response

{
  "errors": [
    {
      "errorCode": 30000,
      "errorSource": "A human-readable message",
      "errorReason": "OPERATION_ALREADY_IN_PROGRESS"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Mambu Function Subscription update status MambuFunctionSubscription
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
409 Conflict Conflict - Validation: This code is returned when there is another concurrent operation on the same function ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Enable Function Subscription

Code samples

# You can also use wget
curl -X PUT https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/enable \
  -H 'Accept: application/vnd.mambu.v2+json'

PUT https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/enable HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json


const headers = {
  'Accept':'application/vnd.mambu.v2+json'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/enable',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.put 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/enable',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.put('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/enable', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/enable', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/enable");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/subscriptions/{subscriptionName}/enable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /mambu-functions/{functionName}/subscriptions/{subscriptionName}/enable

Enables a Mambu Function Subscription.

Parameters

Name Type Description In
functionName (required) string The name of the Function. path
subscriptionName (required) string The name of the subscription to enable. path

Example Responses

200 Response

{
  "name": "all_savings_withdrawal",
  "state": "ACTIVE",
  "batchSize": 50,
  "batchWindow": 3,
  "event": "SAVINGS_WITHDRAWAL"
}

409 Response

{
  "errors": [
    {
      "errorCode": 30000,
      "errorSource": "A human-readable message",
      "errorReason": "OPERATION_ALREADY_IN_PROGRESS"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Mambu Function Subscription update status MambuFunctionSubscription
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
409 Conflict Conflict - Validation: This code is returned when there is another concurrent operation on the same function ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Observability

Get Function Logs

Code samples

# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/logs \
  -H 'Accept: application/vnd.mambu.v2+json'

GET https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/logs HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json


const headers = {
  'Accept':'application/vnd.mambu.v2+json'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/logs',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json'
}

result = RestClient.get 'https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/logs',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json'
}

r = requests.get('https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/logs', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/logs', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/logs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://TENANT_NAME.mambu.com/api/mambu-functions/{functionName}/logs", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /mambu-functions/{functionName}/logs

Gets Mambu Function Logs for the last 10 minutes or for the given time range, by default limited to 100 records.

Parameters

Name Type Description In
functionName (required) string The name of the Function to retrieve logs for. path
from string(date-time) Specifies the start time of the desired time window for getting execution logs. Must be an ISO date and time string. query
to string(date-time) Defines the end time of the selected time window for fetching execution logs. Must be an ISO date and time string. query
limit integer(int32) Sets the maximum number of log records to be returned by the API endpoint. query
level string Sets the maximum level for the the logs to return. query
msgPattern string Filter the logs and only return logs that contain specific text. Only exact substring matching is supported and alphanumeric characters, white space, and these special characters: _, #, =, @,/, ;, ,, and - can be used. query

Enumerated Values

Parameter Value
level error
level trace
level error
level debug
level info
level warn

Example Responses

200 Response

{
  "logs": [
    {
      "time": "1692943135231",
      "requestId": "785ea595-d1af-4a3a-a8b7-fa4dfc29c359",
      "message": "updating fee for account",
      "logLevel": "20"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Mambu Function logs. MambuFunctionLogs
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Not Found ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Secrets

List Function Secrets

Code samples

# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/mambu-functions-secrets \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Content-Type: string'

GET https://TENANT_NAME.mambu.com/api/mambu-functions-secrets HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json
Content-Type: string


const headers = {
  'Accept':'application/vnd.mambu.v2+json',
  'Content-Type':'string'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions-secrets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json',
  'Content-Type' => 'string'
}

result = RestClient.get 'https://TENANT_NAME.mambu.com/api/mambu-functions-secrets',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json',
  'Content-Type': 'string'
}

r = requests.get('https://TENANT_NAME.mambu.com/api/mambu-functions-secrets', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
    'Content-Type' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://TENANT_NAME.mambu.com/api/mambu-functions-secrets', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions-secrets");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Content-Type": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://TENANT_NAME.mambu.com/api/mambu-functions-secrets", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /mambu-functions-secrets

Lists the secrets used for Mambu Function.

Parameters

Name Type Description In
Content-Type (required) string application/json header

Example Responses

200 Response

{
  "name": "secret-name"
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK List of Mambu Function Secret MambuFunctionSecret
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Create Function Secret

Code samples

# You can also use wget
curl -X POST https://TENANT_NAME.mambu.com/api/mambu-functions-secrets \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Content-Type: string'

POST https://TENANT_NAME.mambu.com/api/mambu-functions-secrets HTTP/1.1
Host: tenant_name.mambu.com
Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Content-Type: string

const inputBody = '{
  "name": "secret-name",
  "value": "1234"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Content-Type':'string'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions-secrets',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Content-Type' => 'string'
}

result = RestClient.post 'https://TENANT_NAME.mambu.com/api/mambu-functions-secrets',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Content-Type': 'string'
}

r = requests.post('https://TENANT_NAME.mambu.com/api/mambu-functions-secrets', headers = headers)

print(r.json())

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Content-Type' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://TENANT_NAME.mambu.com/api/mambu-functions-secrets', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions-secrets");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Content-Type": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://TENANT_NAME.mambu.com/api/mambu-functions-secrets", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /mambu-functions-secrets

Creates a new secret used for Mambu Functions and returns the created secret name.

Example Request

{
  "name": "secret-name",
  "value": "1234"
}

Parameters

Name Type Description In
Content-Type (required) string application/json header
body CreateMambuFunctionSecret Represents an action to create a secret used for Mambu Functions. body

Example Responses

201 Response

{
  "name": "secret-name"
}

409 Response

{
  "errors": [
    {
      "errorCode": 30000,
      "errorSource": "A human-readable message",
      "errorReason": "MFUNCTION_ALREADY_EXISTS"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created Mambu Function Secret created MambuFunctionSecret
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
409 Conflict Conflict - Validation: This code is returned when there is another concurrent operation on the same secret or the secret with the same name already exists ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Update Function Secret

Code samples

# You can also use wget
curl -X PUT https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Content-Type: string'

PUT https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name} HTTP/1.1
Host: tenant_name.mambu.com
Content-Type: application/json
Accept: application/vnd.mambu.v2+json
Content-Type: string

const inputBody = '{
  "value": "1234"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/vnd.mambu.v2+json',
  'Content-Type':'string'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/vnd.mambu.v2+json',
  'Content-Type' => 'string'
}

result = RestClient.put 'https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/vnd.mambu.v2+json',
  'Content-Type': 'string'
}

r = requests.put('https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}', headers = headers)

print(r.json())

 'application/json',
    'Accept' => 'application/vnd.mambu.v2+json',
    'Content-Type' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Content-Type": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /mambu-functions-secrets/{name}

Updates an existing secret value.

Example Request

{
  "value": "1234"
}

Parameters

Name Type Description In
Content-Type (required) string application/json header
name (required) string The name of the Mambu Function Secret. path
body UpdateMambuFunctionSecret Request payload to update Mambu Function Secret value. body

Example Responses

200 Response

{
  "name": "secret-name"
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Mambu Function Secret updated MambuFunctionSecret
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Delete Function Secret

Code samples

# You can also use wget
curl -X DELETE https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name} \
  -H 'Accept: application/vnd.mambu.v2+json' \
  -H 'Content-Type: string'

DELETE https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name} HTTP/1.1
Host: tenant_name.mambu.com
Accept: application/vnd.mambu.v2+json
Content-Type: string


const headers = {
  'Accept':'application/vnd.mambu.v2+json',
  'Content-Type':'string'
};

fetch('https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/vnd.mambu.v2+json',
  'Content-Type' => 'string'
}

result = RestClient.delete 'https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/vnd.mambu.v2+json',
  'Content-Type': 'string'
}

r = requests.delete('https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}', headers = headers)

print(r.json())

 'application/vnd.mambu.v2+json',
    'Content-Type' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/vnd.mambu.v2+json"},
        "Content-Type": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://TENANT_NAME.mambu.com/api/mambu-functions-secrets/{name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /mambu-functions-secrets/{name}

Deletes the specified secret used for Mambu Function.

Parameters

Name Type Description In
Content-Type (required) string application/json header
name (required) string The name of the secret. path

Example Responses

400 Response

{
  "errors": [
    {
      "errorCode": 30002,
      "errorSource": "A human-readable message",
      "errorReason": "MFUNCTION_INTERNAL_ERROR"
    }
  ]
}

429 Response

{
  "errors": [
    {
      "errorCode": 300013,
      "errorSource": "Request rate limit exceeded. Please try again later.",
      "errorReason": "MFUNCTION_RATE_LIMIT_EXCEEDED"
    }
  ]
}

Responses

Status Meaning Description Schema
204 No Content Mambu Function Secret deleted None
400 Bad Request Bad Request - Validation: This code is returned when there is malformed syntax in the request or incorrect data in the payload. ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden ErrorResponse
404 Not Found Mambu Function Secret not found ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse

Schemas

MambuFunction

{
  "name": "my-func-1",
  "state": "ACTIVE",
  "version": "v1",
  "lastModifiedDate": "2023-05-08T06:53:52Z",
  "extensionPointId": "DEPOSIT_FEE_AMOUNT",
  "lastDeploymentStatus": "SUCCESS",
  "lastDeploymentFailureReason": ""
}

Represents a Mambu Function.

Properties

Name Type Description Restrictions
name string The name of the Mambu Function. none
state string The current state of the Mambu Function. none
version string The version of the Mambu Function. none
lastModifiedDate string(date-time) The last date the Mambu Function was updated (in UTC). none
extensionPointId string The ID of the extension point none
lastDeploymentStatus string The status of the last asynchronous deployment none
lastDeploymentFailureReason string The reason the last deployment failed if it did none

Enumerated Values

Property Value
state CREATE_PENDING
state UPDATE_PENDING
state ACTIVE
state FAILED
state REMOVING

ErrorResponse

{
  "errors": [
    {
      "errorCode": 30002,
      "errorSource": "A human-readable message",
      "errorReason": "MFUNCTION_INTERNAL_ERROR"
    }
  ]
}

Properties

Name Type Description Restrictions
errors [array] none none

RestError

{
  "errorCode": 0,
  "errorReason": "INVALID_BASIC_AUTHORIZATION",
  "errorSource": "string"
}

Properties

Name Type Description Restrictions
errorCode number A unique error code. For more information, see API Responses and Error Codes. none
errorReason string A human-readable message capturing unsatisfied constraints. none
errorSource string A human-readable message stating the general category of the failure. none

Enumerated Values

Property Value
errorReason INVALID_BASIC_AUTHORIZATION
errorReason INVALID_API_OPERATION
errorReason INVALID_PARAMETERS
errorReason INTERNAL_ERROR
errorReason INVALID_TENANT_ID
errorReason INVALID_PAGINATION_OFFSET_VALUE
errorReason OUT_OF_BOUNDS_PAGINATION_OFFSET_VALUE
errorReason INVALID_PAGINATION_LIMIT_VALUE
errorReason OUT_OF_BOUNDS_PAGINATION_LIMIT_VALUE
errorReason INVALID_PERMISSIONS
errorReason INVALID_JSON_SYNTAX
errorReason OBJECT_NOT_FOUND
errorReason MFUNCTION_ALREADY_EXISTS
errorReason MFUNCTION_SERVICE_NOT_READY
errorReason MFUNCTION_INTERNAL_ERROR
errorReason MFUNCTION_OPERATION_IN_PROGRESS
errorReason MFUNCTION_MAX_FUNCTION_COUNT_LIMIT_REACHED
errorReason MFUNCTION_INTERNAL_LIMIT_REACHED
errorReason MFUNCTION_UNSUPPORTED_EXTENSION_POINT
errorReason MFUNCTION_MAPPED_FUNCTION_CANNOT_BE_DELETED
errorReason MFUNCTION_TOO_MANY_LOG_REQUESTS
errorReason MFUNCTION_MAX_SUBSCRIPTION_COUNT_LIMIT_REACHED
errorReason MFUNCTION_WITH_SUBSCRIPTION_CAN_NOT_BE_DELETED
errorReason MFUNCTION_MAX_SUBSCRIPTION_PER_EVENT_LIMIT_REACHED
errorReason MFUNCTION_MAX_SECRET_COUNT_PER_TENANT_LIMIT_REACHED
errorReason MFUNCTION_RATE_LIMIT_EXCEEDED
errorReason MFUNCTION_CONTRACT_COULD_NOT_BE_LOADED

CreateMambuFunction

{
  "name": "my-func-1",
  "extensionPointId": "DEPOSIT_FEE_AMOUNT",
  "version": "v1",
  "functionCode": {
    "languageId": "es2020",
    "code": "ZXhwb3J0cy5kZWZhdWx0ID0gYXN5bmMgZnVuY3Rpb24oaW5wdXQpIHsgCiAgcmV0dXJuIGlucHV0LnRvdGFsQmFsYW5jZSAqIDAuMDE7IAp9"
  }
}

Represents an action to create a Mambu Function.

Properties

Name Type Description Restrictions
name string The name of the Mambu Function. none
extensionPointId string The ID of the extension point none
version string The version of the Mambu Function. none
functionCode MambuFunctionCode Represents a Mambu Function's code. none

MambuFunctionCode

{
  "languageId": "es2020",
  "code": "ZXhwb3J0cy5kZWZhdWx0ID0gYXN5bmMgZnVuY3Rpb24oaW5wdXQpIHsgCiAgcmV0dXJuIGlucHV0LnRvdGFsQmFsYW5jZSAqIDAuMzsgCn0="
}

Represents a Mambu Function's code.

Properties

Name Type Description Restrictions
languageId string The programming language used in the Mambu Function. none
code string(byte) The base-64 encoded code of the Mambu Function. none

Enumerated Values

Property Value
languageId es2020

MambuFunctionSubscription

{
  "name": "all_savings_withdrawal",
  "state": "ACTIVE",
  "batchSize": 50,
  "batchWindow": 3,
  "event": "SAVINGS_WITHDRAWAL"
}

Represents a Mambu Function Subscription.

Properties

Name Type Description Restrictions
name string The name of the Mambu Function Subscription. none
state string The current state of the Mambu Function Subscription. none
batchSize integer(int32) Subscription batch size, define the maximum number of records in each batch that subscription pulls from your stream. none
batchWindow integer(int32) Subscription batch window in seconds, define the maximum time range subscription pulls from your stream. none
event string Subscription event, source of stream for the subscription. none

Enumerated Values

Property Value
state CREATE_PENDING
state UPDATE_PENDING
state ACTIVE
state FAILED
state REMOVING
state UNKNOWN

CreateMambuFunctionSubscription

{
  "name": "all_savings_withdrawal",
  "event": "ACCOUNT_IN_ARREARS",
  "batchSize": 50,
  "batchWindow": 3
}

Represents an action to create a Mambu Function Subscription.

Properties

Name Type Description Restrictions
name string The name of the Mambu Function Subscription. none
event string An event to subscribe for. See https://support.mambu.com/docs/event-triggers-for-notifications for supported values. none
batchSize integer(int32) Subscription batch size, define the maximum number of records in each batch that subscription pulls from your stream. none
batchWindow integer(int32) subscription batch window in seconds, define the maximum time range subscription pulls from your stream. none

MambuFunctionSubscriptionListItem

{
  "name": "all_savings_withdrawal"
}

Represents an item in the list of returned Mambu Function Subscriptions.

Properties

Name Type Description Restrictions
name string The name of the Mambu Function Subscription. none

UpdateMambuFunction

{
  "version": "v1",
  "functionCode": {
    "languageId": "es2020",
    "code": "ZXhwb3J0cy5kZWZhdWx0ID0gYXN5bmMgZnVuY3Rpb24oaW5wdXQpIHsgCiAgcmV0dXJuIGlucHV0LnRvdGFsQmFsYW5jZSAqIDAuMDE7IAp9"
  }
}

Represents an action to update a Mambu Function.

Properties

Name Type Description Restrictions
version string The version of the Mambu Function. none
functionCode MambuFunctionCode Represents a Mambu Function's code. none

UpdateMambuFunctionSubscription

{
  "batchSize": 50,
  "batchWindow": 10
}

Represents an action to update a Mambu Function Subscription.

Properties

Name Type Description Restrictions
batchSize integer(int32) The batch size to be used. none
batchWindow integer(int32) The batch window to be used. none

MambuFunctionLog

{
  "time": 0,
  "message": "string",
  "logLevel": 0,
  "requestId": "string",
  "functionVersion": "string"
}

Properties

Name Type Description Restrictions
time number The log time. none
message string The log message. none
logLevel integer(int32) The log level. none
requestId string The ID of the specific request to the Function. none
functionVersion string Mambu function version. none

MambuFunctionLogs

{
  "logs": [
    {
      "time": "1692943135231",
      "requestId": "785ea595-d1af-4a3a-a8b7-fa4dfc29c359",
      "message": "updating fee for account",
      "logLevel": "20"
    }
  ]
}

Represents a list of Mambu Function logs.

Properties

Name Type Description Restrictions
logs [array] none none

MambuFunctionSecret

{
  "name": "secret-name"
}

Represents a Mambu Function Secret.

Properties

Name Type Description Restrictions
name string The name of the Mambu Function Secret. none

CreateMambuFunctionSecret

{
  "name": "secret-name",
  "value": "1234"
}

Represents an action to create a secret used for Mambu Functions.

Properties

Name Type Description Restrictions
name string The name of the secret. none
value string The value of the secret. none

UpdateMambuFunctionSecret

{
  "value": "1234"
}

Request payload to update Mambu Function Secret value.

Properties

Name Type Description Restrictions
value string The value of the secret. none