Quick start
Prepare a project
Use an invited account and create a SERVER test key with links:write and links:read. Store it in your shell environment as SLNK_API_KEY; set SLNK_API_URL to your environment's API base URL. Do not paste a live key into shared examples.
Create a link
curl --request POST "$SLNK_API_URL/api/v1/links" \
--header "Authorization: Bearer $SLNK_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"originalUrl":"https://example.com/offer","behavior":"STANDARD"}'
The response is 201 Created with the link's identifier, short code and generated URL. Use the returned URL; do not construct a domain from a guessed organization or project slug. The key already determines the project.
List links
curl "$SLNK_API_URL/api/v1/links?page=0&size=5" \
--header "Authorization: Bearer $SLNK_API_KEY"
For a JWT session, use its access token instead and add X-Project-Id: PROJECT_ID to these requests. See Links for update and deletion semantics.
Collect events
Create a separate COLLECT key with events:write, then follow Events or Web SDK. Obtain the appropriate consent before collecting visitor data.