Assign a label to a fax
curl --request POST \
--url https://api.amplify.xyz/v1/labels/assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"job_id": "01M0FAT727W7PX5RFT6FH2ARY2",
"label_ids": [
1997,
1998
]
}
'import requests
url = "https://api.amplify.xyz/v1/labels/assign"
payload = {
"job_id": "01M0FAT727W7PX5RFT6FH2ARY2",
"label_ids": [1997, 1998]
}
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({job_id: '01M0FAT727W7PX5RFT6FH2ARY2', label_ids: [1997, 1998]})
};
fetch('https://api.amplify.xyz/v1/labels/assign', 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.amplify.xyz/v1/labels/assign",
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([
'job_id' => '01M0FAT727W7PX5RFT6FH2ARY2',
'label_ids' => [
1997,
1998
]
]),
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.amplify.xyz/v1/labels/assign"
payload := strings.NewReader("{\n \"job_id\": \"01M0FAT727W7PX5RFT6FH2ARY2\",\n \"label_ids\": [\n 1997,\n 1998\n ]\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.amplify.xyz/v1/labels/assign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"job_id\": \"01M0FAT727W7PX5RFT6FH2ARY2\",\n \"label_ids\": [\n 1997,\n 1998\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amplify.xyz/v1/labels/assign")
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 \"job_id\": \"01M0FAT727W7PX5RFT6FH2ARY2\",\n \"label_ids\": [\n 1997,\n 1998\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 1,
"message": "Fax label has updated."
}{
"status": 0,
"message": "No new labels to add"
}Labels
Assign a label to a fax
Assign labels to a fax.
POST
/
v1
/
labels
/
assign
Assign a label to a fax
curl --request POST \
--url https://api.amplify.xyz/v1/labels/assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"job_id": "01M0FAT727W7PX5RFT6FH2ARY2",
"label_ids": [
1997,
1998
]
}
'import requests
url = "https://api.amplify.xyz/v1/labels/assign"
payload = {
"job_id": "01M0FAT727W7PX5RFT6FH2ARY2",
"label_ids": [1997, 1998]
}
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({job_id: '01M0FAT727W7PX5RFT6FH2ARY2', label_ids: [1997, 1998]})
};
fetch('https://api.amplify.xyz/v1/labels/assign', 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.amplify.xyz/v1/labels/assign",
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([
'job_id' => '01M0FAT727W7PX5RFT6FH2ARY2',
'label_ids' => [
1997,
1998
]
]),
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.amplify.xyz/v1/labels/assign"
payload := strings.NewReader("{\n \"job_id\": \"01M0FAT727W7PX5RFT6FH2ARY2\",\n \"label_ids\": [\n 1997,\n 1998\n ]\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.amplify.xyz/v1/labels/assign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"job_id\": \"01M0FAT727W7PX5RFT6FH2ARY2\",\n \"label_ids\": [\n 1997,\n 1998\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amplify.xyz/v1/labels/assign")
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 \"job_id\": \"01M0FAT727W7PX5RFT6FH2ARY2\",\n \"label_ids\": [\n 1997,\n 1998\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 1,
"message": "Fax label has updated."
}{
"status": 0,
"message": "No new labels to add"
}Provide the required fax identifier in
job_id and the required numeric label identifiers in label_ids. Obtain label identifiers from List labels. Authenticate with a Bearer access token.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
