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",
"attachments": [
{
"checksum": "<string>",
"filename": "<string>",
"content_type": "<string>",
"byte_size": 123,
"uploaded_by": "creditor",
"download_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"malware_scan_status": "pending"
}
],
"origin": "api",
"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",
"archived_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}messages
Send a message to a debtor
Send a message to a debtor
POST
/
v1
/
messages
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",
"attachments": [
{
"checksum": "<string>",
"filename": "<string>",
"content_type": "<string>",
"byte_size": 123,
"uploaded_by": "creditor",
"download_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"malware_scan_status": "pending"
}
],
"origin": "api",
"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",
"archived_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
application/jsonapplication/x-www-form-urlencoded
Send a message to a debtor
Response
Message
CustomerApi_V1_MessageEntity model
Where the message came from: user (sent by a user of the creditor), api (sent through this API), auto_reply (automatic reply of the inbox), system (sent automatically by Payt), debtor_portal (sent by the debtor in the debtor portal) or email (received by email). Empty when unknown, which can be the case for older messages
Available options:
api, auto_reply, debtor_portal, email, system, user Was this page helpful?