Update current user email notification consent
PATCH
/api/auth/me/email-consent
const url = 'https://api.getvespy.com/api/auth/me/email-consent';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"emailConsent":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.getvespy.com/api/auth/me/email-consent \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "emailConsent": true }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
emailConsent
required
boolean
Examplegenerated
{ "emailConsent": true}Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
user
required
object
email
required
string format: email
emailConsentAt
required
string format: date-time
fullName
required
string
id
required
string format: uuid
isSuperadmin
required
boolean
organizationId
required
string format: uuid
phone
required
string
role
required
string
smsConsentAt
required
string format: date-time
vendorId
required
string format: uuid
Example
{ "user": { "role": "admin" }}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}