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

# Update a connection

> Changes one item. The body's type says which: account, domain, caller_id, pool, crm, webhook. Send only what should change. Requires write access. This operation can change workspace data or trigger an external side effect; review the request before sending it and do not retry blindly after a timeout.



## OpenAPI

````yaml /openapi.json patch /api/v1/public/connections/{id}
openapi: 3.1.0
info:
  description: >-
    Customer-facing API for managing outreach, leads, conversations, voice
    agents, knowledge bases, analytics, and webhooks.
  title: Sendora Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.sendora.ai
security: []
tags:
  - description: Leads, lead lists, importing, enriching and finding new prospects.
    name: Leads
  - description: Build, run and measure outreach, and enroll leads.
    name: Campaigns
  - description: Read and send messages, and manage who must not be contacted.
    name: Conversations
  - description: >-
      Voice and chat agents, their tools, knowledge bases, voices and website
      widgets.
    name: Agents
  - description: >-
      Start calls, and manage phone numbers, SMS registration, sending accounts
      and email domains.
    name: Calls and numbers
  - description: Webhooks, jobs, analytics and the Copilot assistant.
    name: Platform
  - description: Manage client workspaces, plans and branding.
    name: Agency
paths:
  /api/v1/public/connections/{id}:
    patch:
      tags:
        - Calls and numbers
      summary: Update a connection
      description: >-
        Changes one item. The body's type says which: account, domain,
        caller_id, pool, crm, webhook. Send only what should change. Requires
        write access. This operation can change workspace data or trigger an
        external side effect; review the request before sending it and do not
        retry blindly after a timeout.
      operationId: update_api_v1_public_connections__id__patch
      parameters:
        - description: >-
            The connection (of the type you read it with; a CRM's id is its
            provider name)'s id: the `id` from the list for this resource.
          in: path
          name: id
          required: true
          schema:
            title: Id
            type: string
        - in: header
          name: X-API-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - in: header
          name: Authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        content:
          application/json:
            schema:
              discriminator:
                mapping:
                  account: '#/components/schemas/ConnectionAccountUpdate'
                  caller_id: '#/components/schemas/ConnectionCallerIdUpdate'
                  crm: '#/components/schemas/ConnectionCrmUpdate'
                  domain: '#/components/schemas/ConnectionDomainUpdate'
                  pool: '#/components/schemas/ConnectionPoolUpdate'
                  webhook: '#/components/schemas/ConnectionWebhookUpdate'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/ConnectionAccountUpdate'
                - $ref: '#/components/schemas/ConnectionDomainUpdate'
                - $ref: '#/components/schemas/ConnectionCallerIdUpdate'
                - $ref: '#/components/schemas/ConnectionPoolUpdate'
                - $ref: '#/components/schemas/ConnectionCrmUpdate'
                - $ref: '#/components/schemas/ConnectionWebhookUpdate'
              title: Body
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '401':
          description: The X-API-Key header is missing, invalid, expired, or revoked.
        '402':
          description: >-
            The workspace is suspended for billing, or the request would exceed
            a plan or usage limit.
        '403':
          description: >-
            The key is valid but lacks the required scope, or the workspace has
            no active plan, lacks the entitlement, or has this feature turned
            off or view-only.
        '404':
          description: >-
            The resource does not exist or is not owned by the authenticated
            workspace.
        '410':
          description: The workspace behind this key has been deleted.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '500':
          description: >-
            An unexpected Sendora error occurred. Retry only if the operation is
            safe to repeat.
        '503':
          description: >-
            An entitlement or billing check is temporarily unavailable. Retry
            after the Retry-After interval.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >-
            curl -X PATCH
            'https://api.sendora.ai/api/v1/public/connections/YOUR_ID' -H
            "X-API-Key: $SENDORA_API_KEY" -H "Content-Type: application/json" \
              -d '{"type":"example"}'
        - label: Python
          lang: python
          source: >-
            import requests


            url = 'https://api.sendora.ai/api/v1/public/connections/YOUR_ID'

            headers = {'X-API-Key': '$SENDORA_API_KEY'}

            response = requests.patch(url, headers=headers, json={'type':
            'example'})

            response.raise_for_status()

            print(response.json())
        - label: JavaScript
          lang: javascript
          source: >-
            const response = await
            fetch("https://api.sendora.ai/api/v1/public/connections/YOUR_ID", {
              method: "PATCH",
              headers: { 'X-API-Key': process.env.SENDORA_API_KEY, 'Content-Type': 'application/json' },
              body: JSON.stringify({"type": "example"}),
            });

            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
        - label: Go
          lang: go
          source: >-
            req, err := http.NewRequest("PATCH",
            "https://api.sendora.ai/api/v1/public/connections/YOUR_ID",
            bytes.NewBufferString(`{"type": "example"}`))

            if err != nil { log.Fatal(err) }

            req.Header.Set("X-API-Key", os.Getenv("SENDORA_API_KEY"))

            req.Header.Set("Content-Type", "application/json")

            resp, err := http.DefaultClient.Do(req)

            if err != nil { log.Fatal(err) }

            defer resp.Body.Close()
components:
  schemas:
    ConnectionAccountUpdate:
      properties:
        daily_send_limit:
          anyOf:
            - maximum: 50
              minimum: 1
              type: integer
            - type: 'null'
          description: 'Managed mailboxes: emails a day (1 to 50)'
          title: Daily Send Limit
        display_name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: Display name returned by the Sendora API.
          title: Display Name
        from_name:
          anyOf:
            - maxLength: 120
              type: string
            - type: 'null'
          description: The sender name recipients see
          title: From Name
        limits:
          anyOf:
            - additionalProperties:
                type: integer
              type: object
            - type: 'null'
          description: >-
            Daily limit per action, for example {"email_send": 40}; read the
            action names from include=limits
          title: Limits
        mailbox:
          anyOf:
            - $ref: '#/components/schemas/ManagedMailbox'
            - type: 'null'
          description: 'Managed mailboxes: sender name, username, signature and forwarding'
        preferences:
          anyOf:
            - $ref: '#/components/schemas/AccountPreferencesIn'
            - type: 'null'
          description: Active hours, timezone and weekend mode
        sending_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: 'Managed mailboxes: turn sending on or off'
          title: Sending Enabled
        signature:
          anyOf:
            - maxLength: 2000
              type: string
            - type: 'null'
          description: Signature returned by the Sendora API.
          title: Signature
        type:
          const: account
          description: >-
            Must be account: this body is for a sending account (mailbox,
            WhatsApp, LinkedIn or own SMS)
          title: Type
          type: string
        warmup:
          anyOf:
            - $ref: '#/components/schemas/WarmupSettings'
            - type: 'null'
          description: 'Managed mailboxes: warmup ramp'
      required:
        - type
      title: ConnectionAccountUpdate
      type: object
    ConnectionCallerIdUpdate:
      properties:
        code:
          description: Code returned by the Sendora API.
          maxLength: 10
          minLength: 4
          title: Code
          type: string
        type:
          const: caller_id
          description: 'Must be caller_id: this body is for a caller ID'
          title: Type
          type: string
      required:
        - code
        - type
      title: ConnectionCallerIdUpdate
      type: object
    ConnectionCrmUpdate:
      properties:
        field_mapping:
          anyOf:
            - type: object
            - type: 'null'
          description: >-
            contact and opportunity maps: {sendora_key: {to, direction}};
            direction is push, pull, both or off
          title: Field Mapping
        settings:
          anyOf:
            - $ref: '#/components/schemas/CRMConnectionPatch'
            - type: 'null'
          description: >-
            sync_direction, conflict_policy, dry_run, is_active, sync_events,
            pipeline_defaults
        type:
          const: crm
          description: >-
            Must be crm: this body is for a connected CRM (its id is the
            connected service name)
          title: Type
          type: string
      required:
        - type
      title: ConnectionCrmUpdate
      type: object
    ConnectionDomainUpdate:
      properties:
        catch_all_email:
          anyOf:
            - type: string
            - type: 'null'
          description: Catch-all address; empty string turns it off
          title: Catch All Email
        dmarc_reporting_email:
          anyOf:
            - type: string
            - type: 'null'
          description: Where DMARC reports go; empty string restores the default
          title: Dmarc Reporting Email
        dns:
          anyOf:
            - $ref: '#/components/schemas/DnsChanges'
            - type: 'null'
          description: Dns returned by the Sendora API.
        forwarding_url:
          anyOf:
            - type: string
            - type: 'null'
          description: Forward the bare domain here; empty string turns it off
          title: Forwarding Url
        mask_forwarding:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Mask forwarding returned by the Sendora API.
          title: Mask Forwarding
        tags:
          anyOf:
            - $ref: '#/components/schemas/TagChange'
            - type: 'null'
          description: Tags returned by the Sendora API.
        type:
          const: domain
          description: 'Must be domain: this body is for a email domain'
          title: Type
          type: string
      required:
        - type
      title: ConnectionDomainUpdate
      type: object
    ConnectionPoolUpdate:
      properties:
        add_members:
          anyOf:
            - items:
                $ref: '#/components/schemas/api__v1__public__sender_pools__MemberAdd'
              maxItems: 100
              type: array
            - type: 'null'
          description: Add members returned by the Sendora API.
          title: Add Members
        member_settings:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/MemberChange'
              type: object
            - type: 'null'
          description: 'Per member `account_id`: weight and paused'
          title: Member Settings
        name:
          anyOf:
            - maxLength: 120
              minLength: 1
              type: string
            - type: 'null'
          description: Name returned by the Sendora API.
          title: Name
        remove_members:
          anyOf:
            - items:
                type: string
              maxItems: 100
              type: array
            - type: 'null'
          description: Member `account_id`s to take out
          title: Remove Members
        strategy:
          anyOf:
            - enum:
                - least_used
                - round_robin
                - weighted
                - sticky_by_lead
              type: string
            - type: 'null'
          description: Strategy returned by the Sendora API.
          title: Strategy
        type:
          const: pool
          description: 'Must be pool: this body is for a sender pool'
          title: Type
          type: string
      required:
        - type
      title: ConnectionPoolUpdate
      type: object
    ConnectionWebhookUpdate:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: Description returned by the Sendora API.
          title: Description
        event_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Event types returned by the Sendora API.
          title: Event Types
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Is active returned by the Sendora API.
          title: Is Active
        rotate_secret:
          default: false
          description: Issue a new signing secret. It is returned once, in `secret`.
          title: Rotate Secret
          type: boolean
        send_test:
          default: false
          description: Send a test event to the endpoint.
          title: Send Test
          type: boolean
        type:
          const: webhook
          description: 'Must be webhook: this body is for a webhook endpoint'
          title: Type
          type: string
        url:
          anyOf:
            - format: uri
              maxLength: 2083
              minLength: 1
              type: string
            - type: 'null'
          description: Url returned by the Sendora API.
          title: Url
      required:
        - type
      title: ConnectionWebhookUpdate
      type: object
    HTTPValidationError:
      properties:
        detail:
          description: Detail returned by the Sendora API.
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      required: []
      title: HTTPValidationError
      type: object
    ManagedMailbox:
      properties:
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          description: First name returned by the Sendora API.
          title: First Name
        forwarding_email:
          anyOf:
            - type: string
            - type: 'null'
          description: Forward mail to this address; empty string turns forwarding off
          title: Forwarding Email
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Last name returned by the Sendora API.
          title: Last Name
        signature_html:
          anyOf:
            - type: string
            - type: 'null'
          description: Empty string removes the signature
          title: Signature Html
        username:
          anyOf:
            - type: string
            - type: 'null'
          description: The part before the @
          title: Username
      required: []
      title: ManagedMailbox
      type: object
    AccountPreferencesIn:
      properties:
        account_timezone:
          anyOf:
            - type: string
            - type: 'null'
          description: Account timezone returned by the Sendora API.
          title: Account Timezone
        quiet_hours_end:
          anyOf:
            - type: integer
            - type: 'null'
          description: Quiet hours end returned by the Sendora API.
          title: Quiet Hours End
        quiet_hours_start:
          anyOf:
            - type: integer
            - type: 'null'
          description: Quiet hours start returned by the Sendora API.
          title: Quiet Hours Start
        weekend_dampening:
          anyOf:
            - type: number
            - type: 'null'
          description: Weekend dampening returned by the Sendora API.
          title: Weekend Dampening
        weekend_mode_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Weekend mode enabled returned by the Sendora API.
          title: Weekend Mode Enabled
        whatsapp_messaging_tier:
          anyOf:
            - type: integer
            - type: 'null'
          description: Whatsapp messaging tier returned by the Sendora API.
          title: Whatsapp Messaging Tier
        whatsapp_subtype:
          anyOf:
            - type: string
            - type: 'null'
          description: Whatsapp subtype returned by the Sendora API.
          title: Whatsapp Subtype
      required: []
      title: AccountPreferencesIn
      type: object
    WarmupSettings:
      properties:
        daily_increase:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          description: How many more each day
          title: Daily Increase
        starting_volume:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          description: Emails a day when warmup starts
          title: Starting Volume
        target_volume:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          description: Where the ramp stops
          title: Target Volume
      required: []
      title: WarmupSettings
      type: object
    CRMConnectionPatch:
      properties:
        conflict_policy:
          anyOf:
            - enum:
                - last_write_wins
                - sendora_wins
                - crm_wins
                - queued_for_review
              type: string
            - type: 'null'
          description: Conflict policy returned by the Sendora API.
          title: Conflict Policy
        dry_run:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Dry run returned by the Sendora API.
          title: Dry Run
        external_account_id:
          anyOf:
            - maxLength: 120
              type: string
            - type: 'null'
          description: >-
            The account's id inside the CRM (not a Sendora id). It must match
            the connected account; to use another account, disconnect and
            connect again in the app.
          title: External Account Id
        external_account_label:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: External account label returned by the Sendora API.
          title: External Account Label
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Is active returned by the Sendora API.
          title: Is Active
        pipeline_defaults:
          anyOf:
            - type: object
            - type: 'null'
          description: Pipeline defaults returned by the Sendora API.
          title: Pipeline Defaults
        sync_direction:
          anyOf:
            - enum:
                - push
                - pull
                - both
                - 'off'
              type: string
            - type: 'null'
          description: Sync direction returned by the Sendora API.
          title: Sync Direction
        sync_events:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Sync events returned by the Sendora API.
          title: Sync Events
      required: []
      title: CRMConnectionPatch
      type: object
    DnsChanges:
      properties:
        add:
          anyOf:
            - items:
                $ref: '#/components/schemas/DnsRecordIn'
              type: array
            - type: 'null'
          description: Records to add
          title: Add
        delete:
          anyOf:
            - $ref: '#/components/schemas/DnsRecordsDeleteIn'
            - type: 'null'
          description: record_ids to remove, or delete_all
        update:
          anyOf:
            - items:
                $ref: '#/components/schemas/DnsRecordUpdateIn'
              type: array
            - type: 'null'
          description: Records to change; record_id comes from include=dns
          title: Update
      required: []
      title: DnsChanges
      type: object
    TagChange:
      properties:
        action:
          default: add
          description: Action returned by the Sendora API.
          enum:
            - add
            - remove
            - set
          title: Action
          type: string
        confirm_replace:
          default: false
          description: Required for set, which replaces every tag
          title: Confirm Replace
          type: boolean
        tag_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Created if they do not exist
          title: Tag Names
      required: []
      title: TagChange
      type: object
    api__v1__public__sender_pools__MemberAdd:
      properties:
        account_id:
          description: >-
            A sender account's id: the `id` from List or read connections (type
            connected) for the same channel.
          title: Account Id
          type: string
        kind:
          default: account
          description: Kind returned by the Sendora API.
          enum:
            - account
            - phone_number
          title: Kind
          type: string
        weight:
          default: 1
          description: Weight returned by the Sendora API.
          maximum: 1000
          minimum: 1
          title: Weight
          type: integer
      required:
        - account_id
      title: MemberAdd
      type: object
    MemberChange:
      properties:
        paused:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Paused returned by the Sendora API.
          title: Paused
        weight:
          anyOf:
            - maximum: 1000
              minimum: 1
              type: integer
            - type: 'null'
          description: Weight returned by the Sendora API.
          title: Weight
      required: []
      title: MemberChange
      type: object
    ValidationError:
      properties:
        loc:
          description: Loc returned by the Sendora API.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          description: Msg returned by the Sendora API.
          title: Message
          type: string
        type:
          description: Type returned by the Sendora API.
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    DnsRecordIn:
      properties:
        host:
          description: Host returned by the Sendora API.
          title: Host
          type: string
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          description: Priority returned by the Sendora API.
          title: Priority
        proxied:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Proxied returned by the Sendora API.
          title: Proxied
        ttl:
          anyOf:
            - type: integer
            - type: 'null'
          description: Ttl returned by the Sendora API.
          title: Ttl
        type:
          description: Type returned by the Sendora API.
          title: Type
          type: string
        value:
          description: Value returned by the Sendora API.
          title: Value
          type: string
      required:
        - host
        - type
        - value
      title: DnsRecordIn
      type: object
    DnsRecordsDeleteIn:
      properties:
        delete_all:
          default: false
          description: Delete all returned by the Sendora API.
          title: Delete All
          type: boolean
        record_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            The DNS records to remove: each an `id` from the domain's
            `dns_records` (read with include=dns).
          title: Record Ids
      required: []
      title: DnsRecordsDeleteIn
      type: object
    DnsRecordUpdateIn:
      properties:
        host:
          description: Host returned by the Sendora API.
          title: Host
          type: string
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          description: Priority returned by the Sendora API.
          title: Priority
        proxied:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Proxied returned by the Sendora API.
          title: Proxied
        record_id:
          description: >-
            The DNS record's id: the `id` of a record in the domain's
            `dns_records` (read with include=dns).
          title: Record Id
          type: string
        ttl:
          anyOf:
            - type: integer
            - type: 'null'
          description: Ttl returned by the Sendora API.
          title: Ttl
        type:
          description: Type returned by the Sendora API.
          title: Type
          type: string
        value:
          description: Value returned by the Sendora API.
          title: Value
          type: string
      required:
        - record_id
        - host
        - type
        - value
      title: DnsRecordUpdateIn
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Customer API key created in the Sendora dashboard.
      in: header
      name: X-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.