Verify Phone Number

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

Sends a one-time verification code by SMS to the person's phone. Side effect: generates and dispatches a 6-digit code bound to the phone. Returns no body. The code is later confirmed at the /verify/{code} endpoint.

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

Request

cURL
curl -X POST https://api.wellapp.ai/v1/people/{person_id}/phones/{phone_id}/verify \
  -H "Authorization: Bearer $WELL_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "type": "phone",
    "attributes": {
      "workspace_id": "8f6b2c10-4a1e-4d2b-9c3a-1f0e7a5b6c21"
    }
  }
}'
Request body
{
  "data": {
    "type": "phone",
    "attributes": {
      "workspace_id": "8f6b2c10-4a1e-4d2b-9c3a-1f0e7a5b6c21"
    }
  }
}

Responses

204The verification code was sent.

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"
  }
}