Send a unit from one person to another
curl --request POST \
--url https://api.getlurk.com/v1/units/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"from": "ana@example.com",
"to": "ben@example.com",
"unit": "points",
"amount": 25,
"reason": "Thanks"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: 'ana@example.com',
to: 'ben@example.com',
unit: 'points',
amount: 25,
reason: 'Thanks'
})
};
fetch('https://api.getlurk.com/v1/units/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/units/send"
payload = {
"from": "ana@example.com",
"to": "ben@example.com",
"unit": "points",
"amount": 25,
"reason": "Thanks"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"transfer": "act_01m6pajz2re7a8y2srwtjwkpdm",
"receipt": "act_01m6pajz2rebjrm729yyvdnr65",
"from": {
"id": "usr_01m2ayvr9gf8e89t8f5cbx71b0",
"external_id": "ana@example.com",
"balance_after": 144
},
"to": {
"id": "usr_01m40d9ax0e2vrtmq9mk0z6t00",
"external_id": "ben@example.com",
"balance_after": 110
},
"unit": "points",
"amount": 25,
"sent_today": 25,
"daily_limit": 100
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}Units
Send a unit from one person to another
Moves an amount of one unit between two people as two receipts, all or nothing. The unit needs sendable on and must go down; the daily limit is rate_limited. Unknown person or unit: not_found. Owners and admins, or a project key; never an agent. Sending
POST
/
v1
/
units
/
send
Send a unit from one person to another
curl --request POST \
--url https://api.getlurk.com/v1/units/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"from": "ana@example.com",
"to": "ben@example.com",
"unit": "points",
"amount": 25,
"reason": "Thanks"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: 'ana@example.com',
to: 'ben@example.com',
unit: 'points',
amount: 25,
reason: 'Thanks'
})
};
fetch('https://api.getlurk.com/v1/units/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/units/send"
payload = {
"from": "ana@example.com",
"to": "ben@example.com",
"unit": "points",
"amount": 25,
"reason": "Thanks"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"transfer": "act_01m6pajz2re7a8y2srwtjwkpdm",
"receipt": "act_01m6pajz2rebjrm729yyvdnr65",
"from": {
"id": "usr_01m2ayvr9gf8e89t8f5cbx71b0",
"external_id": "ana@example.com",
"balance_after": 144
},
"to": {
"id": "usr_01m40d9ax0e2vrtmq9mk0z6t00",
"external_id": "ben@example.com",
"balance_after": 110
},
"unit": "points",
"amount": 25,
"sent_today": 25,
"daily_limit": 100
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}Authorizations
Headers
Body
application/json
Response
Send a unit from one person to another