> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kapso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update setup link



## OpenAPI

````yaml /api/platform/v1/openapi-platform.yaml patch /customers/{customer_id}/setup_links/{setup_link_id}
openapi: 3.1.0
info:
  title: Kapso Platform API
  version: 0.2.0
  description: >
    Build WhatsApp messaging into your product. Manage customers, connect phone
    numbers, send broadcasts, and handle conversations.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Manage customer accounts
  - name: Setup Links
    description: WhatsApp onboarding via embedded signup
  - name: Phone Numbers
    description: Connect and manage WhatsApp numbers
  - name: Webhooks
    description: Subscribe to WhatsApp events
  - name: Display Names
    description: Update WhatsApp business display names
  - name: Broadcasts
    description: |
      Send template messages at scale

      **Alpha**: This API is in alpha and subject to change
  - name: Conversations
    description: Manage conversation state
  - name: Media
    description: Upload media files for WhatsApp messaging
  - name: Users
    description: Manage project team members
  - name: Inbox Embeds
    description: Create and manage embeddable inbox access links
  - name: Webhook Deliveries
    description: View webhook delivery attempts and their status
  - name: External API Logs
    description: View logs of external API calls made by the project
  - name: Log Search
    description: Search Logs V2 events across API, Meta, workflow, and webhook sources
  - name: Provider Models
    description: List available AI provider models
  - name: WhatsApp Flows
    description: Build interactive WhatsApp Flows for surveys and forms
  - name: Contacts
    description: Manage WhatsApp contacts
paths:
  /customers/{customer_id}/setup_links/{setup_link_id}:
    parameters:
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: setup_link_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    patch:
      tags:
        - Setup Links
      summary: Update setup link
      operationId: updateCustomerSetupLink
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetupLinkUpdateRequest'
            examples:
              revoke:
                summary: Revoke link
                value:
                  setup_link:
                    status: revoked
              extend:
                summary: Extend expiration
                value:
                  setup_link:
                    expires_at: '2025-09-15T10:00:00Z'
              rebrand:
                summary: Update theme
                value:
                  setup_link:
                    theme_config:
                      primary_color: '#10b981'
                      text_color: '#0f172a'
      responses:
        '200':
          description: Setup link updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetupLinkResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    SetupLinkUpdateRequest:
      type: object
      required:
        - setup_link
      properties:
        setup_link:
          type: object
          properties:
            success_redirect_url:
              type:
                - string
                - 'null'
              format: uri
            failure_redirect_url:
              type:
                - string
                - 'null'
              format: uri
            provision_phone_number:
              type: boolean
            phone_number_area_code:
              type:
                - string
                - 'null'
            expires_at:
              type:
                - string
                - 'null'
              format: date-time
            status:
              type: string
              enum:
                - active
                - used
                - expired
                - revoked
              description: Cannot change to `used`
            allowed_connection_types:
              type: array
              items:
                type: string
                enum:
                  - coexistence
                  - dedicated
            theme_config:
              type:
                - object
                - 'null'
              properties:
                primary_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                primary_foreground_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                background_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                text_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                muted_text_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                card_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                muted_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                border_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                secondary_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                secondary_foreground_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                destructive_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
                destructive_foreground_color:
                  type: string
                  pattern: ^#[0-9A-Fa-f]{6}$
            phone_number_country_isos:
              type: array
              items:
                type: string
                pattern: ^[A-Z]{2}$
            language:
              type:
                - string
                - 'null'
              description: ISO 639-1 language code for setup link UI
              enum:
                - en
                - es
                - pt
                - hi
                - id
                - ar
                - null
    SetupLinkResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/SetupLink'
    SetupLink:
      type: object
      required:
        - id
        - status
        - created_at
        - url
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - active
            - used
            - expired
            - revoked
        created_at:
          type: string
          format: date-time
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Expires 30 days after creation by default
        url:
          type: string
          format: uri
        success_redirect_url:
          type:
            - string
            - 'null'
          format: uri
        failure_redirect_url:
          type:
            - string
            - 'null'
          format: uri
        allowed_connection_types:
          type: array
          description: |
            `coexistence` - Use with WhatsApp Business App (5 msg/sec)
            `dedicated` - API-only through Kapso (up to 1000 msg/sec)

            Provide one value to auto-select for customer
          items:
            type: string
            enum:
              - coexistence
              - dedicated
          default:
            - coexistence
            - dedicated
        theme_config:
          type:
            - object
            - 'null'
          description: Hex colors for hosted onboarding page
          properties:
            primary_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Primary action buttons (default
            primary_foreground_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Text on primary buttons (default
            background_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Page background (default
            text_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Body text (default
            muted_text_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Secondary text (default
            card_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Card backgrounds (defaults to background_color)
            muted_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Disabled elements (default
            border_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Borders and dividers (default
            secondary_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Secondary buttons (default
            secondary_foreground_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Text on secondary buttons (default
            destructive_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Error/danger buttons (default
            destructive_foreground_color:
              type: string
              pattern: ^#[0-9A-Fa-f]{6}$
              description: Text on destructive buttons (default
        provision_phone_number:
          type:
            - boolean
            - 'null'
          description: Auto-provision number during onboarding
        phone_number_area_code:
          type:
            - string
            - 'null'
          description: US area code for provisioned numbers
        phone_number_country_isos:
          type: array
          description: Allowed countries for provisioning (defaults to ["US"])
          items:
            type: string
            pattern: ^[A-Z]{2}$
        reconnect_phone_number:
          type:
            - string
            - 'null'
          description: >
            Normalized E.164 digits of the customer's existing WhatsApp number
            this link is targeting for reconnect.


            Set this on create to scope the setup flow to a specific existing
            WhatsApp config for the same customer (token refresh / re-auth).
            When present, `provision_phone_number` is forced to `false` and
            `allowed_connection_types` is locked to match the existing config
            (`["dedicated"]` or `["coexistence"]`).
        language:
          type:
            - string
            - 'null'
          description: >-
            ISO 639-1 language code for setup link UI (en, es, pt, hi, id, ar).
            Defaults to user's browser language.
          enum:
            - en
            - es
            - pt
            - hi
            - id
            - ar
            - null
        whatsapp_setup_status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
        whatsapp_setup_error:
          type:
            - string
            - 'null'
        provisioned_phone_number:
          allOf:
            - $ref: '#/components/schemas/PhoneNumberReference'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    PhoneNumberReference:
      type: object
      required:
        - id
        - phone_number
        - status
        - country_iso
        - country_dial_code
      properties:
        id:
          type: string
          format: uuid
        phone_number:
          type: string
        status:
          type: string
        area_code:
          type:
            - string
            - 'null'
        country_iso:
          type: string
        country_dial_code:
          type: string
        display_number:
          type:
            - string
            - 'null'
  responses:
    UnauthorizedError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````