# Register sender for project

Triggers sender registration with the requested method. An OTP code will be sent over the requested method that will need to be used in the Verify sender endpoint.

Endpoint: POST /v1/projects/{projectId}/whatsapp/senders/{senderId}/register
Version: 1.2.79
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):

  - `method` (string, required)
    Registration Method of the sender.
    Enum: "SMS", "VOICE"

## Response 200 fields (application/json):

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

  - `method` (string, required)
    Registration Method of the sender.
    Enum: "SMS", "VOICE", "UNRECOGNIZED"

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

  - `verificationCodeSent` (boolean, required)
    Whether the verification code has been sent.

## Response 400 fields (application/json):

  - `body` (InvalidInputErrorTitle (object) or ProjectNotInitializedErrorTitle (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":["method must be one of the following values: SMS, VOICE"]}
    - 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."
    - 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` (NotAllowedRegisterErrorTitle (object) or SenderNumberNotApprovedForEnterpriseErrorTitle (object)) — one of:
    - NotAllowedRegisterErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "not_allowed_register"
      - `message` (string)
        Human readable message.
        Example: "Sender not allowed to be registered."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Only \"PENDING_VERIFICATION\" sender can be registered."
    - SenderNumberNotApprovedForEnterpriseErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "sender-number-not-approved-for-enterprise"
      - `message` (string)
        Human readable message.
        Example: "Sender number not approved for enterprise."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "This number has not been approved for an enterprise. Please contact support for more info."

## Response 429 fields (application/json):

  - `body` (SenderRegisterTooManyRequestsErrorTitle (object) or SenderAlreadyRegisteredErrorTitle (object) or TooManyInvalidVerificationCodesErrorTitle (object)) — one of:
    - SenderRegisterTooManyRequestsErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "sender-register-too-many-requests"
      - `message` (string)
        Human readable message.
        Example: "Sender register too many requests."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Register sender request limits reached. Please try again later."
    - SenderAlreadyRegisteredErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "sender-already-registered"
      - `message` (string)
        Human readable message.
        Example: "Sender already registered."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Verify that the parameters are correct."
    - TooManyInvalidVerificationCodesErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "too_many_invalid_verification_codes"
      - `message` (string)
        Human readable message.
        Example: "Too many invalid verification codes."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "You've tried too many invalid verification codes. Please try again later."

## 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."


