Octopost API (0.0.1)

Download OpenAPI specification:Download

user

Operations about user

Create a new user account

This endpoint allows you to create a new user account for the application.

Request Body schema: application/json
required
name
required
string

User account name

username
required
string

User name

email
required
string

Email address for the new user account

password
required
string

Password for the new user account

repeatPassword
required
string

Confirming the user's new password

Responses

Request samples

Content type
application/json
{
  • "name": "John Doe",
  • "username": "johndoe123",
  • "email": "johndoe@example.com",
  • "password": "001@Mypassword",
  • "repeatPassword": "001@Mypassword"
}

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Validation error",
  • "errors": [
    ]
}

Consult user social networks

Retrieves information about the social networks associated with a user.

Responses

Response samples

Content type
application/json
[]

User login for system authentication

This endpoint allows the user to authenticate into the application.

Request Body schema: application/json
required
username
required
string

The username for login

password
required
string

The password for login

Responses

Request samples

Content type
application/json
{
  • "username": "johndoe123",
  • "password": "001@Mypassword"
}

Response samples

Content type
application/json
{
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  • "issuedAt": "1714233677",
  • "expireAt": "1714237277"
}

User email confirmation

This endpoint allows the user to perform email confirmation.

Responses

Response samples

Content type
application/json
{
  • "code": 500,
  • "message": "An unexpected error occurred"
}

Find a user by id

This endpoint allows you to find a user by id.

Responses

Response samples

Content type
application/json
{
  • "id": "1",
  • "name": "John Doe",
  • "username": "johndoe123",
  • "email": "johndoe@example.com"
}

social-medias

Operations about social medias

Remove social media from user

This endpoint allows to remove a social media from user

Authorizations:
bearerAuthOAuth2

Responses

Response samples

Content type
application/json
{
  • "code": 401,
  • "message": "Not authenticated"
}

List all available social medias

This endpoint allows the user to list all available social medias

Authorizations:
bearerAuthOAuth2

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]