Upsert a user — server token only
POST
/v1/users
const url = 'http://localhost:3000/v1/users';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"example","custom":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/v1/users \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "example", "custom": {} }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
id
required
string
custom
required
object
key
additional properties
any
Examplegenerated
{ "id": "example", "custom": {}}Responses
Section titled “Responses”Upserted.
Media typeapplication/json
object
id
required
string
custom
required
object
key
additional properties
any
Examplegenerated
{ "id": "example", "custom": {}}Authenticated but not permitted.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
requestId
required
string
fields
Present only for VALIDATION_FAILED.
Array<object>
object
path
string
message
string
Example
{ "error": { "code": "VALIDATION_FAILED" }}