openapi: 3.0.3
info:
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  title: Context Register API - 10DLC Management
  version: 1.0.0
  description: >
    # Overview

    The Context Register API provides comprehensive registration and compliance
    management for 10DLC messaging services.
  contact:
    name: SabarHub API Support
    url: https://sabarhub.com/support
    email: support@sabarhub.com
  termsOfService: https://sabarhub.com/terms
servers:
  - url: https://contextregister.sabrhub.com/api/v1
    description: Production Environment (live)
  - url: https://usermanagement.sabrhub.com/v1
    description: User Management Auth Dev
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
security:
  - BearerAuth: []
tags:
  - name: Brand Management
    description: >-
      APIs for retrieving and managing brand information, including listing all
      brands and fetching details of a specific brand.
  - name: Campaign Management
    description: >-
      APIs for accessing and managing all campaigns and related messages for a
      specific brand, including campaign details, messaging content, activity
      tracking, and operational metadata.
paths:
  /api/brands:
    get:
      tags:
        - Brand Management
      operationId: getAllBrands
      summary: Retrieve paginated list of company brands
      description: Fetches brands associated with a specific company.
      parameters:
        - name: page
          in: query
          required: false
          description: The page number for pagination.
          schema:
            type: integer
          example: 1
        - name: size
          in: query
          required: false
          description: The size of the page for pagination.
          schema:
            type: integer
          example: 10
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_brands:
                    type: integer
                  page:
                    type: integer
                  size:
                    type: integer
                  total_pages:
                    type: integer
                  brands:
                    type: array
                    items:
                      type: object
              example:
                total_brands: 1
                page: 1
                size: 10
                total_pages: 1
                brands:
                  - id: 10
                    activity_ids: []
                    activity_state: false
                    activity_user_id: false
                    activity_type_id: false
                    activity_type_icon: false
                    activity_date_deadline: false
                    my_activity_date_deadline: false
                    activity_summary: false
                    activity_exception_decoration: false
                    activity_exception_icon: false
                    message_is_follower: false
                    message_follower_ids:
                      - 24
                    message_partner_ids:
                      - 11
                    message_ids:
                      - 98
                    has_message: true
                    message_needaction: false
                    message_needaction_counter: 0
                    message_has_error: false
                    message_has_error_counter: 0
                    message_attachment_count: 0
                    website_message_ids: []
                    message_has_sms_error: false
                    step: company
                    name: BayCove LLC
                    company_name: BayCove LLC
                    company_name_suffix: LLC
                    dba_name: BayCove LLC
                    dba_radio: true
                    legal_form: PRIVATE_PROFIT
                    registration_country: US
                    ein_number: 11-2345678
                    ein_issuing_country: US
                    user_id:
                      - 8
                      - Bay Cove Human Services Inc.
                    user_email: baycove@test.com
                    street_address: 46 DWARIKANAGARI SOCIETY, VIJAPUR
                    city: VIJAPUR
                    state: CA
                    zip_code: '38287'
                    country: US
                    support_email: baycove@test.com
                    support_phone: '+14444444444'
                    website_url: false
                    optin_form_url: false
                    tos_url: false
                    privacy_policy_url: false
                    business_id_type: N/A
                    business_id_number: false
                    vertical: EDUCATION
                    brand_relationship: BASIC_ACCOUNT
                    brand_logo: false
                    brand_logo_filename: false
                    tcr_brand_id: false
                    tcr_api_error: false
                    tcr_api_status: false
                    tcr_brand_identity_status: false
                    website_url_status: false
                    ssl_url_status: false
                    opt_in_url_status: false
                    legal_disclaimer_status: false
                    sitemap_status: false
                    tos_url_status: false
                    privacy_policy_url_status: false
                    website_url_messsage: false
                    ssl_url_messsage: false
                    opt_in_url_messsage: false
                    legal_disclaimer_messsage: false
                    sitemap_url_messsage: false
                    tos_url_messsage: false
                    privacy_policy_url_messsage: false
                    verification: false
                    opt_in_form_checkbox_status: false
                    opt_in_form_phonenumber_field_status: false
                    opt_in_form_has_i_agree_status: false
                    opt_in_form_has_embedded_privacy_url_status: false
                    opt_in_form_has_embedded_tos_url_status: false
                    opt_in_form_has_condition_of_purchase_text_status: false
                    opt_in_form_has_agree_to_receive_text_messages_status: false
                    opt_in_form_i_agree_statement_has_brand_name_status: true
                    opt_in_form_has_message_rates_may_apply_status: false
                    opt_in_form_has_carrier_data_rates_may_apply_status: false
                    opt_in_form_has_message_frequency_may_varies_status: false
                    opt_in_form_has_text_stop_opt_out_status: false
                    opt_in_form_has_text_help_status: true
                    tos_has_agree_to_receive_recurring_texts_status: false
                    tos_has_receive_updates_status: false
                    tos_has_message_frequency_may_varies_status: false
                    tos_has_unsubscribe_by_stop_texts_status: false
                    tos_has_opt_out_may_take_x_business_day_texts_status: false
                    tos_has_privacy_policy_ref_status: false
                    tos_has_message_rates_may_apply_status: false
                    tos_has_carrier_data_rates_may_apply_status: false
                    tos_has_short_code_change_status: false
                    tos_has_missed_message_status: false
                    tos_has_phonenumber_voluntarily_collected_status: false
                    tos_has_affiliate_marketing_status: false
                    tos_has_number_shared_with_sms_provider_status: false
                    tos_has_number_not_shared_with_third_parties_status: false
                    tos_has_text_help_status: true
                    privacy_policy_has_purpose_of_messaging_status: false
                    privacy_policy_has_not_shared_with_third_parties_status: true
                    privacy_policy_has_tos_reference_status: false
                    privacy_policy_has_affiliate_marketing_status: false
                    privacy_policy_has_other_categories_status: false
                    privacy_policy_has_unsubscribe_by_stop_status: false
                    privacy_policy_has_text_help_status: true
                    error_status: false
                    ssl_valid_from: false
                    ssl_valid_to: false
                    sitemap_links: false
                    stage_id:
                      - 5
                      - Verified
                    company_id:
                      - 2
                      - TPx Communications
                    bcc_emails: false
                    form_id: false
                    csp_email: csp_sabrhub_dev@sabrhub.com
                    enterprise:
                      - 10
                      - Google
                    additional_enterprises:
                      - 15
                    completion_percentage: 14.705882352941178
                    FEINMatchFound: false
                    isCorrectFEINumber: false
                    businessName: ''
                    isCorrectBusinessName: false
                    businessNameMatchPercentage: 0
                    display_name: BayCove LLC
                    create_uid:
                      - 8
                      - Bay Cove Human Services Inc.
                    create_date: '2025-03-21T13:00:02.536390'
                    write_uid:
                      - 9
                      - tpxadmin
                    write_date: '2025-03-24T06:33:53.118528'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |
            curl -X GET "https://sabarhub.com/api/brands?page=1&size=10" \
            -H "x-api-key: YOUR_API_KEY" \
            -H "Accept: application/json"
        - lang: Python
          label: Python (requests)
          source: >
            import requests


            url = "https://sabarhub.com/api/brands"

            headers = {
                "x-api-key": "YOUR_API_KEY",
                "Accept": "application/json"
            }

            params = {"page": 1, "size": 10}


            response = requests.get(url, headers=headers, params=params,
            timeout=30)

            response.raise_for_status()

            print(response.json())
        - lang: JavaScript
          label: JavaScript (fetch)
          source: |
            const params = new URLSearchParams({ page: "1", size: "10" });
            fetch(`https://sabarhub.com/api/brands?${params}`, {
              method: "GET",
              headers: {
                "x-api-key": "YOUR_API_KEY",
                "Accept": "application/json"
              }
            })
              .then((res) => {
                if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
                return res.json();
              })
              .then((data) => console.log(data))
              .catch((err) => console.error("Error:", err));
  /api/brand/{brand_id}:
    get:
      tags:
        - Brand Management
      operationId: getBrandById
      summary: Retrieve brand details by ID (single)
      description: Fetches brand by ID associated with a specific company.
      parameters:
        - name: brand_id
          in: path
          required: true
          description: Unique identifier for the brand
          schema:
            type: integer
      responses:
        '200':
          description: Brand retrieved successfully
        '404':
          description: Brand not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  company_name:
                    type: string
                  dba_name:
                    type: string
                  registration_country:
                    type: string
                  ein_number:
                    type: string
                  support_email:
                    type: string
                  support_phone:
                    type: string
                  city:
                    type: string
                  state:
                    type: string
                  country:
                    type: string
                  vertical:
                    type: string
                  brand_relationship:
                    type: string
              example:
                id: 10
                name: BayCove LLC
                company_name: BayCove LLC
                dba_name: BayCove LLC
                registration_country: US
                ein_number: 11-2345678
                support_email: baycove@test.com
                support_phone: '+14444444444'
                city: VIJAPUR
                state: CA
                country: US
                vertical: EDUCATION
                brand_relationship: BASIC_ACCOUNT
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |
            curl -X GET "https://sabarhub.com/api/brand/10" \
            -H "x-api-key: YOUR_API_KEY" \
            -H "Accept: application/json"
        - lang: Python
          label: Python (requests)
          source: |
            import requests

            brand_id = 10  # replace with your brand ID
            url = f"https://sabarhub.com/api/brand/{brand_id}"
            headers = {
                "x-api-key": "YOUR_API_KEY",
                "Accept": "application/json"
            }

            response = requests.get(url, headers=headers, timeout=30)
            response.raise_for_status()
            print(response.json())
        - lang: JavaScript
          label: JavaScript (fetch)
          source: |
            const brandId = 10; // replace with your brand ID
            fetch(`https://sabarhub.com/api/brand/${brandId}`, {
              method: "GET",
              headers: {
                "x-api-key": "YOUR_API_KEY",
                "Accept": "application/json"
              }
            })
              .then((res) => {
                if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
                return res.json();
              })
              .then((data) => console.log(data))
              .catch((err) => console.error("Error:", err));
  /api/brand/{brand_id}/campaigns:
    get:
      tags:
        - Campaign Management
      operationId: getCampaignsByBrandId
      summary: Get Campaigns by Brand ID
      description: Fetches campaigns by brand associated with a specific company.
      parameters:
        - name: brand_id
          in: path
          required: true
          description: Unique identifier for the brand
          schema:
            type: integer
      responses:
        '200':
          description: A list of campaigns associated with the brand
        '404':
          description: Campaigns not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaigns:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        activity_ids:
                          type: array
                          items:
                            type: integer
                        activity_state:
                          type: boolean
                        activity_user_id:
                          type: boolean
                        activity_type_id:
                          type: boolean
                        activity_type_icon:
                          type: boolean
                        activity_date_deadline:
                          type: boolean
                        my_activity_date_deadline:
                          type: boolean
                        activity_summary:
                          type: boolean
                        activity_exception_decoration:
                          type: boolean
                        activity_exception_icon:
                          type: boolean
                        message_is_follower:
                          type: boolean
                        message_follower_ids:
                          type: array
                          items:
                            type: integer
                        message_partner_ids:
                          type: array
                          items:
                            type: integer
                        message_ids:
                          type: array
                          items:
                            type: integer
                        has_message:
                          type: boolean
                        message_needaction:
                          type: boolean
                        message_needaction_counter:
                          type: integer
                        message_has_error:
                          type: boolean
                        message_has_error_counter:
                          type: integer
                        message_attachment_count:
                          type: integer
                        website_message_ids:
                          type: array
                          items:
                            type: integer
                        message_has_sms_error:
                          type: boolean
                        name:
                          type: string
                        user_id:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        user_email:
                          type: string
                        usecase:
                          type: string
                        subUsecases:
                          type: boolean
                        description:
                          type: boolean
                        embeddedLink:
                          type: boolean
                        embeddedPhone:
                          type: boolean
                        termsAndConditions:
                          type: boolean
                        numberPool:
                          type: boolean
                        ageGated:
                          type: boolean
                        directLending:
                          type: boolean
                        subscriberOptin:
                          type: boolean
                        subscriberOptout:
                          type: boolean
                        subscriberHelp:
                          type: boolean
                        messageFlow:
                          type: boolean
                        helpMessage:
                          type: boolean
                        optinKeywords:
                          type: boolean
                        optoutKeywords:
                          type: boolean
                        helpKeywords:
                          type: boolean
                        optinMessage:
                          type: boolean
                        optoutMessage:
                          type: boolean
                        privacyPolicyLink:
                          type: boolean
                        termsAndConditionsLink:
                          type: boolean
                        embeddedLinkSample:
                          type: boolean
                        sample1:
                          type: boolean
                        sample2:
                          type: boolean
                        sample3:
                          type: boolean
                        sample4:
                          type: boolean
                        sample5:
                          type: boolean
                        sampleMultimedia:
                          type: boolean
                        ctaUpload:
                          type: boolean
                        cnp:
                          type: string
                        resellerInvolved:
                          type: boolean
                        brand_id:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        company_name:
                          type: string
                        stage_id:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        company_id:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        enterprise:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        additional_enterprises:
                          type: array
                          items:
                            type: integer
                        selected_numbers:
                          type: array
                          items:
                            type: integer
                        order_ids:
                          type: array
                          items:
                            type: integer
                        tcr_brand_id:
                          type: boolean
                        tcr_campaign_id:
                          type: boolean
                        tcr_api_error:
                          type: boolean
                        tcr_api_status:
                          type: boolean
                        is_stage_verified:
                          type: boolean
                        display_name:
                          type: string
                        create_uid:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        create_date:
                          type: string
                          format: date-time
                        write_uid:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        write_date:
                          type: string
                          format: date-time
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |
            curl -X GET "https://sabarhub.com/api/brand/10/campaigns" \
            -H "x-api-key: YOUR_API_KEY" \
            -H "Accept: application/json"
        - lang: Python
          label: Python (requests)
          source: |
            import requests

            brand_id = 10  # replace with your brand ID
            url = f"https://sabarhub.com/api/brand/{brand_id}/campaigns"
            headers = {
                "x-api-key": "YOUR_API_KEY",
                "Accept": "application/json"
            }

            response = requests.get(url, headers=headers, timeout=30)
            response.raise_for_status()
            print(response.json())
        - lang: JavaScript
          label: JavaScript (fetch)
          source: |
            const brandId = 10; // replace with your brand ID
            fetch(`https://sabarhub.com/api/brand/${brandId}/campaigns`, {
              method: "GET",
              headers: {
                "x-api-key": "YOUR_API_KEY",
                "Accept": "application/json"
              }
            })
              .then((res) => {
                if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
                return res.json();
              })
              .then((data) => console.log(data))
              .catch((err) => console.error("Error:", err));
  /api/brand/{brand_id}/messages:
    get:
      tags:
        - Campaign Management
      summary: Get Messages by brandId
      description: Fetches messages by brand associated with a specific company.
      operationId: getMessagesByBrandId
      parameters:
        - name: brand_id
          in: path
          required: true
          description: Unique identifier for the brand
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 98
                        subject:
                          type: boolean
                          example: false
                        date:
                          type: string
                          format: date-time
                          example: '2025-03-21T13:00:02'
                        body:
                          type: string
                          example: <p>Brand Registration created</p>
                        description:
                          type: string
                        preview:
                          type: string
                        link_preview_ids:
                          type: array
                          items:
                            type: integer
                        reaction_ids:
                          type: array
                          items:
                            type: integer
                        attachment_ids:
                          type: array
                          items:
                            type: integer
                        parent_id:
                          type: boolean
                        child_ids:
                          type: array
                          items:
                            type: integer
                        model:
                          type: string
                        res_id:
                          type: integer
                        record_name:
                          type: string
                          nullable: true
                        record_alias_domain_id:
                          type: integer
                          nullable: true
                        record_company_id:
                          type: integer
                          nullable: true
                        message_type:
                          type: string
                        subtype_id:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        mail_activity_type_id:
                          type: integer
                          nullable: true
                        is_internal:
                          type: boolean
                        email_from:
                          type: string
                        author_id:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        author_avatar:
                          type: string
                        author_guest_id:
                          type: string
                          nullable: true
                        is_current_user_or_guest_author:
                          type: boolean
                        partner_ids:
                          type: array
                          items:
                            type: integer
                        notified_partner_ids:
                          type: array
                          items:
                            type: integer
                        needaction:
                          type: boolean
                        has_error:
                          type: boolean
                        notification_ids:
                          type: array
                          items:
                            type: integer
                        starred_partner_ids:
                          type: array
                          items:
                            type: integer
                        pinned_at:
                          type: integer
                          nullable: true
                        starred:
                          type: boolean
                        tracking_value_ids:
                          type: array
                          items:
                            type: integer
                        reply_to_force_new:
                          type: boolean
                        message_id:
                          type: string
                        reply_to:
                          type: string
                        mail_server_id:
                          type: string
                          nullable: true
                        email_layout_xmlid:
                          type: string
                          nullable: true
                        email_add_signature:
                          type: boolean
                        mail_ids:
                          type: array
                          items:
                            type: integer
                        display_name:
                          type: string
                          nullable: true
                        create_uid:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        create_date:
                          type: string
                          format: date-time
                        write_uid:
                          type: array
                          items:
                            oneOf:
                              - type: integer
                              - type: string
                        write_date:
                          type: string
                          format: date-time
                        has_sms_error:
                          type: boolean
                        snailmail_error:
                          type: boolean
                        letter_ids:
                          type: array
                          items:
                            type: integer
        '404':
          description: Brand not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Brand not found
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |
            curl -X GET "https://sabarhub.com/api/brand/10/messages" \
            -H "x-api-key: YOUR_API_KEY" \
            -H "Accept: application/json"
        - lang: Python
          label: Python (requests)
          source: |
            import requests

            brand_id = 10  # replace with your brand ID
            url = f"https://sabarhub.com/api/brand/{brand_id}/messages"
            headers = {
                "x-api-key": "YOUR_API_KEY",
                "Accept": "application/json"
            }

            response = requests.get(url, headers=headers, timeout=30)
            response.raise_for_status()
            print(response.json())
        - lang: JavaScript
          label: JavaScript (fetch)
          source: |
            const brandId = 10; // replace with your brand ID
            fetch(`https://sabarhub.com/api/brand/${brandId}/messages`, {
              method: "GET",
              headers: {
                "x-api-key": "YOUR_API_KEY",
                "Accept": "application/json"
              }
            })
              .then((res) => {
                if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
                return res.json();
              })
              .then((data) => console.log(data))
              .catch((err) => console.error("Error:", err));
  /api/brand/{brand_id}/messages/{message_id}:
    get:
      tags:
        - Campaign Management
      summary: Get Brand Message by ID
      description: Fetches message by messageId associated with a specific company.
      operationId: getMessageById
      parameters:
        - name: brand_id
          in: path
          required: true
          description: Unique identifier for the brand
          schema:
            type: integer
        - name: message_id
          in: path
          required: true
          description: Unique identifier for the message
          schema:
            type: integer
      responses:
        '200':
          description: Successful response - Message object
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 98
                      subject:
                        type: string
                        example: Notification
                      date:
                        type: string
                        format: date-time
                        example: '2025-03-21T13:00:02'
                      body:
                        type: string
                        format: html
                        example: <p>Brand Registration created</p>
                      description:
                        type: string
                        example: Brand Registration created
                      preview:
                        type: string
                        example: Brand Registration created
                      link_preview_ids:
                        type: array
                        items:
                          type: integer
                      reaction_ids:
                        type: array
                        items:
                          type: integer
                      attachment_ids:
                        type: array
                        items:
                          type: integer
                      parent_id:
                        type: integer
                      child_ids:
                        type: array
                        items:
                          type: integer
                      model:
                        type: string
                        example: brand.model
                      res_id:
                        type: integer
                        example: 10
                      record_name:
                        type: string
                      record_alias_domain_id:
                        type: integer
                      record_company_id:
                        type: integer
                      message_type:
                        type: string
                        example: notification
                      subtype_id:
                        type: array
                        items:
                          oneOf:
                            - type: integer
                            - type: string
                        example:
                          - 2
                          - Note
                      mail_activity_type_id:
                        type: integer
                      is_internal:
                        type: boolean
                        example: true
                      email_from:
                        type: string
                        example: '"Bay Cove Human Services Inc." <baycove@test.com>'
                      author_id:
                        type: array
                        items:
                          oneOf:
                            - type: integer
                            - type: string
                        example:
                          - 11
                          - Bay Cove Human Services Inc.
                      author_avatar:
                        type: string
                        format: byte
                        description: Base64-encoded avatar image
                      author_guest_id:
                        type: boolean
                      is_current_user_or_guest_author:
                        type: boolean
                      partner_ids:
                        type: array
                        items:
                          type: integer
                      notified_partner_ids:
                        type: array
                        items:
                          type: integer
                      needaction:
                        type: boolean
                      has_error:
                        type: boolean
                      notification_ids:
                        type: array
                        items:
                          type: integer
                      starred_partner_ids:
                        type: array
                        items:
                          type: integer
                      pinned_at:
                        type: string
                        format: date-time
                      starred:
                        type: boolean
                      tracking_value_ids:
                        type: array
                        items:
                          type: integer
                      reply_to_force_new:
                        type: boolean
                      message_id:
                        type: string
                        example: >-
                          <619271867203022.1742562002.637557029724121-openerp-message-notify@e8acb5704666>
                      reply_to:
                        type: string
                        example: '"Bay Cove Human Services Inc." <baycove@test.com>'
                      mail_server_id:
                        type: integer
                      email_layout_xmlid:
                        type: string
                      email_add_signature:
                        type: boolean
                      mail_ids:
                        type: array
                        items:
                          type: integer
                      display_name:
                        type: string
                      create_uid:
                        type: array
                        items:
                          oneOf:
                            - type: integer
                            - type: string
                        example:
                          - 8
                          - Bay Cove Human Services Inc.
                      create_date:
                        type: string
                        format: date-time
                        example: '2025-03-21T13:00:02.536390'
                      write_uid:
                        type: array
                        items:
                          oneOf:
                            - type: integer
                            - type: string
                        example:
                          - 8
                          - Bay Cove Human Services Inc.
                      write_date:
                        type: string
                        format: date-time
                        example: '2025-03-21T13:00:02.536390'
                      has_sms_error:
                        type: boolean
                      snailmail_error:
                        type: boolean
                      letter_ids:
                        type: array
                        items:
                          type: integer
        '404':
          description: Error - Brand not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Brand not found
    x-codeSamples:
      - lang: cURL
        label: cURL
        source: |
          curl -X GET "https://sabarhub.com/api/brand/10/messages/98" \
            -H "x-api-key: YOUR_API_KEY" \
            -H "Accept: application/json"
      - lang: Python
        label: Python (requests)
        source: >
          import requests


          brand_id = 10

          message_id = 98

          url =
          f"https://sabarhub.com/api/brand/{brand_id}/messages/{message_id}"

          headers = {
              "x-api-key": "YOUR_API_KEY",
              "Accept": "application/json"
          }


          response = requests.get(url, headers=headers, timeout=30)

          response.raise_for_status()

          print(response.json())
      - lang: JavaScript
        label: JavaScript (fetch)
        source: >
          const brandId = 10

          const messageId = 98

          fetch(`https://sabarhub.com/api/brand/${brandId}/messages/${messageId}`,
          {
            method: "GET",
            headers: {
              "x-api-key": "YOUR_API_KEY",
              "Accept": "application/json"
            }
          })

          .then((res) => {
            if (!res.ok) throw new Error(`${res.status} ${res.statusText}`)
            return res.json()
          })

          .then((data) => console.log(data))

          .catch((err) => console.error("Error:", err))
