Skip to main content

Phone Number Capture

PUT 

/client/users/:correlation_id/profile/phonenumber

  • This API captures a phone number for a member account.

  • The status parameter in the request indicates the user’s phone number prompt preference.

  • Valid status in the request includes: deferred, accepted, and declined.

Request

Body

AttributeDefinitionFormatNotes
phoneNumberThe phone number to be associated with an accountString. For a status of "accepted", a valid phone number (not null) must be provided.For a status of "deferred", the phone number must be undefined (with no value). For a status of "declined", the phone number value must be null.
statusThe phone number prompt preferenceEnum: "deferred", "accepted", or "declined""deferred" means "ask me another time"; "declined" means the member refused to opt in to SMS communications

Response

AttributeDefinitionFormatNotes
messageShows that a phone number has been setString"Phone number option updated."

Error Responses

statusCodeerrorMessageerrorCodeDefinition
400 Bad RequestPhone number is required.INVALID_REQUESTFor status 'accepted' there must be a phoneNumber attribute in the request that has a valid phone number (for instance, (123) 456-7890).
400 Bad RequestPhone number is required.INVALID_REQUESTFor status 'declined' there must be a phoneNumber attribute in the request that has a value of null.
400 Bad RequestPhone number is required.INVALID_REQUESTFor 'accepted' status, the value of the phoneNumber attribute must be a valid phone number (for instance, in the format (123) 456-7890).
400 Bad RequestInvalid phone number for this status.INVALID_REQUESTFor 'declined' status, the value of the phoneNumber attribute must be null.
400 Bad RequestPhone number not expected when status is deferred.INVALID_REQUESTNo phoneNumber attribute with any value can be included in the request for 'deferred' status.
400 Bad RequestPhone number not expected when status is deferred.INVALID_REQUESTNo phoneNumber attribute with any value can be included in the request for 'deferred' status.
400 Bad RequestStatus is mandatory and required to be non-emtpy.INVALID_REQUESTstatus attribute with valid value ('accepted", 'deferred', or 'declined') must be included in request.
400 Bad RequestInvalid status.INVALID_REQUESTstatus attribute value must be 'accepted', 'deferred', or 'declined'.
400 Bad RequestInvalid phone number format.INVALID_REQUESTphoneNumber must have valid phone number value (for instance, (123) 456-7890).

Request

Responses

200 - Phone Number Capture - Accepted