---
updatedAt: 2026-03-13T17:01:00.000Z
agentTools:
  projectIndex: https://developers.masspay.io/llms.txt
---

# Get user by user token

This **GET** endpoint is used to retrieve a user's profile by their user token in MassPay. <br> You can use this endpoint to obtain a user profile for a specified user token. <br> To use this endpoint, you need to provide the `user_token` as a required parameter in the URL Path. <br> The response will include all available details for the user.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "description": "MassPay API",
    "version": "1.0.0",
    "title": "MassPay API",
    "termsOfService": "https://www.masspay.io/terms/",
    "contact": {
      "name": "MassPay",
      "email": "info@masspay.io",
      "url": "https://www.masspay.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "tags": [
    {
      "name": "User",
      "description": "A user represents an individual or a business that can receive payments, such as employees, survey participants, contractors, or distributors. Users can withdraw funds using any of MassPay's supported payout options, including but not limited to bank accounts, debit card, PayPal account, prepaid cards, cash pickup locations, mobile wallets, etc. All payout options for a user are attached to their user resource, so you will always need to create users."
    }
  ],
  "paths": {
    "/payout/user/{user_token}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Get user by user token",
        "description": "This **GET** endpoint is used to retrieve a user's profile by their user token in MassPay. <br> You can use this endpoint to obtain a user profile for a specified user token. <br> To use this endpoint, you need to provide the `user_token` as a required parameter in the URL Path. <br> The response will include all available details for the user.",
        "operationId": "getUserByToken",
        "parameters": [
          {
            "name": "user_token",
            "in": "path",
            "description": "The user token that needs to be fetched.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Unique key to prevent duplicate processing",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredUser"
                },
                "examples": {
                  "Get user": {
                    "value": {
                      "user_token": "usr_123e4567-e89b-12d3-a456-426614174000",
                      "status": "ACTIVE",
                      "created_on": "2019-07-07T23:03:05",
                      "internal_user_id": "4324-rOzk",
                      "address1": "2000 main st",
                      "address2": "apt D",
                      "city": "Santa Monica",
                      "state_province": "CA",
                      "postal_code": "90405",
                      "country": "USA",
                      "first_name": "John",
                      "middle_name": "string",
                      "last_name": "Doe",
                      "email": "jdoe@masspay.io",
                      "language": "en",
                      "mobile_number": "16502000226",
                      "business_name": "ABC Company",
                      "timezone": "America/Los_Angeles",
                      "date_of_birth": "1975-03-24",
                      "metadata": {
                        "group_id": 541
                      },
                      "activation_url": "https://members.masspay.io/activation?activation=AO=="
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error401"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error403"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error404"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error405"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                }
              }
            }
          },
          "504": {
            "description": "Gateway Time-out.",
            "headers": {
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error504"
                }
              }
            }
          }
        },
        "security": [
          {
            "AUTHORIZER_NAME": []
          },
          {
            "api_key": []
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "user_token",
          "in": "path",
          "required": true,
          "description": "The user token that needs to be fetched/updated."
        }
      ]
    }
  },
  "servers": [
    {
      "url": "https://{environment}.masspay.io/{VERSION}",
      "description": "MassPay's API server",
      "variables": {
        "VERSION": {
          "default": "v1.0.0",
          "enum": [
            "v1.0.0"
          ]
        },
        "environment": {
          "default": "api",
          "enum": [
            "api",
            "staging-api"
          ]
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "StoredUser": {
        "type": "object",
        "xml": {
          "name": "StoredUser"
        },
        "x-examples": {
          "StoredUser": {
            "user_token": "ba4275f2-bae1-488d-9d6f-20af1cd83574",
            "status": "ACTIVE",
            "created_on": "2019-10-24T22:54:54.794Z",
            "internal_user_id": "4324-rOzk",
            "address1": "2000 main st",
            "address2": "apt D",
            "city": "Santa Monica",
            "state_province": "CA",
            "postal_code": "90405",
            "country": "USA",
            "first_name": "John",
            "middle_name": "",
            "last_name": "Doe",
            "email": "jdoe@gmail.com",
            "language": "en"
          }
        },
        "x-tags": [
          "User"
        ],
        "properties": {
          "user_token": {
            "type": "string",
            "description": "Token representing the user that was just created",
            "format": "uuid",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "status": {
            "description": "The status of the user",
            "type": "string",
            "enum": [
              "ACTIVE",
              "LOCKED",
              "DEACTIVE",
              "CLOSED"
            ]
          },
          "created_on": {
            "type": "string",
            "example": "2019-07-07T23:03:05",
            "description": "The timestamp the user was created in the system. Using UTC timestamp.[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)",
            "format": "YYYY-MM-DDThh:mm:ss"
          },
          "internal_user_id": {
            "type": "string",
            "example": "4324-rOzk",
            "description": "A client-defined identifier for the user. This is the unique ID assigned to the user on your system. Max 75 characters. Allows letters, numbers, and + , - . / _ ~ |"
          },
          "address1": {
            "type": "string",
            "example": "2000 main st",
            "description": "The user's street address."
          },
          "address2": {
            "type": "string",
            "example": "apt D",
            "description": "The user's street address, line 2."
          },
          "city": {
            "type": "string",
            "example": "Santa Monica",
            "description": "The user's city."
          },
          "state_province": {
            "type": "string",
            "example": "CA",
            "description": "The user's state/province."
          },
          "postal_code": {
            "type": "string",
            "example": "90405",
            "description": "The user's postal code."
          },
          "country": {
            "type": "string",
            "example": "USA",
            "description": "The user's country code. ISO_3166-1_alpha-3 code"
          },
          "first_name": {
            "type": "string",
            "example": "John",
            "description": "The user's first name. (If Business account, the first name of the representative)"
          },
          "middle_name": {
            "type": "string",
            "description": "The user's middle name. (If Business account, the middle name of the representative)"
          },
          "last_name": {
            "type": "string",
            "example": "Doe",
            "description": "The user's last name. (If Business account, the last name of the representative)"
          },
          "email": {
            "type": "string",
            "example": "jdoe@gmail.com",
            "description": "The user's e-mail address. Must be unique. Cannot have two users with the same e-mail address."
          },
          "language": {
            "type": "string",
            "example": "en",
            "description": "The user's preferred language of communication. If not provided, defaults to English (en)"
          },
          "mobile_number": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "example": "16502000226",
            "description": "(Optional) Mobile number of user. Allows for SMS notifications upon availability of funds"
          },
          "business_name": {
            "type": "string",
            "example": "ABC Company",
            "description": "Company legal name (Only if Business account)"
          },
          "timezone": {
            "type": "string",
            "example": "America/Los_Angeles",
            "description": "User's computed timezone"
          },
          "date_of_birth": {
            "type": "string",
            "description": "Date of birth. (optional). Minimum 18 years old",
            "example": "1975-03-24",
            "format": "date"
          },
          "metadata": {
            "type": "object",
            "description": "Optional JSON object with attributes that can later be searched to locate this user. Do not include PII as this object is not encrypted.",
            "example": {
              "group_id": 541
            }
          },
          "activation_url": {
            "type": "string",
            "description": "If the user does not have an activated account yet, an activation URL will be provided.",
            "default": "https://members.masspay.io/activation?activation=AO=="
          }
        },
        "required": [
          "user_token",
          "status",
          "created_on",
          "internal_user_id",
          "first_name",
          "last_name",
          "email",
          "timezone"
        ],
        "description": ""
      },
      "Error400": {
        "description": "Bad request.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Bad request."
            ],
            "example": "Bad request."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The request was invalid or malformed. Please ensure that the request body conforms to the required format and that all required parameters are included."
            ],
            "example": "The request was invalid or malformed. Please ensure that the request body conforms to the required format and that all required parameters are included."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              400
            ],
            "example": 400
          },
          "error": {
            "type": "object",
            "properties": {
              "reason": {
                "type": "string",
                "example": "Error initiating payout",
                "description": "Reason for error"
              },
              "details": {
                "type": "array",
                "description": "Specific details of the cause of the error",
                "items": {
                  "type": "string",
                  "example": "Source amount cannot be $0"
                }
              }
            }
          }
        },
        "required": [
          "message",
          "code"
        ]
      },
      "Error401": {
        "description": "Unauthorized.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Unauthorized."
            ],
            "example": "Unauthorized."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "Authentication failed or credentials were not provided. Please ensure that you have provided valid API credentials and that they are authorized to access the MassPay API."
            ],
            "example": "Authentication failed or credentials were not provided. Please ensure that you have provided valid API credentials and that they are authorized to access the MassPay API."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              401
            ],
            "example": 401
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error403": {
        "description": "Forbidden.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Forbidden."
            ],
            "example": "Forbidden."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The requested action is not allowed or the API credentials do not have sufficient permissions. Please ensure that the API credentials used for the request have the necessary permissions to perform the requested action."
            ],
            "example": "The requested action is not allowed or the API credentials do not have sufficient permissions. Please ensure that the API credentials used for the request have the necessary permissions to perform the requested action."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              403
            ],
            "example": 403
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error404": {
        "description": "Not found.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Not found."
            ],
            "example": "Not found."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The requested resource was not found. Please ensure that the URL for the request is correct and that the requested resource exists."
            ],
            "example": "The requested resource was not found. Please ensure that the URL for the request is correct and that the requested resource exists."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              404
            ],
            "example": 404
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error405": {
        "description": "Method not allowed.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Method not allowed."
            ],
            "example": "Method not allowed."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The HTTP method used for the request is not supported by the MassPay API. Please ensure that you are using the correct HTTP method (e.g., POST) for the specific MassPay API endpoint."
            ],
            "example": "The HTTP method used for the request is not supported by the MassPay API. Please ensure that you are using the correct HTTP method (e.g., POST) for the specific MassPay API endpoint."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              405
            ],
            "example": 405
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error500": {
        "description": "Internal server error",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Internal server error."
            ],
            "example": "Internal server error."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "An unexpected error occurred on the server-side while processing the request. Please try again later or contact support if the issue persists."
            ],
            "example": "An unexpected error occurred on the server-side while processing the request. Please try again later or contact support if the issue persists."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              500
            ],
            "example": 500
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      },
      "Error504": {
        "description": "Gateway Time-out.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Error title.",
            "enum": [
              "Gateway Time-out."
            ],
            "example": "Gateway Time-out."
          },
          "message": {
            "type": "string",
            "description": "Error description.",
            "enum": [
              "The request timed out while waiting for a response from the server. Please try again later or contact support if the issue persists."
            ],
            "example": "The request timed out while waiting for a response from the server. Please try again later or contact support if the issue persists."
          },
          "code": {
            "type": "integer",
            "description": "Error code.",
            "enum": [
              500
            ],
            "example": 500
          }
        },
        "additionalProperties": false,
        "required": [
          "error",
          "message",
          "code"
        ]
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      },
      "AUTHORIZER_NAME": {
        "name": "Authorization",
        "in": "header",
        "type": "apiKey"
      }
    }
  }
}
```