Create Phone Verification Code

post/v1/people/{person_id}/phones/{phone_id}/verify/{code}

Confirms the 6-digit code previously sent to the person's phone. Side effect: marks the phone verified when the code matches. Returns no body on success.

Requires a bearer token: Authorization: Bearer <token>.

Path parameters

NameTypeRequiredDescription
person_idstring <uuid>YesPublic UUID of the person.e.g. c4d5e6f7-8a9b-40c1-92d3-e4f5a6b7c8d9
phone_idstring <uuid>YesPublic UUID of the phone.e.g. f7a8b9c0-1d2e-43f4-95a6-b7c8d9e0f1a2
codestringYesThe 6-digit verification code the person received by SMS.e.g. 482915

Request

cURL
curl -X POST https://api.wellapp.ai/v1/people/{person_id}/phones/{phone_id}/verify/{code} \
  -H "Authorization: Bearer $WELL_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "type": "phone",
    "attributes": {}
  }
}'
Request body
{
  "data": {
    "type": "phone",
    "attributes": {}
  }
}

Responses

204The code matched and the phone is now verified.

400Bad Request

{
  "code": "BAD_REQUEST",
  "status": 400,
  "title": "Bad Request",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}

401Unauthorized

{
  "code": "UNAUTHORIZED",
  "status": 401,
  "title": "Unauthorized",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}

403Forbidden

{
  "code": "FORBIDDEN",
  "status": 403,
  "title": "Forbidden",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}

404Not Found

{
  "code": "NOT_FOUND",
  "status": 404,
  "title": "Not Found",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}