# Updates a sender in project

Updates a sender in project.

Endpoint: PATCH /v1/projects/{projectId}/whatsapp/senders/{senderId}
Version: 1.2.91
Security: BasicAuth, BearerAuth, OAuth2Production

## Path parameters:

  - `projectId` (string, required)
    The unique ID of the project. You can find this on the Sinch Dashboard.

  - `senderId` (string, required)
    The unique ID of the sender.

## Request fields (application/json):

  - `status` (string)
    Create as draft or submit. Defaults to draft.
    Enum: "DRAFT", "SUBMIT"

  - `details` (object)

  - `details.displayName` (string)
    Sender display name within WhatsApp.

  - `details.description` (string,null)
    Description of the sender displayed in the Business Info within WhatsApp. If null the value will be deleted.

  - `details.vertical` (string)
    Category of the sender displayed in the Business Info within WhatsApp.
    Enum: "ALCOHOL", "AUTOMOTIVE", "BEAUTY_SPA_SALON", "CLOTHING_AND_APPAREL", "EDUCATION", "ENTERTAINMENT", "EVENT_PLANNING_AND_SERVICE", "FINANCE_AND_BANKING", "FOOD_AND_GROCERY", "HOTEL_AND_LODGING", "MEDICAL_AND_HEALTH", "NON_PROFIT", "NOT_SET", "ONLINE_GAMBLING", "OTC_DRUGS", "OTHER", "PHYSICAL_GAMBLING", "PROFESSIONAL_SERVICES", "PUBLIC_SERVICE", "RESTAURANT", "SHOPPING_AND_RETAIL", "TRAVEL_AND_TRANSPORTATION"

  - `details.email` (string,null)
    Contact email displayed in the Business Info within WhatsApp. If null the value will be deleted.

  - `details.address` (string,null)
    Business address displayed in the Business Info within WhatsApp. If null the value will be deleted.

  - `details.websiteOne` (string,null)
    Business website displayed in the Business Info within WhatsApp. If null the value will be deleted.

  - `details.websiteTwo` (string,null)
    Second business website displayed in the Business Info within WhatsApp. If null the value will be deleted.

  - `details.about` (string,null)
    About text displayed in the Business Info within WhatsApp.
  - Hyperlinks can be included but will not render as clickable links.
  - Markdown is not supported.
   If null the value will be deleted.

  - `details.photoUrl` (string,null)
    URL to the sender image displayed in WhatsApp.
- Supported mime types: image/jpeg, image/png or image/webp.
- Maximum file size: 5MB.
- Minimum image dimensions: 192 x 192 px.
- Maximum image dimensions: 640 x 640 px.
- Image will be cropped to maximum image dimensions.
- If you submit a PNG image with a transparent background, the background will be rendered as black. If null the value will be deleted.

## Response 200 fields (application/json):

  - `id` (string, required)
    The unique ID of the sender.

  - `region` (string, required)
    Region sender is provisioned in.
    Enum: "BR", "EU", "US", "UNRECOGNIZED"

  - `metaLocalStorage` (string, required)
    Region sender store the data in Meta.
    Enum: "AE", "AU", "BH", "BR", "CA", "CH", "DE", "GB", "ID", "IN", "JP", "KR", "SG", "US", "ZA", "UNRECOGNIZED", "UNSPECIFIED"

  - `businessManager` (string, required)
    Business manager.
    Enum: "SINCH_AMERICA", "SINCH_BR", "SINCH_MX", "SINCH_SEP", "SINCH_UK", "UNRECOGNIZED"

  - `compatibleRegions` (array, required)
    Conversation API app regions the sender can be used for.

  - `state` (string)
    The current state of the sender.
    Enum: "ACTIVE", "IN_PROGRESS", "INACTIVE", "PENDING_VERIFICATION", "SUSPENDED", "ERROR"

  - `changes` (object)
    Any pending changes to the sender.

  - `changes.status` (string, required)
    Current status of the pending changes.
    Enum: "DRAFT", "ERROR", "IN_PROGRESS", "MULTIPLE_WABA_ERROR", "REJECTED"

  - `changes.details` (array) — one of:
    The pending changes to sender details and information
    - WhatsappSenderDetailsDto:
      - `displayName` (string, required)
        Sender display name within WhatsApp.
      - `vertical` (string, required)
        Category of the sender displayed in the Business Info within WhatsApp.
        Enum: "ALCOHOL", "AUTOMOTIVE", "BEAUTY_SPA_SALON", "CLOTHING_AND_APPAREL", "EDUCATION", "ENTERTAINMENT", "EVENT_PLANNING_AND_SERVICE", "FINANCE_AND_BANKING", "FOOD_AND_GROCERY", "HOTEL_AND_LODGING", "MEDICAL_AND_HEALTH", "NON_PROFIT", "NOT_SET", "ONLINE_GAMBLING", "OTC_DRUGS", "OTHER", "PHYSICAL_GAMBLING", "PROFESSIONAL_SERVICES", "PUBLIC_SERVICE", "RESTAURANT", "SHOPPING_AND_RETAIL", "TRAVEL_AND_TRANSPORTATION", "UNRECOGNIZED"
      - `description` (string)
        Description of the sender displayed in the Business Info within WhatsApp.
      - `email` (string)
        Contact email displayed in the Business Info within WhatsApp.
      - `address` (string)
        Business address displayed in the Business Info within WhatsApp.
      - `websiteOne` (string)
        Business website displayed in the Business Info within WhatsApp.
      - `websiteTwo` (string)
        Second business website displayed in the Business Info within WhatsApp.
      - `about` (string)
        About text displayed in the Business Info within WhatsApp.
  - Hyperlinks can be included but will not render as clickable links.
  - Markdown is not supported.
      - `photoUrl` (string)
        URL to the sender image displayed in WhatsApp.
- Supported mime types: image/jpeg, image/png or image/webp.
- Maximum file size: 5MB.
- Minimum image dimensions: 192 x 192 px.
- Maximum image dimensions: 640 x 640 px.
- Image will be cropped to maximum image dimensions.
- If you submit a PNG image with a transparent background, the background will be rendered as black.
      - `username` (string)
        WhatsApp Business username of the sender.
    - WhatsappSenderChangesDetailsDto:
      - `displayName` (string)
        Sender display name within WhatsApp.
      - `description` (string)
        Description of the sender displayed in the Business Info within WhatsApp.
      - `vertical` (string)
        Category of the sender displayed in the Business Info within WhatsApp.
        Enum: same as `vertical` in "WhatsappSenderDetailsDto" (23 values)
      - `email` (string)
        Contact email displayed in the Business Info within WhatsApp.
      - `address` (string)
        Business address displayed in the Business Info within WhatsApp.
      - `websiteOne` (string)
        Business website displayed in the Business Info within WhatsApp.
      - `websiteTwo` (string)
        Second business website displayed in the Business Info within WhatsApp.
      - `about` (string)
        About text displayed in the Business Info within WhatsApp.
  - Hyperlinks can be included but will not render as clickable links.
  - Markdown is not supported.
      - `photoUrl` (string)
        URL to the sender image displayed in WhatsApp.
- Supported mime types: image/jpeg, image/png or image/webp.
- Maximum file size: 5MB.
- Minimum image dimensions: 192 x 192 px.
- Maximum image dimensions: 640 x 640 px.
- Image will be cropped to maximum image dimensions.
- If you submit a PNG image with a transparent background, the background will be rendered as black.
      - `username` (string)
        WhatsApp Business username of the sender.

  - `changes.errorReason` (string)
    Error reason if sender is in state ERROR.

  - `changes.errorCode` (string)
    Error code if sender is in state ERROR.
    Enum: "CANNOT_ASSIGN_CREDIT_LINE", "CANNOT_ASSIGN_SYSTEM_USER", "CANNOT_CREATE_NEW_WHATSAPP_SENDER", "CANNOT_CREATE_WABA_FOR_BUSINESS", "CANNOT_GET_DETAILS_FOR_CLOUD_API", "CANNOT_GET_WABA_DETAILS", "CANNOT_REGISTER_NEW_WHATSAPP_SENDER", "CANNOT_REGISTER_TO_CLOUD_API", "CANNOT_SUBSCRIBE_TO_CLOUD_API", "CANNOT_SUBSCRIBE_TO_WEBHOOK", "DUPLICATES_ON_SENDER_PHONE_NUMBER", "FAILED_TO_FETCH_APPROVED_MESSAGE_TEMPLATES", "MULTIPLE_WABA_FOR_PROJECT_ID", "NO_CERTIFICATE_AVAILABLE", "NO_NOVA_ACCOUNT_ID", "NO_PRICING_PLAN", "NO_PROJECT_ID", "NO_VERIFIED_PHONE_NUMBER", "NOT_VERIFIED_REQUESTED_PHONE_NUMBER", "NOT_VERIFY_BUSINESS_VIA_WHATSAPP", "NOVA_ACCOUNT_ID_CONFLICT", "PROJECT_ID_CONFLICT", "SENDER_HAS_BEEN_DELETED", "WABA_CONNECTED_TO_ANOTHER_PROJECT", "UNKNOWN_ERROR", "UNRECOGNIZED"

  - `details` (object)
    Sender details and information.

  - `details.displayName` (string, required)
    Sender display name within WhatsApp.

  - `details.vertical` (string, required)
    Category of the sender displayed in the Business Info within WhatsApp.
    Enum: same as `vertical` in "WhatsappSenderDetailsDto" (23 values)

  - `details.description` (string)
    Description of the sender displayed in the Business Info within WhatsApp.

  - `details.email` (string)
    Contact email displayed in the Business Info within WhatsApp.

  - `details.address` (string)
    Business address displayed in the Business Info within WhatsApp.

  - `details.websiteOne` (string)
    Business website displayed in the Business Info within WhatsApp.

  - `details.websiteTwo` (string)
    Second business website displayed in the Business Info within WhatsApp.

  - `details.about` (string)
    About text displayed in the Business Info within WhatsApp.
  - Hyperlinks can be included but will not render as clickable links.
  - Markdown is not supported.

  - `details.photoUrl` (string)
    URL to the sender image displayed in WhatsApp.
- Supported mime types: image/jpeg, image/png or image/webp.
- Maximum file size: 5MB.
- Minimum image dimensions: 192 x 192 px.
- Maximum image dimensions: 640 x 640 px.
- Image will be cropped to maximum image dimensions.
- If you submit a PNG image with a transparent background, the background will be rendered as black.

  - `details.username` (string)
    WhatsApp Business username of the sender.

  - `metadata` (object)
    Data about the current state of individual sender fields.

  - `metadata.username` (object)
    Approval status of the sender username.

  - `metadata.username.status` (string, required)
    Current approval status of the field.
    Enum: "APPROVED", "DEFERRED", "DELETED", "EXPIRED", "PENDING", "REJECTED", "RESERVED", "UNRECOGNIZED", "UNSPECIFIED"

  - `metadata.username.value` (string)
    Requested value of the field.

  - `metadata.username.rejectionReason` (string)
    Reason for rejection if the field update was rejected.

  - `conversationApiAppDetails` (object)
    If set, the details of the Conversation API App the sender is connected to.

  - `conversationApiAppDetails.id` (string, required)
    ID of the app

  - `conversationApiAppDetails.projectId` (string, required)
    ID of the app project

  - `conversationApiAppDetails.region` (string, required)
    App region.
    Enum: same as `region` (4 values)

  - `conversationApiAppDetails.channelStatus` (string)
    Status of the channel credentials integration.
    Enum: "ACTIVE", "FAILING", "PENDING", "UNRECOGNIZED"

  - `maxTps` (number)
    Maximum sender TPS.

  - `qualityRating` (string)
    Current quality rating of the sender.
    Enum: "GREEN", "RED", "YELLOW", "UNKNOWN", "UNRECOGNIZED"

  - `bearerToken` (string)
    Bearer token of the sender. The bearer token is needed to connect the sender to a Conversation API App.

  - `created` (string)
    The UTC Date Time in ISO 8601 for when the sender was created.

  - `modified` (string)
    The UTC Date Time in ISO 8601 for when the sender was last modified.

  - `countryCode` (string)
    Country code of sender phone number.

  - `phoneNumber` (string)
    Sender phone number without country code.

  - `numberProvider` (string)
    Provider for phone number.
    Enum: "CUSTOMER", "SINCH", "UNRECOGNIZED"

  - `cloudApi` (boolean, required)
    True if the sender is hosted in WhatsApp Cloud API.

  - `conversationApiApp` (string)
    If set, the Conversation API App ID the sender is connected to.

  - `dailyLimit` (string)
    This property is deprecated. Use AccountDto.businessDailyLimit instead. Current daily message limit of the sender.
    Enum: "NOT_SET", "TIER_100K", "TIER_10K", "TIER_1K", "TIER_250", "TIER_2K", "TIER_50", "TIER_UNLIMITED", "UNRECOGNIZED"

  - `wabaBanState` (string)
    Please use get account endpoint for this information.
    Enum: "DISABLE", "REINSTATE", "SCHEDULE_FOR_DISABLE", "UNRECOGNIZED"

  - `wabaBanDate` (string)
    Please use get account endpoint for this information.

## Response 400 fields (application/json):

  - `body` (InvalidInputErrorTitle (object) or ProjectNotInitializedErrorTitle (object) or NoFieldsToUpdateErrorTitle (object) or FileInvalidMimeTypeErrorTitle (object) or InvalidPayloadErrorTitle (object)) — one of:
    - InvalidInputErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "invalid_input"
      - `message` (string)
        Human readable message.
        Example: "Invalid input."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Correct the validation errors and submit again."
      - `additionalInformation` (object)
        Additional information for error.
        Example: {"validationErrors":["details.displayName must be a string","details.displayName must be longer than or equal to 1 characters","details.displayName must be shorter than or equal to 128 characters","details.displayName should not be equal to null"]}
    - ProjectNotInitializedErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "project_not_initialized"
      - `message` (string)
        Human readable message.
        Example: "Project not initialized for WhatsApp."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Verify that the project ID is correct and that it has been onboarded for WhatsApp."
    - NoFieldsToUpdateErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "no_fields_to_update"
      - `message` (string)
        Human readable message.
        Example: "No fields to be updated."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Supply at least one field to be updated."
    - FileInvalidMimeTypeErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "file_invalid_mime_type"
      - `message` (string)
        Human readable message.
        Example: "details.photoUrl: invalid file mime type."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Try again with supported mime types: image/jpeg, image/png, image/webp."
    - InvalidPayloadErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "invalid_payload"
      - `message` (string)
        Human readable message.
        Example: "Invalid payload."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Correct payload and submit again."

## Response 401 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: "unauthorized_error"

  - `message` (string)
    Human readable message.
    Example: "Unauthorized error."

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: "Verify that projectId is correct."

## Response 404 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: "sender_not_found"

  - `message` (string)
    Human readable message.
    Example: "Sender not found."

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: "Verify that the parameters are correct."

## Response 409 fields (application/json):

  - `body` (SenderNotUpdatableErrorTitle (object) or SenderChangesNotUpdatableErrorTitle (object) or SenderUsernameUpdateNotAllowedErrorTitle (object) or SenderUsernameUpdateNotAvailableErrorTitle (object) or FileNotFoundErrorTitle (object) or FileSizeTooLargeErrorTitle (object) or FileHasWrongDimensionsErrorTitle (object) or FileUnexpectedErrorErrorTitle (object)) — one of:
    - SenderNotUpdatableErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "sender_not_updatable"
      - `message` (string)
        Human readable message.
        Example: "Sender is not updatable."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Updates are only supported by senders with state: ACTIVE."
    - SenderChangesNotUpdatableErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "sender_changes_not_updatable"
      - `message` (string)
        Human readable message.
        Example: "Sender is not updatable."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Updates are only supported by senders changes with status: DRAFT, REJECTED."
    - SenderUsernameUpdateNotAllowedErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "sender_username_update_not_allowed"
      - `message` (string)
        Human readable message.
        Example: "Sender username update is not allowed."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Sender username cannot be updated once set."
    - SenderUsernameUpdateNotAvailableErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "sender_username_update_not_available"
      - `message` (string)
        Human readable message.
        Example: "Sender username update is not available."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Only \"ACTIVE\" senders can have their username updated."
    - FileNotFoundErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "file_not_found"
      - `message` (string)
        Human readable message.
        Example: "details.photoUrl: file not found."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Verify that the url is correct."
    - FileSizeTooLargeErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "file_size_too_large"
      - `message` (string)
        Human readable message.
        Example: "details.photoUrl: file size is too large."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Try again with a smaller file. Max size for `image/jpeg` is 5MB."
    - FileHasWrongDimensionsErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "file_has_wrong_dimensions"
      - `message` (string)
        Human readable message.
        Example: "details.photoUrl: image has wrong dimensions."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Try again with image dimensions: min 192 x 192 px & max 640 x 640 px."
    - FileUnexpectedErrorErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "file_unexpected_error"
      - `message` (string)
        Human readable message.
        Example: "details.photoUrl: file unexpected error."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "The file cannot be handled properly. Please try with another one."

## Response 500 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: "internal_error"

  - `message` (string)
    Human readable message.
    Example: "Internal server error."

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: "Please wait and try again, if the error persist please contact support."


