Surge
POST
/accounts/{account_id}/users

Creates a new User object.

Authorization

authorization
AuthorizationBearer <token>

In: header

Path Parameters

account_id*string

The account for which the user should be created.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.surge.app/accounts/acct_01j9a43avnfqzbjfch6pygv1td/users" \  -H "Content-Type: application/json" \  -d '{    "first_name": "Brian",    "last_name": "O\'Conner",    "metadata": {      "email": "boconner@toretti.family",      "user_id": "1234"    },    "photo_url": "https://toretti.family/people/brian.jpg"  }'
{
  "first_name": "Brian",
  "id": "usr_01j9dwavghe1ttppewekjjkfrx",
  "last_name": "O'Conner",
  "metadata": {
    "email": "boconner@toretti.family",
    "user_id": "1234"
  },
  "photo_url": "https://toretti.family/people/brian.jpg"
}
{
  "error": {
    "message": "The requested resource could not be found.",
    "type": "not_found"
  }
}