{"files":{"SKILL.md":"---\nname: developer-documentation\ndescription: \"Developer documentation API skill. Use when working with Developer documentation for link, events, users. Covers 26 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\n26 endpoints across 10 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### In-app-messages\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /in-app-messages | List in-app messages |\n| POST | /in-app-messages | Create in-app message |\n| GET | /in-app-messages/user/{userId} | Get in-app messages for user |\n| GET | /in-app-messages/user/{userId}/unread | Get unread in-app messages for user |\n| GET | /in-app-messages/user/{userId}/new | Get new in-app messages for user |\n| GET | /in-app-messages/account/{accountId} | Get in-app messages for account |\n| GET | /in-app-messages/account/{accountId}/unread | Get unread in-app messages for account |\n| GET | /in-app-messages/account/{accountId}/new | Get new in-app messages for account |\n| PUT | /in-app-messages/{messageId}/received | Mark message as received |\n| DELETE | /in-app-messages/{messageId} | Delete in-app message |\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- \"List all in-app-messages?\" -> GET /in-app-messages\n- \"Create a in-app-message?\" -> POST /in-app-messages\n- \"Get user details?\" -> GET /in-app-messages/user/{userId}\n- \"List all unread?\" -> GET /in-app-messages/user/{userId}/unread\n- \"List all new?\" -> GET /in-app-messages/user/{userId}/new\n- \"Get account details?\" -> GET /in-app-messages/account/{accountId}\n- \"Delete a in-app-message?\" -> DELETE /in-app-messages/{messageId}\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- Paginated endpoints accept limit/offset or cursor parameters\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 26\n@hint download_for_search\n@toc link(1), events(2), users(2), accounts(4), properties(2), validate(1), tracking(1), track(1), segments(2), in-app-messages(10)\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@group in-app-messages\n@endpoint GET /in-app-messages\n@desc List in-app messages\n@required {appId: str # The connected app ID}\n@optional {limit: int # Number of messages to return (max 100), offset: int # Offset for pagination}\n@returns(200) List of in-app messages\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 /in-app-messages\n@desc Create in-app message\n@required {appId: str, scope: str(user/account), message: str, expiredAt: str(date-time)}\n@optional {userId: str, accountId: str}\n@returns(201) Created in-app message\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 /in-app-messages/user/{userId}\n@desc Get in-app messages for user\n@required {userId: str # The user ID, appId: str # The connected app ID}\n@optional {limit: int # Number of messages to return (max 100), offset: int # Offset for pagination}\n@returns(200) List of in-app messages for user\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 /in-app-messages/user/{userId}/unread\n@desc Get unread in-app messages for user\n@required {userId: str # The user ID, appId: str # The connected app ID}\n@optional {limit: int # Number of messages to return (max 100), offset: int # Offset for pagination}\n@returns(200) List of unread in-app messages for user\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 /in-app-messages/user/{userId}/new\n@desc Get new in-app messages for user\n@required {userId: str # The user ID, appId: str # The connected app ID}\n@optional {limit: int # Number of messages to return (max 100), offset: int # Offset for pagination}\n@returns(200) List of new in-app messages for user\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 /in-app-messages/account/{accountId}\n@desc Get in-app messages for account\n@required {accountId: str # The account ID, appId: str # The connected app ID}\n@optional {limit: int # Number of messages to return (max 100), offset: int # Offset for pagination}\n@returns(200) List of in-app messages for account\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 /in-app-messages/account/{accountId}/unread\n@desc Get unread in-app messages for account\n@required {accountId: str # The account ID, appId: str # The connected app ID}\n@optional {limit: int # Number of messages to return (max 100), offset: int # Offset for pagination}\n@returns(200) List of unread in-app messages for account\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 /in-app-messages/account/{accountId}/new\n@desc Get new in-app messages for account\n@required {accountId: str # The account ID, appId: str # The connected app ID}\n@optional {limit: int # Number of messages to return (max 100), offset: int # Offset for pagination}\n@returns(200) List of new in-app messages for account\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 PUT /in-app-messages/{messageId}/received\n@desc Mark message as received\n@required {messageId: str # The message ID}\n@returns(200) Message marked as received\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@endpoint DELETE /in-app-messages/{messageId}\n@desc Delete in-app message\n@required {messageId: str # The message ID}\n@returns(200) {message: str} # Message deleted successfully\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@end\n"}}