Your Account

API

Our API enables you to send and receive messages efficiently and securely. Each API call requires a unique signature to ensure security and prevent repeated requests.

Following methods are currently available:

send-message: Used to send a message to the service

list-messages: Lists all messages that are available for you at the moment

get-message: Get one message by its ID

get-next-message: Get one message, that is newer than message with ID you specified

wait-next-message: Keep the connection open, until new message is available, and instantly download it

ping: Check service's operability for your monitoring purposes

Request signature calculation is described here.

Details

send-message

Request

Method: POST

This method transmits a message from one route to another, ensuring reliable delivery. It verifies message integrity and confirms receipt to the sender for a seamless messaging experience.

Example:

DATE=$(date -Iseconds)
FILE_MD5=$(md5sum "$1" | head -c 32)
KEY=$(echo -n "$DATE$ROUTE$2$ID$FILE_MD5$KEY_SECRET" | shasum -a 512 | head -c 128)

curl -F "data=@$1" https://eu-nl.api.go-integrate.me/1/send-message \
	--header "request-timestamp: $DATE" \
	--header "request-from: $ROUTE" \
	--header "request-key: $KEY" \
	--header "pay-for-reply: 1" \
	--header "message-id: $ID" \
	--header "message-to: $2" \
	--header "message-priority: normal" \
	--header "message-md5: $FILE_MD5" \
	--header "message-expires-after: 120"

Response: headers

Example, success:

HTTP/1.1 200 OK
server: nginx/1.24.0 (Ubuntu)
date: Sun, 27 Oct 2024 21:02:56 GMT
content-type: text/html; charset=UTF-8
request-id: 20241027210256-f185965753b0b5ac
transfer-encoding: chunked

Example, failed:

HTTP/1.1 404 Not Found
server: nginx/1.24.0 (Ubuntu)
date: Sun, 27 Oct 2024 21:06:58 GMT
content-type: text/html; charset=UTF-8
request-id: 20241027210658-f76ede36711a79e4
error: code=201; message=Message recipient cannot be found
transfer-encoding: chunked

Response: body

Empty body.

list-messages

Request

Method: GET

Calling this method will return list of messages you can download at this moment. Please note that messages about to expire will be shown here, but will not be available after the expiration. So if there's a message with expiration date a second after you received in it a list, and if you make a request to get that particular message after a second, it will be unavailable.

Example:

DATE=$(date -Iseconds)
KEY=$(echo -n "$DATE$ROUTE$KEY_SECRET" | shasum -a 512 | head -c 128)

curl "https://eu-nl.api.go-integrate.me/1/list-messages" \
	--header "request-timestamp: $DATE" \
	--header "request-from: $ROUTE" \
	--header "request-key: $KEY" \
	-o data \
	-D headers

Response: body

[
    {
        "link":"1f393c2d-23e3-JZ0TstJk39",
        "received_date":"2024-10-28 20:11:57",
        "expiration_date":"2024-10-28 20:13:57"
    },
    {
        "link":"1f393c2d-23e3-T95JhiPqLl",
        "received_date":"2024-10-28 20:11:58",
        "expiration_date":"2024-10-28 20:13:58"
    },
    {
        "link":"1f393c2d-23e3-mOCy9jeLOn",
        "received_date":"2024-10-28 20:11:59",
        "expiration_date":"2024-10-28 20:13:59"
    }
]

get-message

Request

Method: GET

Download a message with specified ID.

Example:

DATE=$(date -Iseconds)
KEY=$(echo -n "$DATE$ROUTE$KEY_SECRET" | shasum -a 512 | head -c 128)

curl "https://eu-nl.api.go-integrate.me/1/get-message/$1" \
	--header "request-timestamp: $DATE" \
	--header "request-from: $ROUTE" \
	--header "request-key: $KEY" \
	-o data \
	-D headers

Response: headers

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Mon, 28 Oct 2024 20:18:03 GMT
Content-Type: application/octet-stream
Content-Length: 925
Connection: keep-alive
Request-ID: 20241028201803-1b55526c6a7599ef
Content-Description: File Transfer
Content-Disposition: attachment; filename=your_file.xml
Content-Transfer-Encoding: binary
Cache-Control: must-revalidate, post-check=0, pre-check=0
Pragma: public
Message-Link: 1f393c2d-23e3-7T7GjLMBbU
Message-File-Name: your_file.xml

get-next-message

Request

Method: GET

Download a message, newer than the one with specified ID.

Example:

DATE=$(date -Iseconds)
KEY=$(echo -n "$DATE$ROUTE$KEY_SECRET" | shasum -a 512 | head -c 128)

curl "https://eu-nl.api.go-integrate.me/1/get-next-message/$1" \
	--header "request-timestamp: $DATE" \
	--header "request-from: $ROUTE" \
	--header "request-key: $KEY" \
	-o data \
	-D headers

Response: headers

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Mon, 28 Oct 2024 20:18:03 GMT
Content-Type: application/octet-stream
Content-Length: 925
Connection: keep-alive
Request-ID: 20241028201803-1b55526c6a7599ef
Content-Description: File Transfer
Content-Disposition: attachment; filename=your_file.xml
Content-Transfer-Encoding: binary
Cache-Control: must-revalidate, post-check=0, pre-check=0
Pragma: public
Message-Link: 1f393c2d-23e3-7T7GjLMBbU
Message-File-Name: your_file.xml

wait-next-message

Request

Method: GET

Opens the connection, and keeps it open until there's a message newer than the one with specified ID, and then downloads it.

Example:

DATE=$(date -Iseconds)
KEY=$(echo -n "$DATE$ROUTE$KEY_SECRET" | shasum -a 512 | head -c 128)

curl "https://eu-nl.api.go-integrate.me/1/wait-next-message/$1" \
	--header "request-timestamp: $DATE" \
	--header "request-from: $ROUTE" \
	--header "request-key: $KEY" \
	-o data \
	-D headers

Response: headers

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Mon, 28 Oct 2024 20:18:03 GMT
Content-Type: application/octet-stream
Content-Length: 925
Connection: keep-alive
Request-ID: 20241028201803-1b55526c6a7599ef
Content-Description: File Transfer
Content-Disposition: attachment; filename=your_file.xml
Content-Transfer-Encoding: binary
Cache-Control: must-revalidate, post-check=0, pre-check=0
Pragma: public
Message-Link: 1f393c2d-23e3-7T7GjLMBbU
Message-File-Name: your_file.xml

Request Key

A signature key ensures the authenticity and integrity of each request by providing a unique identifier. It verifies the sender's identity and guarantees that the content hasn't been tampered with in transit.

* — Those fileds are required only for sending the data.

Example with all the data, for sending the message:

DATE=$(date -Iseconds)
FILE_MD5=$(md5sum "$1" | head -c 32)
KEY=$(echo -n "$DATE$ROUTE$2$ID$FILE_MD5$KEY_SECRET" | shasum -a 512 | head -c 128)

Example with data needed to receive a message:

DATE=$(date -Iseconds)
KEY=$(echo -n "$DATE$ROUTE$KEY_SECRET" | shasum -a 512 | head -c 128)