### Setup Webhooks Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Sets up a webhook to receive account and data updates. Webhooks are the primary source of updates in account linking status and data availability. ```APIDOC ## Setup webhooks ### Description Webhooks will be the primary source of updates in the account linking status and data availability. Your application must listen to incoming webhook events and process them to confirm data availability after an account is connected to the work platform. ### Method POST ### Endpoint https://api.sandbox.getphyllo.com/v1/webhooks ### Parameters #### Request Body - **url** (string) - Required - The URL to receive webhook events. - **events** (array of strings) - Required - A list of events to subscribe to. - **name** (string) - Optional - A name for the webhook. - **Authorization*** (string) - Required - Your Phyllo API key. ### Request Example ```json { "url": "http://0.0.0.0:8000/webhook", "events": [ "ACCOUNTS.CONNECTED", "PROFILES.ADDED", "PROFILES.UPDATED" ], "name": "test webhook" } ``` ### Request Example (cURL) ```shell curl -X POST \ 'https://api.sandbox.getphyllo.com/v1/webhooks' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -d '{ "url": "http://0.0.0.0:8000/webhook", "events": [ "ACCOUNTS.CONNECTED", "PROFILES.ADDED", "PROFILES.UPDATED" ], "name": "test webhook" }' ``` ``` -------------------------------- ### Setup Webhooks for Account and Data Updates Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Configure webhooks to receive real-time updates on account linking status and data availability. Use this to confirm data availability after an account is connected. ```json { "url": "http://0.0.0.0:8000/webhook", "events": [ "ACCOUNTS.CONNECTED", "PROFILES.ADDED", "PROFILES.UPDATED" ], "name": "test webhook" } ``` -------------------------------- ### Create Phyllo User in Bubble Workflow Source: https://docs.getphyllo.com/docs/api-reference/guides/phyllo-bubble This action creates a new Phyllo user. Ensure you have the Phyllo APIs plugin installed. Use '.sandbox' for sandbox environments, '.staging' for staging, and leave blank for production. ```bubble Plugins -> Phyllo - Connect - Create a user Environment: .sandbox Name: Current user's email External ID: Current user's unique id ``` -------------------------------- ### Get Media Content of an Account Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Fetch content information of an account using the Retrieve all content items API. This API allows you to retrieve content posted by creators and associated engagement metrics, including likes, shares, impressions, etc. ```APIDOC ## GET https://api.sandbox.getphyllo.com/v1/social/contents ### Description Fetch content information of an account using the Retrieve all content items API. Use this API to fetch content posted by creators and associated engagement metrics, including likes, shares, impressions, etc. ### Method GET ### Endpoint https://api.sandbox.getphyllo.com/v1/social/contents ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the account to retrieve content from. - **Authorization** (string) - Required - Bearer token for authentication. ``` -------------------------------- ### Initialize Phyllo Connect SDK (Web) Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Include the Phyllo Connect SDK script and initialize it with your configuration. Handle events like account connection, disconnection, token expiration, and user exit. ```html ``` ```javascript const config = { clientDisplayName: clientDisplayName, // the name of your app that you want the creators to see while granting access environment: environment, // the mode in which you want to use the SDK, `sandbox`, `staging` or `production` userId: userId, // the unique user_id parameter returned by Phyllo API when you create a user (see https://docs.getphyllo.com/docs/api-reference/reference/openapi.v1.yml/paths/~1v1~1users/post) token: token, }; const phylloConnect = PhylloConnect.initialize(config); phylloConnect.on("accountConnected", (accountId, workplatformId, userId) => { // gives the successfully connected account ID and work platform ID for the given user ID console.log( `onAccountConnected: ${accountId}, ${workplatformId}, ${userId}` ); }); phylloConnect.on( "accountDisconnected", (accountId, workplatformId, userId) => { // gives the successfully disconnected account ID and work platform ID for the given user ID console.log( `onAccountDisconnected: ${accountId}, ${workplatformId}, ${userId}` ); } ); phylloConnect.on("tokenExpired", (userId) => { // gives the user ID for which the token has expired console.log(`onTokenExpired: ${userId}`); // the SDK closes automatically in case the token has expired, and you need to handle this by showing an appropriate UI and messaging to the users }); phylloConnect.on("exit", (reason, userId) => { // indicates that the user with given user ID has closed the SDK and gives an appropriate reason for it console.log(`onExit: ${reason}, ${userId}`); }); phylloConnect.on("connectionFailure", (reason, workplatformId, userId) => { // optional, indicates that the user with given user ID has attempted connecting to the work platform but resulted in a failure and gives an appropriate reason for it console.log(`onConnectionFailure: ${reason}, ${workplatformId}, ${userId}`); }); your_button.onclick = phylloConnect.open(); ``` -------------------------------- ### SESSION.EXPIRED Webhook Event Payload Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events This is an example payload for the SESSION.EXPIRED webhook event. It is triggered when a creator's OAuth access token is expired or invalid. Use this to inform users to reconnect their accounts. ```json { "event": "SESSION.EXPIRED", "name": "OAuth token session expired", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "f9ed198434094d498473953cade79f5e", "user_id": "8145c37cb1744bcf9dd6f90548af9089", "last_updated_time": "2021-11-10T10:09:09.704257" } } ``` -------------------------------- ### Mock Frontend Connection Flow Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Test user flows in sandbox mode by mocking frontend connection. This allows seamless testing without a live backend, as usernames, passwords, OTP fields, and permission pages are simulated. ```text In the `sandbox` mode, usernames, passwords, OTP fields, and permission pages are fully mocked. You can proceed seamlessly by entering any placeholder data, ensuring a smooth and efficient testing process without requiring a live backend. ``` -------------------------------- ### Create an SDK Token Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Generate an SDK token using the user ID obtained from the create user step. This token is used to initialize the SDK for the account connection process and is valid for one week. ```APIDOC ## POST https://api.sandbox.getphyllo.com/v1/sdk-token ### Description Generates a token to initialize the Phyllo SDK for account connection. ### Method POST ### Endpoint https://api.sandbox.getphyllo.com/v1/sdk-token ### Parameters #### Request Body - **user_id** (string) - Required - The ID of the user for whom the SDK token is being generated. - **products** (array of strings) - Required - A list of products to enable for the creator (e.g., `IDENTITY`, `ENGAGEMENT`, `INCOME`). ### Request Example ```json { "user_id": "user-id-from-step-1", "products": [ "IDENTITY", "IDENTITY.AUDIENCE", "ENGAGEMENT", "ENGAGEMENT.AUDIENCE", "INCOME" ] } ``` ### Response #### Success Response (200) - **sdk_token** (string) - The generated token for initializing the SDK. - **expires_at** (string) - The expiration timestamp for the SDK token. ``` -------------------------------- ### Fetch All Users API Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Retrieve a list of all available users in the sandbox environment. This is the first step to accessing user-specific data. ```shell GET https://api.sandbox.getphyllo.com/v1/users Parameters Authorization*: ``` -------------------------------- ### Generate SDK Token for Phyllo Integration Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Generate an SDK token using the user ID obtained from the create user step. This token initializes the Phyllo SDK for the account connection process and is valid for one week. Specify the required data products like `IDENTITY`, `ENGAGEMENT`, etc. Execute this on your backend. ```json { "user_id": "John Doe", "products": [ "IDENTITY", "IDENTITY.AUDIENCE", "ENGAGEMENT", "ENGAGEMENT.AUDIENCE", "INCOME" ] } ``` -------------------------------- ### Create a User Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Use the create a user API to create a user on Phyllo for every creator who needs to share their data. The `id` returned in the response uniquely identifies each user. ```APIDOC ## POST https://api.sandbox.getphyllo.com/v1/users ### Description Creates a new user on the Phyllo platform. ### Method POST ### Endpoint https://api.sandbox.getphyllo.com/v1/users ### Parameters #### Request Body - **name** (string) - Required - The name of the user. - **external_id** (string) - Required - A unique identifier for the user from your system. ### Request Example ```json { "name": "John Doe", "external_id": "unique-user-id" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the created user on Phyllo. - **name** (string) - The name of the user. - **external_id** (string) - The external ID provided for the user. - **created_at** (string) - Timestamp of when the user was created. - **updated_at** (string) - Timestamp of when the user was last updated. ``` -------------------------------- ### Retrieve All Content Items Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Fetches the media content of an account and its associated engagement metrics. ```APIDOC ## Retrieve all content items API ### Description Upon receiving the content related notification, you can fetch the media content of an account using the Retrieve all content items API. This API returns the content posted by creators and its associated engagement metrics, including likes, shares, impressions, and others. ### Method GET ### Endpoint https://api.sandbox.getphyllo.com/v1/content ### Parameters #### Query Parameters - **account_id*** (string) - Required - The ID of the account. - **Authorization*** (string) - Required - Your Phyllo API key. ### Request Example ```shell curl -X GET \ 'https://api.sandbox.getphyllo.com/v1/content?account_id=YOUR_ACCOUNT_ID' \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ``` -------------------------------- ### API Environments Source: https://docs.getphyllo.com/docs/api-reference/api/ref Details on the different environments available for the Phyllo API. ```APIDOC ## API Environments The API operates in three environments: - **Sandbox**: Returns mock data and is used for testing basic functionality. - **Staging**: Similar to production but with limitations, used for internal testing and development. - **Production**: Connects to real platform accounts for live data operations. ``` -------------------------------- ### Retrieve All Content Items API Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Fetch content information of an account, including posted content and engagement metrics like likes, shares, and impressions. Execute this request on the backend. ```shell GET https://api.sandbox.getphyllo.com/v1/social/contents ``` -------------------------------- ### Retrieve All Users Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Retrieves a complete list of users available in the system. ```APIDOC ## Retrieve all users API ### Description Call the retrieve all users API. You will get a complete list of users available. ### Method GET ### Endpoint https://api.sandbox.getphyllo.com/v1/users ### Parameters #### Query Parameters - **Authorization*** (string) - Required - Your Phyllo API key. ### Request Example ```shell curl -X GET \ 'https://api.sandbox.getphyllo.com/v1/users' \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ``` -------------------------------- ### Retrieve All Accounts Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Fetches all accounts connected by your users. The response includes account connection status and data sync status for requested products. ```APIDOC ## Retrieve all accounts API ### Description Call the Retrieve all accounts API to get all the accounts connected by your users. The response will also include account connection status and the data sync status for the all the rquested products (e.g., `IDENTITY`). Once synced, you will receive a webhook notification for each type of data. ### Method GET ### Endpoint https://api.sandbox.getphyllo.com/v1/accounts ### Parameters #### Query Parameters - **account_id*** (string) - Required - The ID of the account. - **Authorization*** (string) - Required - Your Phyllo API key. ### Request Example ```shell curl -X GET \ 'https://api.sandbox.getphyllo.com/v1/accounts?account_id=YOUR_ACCOUNT_ID' \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ``` -------------------------------- ### Create a User with Phyllo API Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Use the create user API to generate a unique identifier for each creator on Phyllo. This `id` is crucial for subsequent operations and uniquely identifies users across sessions. Execute this on your backend. ```json { "name": "John Doe", "external_id": "unique-user-id" } ``` -------------------------------- ### CONTENTS.PUBLISH_READY Webhook Event Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events This event is triggered when a content is uploaded and ready to be published. It includes the `publish_id` for the content. ```json { "event": "CONTENTS.PUBLISH_READY", "name": "contents ready to be published", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "4544993eac6f4c4a9ec27e23f6cb8c56", "user_id": "6bd84fa308f84e66abf108fd3d29f9ef", "publish_id": "74e5f67b9df04cbeba0894d749561447", "last_updated_time": "2021-11-10T12:59:51.874364" } } ``` -------------------------------- ### Security: Basic Auth Source: https://docs.getphyllo.com/docs/api-reference/api/ref Information on how to authenticate API requests using Basic Authentication. ```APIDOC ## Security: Basic Auth Basic authentication is a simple authentication scheme built into the HTTP protocol. To use it, send your HTTP requests with an Authorization header that contains the word Basic followed by a space and a base64-encoded string `username:password`. **Example:** `Authorization: Basic ZGVtbzpwQDU1dzByZA==` ``` -------------------------------- ### Fetch Profile Information of an Account API Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Retrieve profile details for a given account. Use this to verify user identity by obtaining information such as username, follower count, and bio. ```shell GET https://api.sandbox.getphyllo.com/v1/profiles Parameters account_id*: Authorization*: ``` -------------------------------- ### Retrieve All Accounts of a User API Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Fetch all connected accounts for a specific user. Each account represents a real-world platform account like Instagram or YouTube. ```shell GET https://api.sandbox.getphyllo.com/v1/accounts Parameters user_id*: Authorization*: ``` -------------------------------- ### Handle API Retries with Retry-After Header Source: https://docs.getphyllo.com/docs/api-reference/guides/respecting-rate-limits Implement a retry mechanism that respects the `Retry-After` header. This pseudo-code demonstrates how to repeatedly call an API until a successful response is received, pausing for the duration specified in the `Retry-After` header when a rate limit is encountered. ```javascript fetch_and_retry(request) { response = await call_api(request) // the method that actually calls the API and processes the response while(response.status == 429) { retry_after = response.headers['Retry-After'] // value in seconds from API header sleep(retry_after) // time in seconds or sleep(retry_after*1000) if sleep time is in ms await call_api(request) } return response } ``` -------------------------------- ### Retrieve a Profile Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Fetches profile information of an account. This API returns profile-level information like username, bio, and number of followers. ```APIDOC ## Retrieve a profile API ### Description Upon receiving the profile related notification, fetch the profile information of an account using the Retrieve a profile API. This API returns profile-level information like username, bio, number of followers, etc., and can be used to verify account ownership and identity of your users. ### Method GET ### Endpoint https://api.sandbox.getphyllo.com/v1/profiles ### Parameters #### Query Parameters - **account_id*** (string) - Required - The ID of the account. - **Authorization*** (string) - Required - Your Phyllo API key. ### Request Example ```shell curl -X GET \ 'https://api.sandbox.getphyllo.com/v1/profiles?account_id=YOUR_ACCOUNT_ID' \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ``` -------------------------------- ### ACCOUNTS.CONNECTED Webhook Event Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events Triggered when a creator links a new work platform account. Use the account_id to retrieve account details and sync status. ```json { "event": "ACCOUNTS.CONNECTED", "name": "account is connected", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "4544993eac6f4c4a9ec27e23f6cb8c56", "user_id": "6bd84fa308f84e66abf108fd3d29f9ef", "last_updated_time": "2021-11-10T15:44:18.520054" } } ``` -------------------------------- ### PROFILES.ADDED Webhook Event Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events Triggered when a creator profile is synced successfully. Use the profile_id to retrieve the latest identity data for the profile. ```json { "event": "PROFILES.ADDED", "name": "profile added", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "4544993eac6f4c4a9ec27e23f6cb8c56", "user_id": "6bd84fa308f84e66abf108fd3d29f9ef", "profile_id": "74e5f67b9df04cbeba0894d749561447", "last_updated_time": "2021-11-10T12:59:51.874364" } } ``` -------------------------------- ### BALANCES.ADDED Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events Triggered when a creator's new balances are scanned successfully. The `items` array contains balance IDs that can be used to retrieve full balance details via the 'retrieve in bulk API'. ```APIDOC ## BALANCES.ADDED ### Description This event is triggered when new balances for a creator are successfully scanned. It provides a list of balance IDs in the `items` array. ### Event BALANCES.ADDED ### Data Structure Example ```json { "event": "BALANCES.ADDED", "name": "balances added", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "f9ed198434094d498473953cade79f5e", "user_id": "8145c37cb1744bcf9dd6f90548af9089", "last_updated_time": "2021-11-10T10:09:09.704257", "items": [ "0ccc5adf0d7d4eaabca56b58420f7da7", "27c01cb47d3f462eaba08a86dc7bab82", "c61610a33ca641caaec8f2655c1d49f8" ] } } ``` ``` -------------------------------- ### Retrieve All Accounts of a User Source: https://docs.getphyllo.com/docs/api-reference/introduction/getting-started-with-phyllo-APIs Fetches all connected accounts for a specific user. Each account corresponds to a real-world account on platforms like Instagram, YouTube, etc. ```APIDOC ## Retrieve all accounts API ### Description Fetch all connected accounts for each user using the Retrieve all accounts API. Each account corresponds to a real world account on a platforms like Instagram, YouTube, etc. ### Method GET ### Endpoint https://api.sandbox.getphyllo.com/v1/accounts ### Parameters #### Query Parameters - **user_id*** (string) - Required - The ID of the user. - **Authorization*** (string) - Required - Your Phyllo API key. ### Request Example ```shell curl -X GET \ 'https://api.sandbox.getphyllo.com/v1/accounts?user_id=YOUR_USER_ID' \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ``` -------------------------------- ### API Base URLs Source: https://docs.getphyllo.com/docs/api-reference/api/ref The base URLs for accessing the Phyllo API across different environments. ```APIDOC ## API Base URLs ### Sandbox `https://api.sandbox.getphyllo.com` ### Staging `https://api.staging.getphyllo.com` ### Production `https://api.getphyllo.com` ``` -------------------------------- ### ACTIVITY-ARTISTS.ADDED Webhook Event Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events This event is triggered when a user's new artists' data is scanned successfully. The `items` array contains IDs of the newly added artists. ```json { "event": "ACTIVITY-ARTISTS.ADDED", "name": "artists added", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "f9ed198434094d498473953cade79f5e", "user_id": "8145c37cb1744bcf9dd6f90548af9089", "last_updated_time": "2021-11-10T10:09:09.704257", "items": [ "0ccc5adf0d7d4eaabca56b58420f7da7", "27c01cb47d3f462eaba08a86dc7bab82", "c61610a33ca641caaec8f2655c1d49f8" ] } } ``` -------------------------------- ### Profile Webhook Events Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events These events are triggered by changes related to creator profiles. ```APIDOC ## PROFILES.ADDED ### Description Triggered when a creator profile is synced successfully. ### Event Data Example ```json { "event": "PROFILES.ADDED", "name": "profile added", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "4544993eac6f4c4a9ec27e23f6cb8c56", "user_id": "6bd84fa308f84e66abf108fd3d29f9ef", "profile_id": "74e5f67b9df04cbeba0894d749561447", "last_updated_time": "2021-11-10T12:59:51.874364" } } ``` ``` ```APIDOC ## PROFILES.UPDATED ### Description Triggered when a creator profile is updated. ### Event Data Example ```json { "event": "PROFILES.UPDATED", "name": "profile updated", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "711c36fccb2b4304afb4bcd14e6bfbdd", "user_id": "0e3808ca12174c0082381fc5653f9538", "profile_id": "bdec2a8924d14904b022b90c8a463559", "last_updated_time": "2021-11-10T10:09:11.304556" } } ``` ``` -------------------------------- ### BALANCES.ADDED Webhook Event Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events This event is triggered when new balances for a creator are successfully scanned. The payload includes account and user IDs, last updated time, and a list of balance IDs. ```json { "event": "BALANCES.ADDED", "name": "balances added", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "f9ed198434094d498473953cade79f5e", "user_id": "8145c37cb1744bcf9dd6f90548af9089", "last_updated_time": "2021-11-10T10:09:09.704257", "items": [ "0ccc5adf0d7d4eaabca56b58420f7da7", "27c01cb47d3f462eaba08a86dc7bab82", "c61610a33ca641caaec8f2655c1d49f8" ] } } ``` -------------------------------- ### Account Webhook Events Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events These events are triggered by changes related to creator accounts. ```APIDOC ## ACCOUNTS.CONNECTED ### Description Triggered when a creator links a new work platform account. ### Event Data Example ```json { "event": "ACCOUNTS.CONNECTED", "name": "account is connected", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "4544993eac6f4c4a9ec27e23f6cb8c56", "user_id": "6bd84fa308f84e66abf108fd3d29f9ef", "last_updated_time": "2021-11-10T15:44:18.520054" } } ``` ``` ```APIDOC ## ACCOUNTS.DISCONNECTED ### Description Triggered when a creator disconnects his work platform account. ### Event Data Example ```json { "event": "ACCOUNTS.DISCONNECTED", "name": "account is disconnected", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "29ebb0d8296b45159753833989834dbd", "user_id": "1290a1f5ad9b48b5a3f10daaa26469fd", "last_updated_time": "2021-11-10T16:12:58.006355" } } ``` ``` -------------------------------- ### CONTENTS.ADDED Webhook Event Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events This event is triggered when a creator's content is scanned successfully. The payload includes details about the added content. ```json { "event": "CONTENTS.ADDED", "name": "contents added", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "2b3316b8f4684f03841140b547ec7eb3", "user_id": "9864110df20646d29860d0f687c2670d", "last_updated_time": "2021-10-25 16:45:26.761622", "items": [ "0ccc5adf0d7d4eaabca56b58420f7da7", "27c01cb47d3f462eaba08a86dc7bab82", "c61610a33ca641caaec8f2655c1d49f8" ] } } ``` -------------------------------- ### Activity Webhook Events Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events These events are triggered by changes in user activity related to artists and contents. The `items` array in the payload contains IDs that can be used to retrieve detailed information in bulk. ```APIDOC ## ACTIVITY-ARTISTS.ADDED ### Description Triggered when a user's new artists' data is scanned successfully. ### Event Payload Example ```json { "event": "ACTIVITY-ARTISTS.ADDED", "name": "artists added", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "f9ed198434094d498473953cade79f5e", "user_id": "8145c37cb1744bcf9dd6f90548af9089", "last_updated_time": "2021-11-10T10:09:09.704257", "items": [ "0ccc5adf0d7d4eaabca56b58420f7da7", "27c01cb47d3f462eaba08a86dc7bab82", "c61610a33ca641caaec8f2655c1d49f8" ] } } ``` ``` ```APIDOC ## ACTIVITY-ARTISTS.UPDATED ### Description Triggered when a user's existing artists' data is updated. ### Event Payload Example ```json { "event": "ACTIVITY-ARTISTS.UPDATED", "name": "artists updated", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "f9ed198434094d498473953cade79f5e", "user_id": "8145c37cb1744bcf9dd6f90548af9089", "last_updated_time": "2021-11-10T10:09:09.704257", "items": [ "0ccc5adf0d7d4eaabca56b58420f7da7", "27c01cb47d3f462eaba08a86dc7bab82", "c61610a33ca641caaec8f2655c1d49f8" ] } } ``` ``` ```APIDOC ## ACTIVITY-CONTENTS.ADDED ### Description Triggered when a user's new contents' data is scanned successfully. ### Event Payload Example ```json { "event": "ACTIVITY-CONTENTS.ADDED", "name": "contents added", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "f9ed198434094d498473953cade79f5e", "user_id": "8145c37cb1744bcf9dd6f90548af9089", "last_updated_time": "2021-11-10T10:09:09.704257", "items": [ "0ccc5adf0d7d4eaabca56b58420f7da7", "27c01cb47d3f462eaba08a86dc7bab82", "c61610a33ca641caaec8f2655c1d49f8" ] } } ``` ``` ```APIDOC ## ACTIVITY-CONTENTS.UPDATED ### Description Triggered when a user's existing contents' data is updated. ### Event Payload Example ```json { "event": "ACTIVITY-CONTENTS.UPDATED", "name": "contents updated", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "f9ed198434094d498473953cade79f5e", "user_id": "8145c37cb1744bcf9dd6f90548af9089", "last_updated_time": "2021-11-10T10:09:09.704257", "items": [ "0ccc5adf0d7d4eaabca56b58420f7da7", "27c01cb47d3f462eaba08a86dc7bab82", "c61610a33ca641caaec8f2655c1d49f8" ] } } ``` ``` -------------------------------- ### ACTIVITY-CONTENTS.ADDED Webhook Event Source: https://docs.getphyllo.com/docs/api-reference/API/webhook-events This event is triggered when a user's new contents' data is scanned successfully. The `items` array contains IDs of the newly added contents. ```json { "event": "ACTIVITY-CONTENTS.ADDED", "name": "contents added", "id": "674c9030-640a-4c83-a680-666361044f67", "data": { "account_id": "f9ed198434094d498473953cade79f5e", "user_id": "8145c37cb1744bcf9dd6f90548af9089", "last_updated_time": "2021-11-10T10:09:09.704257", "items": [ "0ccc5adf0d7d4eaabca56b58420f7da7", "27c01cb47d3f462eaba08a86dc7bab82", "c61610a33ca641caaec8f2655c1d49f8" ] } } ```