curl --request PUT \
--url https://gateway-sandbox.matambaintelligence.com/v1/applications/{id}/documents/{type} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: image/jpeg' \
--data '"<string>"'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'image/jpeg'},
body: JSON.stringify('<string>')
};
fetch('https://gateway-sandbox.matambaintelligence.com/v1/applications/{id}/documents/{type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://gateway-sandbox.matambaintelligence.com/v1/applications/{id}/documents/{type}"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "image/jpeg"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway-sandbox.matambaintelligence.com/v1/applications/{id}/documents/{type}"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "image/jpeg")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "document",
"application": "app_3rbw6yq2kd5mz7tcxf4n",
"type": "government_id",
"state": "delivered",
"created_at": "2026-09-30T10:02:14Z",
"updated_at": "2026-09-30T10:02:14Z"
}Send a document
Sends one of the application’s four documents to the broker: the file itself as the body, a JPEG or PNG smaller than 1,000,000 bytes and at most 8,000 pixels wide and high. We check that the file is whole, send it to the broker in the same request, and keep no copy. The same file sent again once the broker has it isn’t sent twice; one whose earlier answer was unconfirmed is sent again. A different file for a type the broker has, or whose earlier file is unconfirmed, is refused. At most two of your documents are on their way to the broker at once. Send documents while the application is documents_required or submitted; the fourth makes it submitted. Requires the apply scope.
curl --request PUT \
--url https://gateway-sandbox.matambaintelligence.com/v1/applications/{id}/documents/{type} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: image/jpeg' \
--data '"<string>"'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'image/jpeg'},
body: JSON.stringify('<string>')
};
fetch('https://gateway-sandbox.matambaintelligence.com/v1/applications/{id}/documents/{type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://gateway-sandbox.matambaintelligence.com/v1/applications/{id}/documents/{type}"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "image/jpeg"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway-sandbox.matambaintelligence.com/v1/applications/{id}/documents/{type}"
payload := strings.NewReader("\"<string>\"")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "image/jpeg")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "document",
"application": "app_3rbw6yq2kd5mz7tcxf4n",
"type": "government_id",
"state": "delivered",
"created_at": "2026-09-30T10:02:14Z",
"updated_at": "2026-09-30T10:02:14Z"
}Authorizations
Authorization: Bearer <key>. Sandbox keys start with mgw_test_ and live keys start with mgw_live_. Each key works only in its own environment, and a live key works only from the IP addresses or ranges registered for it.
Path Parameters
The application's id.
^app_[a-z2-7]{20}$Which of the four documents.
photo: a passport photograph. government_id: a government-issued ID. utility_bill: a utility bill, for the address. signature: a specimen of the customer's signature. New values can be added: handle an unrecognised value with a safe default.
photo, government_id, utility_bill, signature Body
The file itself.
The body is of type file.
Response
The document, as the broker has it.
One document of an application, as the broker has it. The gateway keeps no copy of the file.
"document"The application's id.
"app_3rbw6yq2kd5mz7tcxf4n"
photo: a passport photograph. government_id: a government-issued ID. utility_bill: a utility bill, for the address. signature: a specimen of the customer's signature. New values can be added: handle an unrecognised value with a safe default.
photo, government_id, utility_bill, signature delivered: the broker has the file. It doesn't mean the broker's staff have verified it. New values can be added: handle an unrecognised value with a safe default.
delivered When the document was first sent, in UTC.
When its state last changed, in UTC.