Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
This API is not authenticated.
Endpoints
GET api/health
requires authentication
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/health" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/health"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"ok": 200
}
Received response:
Request failed with error:
Global settings
This endpoint is used to know the state of the API.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"maintenance": 0,
"versions": {
"latest": 1,
"required": 1
}
}
Received response:
Request failed with error:
Verify email
This endpoint lets you check the availability of an email address.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/auth/verify-email" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"jcasper@example.org\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/auth/verify-email"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "jcasper@example.org"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Register
This endpoint lets you register.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/auth/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"laudantium\",
\"last_name\": \"autem\",
\"email\": \"fzieme@example.org\",
\"password\": \"7n\'}Z4UN{$fU^@\",
\"gender\": \"doloremque\",
\"status\": \"sapiente\",
\"locale\": \"fo_FO\",
\"token\": \"eos\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/auth/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "laudantium",
"last_name": "autem",
"email": "fzieme@example.org",
"password": "7n'}Z4UN{$fU^@",
"gender": "doloremque",
"status": "sapiente",
"locale": "fo_FO",
"token": "eos"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Login
This endpoint lets you login.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"alia51@example.org\",
\"password\": \"iXQ6*KH*CnS$\",
\"token\": \"aliquam\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "alia51@example.org",
"password": "iXQ6*KH*CnS$",
"token": "aliquam"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Forgot password
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/forgot-password" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"iwill@example.com\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/forgot-password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "iwill@example.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Reset password
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/reset-password" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token\": \"ut\",
\"email\": \"brando45@example.net\",
\"password\": \"f*[{tEhMOq\",
\"password_confirmation\": \"consequatur\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/reset-password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "ut",
"email": "brando45@example.net",
"password": "f*[{tEhMOq",
"password_confirmation": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Logout
requires authentication
This endpoint lets you logout, and delete the token associated with your session.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/auth/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/auth/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List of artworks
requires authentication
This endpoint is used to get the the current user's artworks.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/artworks" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/artworks"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Create a new artwork
requires authentication
This endpoint is used to create a new artwork.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/artworks" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Mona Lisa\",
\"creation_year\": 1503,
\"dimensions\": \"77 cm × 53 cm\",
\"medium\": \"oil painting\",
\"typology\": \"Painting\",
\"status\": \"Available\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/artworks"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Mona Lisa",
"creation_year": 1503,
"dimensions": "77 cm × 53 cm",
"medium": "oil painting",
"typology": "Painting",
"status": "Available"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get one artwork
requires authentication
This endpoint is used to get details about one artwork.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/artworks/nobis" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/artworks/nobis"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Modify one artwork
requires authentication
This endpoint is used to update one artwork.
Example request:
curl --request PATCH \
"https://dev-api.atfu.io/api/artworks/laboriosam" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Mona Lisa\",
\"creation_year\": 1503,
\"dimensions\": \"77 cm × 53 cm\",
\"medium\": \"oil painting\",
\"typology\": \"Painting\",
\"status\": \"Available\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/artworks/laboriosam"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Mona Lisa",
"creation_year": 1503,
"dimensions": "77 cm × 53 cm",
"medium": "oil painting",
"typology": "Painting",
"status": "Available"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete one artwork
requires authentication
This endpoint is used to delete one artwork.
Example request:
curl --request DELETE \
"https://dev-api.atfu.io/api/artworks/nostrum" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/artworks/nostrum"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Add media to artwork
requires authentication
This endpoint is used to add a new image to an existing artwork If the type specified is MainPicture and there is another one already, the existing one will become SecondaryPicture.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/artworks/aspernatur/media" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "credits=Leonardo Da Vinci" \
--form "type=MainPicture" \
--form "media=@/tmp/phpFKPipA"
const url = new URL(
"https://dev-api.atfu.io/api/artworks/aspernatur/media"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('credits', 'Leonardo Da Vinci');
body.append('type', 'MainPicture');
body.append('media', document.querySelector('input[name="media"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Ignore one artwork
requires authentication
This endpoint is used to ignore one artwork (swipe left).
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/artworks/quam/hide" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/artworks/quam/hide"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Un-ignore one artwork
requires authentication
This endpoint is used to un-ignore one artwork (swipe right when viewing already seen artworks).
Example request:
curl --request DELETE \
"https://dev-api.atfu.io/api/artworks/non/hide" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/artworks/non/hide"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Like one artwork
requires authentication
This endpoint is used to like one artwork (swipe right).
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/artworks/modi/like" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/artworks/modi/like"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Un-like one artwork
requires authentication
This endpoint is used to un-like one artwork.
Example request:
curl --request DELETE \
"https://dev-api.atfu.io/api/artworks/eos/like" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/artworks/eos/like"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Show artwork in swipe
requires authentication
This endpoint is used to make an artwork visible for other users.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/artworks/sed/visible" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/artworks/sed/visible"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Hide artwork from swipe
requires authentication
This endpoint is used to hide an artwork from other users.
Example request:
curl --request DELETE \
"https://dev-api.atfu.io/api/artworks/ipsum/visible" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/artworks/ipsum/visible"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List of liked artworks
requires authentication
This endpoint is used to get the list of liked artworks.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/liked-artworks" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/liked-artworks"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
List of visible artworks
requires authentication
This endpoint is used for the swipe list.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/visible-artworks?force=" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/visible-artworks"
);
const params = {
"force": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
List of conversations
requires authentication
This endpoint is used to get the list of conversations.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/conversations" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/conversations"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
List of conversation messages
requires authentication
This endpoint is used to get the messages of a conversation.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/conversations/quia/messages" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/conversations/quia/messages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Send a message in a conversation
requires authentication
This endpoint is used to get the messages of a conversation.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/conversations/vitae/messages" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"message\": null
}"
const url = new URL(
"https://dev-api.atfu.io/api/conversations/vitae/messages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"message": null
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
List of exhibitions
requires authentication
This endpoint is used to get the list of exhibitions.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/exhibitions" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/exhibitions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Create a new exhibition
requires authentication
This endpoint is used to create a new exhibition.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/exhibitions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Exhibition no. 1\",
\"started_at\": \"2023-01-01\",
\"ended_at\": \"2024-01-01\",
\"type\": null,
\"curator\": null,
\"location\": null,
\"other_artists\": \"Sirine Ammar, Clara Citron\",
\"links\": [
\"https:\\/\\/exhibition.com\\/1\",
\"https:\\/\\/exhibition.com\\/2\"
]
}"
const url = new URL(
"https://dev-api.atfu.io/api/exhibitions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Exhibition no. 1",
"started_at": "2023-01-01",
"ended_at": "2024-01-01",
"type": null,
"curator": null,
"location": null,
"other_artists": "Sirine Ammar, Clara Citron",
"links": [
"https:\/\/exhibition.com\/1",
"https:\/\/exhibition.com\/2"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get one exhibition
requires authentication
This endpoint is used to get details about one exhibition.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/exhibitions/quo" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/exhibitions/quo"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Modify one exhibition
requires authentication
This endpoint is used to update one exhibition.
Example request:
curl --request PATCH \
"https://dev-api.atfu.io/api/exhibitions/et" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Exhibition no. 1\",
\"started_at\": \"2023-01-01\",
\"ended_at\": \"2024-01-01\",
\"type\": null,
\"curator\": null,
\"location\": null,
\"other_artists\": \"Sirine Ammar, Clara Citron\",
\"links\": [
\"https:\\/\\/exhibition.com\\/1\",
\"https:\\/\\/exhibition.com\\/2\"
]
}"
const url = new URL(
"https://dev-api.atfu.io/api/exhibitions/et"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Exhibition no. 1",
"started_at": "2023-01-01",
"ended_at": "2024-01-01",
"type": null,
"curator": null,
"location": null,
"other_artists": "Sirine Ammar, Clara Citron",
"links": [
"https:\/\/exhibition.com\/1",
"https:\/\/exhibition.com\/2"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete one exhibition
requires authentication
This endpoint is used to delete one exhibition.
Example request:
curl --request DELETE \
"https://dev-api.atfu.io/api/exhibitions/quam" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/exhibitions/quam"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Add media to exhibition
requires authentication
This endpoint is used to add a new image to an existing exhibition If there is already an image, it will delete it before adding the new one.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/exhibitions/sunt/media" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "credits=Leonardo Da Vinci" \
--form "media=@/tmp/phpLlicab"
const url = new URL(
"https://dev-api.atfu.io/api/exhibitions/sunt/media"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('credits', 'Leonardo Da Vinci');
body.append('media', document.querySelector('input[name="media"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Show media
requires authentication
This endpoint is used to display a media, as they are not directly accessible from the storage system, for security reasons.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/media/non" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/media/non"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Update media
requires authentication
This endpoint is used to update a file information If media belongs to an artwork,the type specified is MainPicture and there is another one present already then the existing one will become SecondaryPicture.
Example request:
curl --request PATCH \
"https://dev-api.atfu.io/api/media/et" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"credits\": \"Leonardo Da Vinci\",
\"type\": \"MainPicture\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/media/et"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"credits": "Leonardo Da Vinci",
"type": "MainPicture"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete media
requires authentication
This endpoint is used to delete a file
Example request:
curl --request DELETE \
"https://dev-api.atfu.io/api/media/sit" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/media/sit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Get profile
requires authentication
This endpoint is used to get the current user's profile.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/profile" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/profile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Modify profile
requires authentication
This endpoint is used to update the current user's profile.
Example request:
curl --request PATCH \
"https://dev-api.atfu.io/api/profile" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"trijfmwyyjwobgmtshnkcoxdf\",
\"last_name\": \"ffsarhgwlwaudukbrkfxvdra\",
\"email\": \"louvenia57@example.com\",
\"gender\": \"nihil\",
\"status\": \"dolores\",
\"locale\": \"eum\",
\"birth_date\": \"2023-02-20T15:40:57\",
\"studies\": \"delectus\",
\"gallery\": \"consequatur\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/profile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "trijfmwyyjwobgmtshnkcoxdf",
"last_name": "ffsarhgwlwaudukbrkfxvdra",
"email": "louvenia57@example.com",
"gender": "nihil",
"status": "dolores",
"locale": "eum",
"birth_date": "2023-02-20T15:40:57",
"studies": "delectus",
"gallery": "consequatur"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Modify user's notification preferences
requires authentication
This endpoint is used to update the user's notification preferences.
Example request:
curl --request PATCH \
"https://dev-api.atfu.io/api/profile/notification-preferences" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"notification_preferences\": [
{
\"id\": \"123\",
\"is_enabled\": true
},
{
\"id\": \"456\",
\"is_enabled\": false
}
]
}"
const url = new URL(
"https://dev-api.atfu.io/api/profile/notification-preferences"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"notification_preferences": [
{
"id": "123",
"is_enabled": true
},
{
"id": "456",
"is_enabled": false
}
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete profile
requires authentication
This endpoint is used to delete the current user's account. (delete account)
Example request:
curl --request DELETE \
"https://dev-api.atfu.io/api/profile" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/profile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List of propositions
requires authentication
This endpoint is used to get the list of all propositions.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/propositions" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/propositions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Send a new proposition
requires authentication
This endpoint is used to send a new proposition to another user.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/propositions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"artwork_id\": \"beatae\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/propositions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"artwork_id": "beatae"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get one proposition
requires authentication
This endpoint is used to get details about one proposition.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/propositions/unde" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/propositions/unde"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Delete one proposition
requires authentication
This endpoint is used to delete one proposition.
Example request:
curl --request DELETE \
"https://dev-api.atfu.io/api/propositions/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/propositions/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Accept proposition
requires authentication
This endpoint is used to accept a proposition by sending which artwork the user is interested in.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/propositions/eaque/accept" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"artwork_id\": \"rerum\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/propositions/eaque/accept"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"artwork_id": "rerum"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Mark proposition as complete
requires authentication
This endpoint is used to mark a proposition as complete. As a side effect, all the propositions related to the artworks of the proposition will be marked as "Too late".
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/propositions/officia/complete" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/propositions/officia/complete"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List of user notes
requires authentication
This endpoint is used to get the the current user's notes.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/user-notes" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/user-notes"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Create a new note
requires authentication
This endpoint is used to create a new note.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/user-notes" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"First note\",
\"description\": null
}"
const url = new URL(
"https://dev-api.atfu.io/api/user-notes"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "First note",
"description": null
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get one note
requires authentication
This endpoint is used to get details about one note.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/user-notes/doloribus" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/user-notes/doloribus"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Modify one note
requires authentication
This endpoint is used to update one note.
Example request:
curl --request PATCH \
"https://dev-api.atfu.io/api/user-notes/provident" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"First note\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/user-notes/provident"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "First note"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete one note
requires authentication
This endpoint is used to delete one note.
Example request:
curl --request DELETE \
"https://dev-api.atfu.io/api/user-notes/laborum" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/user-notes/laborum"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List of user texts
requires authentication
This endpoint is used to get the the current user's texts.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/user-texts" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/user-texts"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Create a new text
requires authentication
This endpoint is used to create a new text.
Example request:
curl --request POST \
"https://dev-api.atfu.io/api/user-texts" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"First text\",
\"description\": null,
\"type\": null,
\"author\": null,
\"written_at\": null
}"
const url = new URL(
"https://dev-api.atfu.io/api/user-texts"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "First text",
"description": null,
"type": null,
"author": null,
"written_at": null
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Get one text
requires authentication
This endpoint is used to get details about one text.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/user-texts/odit" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/user-texts/odit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Modify one text
requires authentication
This endpoint is used to update one text.
Example request:
curl --request PATCH \
"https://dev-api.atfu.io/api/user-texts/nemo" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"First text\"
}"
const url = new URL(
"https://dev-api.atfu.io/api/user-texts/nemo"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "First text"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Delete one text
requires authentication
This endpoint is used to delete one text.
Example request:
curl --request DELETE \
"https://dev-api.atfu.io/api/user-texts/cum" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/user-texts/cum"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
List of artworks owned by user
requires authentication
This endpoint is used to get the list of the specified user's artworks.
Example request:
curl --request GET \
--get "https://dev-api.atfu.io/api/users/ea/artworks" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://dev-api.atfu.io/api/users/ea/artworks"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error: