Skip to main content
POST
Create or get a user

Authorizations

Authorization
string
header
required

Company API key. The header value must be Api-Key <token>, e.g. Authorization: Api-Key AbCd1234.xxxxxxxx.

Body

application/json
email
string<email>
required

Identity key; repeating it returns the existing user.

first_name
string
required
Maximum string length: 100
last_name
string
required
Maximum string length: 100
friendly_name
string
required

Name used in messages.

Maximum string length: 100
phone_number
string
required

International format. Must be unique within the company for new users.

Pattern: \+?1?\d{9,15}$
country
string
required

Country slug, e.g. colombia, mexico.

Maximum string length: 100
hour
string
required

Daily delivery time, HH:MM.

Pattern: ^\d{2}:\d{2}$
selected_days
enum<string>[]
required

Delivery days. Spanish (lunes, martes, miercoles, jueves, viernes, sabado, domingo) or English (monday..sunday) names.

Minimum array length: 1
Available options:
lunes,
martes,
miercoles,
jueves,
viernes,
sabado,
domingo,
monday,
tuesday,
wednesday,
thursday,
friday,
saturday,
sunday
document_type

CEDULA: national id; INE; TI: identity card (minors); DNI; CEDULA_EX: foreigner id; PASS: passport; PERMISO: special permit; SALVOC: safe-conduct; EXPEDIENTE; CPF; RUT.

Available options:
CEDULA,
INE,
TI,
DNI,
CEDULA_EX,
PASS,
PERMISO,
SALVOC,
EXPEDIENTE,
CPF,
RUT
document_number
string | null
Maximum string length: 100
origin
string | null

Accepted but not stored.

Maximum string length: 100
extra_fields
object[]
silent_creation
boolean
default:false

Do not create a membership (and send no welcome).

send_welcome_message
boolean
default:false

Send the WhatsApp welcome message when the user is created.

offline_mode
boolean
default:false

Response

A user with this email already existed for the company.

user_pk
integer
required

hackU user id.