Documentation API SyncSpace

Démarrage

Cette section sera disponible bientôt.

Toutes les réponses sont au format JSON sauf indication contraire.

Authentification

Tous les endpoints nécessitent une authentification. Incluez cet en-tête avec chaque requête:

{
    "Authorization": "Bearer VOTRE_CLE_API"
}

Points d'accès

Conversations

POST /api/conversation/new

Create a new conversation.

{
    "userIds": [1, 2, 3],
    "name": "My Conversation",
    "avatar": "https://example.com/avatar.png"
}
GET /api/conversation/{id}

Show a conversation.

GET /api/conversations

Show all conversations.

DELETE /api/conversation/remove/{id}

Remove a conversation.

PUT /api/conversation/edit/{id}

Edit a conversation.

POST /api/conversation/{id}/message/new

Envoyer un message.

{
    "content": "Hello, world!",
    "type": "text",
    "attachment": ""
}
POST /api/conversation/{id}/message/new/audio

Send an audio message (multipart/form-data with 'audio' file).

POST /api/conversation/{id}/message/new/media

Send an image message (multipart/form-data with 'media' file).

POST /api/conversation/{id}/message/new/gif

Envoyer un message GIF.

{
    "gifUrl": "https://example.com/my.gif"
}
DELETE /api/conversation/message/remove/{id}

Remove a message.

PUT /api/conversation/message/edit/{id}

Edit a message.

POST /api/conversation/user/search

Rechercher un utilisateur.

{
    "username": "john.doe"
}

Utilisateurs

PUT /api/user/setOnline/{email}

Set user online.

PUT /api/user/setOffline/{email}

Set user offline.

Contact

POST /api/contact/

Formulaire de contact.

{
    "name": "John Doe",
    "email": "john.doe@example.com",
    "message": "Hello, I have a question."
}

Événements

GET /api/events/all

Get all events.

POST /api/events/create

Créer un événement.

{
    "title": "My Event",
    "start": "2025-08-25T10:00:00",
    "end": "2025-08-25T11:00:00",
    "isAllDay": false,
    "participantsIds": [1, 2, 3]
}
DELETE /api/events/remove/{id}

Remove an event.

PUT /api/events/update/{id}

Update an event.

Musique

GET /api/music/favorites/index

List favorite tracks.

POST /api/music/favorites/add/{trackId}

Add a track to favorites.

DELETE /api/music/favorites/remove/{trackId}

Remove a track from favorites.

GET /api/music/favorites/quantity

Get the quantity of favorite tracks.

POST /api/music/favorites/isFavorite

Vérifier si une piste est en favori.

{
    "videoId": "your_video_id"
}
GET /api/music/playlists

Show all playlists.

POST /api/music/playlist/create

Créer une playlist.

{
    "name": "My Playlist"
}
POST /api/music/playlist/add-track

Ajouter une piste à une playlist.

{
    "playlistId": 1,
    "trackId": "your_track_id"
}
GET /api/music/playlist/index

List all playlists.

POST /api/music/playlist/new

Créer une nouvelle playlist.

{
     "name": "My Playlist"
}
GET /api/music/playlist/quantity

Get the quantity of playlists.

GET /api/music/playlist/{id}

Get tracks from a playlist.

DELETE /api/music/playlist/remove/{id}

Remove a playlist.

PUT /api/music/playlist/update/{id}

Update a playlist.

GET /api/music/history

List track history.

POST /api/music/history/add

Add a track to history.

GET /api/music/youtube/search

Search on YouTube.

Fichiers

POST /api/files/upload/{folderId}

Upload a file to a folder (multipart/form-data with 'file').

POST /api/files/upload

Upload a file (multipart/form-data with 'file').

GET /api/files/all

Get all files from a user.

GET /api/files/download/{id}

Download a file.

DELETE /api/files/remove/{id}

Delete a file.

POST /api/files/share/{id}

Partager un fichier.

{
    "userIds": [1, 2, 3]
}
POST /api/files/revoke/{id}

Révoquer l'accès à un fichier.

{
    "userIds": [1, 2, 3]
}
GET /api/files/show/{id}

Get file data.

GET /api/files/recent

Get recent files.

GET /api/files/folders

List all folders.

GET /api/files/documents

List all documents.

GET /api/files/images

List all images.

POST /api/files/folder/create

Créer un dossier.

{
    "folderName": "My New Folder",
    "parentId": 123
}
GET /api/files/folder/{id}

Get children of a folder.

POST /api/files/move/{id}

Déplacer un fichier.

{
     "newParentId": 456
}
GET /api/files/preview/{id}

Preview a file.

Connexion

ANY /api/auth/google

Google login.

ANY /api/auth/google/callback

Google callback.

ANY /login

Login.

ANY /logout

Logout.

ANY /register

Register.

POST /api/register

Inscription via API.

{
    "email": "user@example.com",
    "password": "password",
    "firstName": "John",
    "lastName": "Doe"
}
POST /api/sendVerificationCode/{id}

Send verification code.

POST /api/verifyVerificationCode

Envoyer un code de vérification.

{
    "userId": 1,
    "code": "123456"
}
ANY /api/login_check

Check login.

Email

ANY /email

Send an email.

Notes

GET /api/notes

List all notes.

PUT /api/note/save/{id}

Update a note.

POST /api/note/save

Enregistrer une nouvelle note.

{
    "title": "My Note",
    "content": "This is the content of my note."
}
DELETE /api/note/remove/{id}

Remove a note.

Notifications

GET /api/notifications/all

Get all notifications.

POST /api/notifications/new

Créer une nouvelle notification.

{
    "title": "New Notification",
    "content": "This is a new notification.",
    "userId": 1
}
PUT /api/notifications/{id}/read

Mark a notification as read.

PUT /api/notifications/readAll

Mark all notifications as read.

Mots de passe

POST /api/passwords/add

Ajouter un mot de passe.

{
    "url": "https://example.com",
    "name": "Example",
    "email": "user@example.com",
    "passwordEncrypted": "encrypted_password",
    "iv": "initialization_vector",
    "notes": "This is a note.",
    "isFavorite": false
}
GET /api/passwords/list

List all passwords.

POST /api/passwords/set-master-password

Définir un mot de passe principal.

{
    "masterPassword": "my_master_password"
}
GET /api/passwords/get-master-password-hash

Get the master password hash.

GET /api/passwords/count

Get the number of passwords.

PATCH /api/passwords/update/{id}

Mettre à jour un mot de passe.

{
    "url": "https://new-example.com",
    "name": "New Example"
}
DELETE /api/passwords/remove/{id}

Remove a password item.

PATCH /api/passwords/toggle-favorite/{id}

Toggle a password item as favorite.

Recommandations

GET /api/recommendations

Get recommendations.

GET /api/discover

Discover new content.

Pistes

GET /api/track/search

Search for a track.

GET /api/track/suggest

Suggest a track.

POST /api/track/add

Ajouter une piste.

{
    "youtubeId": "your_youtube_id",
    "title": "My Track",
    "artist": "My Artist",
    "genre": "My Genre"
}
POST /api/track/setCurrentTrack

Définir la piste actuelle de l'utilisateur.

{
    "trackId": "your_track_id"
}
POST /api/track/like

Aimer une piste.

{
    "track": {
        "title": "My Track",
        "youtubeId": "your_youtube_id",
        "artist": "My Artist",
        "coverUrl": "https://example.com/cover.jpg"
    }
}

Paramètres

POST /api/settings/enable-disable-notifications

Activer ou désactiver les notifications.

{
    "notifications_enabled": true
}
POST /api/settings/enable-disable-geolocation

Activer ou désactiver la géolocalisation.

{
    "geolocation_enabled": true
}
POST /api/settings/update-theme-preference

Mettre à jour la préférence de thème.

{
    "theme": "dark"
}
POST /api/settings/update-current-track

Mettre à jour la piste actuelle.

{
    "youtubeId": "your_youtube_id",
    "title": "My Track",
    "artist": "My Artist",
    "coverUrl": "https://example.com/cover.jpg"
}
GET /api/settings/current-track

Get the current track.

Loading…
Loading the web debug toolbar…
Attempt #