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.
- data
The file containing the data to be sent.
@file.txt - request-timestamp
The timestamp of the request.
2024-10-24T22:51:00 - request-from
The origin or route of the request.
abcd@abcdef01 - request-key
The key for authenticating the request. - pay-for-reply
Indicates if the reply is paid for. Set to 1.
1 - message-id
The unique identifier for the message.
12345 - message-to
The recipient of the message.
ef01@1234abcd - message-priority
The priority of the message (e.g., normal).
Currently only normal priority is supported - message-md5
The MD5 checksum of the message.
d41d8cd98f00b204e9800998ecf8427e - message-expires-after
The expiration time for the message in seconds.
120
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
- HTTP/1.1 200 OK
The result of sending a message. - request-id
The request's unique ID you can use as a reference in support cases. - error
Additional information of the error, in case there will be any. List of possible errors can be found here.
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.
- request-timestamp
The timestamp of the request.
2024-10-24T22:51:00 - request-from
The origin or route of the request.
abcd@abcdef01 - request-key
The key for authenticating the request.
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.
- request-timestamp
The timestamp of the request.
2024-10-24T22:51:00 - request-from
The origin or route of the request.
abcd@abcdef01 - request-key
The key for authenticating the request. - $1 in the URL
ID of the message requested.
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.
- request-timestamp
The timestamp of the request.
2024-10-24T22:51:00 - request-from
The origin or route of the request.
abcd@abcdef01 - request-key
The key for authenticating the request. - $1 in the URL
ID of the previous message requested.
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.
- request-timestamp
The timestamp of the request.
2024-10-24T22:51:00 - request-from
The origin or route of the request.
abcd@abcdef01 - request-key
The key for authenticating the request. - $1 in the URL
ID of the previous message requested.
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.
- DATE is the request timestamp in UTC. Please not to use the very same string you use in the request header, they will be compared. Also note that maximum deviation of this time is ±300 seconds from the time on Go Integrate Me servers.
- ROUTE is the origin or route of the request.
- $2* is the recipient of the message.
- ID* is the unique identifier for the message.
- FILE_MD5* is the MD5 checksum of the message.
- KEY_SECRET is your secret key.
* — 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)