Skip to main content
The Verify OTP endpoint completes the authentication flow started by Send OTP. Submit the 6-digit code from your email to receive your user profile, team details, and API key. For new users, this automatically creates a team and generates an API key. This endpoint requires no authentication — use the OTP from your email.

Endpoint

POST https://api.outx.ai/linkedin-agent/auth-verify-otp

Headers

HeaderTypeRequiredDescription
Content-TypestringYesMust be application/json

Request Body

FieldTypeRequiredDescription
emailstringYesThe email address the OTP was sent to
otpstringYesThe 6-digit OTP from your email
{
  "email": "john@example.com",
  "otp": "123456"
}

Response

{
  "user": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "full_name": "John Doe",
    "email": "john@example.com"
  },
  "team": {
    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "name": "John Doe's Team",
    "api_key": "outx_a1b2c3d4e5f6g7h8i9j0k1l2"
  }
}
FieldDescription
user.idYour unique user ID
user.full_nameYour name (from signup or account)
user.emailYour email address
team.idYour team ID
team.nameYour team name
team.api_keyYour API key — use this in the x-api-key header for all OutX API and LinkedIn API requests

Example Request

curl -X POST "https://api.outx.ai/linkedin-agent/auth-verify-otp" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "john@example.com",
    "otp": "123456"
  }'

Errors

StatusErrorDescription
400Missing or invalid 'email'The email field is missing or not a valid string
400Missing or invalid 'otp'The otp field is missing or not a valid string
401Invalid or expired OTPThe OTP is incorrect or has expired (OTPs expire after 1 hour)
If the OTP has expired, call Send OTP again to receive a new code.

Full Authentication Flow

Here is the complete two-step flow to get your API key programmatically:
Python
import requests

# Step 1: Send OTP
requests.post(
    "https://api.outx.ai/linkedin-agent/auth-send-otp",
    json={"email": "john@example.com", "full_name": "John Doe"},
)
print("Check your email for the OTP...")

# Step 2: Verify OTP (enter the code from your email)
otp = input("Enter the 6-digit OTP: ")
response = requests.post(
    "https://api.outx.ai/linkedin-agent/auth-verify-otp",
    json={"email": "john@example.com", "otp": otp},
)

api_key = response.json()["team"]["api_key"]
print(f"Your API key: {api_key}")

Next Steps