homemade food app
  1. Admin (role-based)
homemade food app
  • APIs v1
    • Auth
      • Register: submit account data
        POST
      • Register: resend confirmation email
        POST
      • Register: submit email-confirmation code
        POST
      • Login by password or 3rd-party providers
        POST
      • Reset passwd: submit email
        POST
      • Reset passwd: submit new password
        PUT
    • Admin (role-based)
      • Merchant admin
        • Get products list
        • Create product (merchant-specific or global)
        • Update product
        • Delete product
        • Get discount events list
        • Create discount event for product(s)
        • Update discount event for product(s)
        • Delete discount event for product(s)
        • Create merchant
        • Find orders by merchant
        • Update order
        • Update order's delivery status
      • Get users list
        GET
      • Get user by ID
        GET
      • Create user
        POST
      • Get merchants list
        GET
    • User (private)
      • Get current account data
        GET
      • Exchange new tokens
        GET
      • Request to delete current account
        DELETE
    • Public
      • Find merchants
        GET
      • Find products by merchant
        GET
      • Get merchant by ID
        GET
  1. Admin (role-based)

Create user

Designing
POST
https://mock.apidog.com/m1/740441-0-default/users
Last modified:2025-01-07 07:07:37

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/json

Example
{
    "displayedName": "doggie",
    "avatarUrl": "http://example.com",
    "email": "user@example.com",
    "updatedAt": 0,
    "deletedAt": 0,
    "phoneNumber": "string",
    "merchantId": 0
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mock.apidog.com/m1/740441-0-default/users' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "displayedName": "doggie",
    "avatarUrl": "http://example.com",
    "email": "user@example.com",
    "updatedAt": 0,
    "deletedAt": 0,
    "phoneNumber": "string",
    "merchantId": 0
}'

Responses

🟢201Created
application/json
Body

Example
{
    "data": {
        "id": 0,
        "displayedName": "doggie",
        "avatarUrl": "http://example.com",
        "email": "user@example.com",
        "emailVerified": false,
        "createdAt": 0,
        "updatedAt": 0,
        "deletedAt": 0,
        "phoneNumber": "string",
        "merchantId": 0
    },
    "error": null,
    "links": null,
    "meta": null
}
🟠400Invalid request body
🟠401Unauthorized
Modified at 2025-01-07 07:07:37
Previous
Get user by ID
Next
Get merchants list
Built with