Skip to content

Set or remove a contact's phone number (logged)

PUT
/api/v1/workspaces/{workspace}/contacts/{contactId}/phone
curl --request PUT \
--url https://reputecast.example.com/api/v1/workspaces/acme-newsletter/contacts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/phone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "country": "example", "phone": "example" }'

Permission: subscribers:edit

workspace
required

Workspace slug

string
/^[a-z0-9][a-z0-9-]{1,62}$/

Workspace slug

contactId
required

Contact id

string format: uuid

Contact id

Media typeapplication/json
object
country
string
/^[A-Z]{2}$/
phone
required
string
<= 40 characters

Example generated

{
"country": "example",
"phone": "example"
}

OK

Media typeapplication/json
object
canEdit
required
boolean
country
required
string
display
required
string
events
required
Array<object>
object
action
required
string
Allowed values: subscribed pending confirmed opted_out opted_in unsubscribed imported confirmation_sent confirmation_failed
actor
string
at
required
string format: date-time
consentText
string
consentVersion
string
id
required
string
ip
string
keyword
string
list
string
note
string
number
required
string
page
string
source
required
string
lineSource
required
string
Allowed values: number_plan provider receipt ""
lineType
required
string
Allowed values: mobile landline toll_free voip unknown ""
lists
required
Array<object>
object
confirmation
string
confirmationAt
string format: date-time
email
required
string
Allowed values: subscribed pending unsubscribed not_subscribed
emailAt
string format: date-time
emailConfirmed
boolean
emailSource
string
emailSourceLabel
string
listId
required
string
name
required
string
sms
required
string
Allowed values: subscribed pending opted_out not_subscribed
smsAt
string format: date-time
smsIp
string
smsKeyword
string
smsPage
string
smsSource
string
smsVersion
string
whatsApp
required
string
Allowed values: subscribed pending opted_out not_subscribed
whatsAppAt
string format: date-time
whatsAppKeyword
string
whatsAppPage
string
whatsAppSource
string
whatsAppVersion
string
phone
required
string
shared
required
integer format: int64
smsSetUp
required
boolean
suppressed
object
at
required
string format: date-time
automation
string
campaign
string
code
required
string
context
string
id
required
string
number
required
string
reason
required
string
Allowed values: opted_out landline not_in_service invalid filtered provider_list manual
removable
required
boolean
source
required
string
timeZone
required
string
whatsAppSetUp
required
boolean
zoneSource
required
string
Allowed values: contact area_code country unknown

Example

{
"events": [
{
"action": "subscribed"
}
],
"lineSource": "number_plan",
"lineType": "mobile",
"lists": [
{
"email": "subscribed",
"sms": "subscribed",
"whatsApp": "subscribed"
}
],
"suppressed": {
"reason": "opted_out"
},
"zoneSource": "contact"
}

Error

Media typeapplication/problem+json
object
code

Stable error code, e.g. permission_denied

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object>
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

helpers

Members who hold the missing permission

Array<string>
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
meta
object
key
additional properties
permission

The missing permission key

string
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}