Put a Lusor Phone on a static IP
With no body, puts the phone on its own static IP. Each Lusor Phone
includes one; this call does not charge the workspace. Setting it up
can take minutes: the answer is 200 when it is active, otherwise
202 with an operationId to poll with GET …/static-ip?operation=.
With { proxyId }, the phone uses a Persistent IP the workspace
already owns (GET …/static-ip/owned), free; the IP it used before
lapses once no phone uses it. Answers 200.
To buy another Persistent IP, quote it with
POST /internet/persistent-ips/preview, then confirm with
POST /internet/persistent-ips. An API key may use phones in its own
workspace; a signed-in user needs the admin role.
Retries: safe within 5 minutes: a repeat answers the same operation, and a phone already on its static IP buys nothing.
curl --request POST \
--url https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/static-ip \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{
"proxyId": 2
}'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({proxyId: 2})
};
fetch('https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/static-ip', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/static-ip"
payload = { "proxyId": 2 }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"state": "active",
"static": {
"state": "active",
"country": "<string>",
"publicIp": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
},
"operationId": "<string>"
}
}{
"data": {
"state": "active",
"static": {
"state": "active",
"country": "<string>",
"publicIp": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
},
"operationId": "<string>"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "device_busy",
"currentSessionId": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Path Parameters
Body
Was this page helpful?
curl --request POST \
--url https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/static-ip \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{
"proxyId": 2
}'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({proxyId: 2})
};
fetch('https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/static-ip', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/static-ip"
payload = { "proxyId": 2 }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"state": "active",
"static": {
"state": "active",
"country": "<string>",
"publicIp": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
},
"operationId": "<string>"
}
}{
"data": {
"state": "active",
"static": {
"state": "active",
"country": "<string>",
"publicIp": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
},
"operationId": "<string>"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "device_busy",
"currentSessionId": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}
