{"files":{"SKILL.md":"---\nname: developer-documentation\ndescription: \"Developer documentation API skill. Use when working with Developer documentation for link, events, users. Covers 16 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Developer documentation\nAPI version: 1.0.0\n\n## Auth\nApiKey (inferred from docs)\n\n## Base URL\nhttps://api.journy.io\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /events -- get events\n3. POST /link -- create first link\n\n## Endpoints\n16 endpoints across 9 groups. See references/api-spec.lap for full details.\n\n### Link\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /link | Link web activity to user |\n\n### Events\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /events | Track event |\n| GET | /events | Get events |\n\n### Users\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /users/upsert | Create or update user |\n| DELETE | /users | Delete user |\n\n### Accounts\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /accounts/upsert | Create or update account |\n| POST | /accounts/users/add | Add users to an account |\n| POST | /accounts/users/remove | Remove user from account |\n| DELETE | /accounts | Delete account |\n\n### Properties\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /properties/users | Get user properties |\n| GET | /properties/accounts | Get account properties |\n\n### Validate\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /validate | Validate API key |\n\n### Tracking\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /tracking/snippet | Get snippet for a website |\n\n### Track\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /track | Track event |\n\n### Segments\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /segments/users | Get user segments |\n| GET | /segments/accounts | Get account segments |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a link?\" -> POST /link\n- \"Create a event?\" -> POST /events\n- \"List all events?\" -> GET /events\n- \"Create a upsert?\" -> POST /users/upsert\n- \"Create a add?\" -> POST /accounts/users/add\n- \"Create a remove?\" -> POST /accounts/users/remove\n- \"List all users?\" -> GET /properties/users\n- \"List all accounts?\" -> GET /properties/accounts\n- \"List all validate?\" -> GET /validate\n- \"List all snippet?\" -> GET /tracking/snippet\n- \"Create a track?\" -> POST /track\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Developer documentation\n@base https://api.journy.io\n@version 1.0.0\n@auth ApiKey (inferred from docs)\n@endpoints 16\n@toc link(1), events(2), users(2), accounts(4), properties(2), validate(1), tracking(1), track(1), segments(2)\n\n@group link\n@endpoint POST /link\n@desc Link web activity to user\n@required {deviceId: str(non-empty-string), identification: map{email: str(email), userId: str(user-id)} # User identification requires a userId, email or both}\n@returns(201) Object was created\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endgroup\n\n@group events\n@endpoint POST /events\n@desc Track event\n@required {identification: map{account: map, user: map} # Event identification requires a user, account or both, name: str(event-name)}\n@optional {metadata: map # Event metadata, possible values are strings, booleans, numbers and datetimes (ISO 8601), triggeredAt: str(datetime) # If left blank this defaults to the current datetime}\n@returns(201) Object was created\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endpoint GET /events\n@desc Get events\n@returns(200) Events\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endgroup\n\n@group users\n@endpoint POST /users/upsert\n@desc Create or update user\n@required {identification: map{email: str(email), userId: str(user-id)} # User identification requires a userId, email or both}\n@optional {properties: map # The properties being set, possible values are strings, booleans, numbers and datetimes (ISO 8601)}\n@returns(201) User will be created\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endpoint DELETE /users\n@desc Delete user\n@required {identification: map{email: str(email), userId: str(user-id)} # User identification requires a userId, email or both}\n@returns(202) Accepted\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endgroup\n\n@group accounts\n@endpoint POST /accounts/upsert\n@desc Create or update account\n@required {identification: map{domain: str(top-level-domain), accountId: str(account-id)} # Account identification requires an accountId, domain or both}\n@optional {properties: map # The properties being set, possible values are strings, booleans, numbers and datetimes (ISO 8601)}\n@returns(201) Account will be created\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endpoint POST /accounts/users/add\n@desc Add users to an account\n@required {account: map{domain: str(top-level-domain), accountId: str(account-id)} # Account identification requires an accountId, domain or both, users: [map{identification!: map, properties: map}]}\n@returns(201) Object was created\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endpoint POST /accounts/users/remove\n@desc Remove user from account\n@required {account: map{domain: str(top-level-domain), accountId: str(account-id)} # Account identification requires an accountId, domain or both, users: [map{identification!: map}]}\n@returns(204) No content\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endpoint DELETE /accounts\n@desc Delete account\n@required {identification: map{domain: str(top-level-domain), accountId: str(account-id)} # Account identification requires an accountId, domain or both}\n@returns(202) Accepted\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endgroup\n\n@group properties\n@endpoint GET /properties/users\n@desc Get user properties\n@returns(200) User Properties\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endpoint GET /properties/accounts\n@desc Get account properties\n@returns(200) Account Properties\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endgroup\n\n@group validate\n@endpoint GET /validate\n@desc Validate API key\n@returns(200) Key validation\n@errors {401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endgroup\n\n@group tracking\n@endpoint GET /tracking/snippet\n@desc Get snippet for a website\n@required {domain: str(domain) # The domain you want to receive a snippet for}\n@returns(200) Snippet\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 404: Not found, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endgroup\n\n@group track\n@endpoint POST /track\n@desc Track event\n@required {identification: map{account: map, user: map} # Event identification requires a user, account or both, name: str(event-name)}\n@optional {metadata: map # Event metadata, possible values are strings, booleans, numbers and datetimes (ISO 8601), triggeredAt: str(datetime) # If left blank this defaults to the current datetime}\n@returns(201) Object was created\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endgroup\n\n@group segments\n@endpoint GET /segments/users\n@desc Get user segments\n@returns(200) User Segments\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endpoint GET /segments/accounts\n@desc Get account segments\n@returns(200) Account Segments\n@errors {400: Bad request, some fields or parameters are incorrect, 401: No API Key was provided or the key is not authorised to perform the action, 403: The API Key provided is currently not enabled, 429: Too many API requests were send, 500: An unexpected error occurred}\n\n@endgroup\n\n@end\n"}}