curl --request POST \
--url https://api.pincast.fm/v1/sets/{set}/collects \
--header 'Content-Type: application/json' \
--header 'X-Pincast-Key: <api-key>' \
--data '
{
"card": "tree:2614648",
"actor": {
"id": "guest-7f3c9a2e5b41",
"source": "anonymous"
},
"at": "2026-11-14T15:04:05Z",
"lat": 40.77951,
"lng": -73.96311,
"accuracy": 8
}
'const options = {
method: 'POST',
headers: {'X-Pincast-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
card: 'tree:2614648',
actor: {id: 'guest-7f3c9a2e5b41', source: 'anonymous'},
at: '2026-11-14T15:04:05Z',
lat: 40.77951,
lng: -73.96311,
accuracy: 8
})
};
fetch('https://api.pincast.fm/v1/sets/{set}/collects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pincast.fm/v1/sets/{set}/collects"
payload = {
"card": "tree:2614648",
"actor": {
"id": "guest-7f3c9a2e5b41",
"source": "anonymous"
},
"at": "2026-11-14T15:04:05Z",
"lat": 40.77951,
"lng": -73.96311,
"accuracy": 8
}
headers = {
"X-Pincast-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"collected": true,
"first": true,
"count": 1,
"collectedAt": "2026-11-14T15:04:05.000Z",
"card": {
"key": "tree:2614648",
"type": "tree"
},
"parent": {
"key": "species:ginkgo",
"first": true
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}Record that a person collected a card
Send the card’s key, or the whole card to register or update it first. The actor is the person as your app knows them: a Logto id once they have signed in and your app has sent their sign-in token with POST /people, or your app’s guest token for this device before that. The card’s parent (a tree card’s species card) is held through it and recorded with it.
Safe to send again until you hear back: a collect with the same card, actor and time changes nothing and answers as the first send did, first included. A later time counts one more collect; an earlier time moves the first collect back. A collect sent without at takes Placecard’s clock, so each send of it is a new time: send it with an Idempotency-Key to retry it safely.
curl --request POST \
--url https://api.pincast.fm/v1/sets/{set}/collects \
--header 'Content-Type: application/json' \
--header 'X-Pincast-Key: <api-key>' \
--data '
{
"card": "tree:2614648",
"actor": {
"id": "guest-7f3c9a2e5b41",
"source": "anonymous"
},
"at": "2026-11-14T15:04:05Z",
"lat": 40.77951,
"lng": -73.96311,
"accuracy": 8
}
'const options = {
method: 'POST',
headers: {'X-Pincast-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
card: 'tree:2614648',
actor: {id: 'guest-7f3c9a2e5b41', source: 'anonymous'},
at: '2026-11-14T15:04:05Z',
lat: 40.77951,
lng: -73.96311,
accuracy: 8
})
};
fetch('https://api.pincast.fm/v1/sets/{set}/collects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pincast.fm/v1/sets/{set}/collects"
payload = {
"card": "tree:2614648",
"actor": {
"id": "guest-7f3c9a2e5b41",
"source": "anonymous"
},
"at": "2026-11-14T15:04:05Z",
"lat": 40.77951,
"lng": -73.96311,
"accuracy": 8
}
headers = {
"X-Pincast-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"collected": true,
"first": true,
"count": 1,
"collectedAt": "2026-11-14T15:04:05.000Z",
"card": {
"key": "tree:2614648",
"type": "tree"
},
"parent": {
"key": "species:ginkgo",
"first": true
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}{
"url": "<string>",
"statusCode": 499,
"statusMessage": "<string>",
"message": "<string>",
"stack": "<string>",
"data": {
"code": "key_missing",
"fix": "<string>",
"field": "<string>"
}
}Authorizations
Your app's key, sent on every call from your server only. It reads pck_, your app id, an underscore, then a secret of 20 or more letters, digits, underscores or hyphens. Never put it in a web page, an app bundle or a query string. Placecard stores only its sha256.
Your app can hold two live keys at once, so a key is replaced with no outage: the new key works at once, and the old one keeps working until its expiry (seven days after the new key is made, unless you ask for less). A revoked key is refused from the next call.
X-Placecard-Key, the older name of this header, is taken too, at either address. Send one of the two; if both come and they differ, the call answers 400 key_conflict.
Headers
Optional, on the three writes. A string your app makes for one request, a UUID for example, and sends again unchanged with each retry of that request. Placecard keeps the first 200 answer to it for 24 hours, for your app only. A retry with the same key and the same request (method, path and body; the order of keys in the body does not matter) answers that answer again, marked Idempotent-Replayed: true, and runs nothing. The same key with a different request answers 422. A refused call keeps nothing, so its retry runs again. 1 to 255 visible ASCII characters, with no spaces.
^[\x21-\x7E]{1,255}$Path Parameters
Body
Response
The collect is recorded. first is true when this collect's time is this person's first hold of the card: on their first collect, on a resend of it, and on a collect dated before their first. count is how many times they collected it directly.