curl --request POST \
--url https://api.uplift.ai/v1/athletes/{athleteId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "<string>",
"email": "<string>",
"phone": "<string>",
"height": 123,
"weight": 123,
"positions": [
"<string>"
],
"custom_attributes": {}
}
'import requests
url = "https://api.uplift.ai/v1/athletes/{athleteId}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "<string>",
"email": "<string>",
"phone": "<string>",
"height": 123,
"weight": 123,
"positions": ["<string>"],
"custom_attributes": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
date_of_birth: '<string>',
email: '<string>',
phone: '<string>',
height: 123,
weight: 123,
positions: ['<string>'],
custom_attributes: {}
})
};
fetch('https://api.uplift.ai/v1/athletes/{athleteId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uplift.ai/v1/athletes/{athleteId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'date_of_birth' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'height' => 123,
'weight' => 123,
'positions' => [
'<string>'
],
'custom_attributes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.uplift.ai/v1/athletes/{athleteId}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"height\": 123,\n \"weight\": 123,\n \"positions\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.uplift.ai/v1/athletes/{athleteId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"height\": 123,\n \"weight\": 123,\n \"positions\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uplift.ai/v1/athletes/{athleteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"height\": 123,\n \"weight\": 123,\n \"positions\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n}"
response = http.request(request)
puts response.read_body{
"athlete": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-11-07T05:31:56Z",
"email": "<string>",
"phone": "<string>",
"gender": "male",
"dominant_arm": "left",
"dominant_leg": "left",
"activity": "baseball",
"positions": [
"<string>"
],
"competition_level": "youth",
"height": 123,
"weight": 123,
"custom_attributes": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "BadRequest",
"message": "The request parameters are invalid. Please review the request and try again."
}{
"error": "Unauthorized",
"message": "Bearer token is missing or invalid."
}{
"error": "Forbidden",
"message": "You do not have permission to access this resource."
}{
"error": "TooManyRequests",
"message": "The rate limit has been exceeded. Please wait and try again later."
}{
"error": "InternalServerError",
"message": "An unexpected error occurred on the server. Please try again later."
}Update Athlete
Use this endpoint to update an athlete’s attributes. You can modify all attributes, following specific rules for certain fields and custom attributes. Include only the attributes you wish to update or new custom attributes to add in the request body.
curl --request POST \
--url https://api.uplift.ai/v1/athletes/{athleteId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "<string>",
"email": "<string>",
"phone": "<string>",
"height": 123,
"weight": 123,
"positions": [
"<string>"
],
"custom_attributes": {}
}
'import requests
url = "https://api.uplift.ai/v1/athletes/{athleteId}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "<string>",
"email": "<string>",
"phone": "<string>",
"height": 123,
"weight": 123,
"positions": ["<string>"],
"custom_attributes": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
date_of_birth: '<string>',
email: '<string>',
phone: '<string>',
height: 123,
weight: 123,
positions: ['<string>'],
custom_attributes: {}
})
};
fetch('https://api.uplift.ai/v1/athletes/{athleteId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uplift.ai/v1/athletes/{athleteId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'date_of_birth' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'height' => 123,
'weight' => 123,
'positions' => [
'<string>'
],
'custom_attributes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.uplift.ai/v1/athletes/{athleteId}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"height\": 123,\n \"weight\": 123,\n \"positions\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.uplift.ai/v1/athletes/{athleteId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"height\": 123,\n \"weight\": 123,\n \"positions\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uplift.ai/v1/athletes/{athleteId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"height\": 123,\n \"weight\": 123,\n \"positions\": [\n \"<string>\"\n ],\n \"custom_attributes\": {}\n}"
response = http.request(request)
puts response.read_body{
"athlete": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-11-07T05:31:56Z",
"email": "<string>",
"phone": "<string>",
"gender": "male",
"dominant_arm": "left",
"dominant_leg": "left",
"activity": "baseball",
"positions": [
"<string>"
],
"competition_level": "youth",
"height": 123,
"weight": 123,
"custom_attributes": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "BadRequest",
"message": "The request parameters are invalid. Please review the request and try again."
}{
"error": "Unauthorized",
"message": "Bearer token is missing or invalid."
}{
"error": "Forbidden",
"message": "You do not have permission to access this resource."
}{
"error": "TooManyRequests",
"message": "The rate limit has been exceeded. Please wait and try again later."
}{
"error": "InternalServerError",
"message": "An unexpected error occurred on the server. Please try again later."
}Attribute Modification
All attributes of the athlete can be updated. Include only the attributes you wish to change — omitted attributes are left unchanged. The following rules apply:-
String Attributes:
- String values can be updated to any non-empty string.
- String values can be set to an empty string (
"") ornullto clear the attribute.
-
Integer Attributes:
- Integer values can be updated to any valid integer.
- Integer values can be set to
0ornullto clear the attribute.
-
Special Rules for
first_name:- The
first_nameattribute, if included, cannot be empty. It must always contain a non-empty string.
- The
-
Custom Attributes (
custom_attributes):- Updates are merged with the athlete’s existing custom attributes:
- Keys omitted from the request are left unchanged.
- Keys set to a non-empty string are created or updated.
- Keys set to
nullare deleted from thecustom_attributesobject.
- Empty strings (
"") and non-string values are not valid custom attribute values and return a400error. - New custom attributes must follow the same key rules as described in the
createAthleteendpoint.
- Updates are merged with the athlete’s existing custom attributes:
Example Request
POST /athletes/12345
{
"last_name": "",
"email": "john@example.com",
"weight": 0,
"custom_attributes": {
"team": "Team B",
"position": "pitcher",
"sport": null
}
}
last_name and weight are cleared, email is updated, the team and position custom attributes are created or updated, and the sport custom attribute is deleted.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier for the athlete record to be retrieved.
Body
The first name of the athlete.
Note: This is the minimum required field.
The last name of the athlete.
The date of birth of the athlete, formatted as YYYY-MM-DD
The athlete's email address.
The athlete's phone number.
The athlete's gender. Allowed values: male, female, non-binary, prefer_not_to_say.
male, female, non-binary, prefer_not_to_say The height of the athlete, in inches.
The weight of the athlete, in pounds (lbs).
Dominant arm. Allowed values: left, right, both.
left, right, both Dominant leg. Allowed values: left, right, both.
left, right, both Primary sport or activity. Allowed values: baseball, softball, tennis, basketball, golf.
baseball, softball, tennis, basketball, golf Positions for the athlete's activity. Requires activity to be set. baseball/softball: pitcher, catcher, first_base, second_base, third_base, shortstop, left_field, center_field, right_field, designated_hitter. basketball: point_guard, shooting_guard, small_forward, power_forward, center.
Competition level. Allowed values: youth, high_school, college, professional.
youth, high_school, college, professional A set of custom key-value attributes, merged with the athlete's existing custom attributes. Keys must be strings, and values must be non-empty strings or null. Keys omitted from the request are left unchanged, keys set to a non-empty string are created or updated, and keys set to null are deleted.
Show child attributes
Show child attributes
Response
Athlete updated successfully.
Show child attributes
Show child attributes