Member API - How to Edit Member Data with API Calls
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000091105
Now that our connection is all set and our Zap is published, we can update the spreadsheet created and this will create members on the site dynamically.
How to Connect to the API: Google Sheets Example
The examples shown in this article are completed using https://www.postman.com/.
Updating Member Data
The API's main function is to add members to the database, it does not trigger a welcome emails because the member did not actually sign up on the site.
We have created a parameter that can be sent with the API request to trigger the email being sent, based on the settings of the membership plan. The idea is not to always trigger the signup email to be sent, only when the parameter is sent with the request.
The parameter:
send_email_notifications
Is set to 1 so the system will now trigger the emails after a successful create user request:

When updating a members information using the api, only one member can be updated at a time.
Using the following URL:
/api/v2/user/update

Make sure that the member data that is to be updated keeps the original user_id of the member, this is important because the id is tied to the member in the database.
With the same user_id you can then add the fields and the new information.

Items to take in consideration with the user UPDATE
- In order to add new services (sub and sub-sub level categories) for the current top level category add the parameter:
create_new_categories = 1 - Sub and sub-sub categories have to match the parent top category and sub-subs have to match the parent sub.
- Email can only be a duplicate is allowed in the site settings: allow_duplicate_member_emails
- Combo of email + password can never be the same for 2 members.
- Token can't be a duplicate and needs to follow the correct format, it needs to be alphanumerical and 32 characters.
- All of the values passed for all fields have to be an accepted value. Use our member import template as a guide for accepted default values: How To Import Members Via CSV File
- When referencing a category name in the API, use single quotes. For example, if the top category is Adults and the subcategory is 25-30, enclose the subcategory name in single quotes '25-30' to ensure it is properly recognized.
- When updating member data such as website, booking link, or social media URLs, the system will validate each URL to ensure it follows a proper format. If a URL is not in a valid format, it will be skipped during the update process.
Valid URL format example: http://www.example.com or https://www.example.com - An existing Stripe customer can be linked to a member that already exists on the site using the stripe_customer_id parameter. See Linking a Stripe Customer ID to an Existing Member below.
The subscription_id and profession_id have to created within the site before they can be used or updated via spreadsheet. This means the membership plan and categories must already exist within the site in order for the api call to work properly.
>> Finance » Membership Plans Overview
>> How To Import Categories Via CSV File
Linking a Stripe Customer ID to an Existing Member
When a member's subscription was originally created outside Brilliant Directories, but through the same Stripe account connected to the site, the existing Stripe customer can be linked to that member so the saved card is charged automatically at renewal. No direct database changes are required.
The parameter is stripe_customer_id, and the accepted value must match the format cus_ followed by alphanumeric characters only (eg: cus_ABC123xyz789).
Two details are easy to miss: the request method must be PUT, and user_id is sent in the request body rather than at the end of the URL.
curl -X PUT "https://www.example.com/api/v2/user/update" \ -H "x-api-key: API_KEY" \ -d "user_id=1048" \ -d "stripe_customer_id=cus_ABC123xyz789"
The request is validated before anything is written:
- A value that does not match the cus_ format is rejected.
- A Stripe customer ID already attached to a different member is rejected, so the same customer cannot be linked twice.
- If the member already has a different Stripe customer ID on file, the request is rejected unless overwrite_stripe_customer_id = 1 is sent with it.
- If the member has no billing client record yet, one is created automatically.
Writing a payment_method_id value into member metadata does not link a saved card to a subscription. That value is stored by the site's own checkout for display purposes only. Linking an existing Stripe customer to a member is done with stripe_customer_id as shown above. The chosen payment method must also be set as the default on that customer in Stripe.
The related parameters subscription_start_date and billing_cycle are accepted only when a member is created or imported, not on update. Members that already hold an active subscription keep their existing renewal schedule. For members that do not exist on the site yet, all three values can be supplied together through the member import: How To Import Members Via CSV File
Member Credits
Member Credits can be edited via the API, there are 2 parameters and 3 actions to perform:
- credit_action parameter: use to add, deduct or override member credits.
- credit_amount parameter: is required to specifying the amount of member credits that will be added, deducted or overridden.

Verify User Credentials Action
This API endpoint is used to verify user credentials. It is easy and cost-effective for websites that provide support for SSO directly.
- api/v2/user/login

