Update the current profile
curl --request PATCH \
--url https://swish.app/api/2026-07/profiles/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"phone": "+353123456789",
"about": "About me",
"birthdate": "1990-01-01",
"marketingConsent": {
"email": false,
"phone": false
}
}
'import requests
url = "https://swish.app/api/2026-07/profiles/profile"
payload = {
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"phone": "+353123456789",
"about": "About me",
"birthdate": "1990-01-01",
"marketingConsent": {
"email": False,
"phone": False
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'John',
lastName: 'Doe',
email: 'john@example.com',
phone: '+353123456789',
about: 'About me',
birthdate: '1990-01-01',
marketingConsent: {email: false, phone: false}
})
};
fetch('https://swish.app/api/2026-07/profiles/profile', 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://swish.app/api/2026-07/profiles/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'John',
'lastName' => 'Doe',
'email' => 'john@example.com',
'phone' => '+353123456789',
'about' => 'About me',
'birthdate' => '1990-01-01',
'marketingConsent' => [
'email' => false,
'phone' => false
]
]),
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://swish.app/api/2026-07/profiles/profile"
payload := strings.NewReader("{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+353123456789\",\n \"about\": \"About me\",\n \"birthdate\": \"1990-01-01\",\n \"marketingConsent\": {\n \"email\": false,\n \"phone\": false\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://swish.app/api/2026-07/profiles/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+353123456789\",\n \"about\": \"About me\",\n \"birthdate\": \"1990-01-01\",\n \"marketingConsent\": {\n \"email\": false,\n \"phone\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://swish.app/api/2026-07/profiles/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+353123456789\",\n \"about\": \"About me\",\n \"birthdate\": \"1990-01-01\",\n \"marketingConsent\": {\n \"email\": false,\n \"phone\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "gid://shopify/Customer/123456789",
"displayName": "John Doe",
"about": "",
"addresses": [],
"notifications": {
"priceDrop": true,
"backInStock": true,
"lowInStock": true
},
"marketingConsent": {
"email": false,
"phone": false
},
"firstName": "John",
"lastName": "Doe",
"email": "customer@example.com",
"phone": "+353123456789",
"birthdate": "1990-01-01",
"defaultAddress": {
"id": "gid://shopify/MailingAddress/123?model_name=CustomerAddress",
"address1": "123 Main St",
"address2": "Apt 4",
"city": "Dublin",
"province": "Leinster",
"country": "Ireland",
"zip": "D01 X2Y3",
"phone": "+353 1 234 5678",
"formattedArea": "Ireland"
}
}
}{
"error": {
"message": "Validation failed",
"error": "Bad Request",
"statusCode": 400,
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"error": {
"message": "Failed to authenticate request",
"error": "Unauthorized",
"statusCode": 401,
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"error": {
"message": "You do not have permission to access this resource",
"error": "Forbidden",
"statusCode": 403,
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"error": {
"message": "The requested resource was not found",
"error": "Not Found",
"statusCode": 404,
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"error": {
"message": "An unexpected error occurred",
"error": "Internal Server Error",
"statusCode": 500,
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}Profiles
Update the current profile
Updates profile fields such as about text, notification preferences, and marketing consent
PATCH
/
profiles
/
profile
Update the current profile
curl --request PATCH \
--url https://swish.app/api/2026-07/profiles/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"phone": "+353123456789",
"about": "About me",
"birthdate": "1990-01-01",
"marketingConsent": {
"email": false,
"phone": false
}
}
'import requests
url = "https://swish.app/api/2026-07/profiles/profile"
payload = {
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"phone": "+353123456789",
"about": "About me",
"birthdate": "1990-01-01",
"marketingConsent": {
"email": False,
"phone": False
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'John',
lastName: 'Doe',
email: 'john@example.com',
phone: '+353123456789',
about: 'About me',
birthdate: '1990-01-01',
marketingConsent: {email: false, phone: false}
})
};
fetch('https://swish.app/api/2026-07/profiles/profile', 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://swish.app/api/2026-07/profiles/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'John',
'lastName' => 'Doe',
'email' => 'john@example.com',
'phone' => '+353123456789',
'about' => 'About me',
'birthdate' => '1990-01-01',
'marketingConsent' => [
'email' => false,
'phone' => false
]
]),
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://swish.app/api/2026-07/profiles/profile"
payload := strings.NewReader("{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+353123456789\",\n \"about\": \"About me\",\n \"birthdate\": \"1990-01-01\",\n \"marketingConsent\": {\n \"email\": false,\n \"phone\": false\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://swish.app/api/2026-07/profiles/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+353123456789\",\n \"about\": \"About me\",\n \"birthdate\": \"1990-01-01\",\n \"marketingConsent\": {\n \"email\": false,\n \"phone\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://swish.app/api/2026-07/profiles/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"+353123456789\",\n \"about\": \"About me\",\n \"birthdate\": \"1990-01-01\",\n \"marketingConsent\": {\n \"email\": false,\n \"phone\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "gid://shopify/Customer/123456789",
"displayName": "John Doe",
"about": "",
"addresses": [],
"notifications": {
"priceDrop": true,
"backInStock": true,
"lowInStock": true
},
"marketingConsent": {
"email": false,
"phone": false
},
"firstName": "John",
"lastName": "Doe",
"email": "customer@example.com",
"phone": "+353123456789",
"birthdate": "1990-01-01",
"defaultAddress": {
"id": "gid://shopify/MailingAddress/123?model_name=CustomerAddress",
"address1": "123 Main St",
"address2": "Apt 4",
"city": "Dublin",
"province": "Leinster",
"country": "Ireland",
"zip": "D01 X2Y3",
"phone": "+353 1 234 5678",
"formattedArea": "Ireland"
}
}
}{
"error": {
"message": "Validation failed",
"error": "Bad Request",
"statusCode": 400,
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"error": {
"message": "Failed to authenticate request",
"error": "Unauthorized",
"statusCode": 401,
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"error": {
"message": "You do not have permission to access this resource",
"error": "Forbidden",
"statusCode": 403,
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"error": {
"message": "The requested resource was not found",
"error": "Not Found",
"statusCode": 404,
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"error": {
"message": "An unexpected error occurred",
"error": "Internal Server Error",
"statusCode": 500,
"requestId": "123e4567-e89b-12d3-a456-426614174000"
}
}Body
application/json
First name
Example:
"John"
Last name
Example:
"Doe"
Email address
Example:
"john@example.com"
Phone number
Example:
"+353123456789"
About text (metafield)
Example:
"About me"
Notification preferences (metafield)
Show child attributes
Show child attributes
Birthdate (metafield, ISO 8601 date). Send null to clear.
Example:
"1990-01-01"
Marketing consent preferences
Show child attributes
Show child attributes
Response
The profile has been updated
Response data
Show child attributes
Show child attributes