Interface ProfileService
-
- All Implemented Interfaces:
public interface ProfileServiceManage organization profiles
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceProfileService.WithRawResponseA view of ProfileService that provides access to raw HTTP responses for each method.
-
Method Summary
-
-
Method Detail
-
withRawResponse
abstract ProfileService.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract ProfileService withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
campaigns
abstract CampaignService campaigns()
Manage organization profiles
-
create
ApiResponseOfProfileDetail create()
Creates a new sender profile within an organization. Profiles represent different brands, departments, or use cases, each with their own messaging configuration and settings. Requires admin role in the organization.
Every profile must be linked to a WhatsApp Business Account. There are two ways to do this:
1. Inherit from organization (default) — Omit the
whatsapp_business_accountfield. The profile will share the organization's WhatsApp Business Account, which must have been set up via WhatsApp Embedded Signup. This is the recommended path for most use cases.2. Direct credentials — Provide a
whatsapp_business_accountobject withwaba_id,phone_number_id, andaccess_token. Use this when the profile needs its own independent WhatsApp Business Account. Obtain these from Meta Business Manager by creating a System User withwhatsapp_business_messagingandwhatsapp_business_managementpermissions.If the
whatsapp_business_accountfield is omitted and the organization has no WhatsApp Business Account configured, the request will be rejected with HTTP 422.Include the optional
brandfield to create the brand for this profile at the same time. Cannot be used wheninherit_tcr_brandistrue.When
billing_modelis"profile"or"profile_and_organization"you may include apayment_detailsobject containing the card number, expiry (MM/YY), CVC, and billing ZIP code. Payment details are never stored on our servers and are forwarded directly to the payment processor. Providingpayment_detailswhenbilling_modelis"organization"is not allowed.
-
create
abstract ApiResponseOfProfileDetail create(ProfileCreateParams params, RequestOptions requestOptions)
-
create
ApiResponseOfProfileDetail create(ProfileCreateParams params)
-
create
ApiResponseOfProfileDetail create(RequestOptions requestOptions)
-
retrieve
ApiResponseOfProfileDetail retrieve(String profileId)
Retrieves detailed information about a specific sender profile within an organization, including brand and KYC information if a brand has been configured.
-
retrieve
ApiResponseOfProfileDetail retrieve(String profileId, ProfileRetrieveParams params, RequestOptions requestOptions)
-
retrieve
ApiResponseOfProfileDetail retrieve(String profileId, ProfileRetrieveParams params)
-
retrieve
abstract ApiResponseOfProfileDetail retrieve(ProfileRetrieveParams params, RequestOptions requestOptions)
-
retrieve
ApiResponseOfProfileDetail retrieve(ProfileRetrieveParams params)
-
retrieve
ApiResponseOfProfileDetail retrieve(String profileId, RequestOptions requestOptions)
-
update
ApiResponseOfProfileDetail update(String profileId)
Updates a profile's configuration and settings. Requires admin role in the organization. Only provided fields will be updated (partial update).
Include the optional
brandfield to create or update the brand associated with this profile. The brand holds KYC and TCR compliance data (legal business info, contact details, messaging vertical). Once a brand has been submitted to TCR it cannot be modified. Settinginherit_tcr_brand: trueand providingbrandin the same request is not allowed.When
billing_modelis"profile"or"profile_and_organization"you may include apayment_detailsobject containing the card number, expiry (MM/YY), CVC, and billing ZIP code. Payment details are never stored on our servers and are forwarded directly to the payment processor. Providingpayment_detailswhenbilling_modelis"organization"is not allowed.
-
update
ApiResponseOfProfileDetail update(String profileId, ProfileUpdateParams params, RequestOptions requestOptions)
-
update
ApiResponseOfProfileDetail update(String profileId, ProfileUpdateParams params)
-
update
abstract ApiResponseOfProfileDetail update(ProfileUpdateParams params, RequestOptions requestOptions)
-
update
ApiResponseOfProfileDetail update(ProfileUpdateParams params)
-
update
ApiResponseOfProfileDetail update(String profileId, RequestOptions requestOptions)
-
list
ProfileListResponse list()
Retrieves all sender profiles within an organization, including brand information for each profile. Profiles represent different brands, departments, or use cases within an organization, each with their own messaging configuration.
-
list
abstract ProfileListResponse list(ProfileListParams params, RequestOptions requestOptions)
-
list
ProfileListResponse list(ProfileListParams params)
-
list
ProfileListResponse list(RequestOptions requestOptions)
-
delete
Unit delete(String profileId, ProfileDeleteParams params)
Soft deletes a sender profile. The profile will be marked as deleted but data is retained. Requires admin role in the organization.
-
delete
Unit delete(String profileId, ProfileDeleteParams params, RequestOptions requestOptions)
-
delete
Unit delete(ProfileDeleteParams params)
-
delete
abstract Unit delete(ProfileDeleteParams params, RequestOptions requestOptions)
-
complete
ProfileCompleteResponse complete(String profileId, ProfileCompleteParams params)
Final step in profile compliance workflow. Validates all prerequisites (general data, brand, campaigns), connects profile to Telnyx/WhatsApp, and sets status based on configuration. The process runs in the background and calls the provided webhook URL when finished.
Prerequisites: - Profile must be completed - If inheritTcrBrand=false: Profile must have existing brand - If inheritTcrBrand=true: Parent must have existing brand - If TCR application: Must have at least one campaign (own or inherited) - If inheritTcrCampaign=false: Profile should have campaigns - If inheritTcrCampaign=true: Parent must have campaigns Status Logic: - If both SMS and WhatsApp channels are missing → SUBMITTED - If TCR application and not inheriting brand/campaigns → SUBMITTED - If non-TCR with destination country (IsMain=true) → SUBMITTED - Otherwise → COMPLETED
-
complete
ProfileCompleteResponse complete(String profileId, ProfileCompleteParams params, RequestOptions requestOptions)
-
complete
ProfileCompleteResponse complete(ProfileCompleteParams params)
-
complete
abstract ProfileCompleteResponse complete(ProfileCompleteParams params, RequestOptions requestOptions)
-
-
-
-