MENU navbar-image

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
}
 

Request   

GET api/health

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request   

GET api/status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request   

POST api/auth/verify-email

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: jcasper@example.org

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());

Request   

POST api/auth/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_name   string   

Example: laudantium

last_name   string   

Example: autem

email   string   

Must be a valid email address. Example: fzieme@example.org

password   string   

Example: 7n'}Z4UN{$fU^@

gender   string   

Example: doloremque

status   string   

Example: sapiente

locale   string  optional  

Example: fo_FO

token   string   

Example: eos

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());

Request   

POST api/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Must not be greater than 255 characters. Example: alia51@example.org

password   string   

Must not be greater than 255 characters. Example: iXQ6*KH*CnS$

token   string   

Example: aliquam

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());

Request   

POST api/forgot-password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   email   

The user's email. Example: iwill@example.com

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());

Request   

POST api/reset-password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

token   string   

The token sent by email. Example: ut

email   email   

The user's email. Example: brando45@example.net

password   string   

The new password. Example: f*[{tEhMOq

password_confirmation   string   

The new password. Example: consequatur

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());

Request   

POST api/auth/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request   

GET api/artworks

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request   

POST api/artworks

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title of the artwork. Example: Mona Lisa

creation_year   integer   

The creation year of the artwork. Example: 1503

dimensions   string   

The dimensions of the artwork. Example: 77 cm × 53 cm

medium   string   

The medium used to create the artwork. Example: oil painting

typology   string   

The typology of the artwork. Example: Painting

status   string   

The status of the artwork. Example: Available

description   string  optional  

A description of the artwork.

items   string  optional  

If the artwork is unique or not.

price   integer  optional  

The price of the artwork.

currency   string  optional  

The price's currency.

collection   string  optional  

The collection which the artwork comes from.

instructions   string  optional  

How to handle the artwork.

framing   string  optional  

The framing of the artwork.

location   string  optional  

The location of the artwork.

is_enabled   boolean  optional  

If the artwork is visible in the swipe.

notes   string  optional  

Some notes related to the artwork.

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

Request   

GET api/artworks/{artwork_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

artwork_id   string   

The ID of the artwork. Example: nobis

artwork   string  optional  

uuid required The ID of the artwork. Example: voluptatem

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());

Request   

PATCH api/artworks/{artwork_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

artwork_id   string   

The ID of the artwork. Example: laboriosam

artwork   string  optional  

uuid required The ID of the artwork. Example: cum

Body Parameters

title   string   

The title of the artwork. Example: Mona Lisa

creation_year   integer   

The creation year of the artwork. Example: 1503

dimensions   string   

The dimensions of the artwork. Example: 77 cm × 53 cm

medium   string   

The medium used to create the artwork. Example: oil painting

typology   string   

The typology of the artwork. Example: Painting

status   string   

The status of the artwork. Example: Available

description   string  optional  

A description of the artwork.

items   string  optional  

If the artwork is unique or not.

price   integer  optional  

The price of the artwork.

currency   string  optional  

The price's currency.

collection   string  optional  

The collection which the artwork comes from.

instructions   string  optional  

How to handle the artwork.

framing   string  optional  

The framing of the artwork.

location   string  optional  

The location of the artwork.

is_enabled   boolean  optional  

If the artwork is visible in the swipe.

notes   string  optional  

Some notes related to the artwork.

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());

Request   

DELETE api/artworks/{artwork_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

artwork_id   string   

The ID of the artwork. Example: nostrum

artwork   string  optional  

uuid required The ID of the artwork. Example: ipsum

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());

Request   

POST api/artworks/{artwork_id}/media

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

artwork_id   string   

The ID of the artwork. Example: aspernatur

artwork   string  optional  

uuid required The ID of the artwork. Example: voluptas

Body Parameters

media   file   

The media. Example: /tmp/phpFKPipA

credits   string   

The credits. Example: Leonardo Da Vinci

type   string   

The type of media. Example: MainPicture

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());

Request   

POST api/artworks/{artwork_id}/hide

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

artwork_id   string   

The ID of the artwork. Example: quam

artwork   string  optional  

uuid required The ID of the artwork. Example: quis

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());

Request   

DELETE api/artworks/{artwork_id}/hide

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

artwork_id   string   

The ID of the artwork. Example: non

artwork   string  optional  

uuid required The ID of the artwork. Example: magni

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());

Request   

POST api/artworks/{artwork_id}/like

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

artwork_id   string   

The ID of the artwork. Example: modi

artwork   string  optional  

uuid required The ID of the artwork. Example: qui

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());

Request   

DELETE api/artworks/{artwork_id}/like

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

artwork_id   string   

The ID of the artwork. Example: eos

artwork   string  optional  

uuid required The ID of the artwork. Example: iure

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());

Request   

POST api/artworks/{artwork_id}/visible

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

artwork_id   string   

The ID of the artwork. Example: sed

artwork   string  optional  

uuid required The ID of the artwork. Example: iusto

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());

Request   

DELETE api/artworks/{artwork_id}/visible

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

artwork_id   string   

The ID of the artwork. Example: ipsum

artwork   string  optional  

uuid required The ID of the artwork. Example: suscipit

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

Request   

GET api/liked-artworks

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request   

GET api/visible-artworks

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

force   boolean  optional  

This gets the artworks that were seen and hidden by the user. Example: false

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

Request   

GET api/conversations

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request   

GET api/conversations/{conversation_id}/messages

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

conversation_id   string   

The ID of the conversation. Example: quia

conversation   string  optional  

uuid required The ID of the conversation. Example: enim

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());

Request   

POST api/conversations/{conversation_id}/messages

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

conversation_id   string   

The ID of the conversation. Example: vitae

conversation   string  optional  

uuid required The ID of the conversation. Example: inventore

Body Parameters

message   string   

The content of the message.

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

Request   

GET api/exhibitions

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request   

POST api/exhibitions

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title of the exhibition. Example: Exhibition no. 1

started_at   date  optional  

The date when the exhibition starts or started. Example: 2023-01-01

ended_at   date  optional  

The date when the exhibition ended or will end. Example: 2024-01-01

type   string   

The type of exhibition.

curator   string   

The curator of the exhibition.

location   string   

The location of the exhibition.

other_artists   List  optional  

of artists participating in the exhibition. Example: Sirine Ammar, Clara Citron

links   string[]  optional  

Array of URLs linked to the exhibition.

artworks   uuid[]  optional  

Array of artwork IDs linked to the exhibition.

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

Request   

GET api/exhibitions/{exhibition_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

exhibition_id   string   

The ID of the exhibition. Example: quo

exhibition   string  optional  

uuid required The ID of the exhibition. Example: et

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());

Request   

PATCH api/exhibitions/{exhibition_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

exhibition_id   string   

The ID of the exhibition. Example: et

Body Parameters

title   string   

The title of the exhibition. Example: Exhibition no. 1

started_at   date  optional  

The date when the exhibition starts or started. Example: 2023-01-01

ended_at   date  optional  

The date when the exhibition ended or will end. Example: 2024-01-01

type   string   

The type of exhibition.

curator   string   

The curator of the exhibition.

location   string   

The location of the exhibition.

other_artists   List  optional  

of artists participating in the exhibition. Example: Sirine Ammar, Clara Citron

links   string[]  optional  

Array of URLs linked to the exhibition.

artworks   uuid[]  optional  

Array of artwork IDs linked to the exhibition.

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());

Request   

DELETE api/exhibitions/{exhibition_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

exhibition_id   string   

The ID of the exhibition. Example: quam

exhibition   string  optional  

uuid required The ID of the exhibition. Example: aut

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());

Request   

POST api/exhibitions/{exhibition_id}/media

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

exhibition_id   string   

The ID of the exhibition. Example: sunt

exhibition   string  optional  

uuid required The ID of the exhibition. Example: praesentium

Body Parameters

media   file   

The media. Example: /tmp/phpLlicab

credits   string   

The credits. Example: Leonardo Da Vinci

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

Request   

GET api/media/{media_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

media_id   string   

The ID of the media. Example: non

media   string  optional  

uuid required The ID of the media. Example: iste

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());

Request   

PATCH api/media/{media_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

media_id   string   

The ID of the media. Example: et

media   string  optional  

uuid required The ID of the media. Example: dolorem

Body Parameters

credits   string  optional  

The credits. Example: Leonardo Da Vinci

type   string  optional  

The type of media. Example: MainPicture

is_visible   boolean  optional  

Is the file visible?

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());

Request   

DELETE api/media/{media_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

media_id   string   

The ID of the media. Example: sit

media   string  optional  

uuid required The ID of the media. Example: necessitatibus

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

Request   

GET api/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request   

PATCH api/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_name   string   

Must not be greater than 255 characters. Example: trijfmwyyjwobgmtshnkcoxdf

last_name   string   

Must not be greater than 255 characters. Example: ffsarhgwlwaudukbrkfxvdra

email   string   

Must be a valid email address. Must not be greater than 255 characters. Example: louvenia57@example.com

gender   string   

Example: nihil

status   string   

Example: dolores

locale   string   

Example: eum

birth_date   string   

Must be a valid date. Example: 2023-02-20T15:40:57

studies   string   

Example: delectus

gallery   string   

Example: consequatur

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());

Request   

PATCH api/profile/notification-preferences

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

notification_preferences   object[]   

List of notification_preferences to update.

id   string   

Must be a valid UUID. Example: c9e2195f-53a8-3c74-b026-d6e5e3d02c81

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());

Request   

DELETE api/profile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request   

GET api/propositions

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request   

POST api/propositions

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

artwork_id   uuid   

The artwork the user is interested in Example: beatae

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

Request   

GET api/propositions/{proposition_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

proposition_id   string   

The ID of the proposition. Example: unde

proposition   string  optional  

uuid required The ID of the proposition. Example: qui

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());

Request   

DELETE api/propositions/{proposition_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

proposition_id   string   

The ID of the proposition. Example: consequatur

proposition   string  optional  

uuid required The ID of the proposition. Example: architecto

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());

Request   

POST api/propositions/{proposition_id}/accept

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

proposition_id   string   

The ID of the proposition. Example: eaque

proposition   string  optional  

uuid required The ID of the proposition. Example: laudantium

Body Parameters

artwork_id   uuid   

The ID of the artwork the user is interested in. Example: rerum

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());

Request   

POST api/propositions/{proposition_id}/complete

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

proposition_id   string   

The ID of the proposition. Example: officia

proposition   string  optional  

uuid required The ID of the proposition. Example: amet

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

Request   

GET api/user-notes

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request   

POST api/user-notes

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title of the note. Example: First note

description   string   

The content of the note.

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

Request   

GET api/user-notes/{userNote_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

userNote_id   string   

The ID of the userNote. Example: doloribus

userNote   string  optional  

uuid required The ID of the note. Example: quasi

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());

Request   

PATCH api/user-notes/{userNote_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

userNote_id   string   

The ID of the userNote. Example: provident

userNote   string  optional  

uuid required The ID of the note. Example: quia

Body Parameters

title   string  optional  

The title of the note. Example: First note

description   The  optional  

content of the note.

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());

Request   

DELETE api/user-notes/{userNote_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

userNote_id   string   

The ID of the userNote. Example: laborum

userNote   string  optional  

uuid required The ID of the note. Example: illo

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

Request   

GET api/user-texts

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request   

POST api/user-texts

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title of the text. Example: First text

description   string   

The content of the text.

type   string   

The type of text.

author   string   

The author of the text.

written_at   date   

The date when the text was written.

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

Request   

GET api/user-texts/{userText_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

userText_id   string   

The ID of the userText. Example: odit

userText   string  optional  

uuid required The ID of the text. Example: modi

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());

Request   

PATCH api/user-texts/{userText_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

userText_id   string   

The ID of the userText. Example: nemo

userText   string  optional  

uuid required The ID of the text. Example: ut

Body Parameters

title   string  optional  

The title of the text. Example: First text

description   string  optional  

The content of the text.

type   string  optional  

The type of text.

author   string  optional  

The author of the text.

written_at   date  optional  

The date when the text was written.

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());

Request   

DELETE api/user-texts/{userText_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

userText_id   string   

The ID of the userText. Example: cum

userText   string  optional  

uuid required The ID of the text. Example: et

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

Request   

GET api/users/{user_id}/artworks

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   string  optional  

uuid required The ID of the user. Example: ea