Decline an organization invitation.
curl --request POST \
--url https://api.leadping.ai/invitations/{id}/decline \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.leadping.ai/invitations/{id}/decline"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/invitations/{id}/decline");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/invitations/{id}/decline")
.header("Authorization", "Bearer <token>")
.asString();const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.leadping.ai/invitations/{id}/decline', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/invitations/{id}/decline"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/invitations/{id}/decline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"safeMessage": "<string>",
"id": "<string>",
"organization": {
"id": "<string>",
"name": "<string>"
},
"email": "jsmith@example.com",
"role": "Account Admin",
"status": "Declined",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"resentAt": "2023-11-07T05:31:56Z",
"acceptedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"sendFailureReason": "<string>",
"licenseBillingStatus": "<string>",
"licenseQuantity": 123,
"licenseRenewalDate": "2023-11-07T05:31:56Z",
"licenseActivatedAt": "2023-11-07T05:31:56Z",
"licenseReleasedAt": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Service Unavailable",
"status": 503,
"detail": "The request could not be completed."
}Invitations
Decline an organization invitation.
Decline a pending Leadping organization invitation by ID while signed in as the recipient. Use this endpoint to turn down the invitation to join.
POST
/
invitations
/
{id}
/
decline
Decline an organization invitation.
curl --request POST \
--url https://api.leadping.ai/invitations/{id}/decline \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.leadping.ai/invitations/{id}/decline"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/invitations/{id}/decline");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/invitations/{id}/decline")
.header("Authorization", "Bearer <token>")
.asString();const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.leadping.ai/invitations/{id}/decline', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/invitations/{id}/decline"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/invitations/{id}/decline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"safeMessage": "<string>",
"id": "<string>",
"organization": {
"id": "<string>",
"name": "<string>"
},
"email": "jsmith@example.com",
"role": "Account Admin",
"status": "Declined",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"resentAt": "2023-11-07T05:31:56Z",
"acceptedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"sendFailureReason": "<string>",
"licenseBillingStatus": "<string>",
"licenseQuantity": 123,
"licenseRenewalDate": "2023-11-07T05:31:56Z",
"licenseActivatedAt": "2023-11-07T05:31:56Z",
"licenseReleasedAt": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Service Unavailable",
"status": 503,
"detail": "The request could not be completed."
}Authorizations
Response
The invitation after the decline is recorded.
Describes organization invitation data returned by Leadping.

