Skip to content

Commit 5c4d385

Browse files
authored
Merge pull request #655 from bbiggerr/add/account/profile/phone
Add Phone Number Endpoints
2 parents 8ca91f3 + 6a9fdaf commit 5c4d385

File tree

1 file changed

+169
-1
lines changed

1 file changed

+169
-1
lines changed

openapi.yaml

Lines changed: 169 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2631,7 +2631,7 @@ paths:
26312631
email address. Linode Managed can monitor any service or software stack reachable over TCP or HTTP. See
26322632
our [Linode Managed guide](/docs/platform/linode-managed/)
26332633
to learn more.
2634-
operationId: enableAccountManged
2634+
operationId: enableAccountManaged
26352635
x-linode-cli-action: enable-managed
26362636
security:
26372637
- personalAccessToken: []
@@ -17564,6 +17564,165 @@ paths:
1756417564
- lang: CLI
1756517565
source: >
1756617566
linode-cli sshkey delete 42
17567+
/profile/phone-number:
17568+
x-linode-cli-command: phone
17569+
delete:
17570+
x-linode-grant: read_write
17571+
tags:
17572+
- Profile
17573+
summary: Phone Number Delete
17574+
description: |
17575+
Delete the verified phone number for the User making this request.
17576+
17577+
Use this command to opt out of SMS messages for the requesting User after a phone number has been verified with the **Phone Number Verify** ([POST /profile/phone-number/verify](/docs/api/profile/#phone-number-verify)) command.
17578+
operationId: deleteProfilePhoneNumber
17579+
x-linode-cli-command: delete
17580+
security:
17581+
- personalAccessToken: []
17582+
- oauth:
17583+
- account:read_write
17584+
responses:
17585+
'200':
17586+
description: >
17587+
Phone number deletion request successful.
17588+
content:
17589+
application/json:
17590+
schema:
17591+
type: object
17592+
default:
17593+
$ref: '#/components/responses/ErrorResponse'
17594+
x-code-samples:
17595+
- lang: Shell
17596+
source: >
17597+
curl -H "Content-Type: application/json" \
17598+
-H "Authorization: Bearer $TOKEN_BBIGGER_DEV" \
17599+
-X DELETE \
17600+
https://api.dev.linode.com/v4/profile/phone-number
17601+
- lang: CLI
17602+
source: >
17603+
linode-cli phone delete
17604+
post:
17605+
x-linode-grant: read_write
17606+
tags:
17607+
- Profile
17608+
summary: Phone Number Verification Code Send
17609+
description: |
17610+
Send a one-time verification code via SMS message to the submitted phone number. Providing your phone number helps ensure you can securely access your Account in case other ways to connect are lost. Your phone number is only used to verify your identity by sending an SMS message. Standard carrier messaging fees may apply.
17611+
17612+
* By accessing this command you are opting in to receive SMS messages. You can opt out of SMS messages by using the **Phone Number Delete** ([DELETE /profile/phone-number](/docs/api/profile/#phone-number-delete)) command after your phone number is verified.
17613+
17614+
* Verification codes are valid for 10 minutes after they are sent.
17615+
17616+
* Subsequent requests made prior to code expiration result in sending the same code.
17617+
17618+
Once a verification code is received, verify your phone number with the **Phone Number Verify** ([POST /profile/phone-number/verify](/docs/api/profile/#phone-number-verify)) command.
17619+
operationId: postProfilePhoneNumber
17620+
x-linode-cli-command: sms-code-send
17621+
security:
17622+
- personalAccessToken: []
17623+
- oauth:
17624+
- account:read_write
17625+
requestBody:
17626+
description: Enter a phone number and country code for verification.
17627+
content:
17628+
application/json:
17629+
schema:
17630+
required:
17631+
- iso_code
17632+
- phone_number
17633+
type: object
17634+
properties:
17635+
iso_code:
17636+
type: string
17637+
description: The two-letter ISO 3166 country code associated with the phone number.
17638+
example: US
17639+
phone_number:
17640+
type: string
17641+
description: A valid phone number.
17642+
format: phone
17643+
example: 555-555-5555
17644+
responses:
17645+
'200':
17646+
description: >
17647+
Phone number verification code request successful.
17648+
content:
17649+
application/json:
17650+
schema:
17651+
type: object
17652+
default:
17653+
$ref: '#/components/responses/ErrorResponse'
17654+
x-code-samples:
17655+
- lang: Shell
17656+
source: >
17657+
curl -H "Content-Type: application/json" \
17658+
-H "Authorization: Bearer $TOKEN_BBIGGER_DEV" \
17659+
-X POST -d '{
17660+
"iso_code": "US",
17661+
"phone_number": "267-273-8229"
17662+
}' \
17663+
https://api.dev.linode.com/v4/profile/phone-number
17664+
- lang: CLI
17665+
source: >
17666+
linode-cli phone sms-code-send \
17667+
--iso-code US \
17668+
--phone-number 555-555-5555
17669+
/profile/phone-number/verify:
17670+
x-linode-cli-command: phone
17671+
post:
17672+
x-linode-grant: read_write
17673+
tags:
17674+
- Profile
17675+
summary: Phone Number Verify
17676+
description: |
17677+
Verify a phone number by confirming the one-time code received via SMS message after accessing the **Phone Verification Code Send** ([POST /profile/phone-number](/docs/api/profile/#phone-number-verification-code-send)) command.
17678+
17679+
* Verification codes are valid for 10 minutes after they are sent.
17680+
17681+
* Only the same User that made the verification code request can use that code with this command.
17682+
17683+
Once completed, the verified phone number is assigned to the User making the request. To change the verified phone number for a User, first use the **Phone Number Delete** ([DELETE /profile/phone-number](/docs/api/profile/#phone-number-delete)) command, then begin the verification process again with the **Phone Verification Code Send** ([POST /profile/phone-number](/docs/api/profile/#phone-number-verification-code-send)) command.
17684+
operationId: postProfilePhoneNumberVerify
17685+
x-linode-cli-command: verify
17686+
security:
17687+
- personalAccessToken: []
17688+
- oauth:
17689+
- account:read_write
17690+
requestBody:
17691+
description: Enter a phone verification code for confirmation.
17692+
content:
17693+
application/json:
17694+
schema:
17695+
required:
17696+
- otp_code
17697+
type: object
17698+
properties:
17699+
otp_code:
17700+
type: string
17701+
description: The one-time, six-digit code received via SMS message after accessing the **Phone Verification Code Send** ([POST /profile/phone-number](/docs/api/profile/#phone-number-verification-code-send)) command.
17702+
example: "US"
17703+
responses:
17704+
'200':
17705+
description: >
17706+
Phone number verification successful.
17707+
content:
17708+
application/json:
17709+
schema:
17710+
type: object
17711+
default:
17712+
$ref: '#/components/responses/ErrorResponse'
17713+
x-code-samples:
17714+
- lang: Shell
17715+
source: >
17716+
curl -H "Content-Type: application/json" \
17717+
-H "Authorization: Bearer $TOKEN" \
17718+
-X POST -d '{
17719+
"otp_code": "123456"
17720+
}' \
17721+
https://api.linode.com/v4/profile/phone-number/verify
17722+
- lang: CLI
17723+
source: >
17724+
linode-cli phone verify \
17725+
--otp_code 123456
1756717726
/profile/preferences:
1756817727
x-linode-cli-command: profile
1756917728
get:
@@ -25159,6 +25318,15 @@ components:
2515925318
as necessary.
2516025319
2516125320
x-linode-cli-display: 2
25321+
verified_phone_number:
25322+
type: string
25323+
format: phone
25324+
readOnly: true
25325+
description: |
25326+
The phone number verified for this Profile with the **Phone Number Verify** ([POST /profile/phone-number/verify](/docs/api/profile/#phone-number-verify)) command.
25327+
25328+
`null` if this Profile has no verified phone number.
25329+
example: "+5555555555"
2516225330
timezone:
2516325331
type: string
2516425332
description: >

0 commit comments

Comments
 (0)