curl --request POST \
--url https://api.paytsoftware.com/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"administration_id": "<string>",
"message": {
"body": "<string>",
"subject": "<string>",
"email": "<string>",
"cc_email": "<string>",
"bcc_email": "<string>",
"attachments": [
"<string>"
]
},
"debtor_number": "<string>",
"debtor_identifier": "<string>",
"invoice_number": "<string>",
"invoice_identifier": "<string>",
"credit_case_number": "<string>"
}
'import requests
url = "https://api.paytsoftware.com/v1/messages"
payload = {
"administration_id": "<string>",
"message": {
"body": "<string>",
"subject": "<string>",
"email": "<string>",
"cc_email": "<string>",
"bcc_email": "<string>",
"attachments": ["<string>"]
},
"debtor_number": "<string>",
"debtor_identifier": "<string>",
"invoice_number": "<string>",
"invoice_identifier": "<string>",
"credit_case_number": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
administration_id: '<string>',
message: {
body: JSON.stringify('<string>'),
subject: '<string>',
email: '<string>',
cc_email: '<string>',
bcc_email: '<string>',
attachments: ['<string>']
},
debtor_number: '<string>',
debtor_identifier: '<string>',
invoice_number: '<string>',
invoice_identifier: '<string>',
credit_case_number: '<string>'
})
};
fetch('https://api.paytsoftware.com/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paytsoftware.com/v1/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'administration_id' => '<string>',
'message' => [
'body' => '<string>',
'subject' => '<string>',
'email' => '<string>',
'cc_email' => '<string>',
'bcc_email' => '<string>',
'attachments' => [
'<string>'
]
],
'debtor_number' => '<string>',
'debtor_identifier' => '<string>',
'invoice_number' => '<string>',
'invoice_identifier' => '<string>',
'credit_case_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paytsoftware.com/v1/messages"
payload := strings.NewReader("{\n \"administration_id\": \"<string>\",\n \"message\": {\n \"body\": \"<string>\",\n \"subject\": \"<string>\",\n \"email\": \"<string>\",\n \"cc_email\": \"<string>\",\n \"bcc_email\": \"<string>\",\n \"attachments\": [\n \"<string>\"\n ]\n },\n \"debtor_number\": \"<string>\",\n \"debtor_identifier\": \"<string>\",\n \"invoice_number\": \"<string>\",\n \"invoice_identifier\": \"<string>\",\n \"credit_case_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.paytsoftware.com/v1/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"administration_id\": \"<string>\",\n \"message\": {\n \"body\": \"<string>\",\n \"subject\": \"<string>\",\n \"email\": \"<string>\",\n \"cc_email\": \"<string>\",\n \"bcc_email\": \"<string>\",\n \"attachments\": [\n \"<string>\"\n ]\n },\n \"debtor_number\": \"<string>\",\n \"debtor_identifier\": \"<string>\",\n \"invoice_number\": \"<string>\",\n \"invoice_identifier\": \"<string>\",\n \"credit_case_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytsoftware.com/v1/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"administration_id\": \"<string>\",\n \"message\": {\n \"body\": \"<string>\",\n \"subject\": \"<string>\",\n \"email\": \"<string>\",\n \"cc_email\": \"<string>\",\n \"bcc_email\": \"<string>\",\n \"attachments\": [\n \"<string>\"\n ]\n },\n \"debtor_number\": \"<string>\",\n \"debtor_identifier\": \"<string>\",\n \"invoice_number\": \"<string>\",\n \"invoice_identifier\": \"<string>\",\n \"credit_case_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"sender_type": "<string>",
"administration_id": "<string>",
"id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"subject": "<string>",
"read_by_user": {
"id": "<string>",
"name": "<string>",
"email_address": "<string>"
},
"sent_by_user": {
"id": "<string>",
"name": "<string>",
"email_address": "<string>"
},
"credit_case_id": "<string>",
"debtor_id": "<string>",
"invoice_id": "<string>",
"content": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"received_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Send a message to a debtor
Send a message to a debtor
curl --request POST \
--url https://api.paytsoftware.com/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"administration_id": "<string>",
"message": {
"body": "<string>",
"subject": "<string>",
"email": "<string>",
"cc_email": "<string>",
"bcc_email": "<string>",
"attachments": [
"<string>"
]
},
"debtor_number": "<string>",
"debtor_identifier": "<string>",
"invoice_number": "<string>",
"invoice_identifier": "<string>",
"credit_case_number": "<string>"
}
'import requests
url = "https://api.paytsoftware.com/v1/messages"
payload = {
"administration_id": "<string>",
"message": {
"body": "<string>",
"subject": "<string>",
"email": "<string>",
"cc_email": "<string>",
"bcc_email": "<string>",
"attachments": ["<string>"]
},
"debtor_number": "<string>",
"debtor_identifier": "<string>",
"invoice_number": "<string>",
"invoice_identifier": "<string>",
"credit_case_number": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
administration_id: '<string>',
message: {
body: JSON.stringify('<string>'),
subject: '<string>',
email: '<string>',
cc_email: '<string>',
bcc_email: '<string>',
attachments: ['<string>']
},
debtor_number: '<string>',
debtor_identifier: '<string>',
invoice_number: '<string>',
invoice_identifier: '<string>',
credit_case_number: '<string>'
})
};
fetch('https://api.paytsoftware.com/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paytsoftware.com/v1/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'administration_id' => '<string>',
'message' => [
'body' => '<string>',
'subject' => '<string>',
'email' => '<string>',
'cc_email' => '<string>',
'bcc_email' => '<string>',
'attachments' => [
'<string>'
]
],
'debtor_number' => '<string>',
'debtor_identifier' => '<string>',
'invoice_number' => '<string>',
'invoice_identifier' => '<string>',
'credit_case_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paytsoftware.com/v1/messages"
payload := strings.NewReader("{\n \"administration_id\": \"<string>\",\n \"message\": {\n \"body\": \"<string>\",\n \"subject\": \"<string>\",\n \"email\": \"<string>\",\n \"cc_email\": \"<string>\",\n \"bcc_email\": \"<string>\",\n \"attachments\": [\n \"<string>\"\n ]\n },\n \"debtor_number\": \"<string>\",\n \"debtor_identifier\": \"<string>\",\n \"invoice_number\": \"<string>\",\n \"invoice_identifier\": \"<string>\",\n \"credit_case_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.paytsoftware.com/v1/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"administration_id\": \"<string>\",\n \"message\": {\n \"body\": \"<string>\",\n \"subject\": \"<string>\",\n \"email\": \"<string>\",\n \"cc_email\": \"<string>\",\n \"bcc_email\": \"<string>\",\n \"attachments\": [\n \"<string>\"\n ]\n },\n \"debtor_number\": \"<string>\",\n \"debtor_identifier\": \"<string>\",\n \"invoice_number\": \"<string>\",\n \"invoice_identifier\": \"<string>\",\n \"credit_case_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytsoftware.com/v1/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"administration_id\": \"<string>\",\n \"message\": {\n \"body\": \"<string>\",\n \"subject\": \"<string>\",\n \"email\": \"<string>\",\n \"cc_email\": \"<string>\",\n \"bcc_email\": \"<string>\",\n \"attachments\": [\n \"<string>\"\n ]\n },\n \"debtor_number\": \"<string>\",\n \"debtor_identifier\": \"<string>\",\n \"invoice_number\": \"<string>\",\n \"invoice_identifier\": \"<string>\",\n \"credit_case_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"sender_type": "<string>",
"administration_id": "<string>",
"id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"subject": "<string>",
"read_by_user": {
"id": "<string>",
"name": "<string>",
"email_address": "<string>"
},
"sent_by_user": {
"id": "<string>",
"name": "<string>",
"email_address": "<string>"
},
"credit_case_id": "<string>",
"debtor_id": "<string>",
"invoice_id": "<string>",
"content": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"received_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
OAuth2 access token or static API token. See Authorization for how to obtain one.
Body
Send a message to a debtor
Administration identifier
Show child attributes
Show child attributes
Number of the debtor to send a message to
Identifier of the debtor to send a message to
Number of the invoice to send a message to
Identifier of the invoice to send a message to
Number of the credit case to send a message to
Response
Message
CustomerApi_V1_MessageEntity model
Sender type (creditor|debtor)
Owning administration identifier
Unique identifier
Timestamp at which the message was last updated
Message subject
User who marked the message as read
Show child attributes
Show child attributes
Creditor user who sent the message
Show child attributes
Show child attributes
Associated credit_case identifier
Associated debtor identifier
Associated invoice identifier
The content of the message (request with the 'fields' parameter)
Timestamp at which the message was sent
Timestamp at which the message was received
Timestamp at which the message was first read (please note that for some mail clients this field is not filled when an email is read)
Was this page helpful?