Appearance
Getting started
This walkthrough creates an unpublished property through the production API, reads it back, and deletes it. The commands first retrieve the languages, fields, and option IDs configured for your Residenda account.
Live data
These commands change data in your Residenda account. Use a test account when possible and complete the cleanup step. The Try it feature in the API Reference also calls production and does not save your token between browser sessions.
Prerequisites
You need:
- an account owner or administrator with access to API Tokens;
curlandjqin your terminal.
The token selects the account. You do not need an account ID in your API requests.
1. Create and store a token
Open API Tokens in the Residenda dashboard and create a named token. For this full walkthrough, select Full API access. For production integrations, select only the permissions they need.
The token is displayed once. Store it in a secrets manager. For this terminal session, read it without echoing it or placing it in shell history:
sh
read -rsp 'Residenda API token: ' RESIDENDA_TOKEN && export RESIDENDA_TOKEN && echo
export RESIDENDA_API='https://api.residenda.com/v1'Never put the token in a URL, source file, log, or support message.
2. Validate full access
sh
curl --fail-with-body --silent --show-error \
--output /dev/null \
--write-out 'HTTP %{http_code}\n' \
--header "Authorization: Bearer ${RESIDENDA_TOKEN}" \
"${RESIDENDA_API}/token/validate"A full-access token returns HTTP 204. A missing or invalid token returns 401. A valid token that does not have all four permissions returns 403; that does not make the token invalid.
3. Discover property fields
Fetch the schema and derive the default language and valid required option IDs:
sh
SCHEMA="$(curl --fail-with-body --silent --show-error \
--header "Authorization: Bearer ${RESIDENDA_TOKEN}" \
"${RESIDENDA_API}/property-schema")"
LANGUAGE="$(jq -r '
.data.languages[]
| select(.default)
| .code
' <<<"${SCHEMA}")"
LISTING_TYPE_ID="$(jq -r '
.data.fields[]
| select(.slug == "listing_type")
| .options.values[0].id
' <<<"${SCHEMA}")"
LISTING_STATUS_ID="$(jq -r '
.data.fields[]
| select(.slug == "listing_status")
| .options.values[0].id
' <<<"${SCHEMA}")"Option IDs and enabled languages can differ between Residenda accounts. See Properties and schema before mapping a production data source.
4. Create a property
Build the body with values discovered above, then create the property:
sh
CREATE_BODY="$(jq -n \
--arg language "${LANGUAGE}" \
--argjson listingType "${LISTING_TYPE_ID}" \
--argjson listingStatus "${LISTING_STATUS_ID}" \
'{
title: {($language): "API onboarding property"},
listing_type: $listingType,
listing_status: $listingStatus,
reference: "API-ONBOARDING",
status: "unpublished"
}')"
CREATE_RESPONSE="$(curl --fail-with-body --silent --show-error \
--request POST \
--header "Authorization: Bearer ${RESIDENDA_TOKEN}" \
--header 'Content-Type: application/json' \
--data "${CREATE_BODY}" \
"${RESIDENDA_API}/properties")"
PROPERTY_ID="$(jq -r '.data.id' <<<"${CREATE_RESPONSE}")"
jq '{
id: .data.id,
title: .data.title,
status: .data.status
}' <<<"${CREATE_RESPONSE}"Creation returns 201 Created. Custom fields required in your account may make the request return 422; include every slug listed in .data.create.required and follow each field's value shape and constraints.
5. Read and clean up
sh
curl --fail-with-body --silent --show-error \
--header "Authorization: Bearer ${RESIDENDA_TOKEN}" \
"${RESIDENDA_API}/properties/${PROPERTY_ID}" | jq '.data'
curl --fail-with-body --silent --show-error \
--request DELETE \
--header "Authorization: Bearer ${RESIDENDA_TOKEN}" \
--output /dev/null \
--write-out 'HTTP %{http_code}\n' \
"${RESIDENDA_API}/properties/${PROPERTY_ID}"
unset RESIDENDA_TOKEN CREATE_BODY CREATE_RESPONSE SCHEMAThe read returns 200; successful deletion returns 204. Continue with the property workflow, media synchronization, and reliability guidance. The API Reference is authoritative for complete schemas and status codes.