curl --request PUT \
--url https://api.leadping.ai/organizations/me/members/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "<string>",
"email": "jsmith@example.com"
}
'import requests
url = "https://api.leadping.ai/organizations/me/members/{userId}"
payload = {
"userId": "<string>",
"email": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/organizations/me/members/{userId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"userId\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.put("https://api.leadping.ai/organizations/me/members/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}")
.asString();const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>', email: 'jsmith@example.com'})
};
fetch('https://api.leadping.ai/organizations/me/members/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/organizations/me/members/{userId}"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("PUT", 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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/organizations/me/members/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '<string>',
'email' => 'jsmith@example.com'
]),
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;
}{
"organization": {
"id": "<string>",
"name": "<string>"
},
"user": {
"id": "<string>",
"name": "<string>"
},
"userEmail": "jsmith@example.com",
"role": "Owner",
"createdByUserId": "<string>",
"removedAt": "2023-11-07T05:31:56Z",
"removedByUserId": "<string>",
"lastUsedAt": "2023-11-07T05:31:56Z",
"licenseBillingStatus": "<string>",
"licenseQuantity": 123,
"licenseRenewalDate": "2023-11-07T05:31:56Z",
"name": "<string>",
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request could not be completed."
}{
"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": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Change a current-organization user role
Changes a user’s role in the current organization, updating access to lead, automation, billing, and admin workflows.
curl --request PUT \
--url https://api.leadping.ai/organizations/me/members/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "<string>",
"email": "jsmith@example.com"
}
'import requests
url = "https://api.leadping.ai/organizations/me/members/{userId}"
payload = {
"userId": "<string>",
"email": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/organizations/me/members/{userId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"userId\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.put("https://api.leadping.ai/organizations/me/members/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}")
.asString();const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>', email: 'jsmith@example.com'})
};
fetch('https://api.leadping.ai/organizations/me/members/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/organizations/me/members/{userId}"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("PUT", 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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/organizations/me/members/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '<string>',
'email' => 'jsmith@example.com'
]),
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;
}{
"organization": {
"id": "<string>",
"name": "<string>"
},
"user": {
"id": "<string>",
"name": "<string>"
},
"userEmail": "jsmith@example.com",
"role": "Owner",
"createdByUserId": "<string>",
"removedAt": "2023-11-07T05:31:56Z",
"removedByUserId": "<string>",
"lastUsedAt": "2023-11-07T05:31:56Z",
"licenseBillingStatus": "<string>",
"licenseQuantity": 123,
"licenseRenewalDate": "2023-11-07T05:31:56Z",
"name": "<string>",
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request could not be completed."
}{
"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": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Authorizations
Authorization header using the Bearer scheme. Accepted values are Leadping user JWT access tokens and WorkOS organization API keys beginning with sk_.
Path Parameters
The ID of the user whose current-organization role is changing.
Body
The updated role assignment.
Defines the fields clients can send when working with organization user.
User ID to add, update, or remove from the organization.
Email address for the person represented by this organization user request.
Identifies an organization member's access level and permission scope within Leadping.
Owner, Admin, Agent Response
Returns the organization member response.
Describes organization user data returned by Leadping.
Provides a compact API reference to another resource using its stable identifier and human-readable display name.
Show child attributes
Show child attributes
Provides a compact API reference to another resource using its stable identifier and human-readable display name.
Show child attributes
Show child attributes
User email for this organization user.
Identifies an organization member's access level and permission scope within Leadping.
Owner, Admin, Agent The created by user ID associated with this organization user.
UTC timestamp for removed at on this organization user.
The removed by user ID associated with this organization user.
UTC timestamp for last used at on this organization user.
The billing status for this user's organization license.
The quantity on the shared organization user license item after this change.
The renewal date used for this user's license proration.
Human-readable display name of the resource.
Stable unique identifier of the resource.
UTC timestamp when the resource was created.
UTC timestamp when the resource was last modified, or null when it has not been updated.

