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

# Update project campaign

> **Required scope:** `campaigns:manage`

Updates the fields you send and leaves the rest unchanged. On an unlaunched draft, a new `senderConfig` passes the same checks as create, on any plan; launch checks the selection against live plans. Once the campaign has launched, including a scheduled launch that has not started, a new `senderConfig` must pass the launch checks and can answer `402 campaigns_not_entitled` or `400 invalid_parameter`. `recipientListId` and a different `scheduledAt` are accepted only while the campaign is an unlaunched draft; afterwards they answer `409`. A sender change to a draft that launches while the change is being saved also answers `409`. `sendWindow` changes only while draft or paused; a paused edit answers `409` while sends are in progress. A non-null `scheduledAt` must be integer Unix milliseconds within the JavaScript Date range.



## OpenAPI

````yaml api-reference/features/engage-at-scale.json PATCH /messaging/projects/{projectSlug}/campaigns/{id}
openapi: 3.0.3
info:
  title: Engage at scale API methods
  version: 1.0.0
  description: >-
    Task-focused engage at scale methods across supported Polymorfa connection
    types.
servers: []
security: []
paths:
  /messaging/projects/{projectSlug}/campaigns/{id}:
    patch:
      tags:
        - Campaigns
      summary: Update project campaign
      description: >-
        **Required scope:** `campaigns:manage`


        Updates the fields you send and leaves the rest unchanged. On an
        unlaunched draft, a new `senderConfig` passes the same checks as create,
        on any plan; launch checks the selection against live plans. Once the
        campaign has launched, including a scheduled launch that has not
        started, a new `senderConfig` must pass the launch checks and can answer
        `402 campaigns_not_entitled` or `400 invalid_parameter`.
        `recipientListId` and a different `scheduledAt` are accepted only while
        the campaign is an unlaunched draft; afterwards they answer `409`. A
        sender change to a draft that launches while the change is being saved
        also answers `409`. `sendWindow` changes only while draft or paused; a
        paused edit answers `409` while sends are in progress. A non-null
        `scheduledAt` must be integer Unix milliseconds within the JavaScript
        Date range.
      operationId: nativeUpdateProjectCampaign
      parameters:
        - schema:
            type: string
          required: true
          name: projectSlug
          in: path
          description: Specifies project slug for this path parameter.
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
          description: |-
            Identifier for this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/native__UpdateCampaignRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__UpdateCampaignResponse'
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/native__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/native__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/native__X-RateLimit-Reset'
        '400':
          description: Bad request — request body or params failed validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: invalid_request_error
                  code: invalid_parameter
                  message: Correct the invalid request field.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#invalid-parameter
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/native__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/native__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/native__X-RateLimit-Reset'
        '401':
          description: Missing or invalid authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: authentication_error
                  code: invalid_credential
                  message: Supply a valid credential.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#invalid-credential
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/native__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/native__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/native__X-RateLimit-Reset'
        '402':
          description: >-
            `campaigns_not_entitled`: a new sender selection on a launched
            campaign names a number whose plan does not include Campaigns
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: permission_error
                  code: campaigns_not_entitled
                  message: This number’s plan does not include Campaigns.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#campaigns-not-entitled
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/native__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/native__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/native__X-RateLimit-Reset'
        '403':
          description: Authenticated but not permitted (missing scope or rule violation)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: permission_error
                  code: permission_denied
                  message: The credential does not have access to this resource.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#permission-denied
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/native__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/native__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/native__X-RateLimit-Reset'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: invalid_request_error
                  code: resource_not_found
                  message: The resource is unavailable to this caller.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#resource-not-found
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/native__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/native__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/native__X-RateLimit-Reset'
        '409':
          description: >-
            `state_conflict`: the campaign has launched and the audience or
            start time can no longer change, it launched while its sending
            numbers were being changed, or its send window cannot change in the
            current state or while sends are in progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: conflict_error
                  code: state_conflict
                  message: The request conflicts with the resource state.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#state-conflict
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/native__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/native__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/native__X-RateLimit-Reset'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: api_error
                  code: internal_error
                  message: >-
                    An unexpected service failure occurred. Keep the request ID
                    for support.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#internal-error
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/native__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/native__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/native__X-RateLimit-Reset'
        '503':
          description: >-
            `service_unavailable`: number eligibility for a launched campaign's
            new sender selection could not be checked. Nothing was changed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: api_error
                  code: service_unavailable
                  message: >-
                    A required service is unavailable. Check completion before
                    repeating a write.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#service-unavailable
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/native__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/native__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/native__X-RateLimit-Reset'
      security:
        - native__BearerAuth: []
      servers:
        - url: https://api.polymorfa.com
components:
  schemas:
    native__UpdateCampaignRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
          description: |-
            New name, 1 to 200 characters after trimming.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | String length | `1` through `200` characters |
        recipientListId:
          type: string
          nullable: true
          format: uuid
          description: >-
            Audience to send to, or null for none. Only an unlaunched draft can
            change it; the campaign's current recipients are replaced by the
            audience's members at launch.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; Format: `uuid` |

            | Alternative 2 | `null` |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Format | `uuid` |
        senderConfig:
          type: object
          additionalProperties: {}
          description: >-
            Replaces the sender selection and throughput. On an unlaunched draft
            it passes the same checks as create. Once the campaign has launched
            it must pass the launch checks.
        scheduledAt:
          type: integer
          nullable: true
          minimum: 0
          maximum: 8640000000000000
          description: >-
            Start time in milliseconds since the Unix epoch, or null to start at
            launch. Only an unlaunched draft can change it.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `integer`; Numeric value: `0` through
            `8640000000000000` (inclusive) |

            | Alternative 2 | `null` |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `0` through `8640000000000000` (inclusive) |
        sendWindow:
          allOf:
            - $ref: '#/components/schemas/native__CampaignSendWindowRequest'
            - description: >-
                When the campaign may send. Null removes the window. Only a
                draft or paused campaign can change it; a paused edit requires
                in-flight sends to have settled.
          nullable: true
          description: |-
            Specifies send window for this native update campaign request.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `object`; Required fields: `days`, `hours` |
            | Alternative 2 | `null` |

            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `object`; Required fields: `days`, `hours` |
            | Alternative 2 | `null` |
      additionalProperties: false
      minProperties: 1
    native__UpdateCampaignResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
          description: |-
            Whether the request succeeded.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `true` | True. |
        data:
          allOf:
            - $ref: '#/components/schemas/native__Campaign'
          description: Structured data carried by this object.
      required:
        - success
        - data
    native__PublicError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - conflict_error
                - rate_limit_error
                - api_error
                - upstream_error
              description: |-
                Type discriminator for this object.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `invalid_request_error` | Invalid request error. |
                | `authentication_error` | Authentication error. |
                | `permission_error` | Permission error. |
                | `conflict_error` | Conflict error. |
                | `rate_limit_error` | Rate limit error. |
                | `api_error` | Api error. |
                | `upstream_error` | Upstream error. |
            code:
              type: string
              enum:
                - invalid_parameter
                - invalid_credential
                - entitlement_required
                - gate_limit_reached
                - method_not_allowed
                - permission_denied
                - missing_scope
                - resource_not_found
                - hms_not_enabled
                - media_fetch_failed
                - resource_gone
                - feature_unavailable
                - stream_cursor_invalid
                - stream_cursor_expired
                - stream_connection_limit_reached
                - state_conflict
                - hybrid_choice_required
                - idempotency_conflict
                - idempotency_in_progress
                - idempotency_completed
                - idempotency_outcome_unknown
                - call_claimed
                - call_not_ringing
                - connection_limit
                - unsupported_for_connection
                - call_permission_required
                - invalid_sip_trunk
                - calls_disabled
                - call_recipient_opted_out
                - call_destination_blocked
                - call_permission_request_limited
                - call_permission_granted
                - call_opt_out_limit
                - number_restricted
                - sip_trunk_in_use
                - sip_trunk_revision_conflict
                - sip_trunk_limit
                - sip_unavailable
                - voice_not_enabled
                - provider_credential_invalid
                - provider_unavailable
                - asset_not_ready
                - voice_asset_in_use
                - voice_asset_revision_conflict
                - voice_unavailable
                - rate_limit_exceeded
                - internal_error
                - operation_not_supported
                - upstream_failure
                - service_unavailable
                - credential_verification_unavailable
                - session_not_ready
                - command_dispatch_failed
                - result_unknown
                - recipient_not_on_whatsapp
                - conversation_window_closed
                - template_not_approved
                - media_too_large
                - whatsapp_rate_limited
                - new_chat_limit_reached
                - whatsapp_account_restricted
                - bansafe_suspended
                - bansafe_org_suspended
                - bansafe_cold_blocked
                - bansafe_cold_held
                - bansafe_throttled
                - bansafe_daily_allowance_reached
                - bansafe_accounting_unavailable
                - bansafe_send_outcome_unknown
                - campaigns_not_entitled
                - campaign_throughput_capped
              description: >-
                Stable machine-readable code for this result.


                <!-- polymorfa-input-table -->

                **Allowed values**

                | Value | Meaning |

                | --- | --- |

                | `invalid_parameter` | Invalid parameter. |

                | `invalid_credential` | Invalid credential. |

                | `entitlement_required` | Entitlement required. |

                | `gate_limit_reached` | Gate limit reached. |

                | `method_not_allowed` | Method not allowed. |

                | `permission_denied` | Permission denied. |

                | `missing_scope` | Missing scope. |

                | `resource_not_found` | Resource not found. |

                | `hms_not_enabled` | Hms not enabled. |

                | `media_fetch_failed` | Media fetch failed. |

                | `resource_gone` | Resource gone. |

                | `feature_unavailable` | Feature unavailable. |

                | `stream_cursor_invalid` | Stream cursor invalid. |

                | `stream_cursor_expired` | Stream cursor expired. |

                | `stream_connection_limit_reached` | Stream connection limit
                reached. |

                | `state_conflict` | State conflict. |

                | `hybrid_choice_required` | Hybrid choice required. |

                | `idempotency_conflict` | Idempotency conflict. |

                | `idempotency_in_progress` | Idempotency in progress. |

                | `idempotency_completed` | Idempotency completed. |

                | `idempotency_outcome_unknown` | Idempotency outcome unknown. |

                | `call_claimed` | Call claimed. |

                | `call_not_ringing` | Call not ringing. |

                | `connection_limit` | Connection limit. |

                | `unsupported_for_connection` | Unsupported for connection. |

                | `call_permission_required` | Call permission required. |

                | `invalid_sip_trunk` | Invalid sip trunk. |

                | `calls_disabled` | Calls disabled. |

                | `call_recipient_opted_out` | Call recipient opted out. |

                | `call_destination_blocked` | Call destination blocked. |

                | `call_permission_request_limited` | Call permission request
                limited. |

                | `call_permission_granted` | Call permission granted. |

                | `call_opt_out_limit` | Call opt out limit. |

                | `number_restricted` | Number restricted. |

                | `sip_trunk_in_use` | Sip trunk in use. |

                | `sip_trunk_revision_conflict` | Sip trunk revision conflict. |

                | `sip_trunk_limit` | Sip trunk limit. |

                | `sip_unavailable` | Sip unavailable. |

                | `voice_not_enabled` | Voice not enabled. |

                | `provider_credential_invalid` | Provider credential invalid. |

                | `provider_unavailable` | Provider unavailable. |

                | `asset_not_ready` | Asset not ready. |

                | `voice_asset_in_use` | Voice asset in use. |

                | `voice_asset_revision_conflict` | Voice asset revision
                conflict. |

                | `voice_unavailable` | Voice unavailable. |

                | `rate_limit_exceeded` | Rate limit exceeded. |

                | `internal_error` | Internal error. |

                | `operation_not_supported` | Operation not supported. |

                | `upstream_failure` | Upstream failure. |

                | `service_unavailable` | Service unavailable. |

                | `credential_verification_unavailable` | Credential
                verification unavailable. |

                | `session_not_ready` | Session not ready. |

                | `command_dispatch_failed` | Command dispatch failed. |

                | `result_unknown` | Result unknown. |

                | `recipient_not_on_whatsapp` | Recipient not on whatsapp. |

                | `conversation_window_closed` | Conversation window closed. |

                | `template_not_approved` | Template not approved. |

                | `media_too_large` | Media too large. |

                | `whatsapp_rate_limited` | Whatsapp rate limited. |

                | `new_chat_limit_reached` | New chat limit reached. |

                | `whatsapp_account_restricted` | Whatsapp account restricted. |

                | `bansafe_suspended` | Bansafe suspended. |

                | `bansafe_org_suspended` | Bansafe org suspended. |

                | `bansafe_cold_blocked` | Bansafe cold blocked. |

                | `bansafe_cold_held` | Bansafe cold held. |

                | `bansafe_throttled` | Bansafe throttled. |

                | `bansafe_daily_allowance_reached` | Bansafe daily allowance
                reached. |

                | `bansafe_accounting_unavailable` | Bansafe accounting
                unavailable. |

                | `bansafe_send_outcome_unknown` | Bansafe send outcome unknown.
                |

                | `campaigns_not_entitled` | Campaigns not entitled. |

                | `campaign_throughput_capped` | Campaign throughput capped. |
            message:
              type: string
              description: Human-readable message associated with this result.
            param:
              type: string
              nullable: true
              description: |-
                Specifies param for this error.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Type: `string` |
                | Alternative 2 | `null` |
            request_id:
              type: string
              description: >-
                Matches the X-Request-Id response header. Include it when you
                contact support.
            request_log_url:
              type: string
              format: uri
              description: >-
                Console page that shows this request. Returned only to
                organization and project credentials whose request was logged.


                <!-- polymorfa-input-table -->

                **Value constraints**

                | Constraint | Accepted input |

                | --- | --- |

                | Format | `uri` |
          required:
            - type
            - code
            - message
            - param
            - request_id
          description: Error details returned when the operation fails.
        data:
          type: string
          nullable: true
          enum:
            - null
          description: |-
            Always null for a failed request.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `null` | Null. |

            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        docs:
          type: string
          format: uri
          description: |-
            Specifies docs for this native public error.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uri` |
      required:
        - error
        - data
        - docs
    native__CampaignSendWindowRequest:
      type: object
      nullable: true
      properties:
        timeZone:
          type: string
          minLength: 1
          maxLength: 64
          description: >-
            IANA time zone the window is written in, such as
            `America/Sao_Paulo`. When omitted, the team's time zone is stored,
            or `UTC` when the team has none.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | String length | `1` through `64` characters |
          example: America/Sao_Paulo
        days:
          type: array
          items:
            type: string
            enum:
              - monday
              - tuesday
              - wednesday
              - thursday
              - friday
              - saturday
              - sunday
          minItems: 1
          maxItems: 7
          description: >-
            Weekdays the campaign may send on, in the window's time zone. At
            least one; no repeats.


            <!-- polymorfa-input-table -->

            **Allowed item values**

            | Item value | Meaning |

            | --- | --- |

            | `monday` | Monday. |

            | `tuesday` | Tuesday. |

            | `wednesday` | Wednesday. |

            | `thursday` | Thursday. |

            | `friday` | Friday. |

            | `saturday` | Saturday. |

            | `sunday` | Sunday. |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Array size | `1` through `7` items |

            | Duplicates | Not accepted; every array item must be unique |
          uniqueItems: true
          example:
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
        hours:
          type: array
          items:
            $ref: '#/components/schemas/native__CampaignSendWindowRange'
          minItems: 1
          maxItems: 4
          description: >-
            Local time ranges the campaign may send in on those days, at most 4.
            Ranges must not overlap. A range cannot cross midnight; use two
            ranges instead.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Array size | `1` through `4` items |
        recipientTimeZone:
          type: boolean
          default: false
          description: >-
            Evaluate the window in each recipient's own time zone. The zone
            comes from the recipient variable named by `timeZoneVariable` when
            it holds a valid IANA zone, otherwise from the phone number's
            country when that country uses one UTC offset, otherwise `timeZone`.
        timeZoneVariable:
          type: string
          pattern: ^[A-Za-z0-9_][A-Za-z0-9_.-]{0,63}$
          default: timeZone
          description: >-
            Recipient variable holding the recipient's IANA time zone, used when
            `recipientTimeZone` is true.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Pattern | `^[A-Za-z0-9_][A-Za-z0-9_.-]{0,63}$` |
          example: timeZone
      required:
        - days
        - hours
      additionalProperties: false
      description: >-
        When the campaign may send. Recipients outside the window stay `queued`
        and are sent when it next opens. `null` sends at any time.
    native__Campaign:
      type: object
      properties:
        id:
          type: string
          description: Identifier for this resource.
        name:
          type: string
          description: Human-readable name for this resource.
        status:
          type: string
          description: Current status of this resource or operation.
        templateId:
          type: string
          nullable: true
          description: |-
            Identifier of the message template.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        recipientListId:
          type: string
          nullable: true
          description: |-
            Identifier for the recipient list.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        recipientCount:
          type: number
          description: Number of recipients.
        sentCount:
          type: number
          description: Number of sents.
        deliveredCount:
          type: number
          description: Number of delivereds.
        readCount:
          type: number
          description: Number of reads.
        failedCount:
          type: number
          description: Number of faileds.
        skippedCount:
          type: number
          description: Number of skippeds.
        scheduledAt:
          type: number
          nullable: true
          description: >-
            Unix timestamp in milliseconds when this operation is scheduled to
            start.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `number` |

            | Alternative 2 | `null` |
        launchedAt:
          type: number
          nullable: true
          description: |-
            Unix timestamp in milliseconds when this campaign launched.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `number` |
            | Alternative 2 | `null` |
        completedAt:
          type: number
          nullable: true
          description: |-
            Unix timestamp in milliseconds when this operation completed.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `number` |
            | Alternative 2 | `null` |
        createdAt:
          type: number
          description: Unix timestamp in milliseconds when this resource was created.
        updatedAt:
          type: number
          description: Unix timestamp in milliseconds when this resource was last updated.
        sendWindow:
          allOf:
            - $ref: '#/components/schemas/native__CampaignSendWindow'
          description: >-
            Specifies send window for this native campaign.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `object`; Required fields: `timeZone`,
            `days`, `hours`, `recipientTimeZone`, `timeZoneVariable` |

            | Alternative 2 | `null` |
      required:
        - id
        - name
        - status
        - templateId
        - recipientListId
        - recipientCount
        - sentCount
        - deliveredCount
        - readCount
        - failedCount
        - skippedCount
        - scheduledAt
        - launchedAt
        - completedAt
        - createdAt
        - updatedAt
        - sendWindow
    native__CampaignSendWindowRange:
      type: object
      additionalProperties: false
      properties:
        start:
          type: string
          pattern: ^([01][0-9]|2[0-3]):[0-5][0-9]$
          description: |-
            Local start time, `HH:MM` in 24-hour time, inclusive.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Pattern | `^([01][0-9]\|2[0-3]):[0-5][0-9]$` |
          example: '09:00'
        end:
          type: string
          pattern: ^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$
          description: >-
            Local end time, `HH:MM` in 24-hour time or `24:00`, exclusive. Must
            be later than `start`.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Pattern | `^(([01][0-9]\|2[0-3]):[0-5][0-9]\|24:00)$` |
          example: '18:00'
      required:
        - start
        - end
    native__CampaignSendWindow:
      type: object
      nullable: true
      properties:
        timeZone:
          type: string
          description: IANA time zone the window is written in.
          example: America/Sao_Paulo
        days:
          type: array
          items:
            type: string
            enum:
              - monday
              - tuesday
              - wednesday
              - thursday
              - friday
              - saturday
              - sunday
          minItems: 1
          maxItems: 7
          description: >-
            Weekdays the campaign may send on, in the window's time zone. At
            least one; no repeats.


            <!-- polymorfa-input-table -->

            **Allowed item values**

            | Item value | Meaning |

            | --- | --- |

            | `monday` | Monday. |

            | `tuesday` | Tuesday. |

            | `wednesday` | Wednesday. |

            | `thursday` | Thursday. |

            | `friday` | Friday. |

            | `saturday` | Saturday. |

            | `sunday` | Sunday. |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Array size | `1` through `7` items |

            | Duplicates | Not accepted; every array item must be unique |
          uniqueItems: true
          example:
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
        hours:
          type: array
          items:
            $ref: '#/components/schemas/native__CampaignSendWindowRange'
          minItems: 1
          maxItems: 4
          description: >-
            Local time ranges the campaign may send in on those days, at most 4.
            Ranges must not overlap. A range cannot cross midnight; use two
            ranges instead.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Array size | `1` through `4` items |
        recipientTimeZone:
          type: boolean
          description: >-
            Evaluate the window in each recipient's own time zone. The zone
            comes from the recipient variable named by `timeZoneVariable` when
            it holds a valid IANA zone, otherwise from the phone number's
            country when that country uses one UTC offset, otherwise `timeZone`.
        timeZoneVariable:
          type: string
          pattern: ^[A-Za-z0-9_][A-Za-z0-9_.-]{0,63}$
          description: >-
            Recipient variable holding the recipient's IANA time zone, used when
            `recipientTimeZone` is true.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Pattern | `^[A-Za-z0-9_][A-Za-z0-9_.-]{0,63}$` |
          example: timeZone
      required:
        - timeZone
        - days
        - hours
        - recipientTimeZone
        - timeZoneVariable
      description: When the campaign may send; null sends at any time.
  headers:
    native__X-RateLimit-Limit:
      description: >-
        Team request quota per rolling minute, when the per-team request limiter
        applies.
      schema:
        type: integer
        minimum: 1
    native__X-RateLimit-Remaining:
      description: >-
        Requests left in the per-team quota; zero when this limiter rejects the
        request.
      schema:
        type: integer
        minimum: 0
    native__X-RateLimit-Reset:
      description: >-
        Unix timestamp in seconds when the oldest counted request leaves the
        rolling window, when the per-team request limiter applies. Follow
        Retry-After on a rejected request.
      schema:
        type: integer
        minimum: 0
  securitySchemes:
    native__BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Polymorfa organization key (pmfa_ prefix), project token (pmfa_pt_
        prefix) where supported, or short-lived client token (pmfa_ct_ prefix).
        Organization and project keys may be personal or service-account owned
        and enforce selected action scopes. Organization keys cover the team and
        its projects; project tokens stay inside one project. Client tokens stay
        inside their live project and session and enforce their client rules.

````

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