> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.hellotracks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a member

> Adds a person to the company and sends them an invitation by email (and by text message when a phone number is given). username and name are required. All other fields are applied too. Adding a username that belongs to a removed member of the same company brings that member back. Workers can't add members; only admins and company keys may add admins. A company that isn't paying yet can have at most 300 members (403). A taken username answers 409.



## OpenAPI

````yaml v1/openapi.json POST /members
openapi: 3.1.0
info:
  title: Hellotracks REST API
  version: '1'
  description: >-
    Plain REST resources over HTTPS, for tools, automations and services. The ht
    command line is built on it.
  contact:
    email: api@hellotracks.com
servers:
  - url: https://api.hellotracks.com/v1
security:
  - ApiKey: []
tags:
  - name: Sign-up and sign-in
    description: >-
      Create a company or get an API key by an emailed code, without a key; and
      check which account a key belongs to.
  - name: Company
    description: The company the API key belongs to, with its settings and teams.
  - name: Members
    description: 'The people in the company: admins, operators and workers.'
  - name: API keys
    description: 'The company''s API keys: list, create, revoke and delete.'
  - name: Jobs
    description: 'Jobs: work at a location on a date, assigned to a member.'
  - name: Places
    description: 'Places: customer sites and other saved locations with a check-in radius.'
  - name: Zones
    description: 'Zones: the company''s geofences.'
  - name: Routing
    description: Route optimization for one member's day.
  - name: ETA pages
    description: >-
      Live ETA pages (eta.page links) that show a job's recipient when the
      worker arrives.
  - name: Maps
    description: Rendered maps as GeoJSON, and public map share links.
  - name: Timesheets
    description: Clock-in and clock-out entries of members, with totals, and editing them.
  - name: Forms
    description: >-
      Form templates, submitted forms, attachments for file and image fields,
      and forms linked to places and jobs.
  - name: Alerts
    description: >-
      Alert rules (configs) that watch members, places and zones, and the alerts
      (instances) they raised.
  - name: Reports
    description: >-
      Reports: the newer reporting API (catalog, preview, run, saved) and the
      older one (types, generate, jobs, uploads, recurring).
  - name: Webhooks
    description: URLs Hellotracks calls when jobs, check-ins, clock-ins or alerts happen.
paths:
  /members:
    post:
      tags:
        - Members
      summary: Add a member
      description: >-
        Adds a person to the company and sends them an invitation by email (and
        by text message when a phone number is given). username and name are
        required. All other fields are applied too. Adding a username that
        belongs to a removed member of the same company brings that member back.
        Workers can't add members; only admins and company keys may add admins.
        A company that isn't paying yet can have at most 300 members (403). A
        taken username answers 409.
      operationId: createMember
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemberWrite'
            example:
              username: alex@example.com
              name: Alex Rivera
              phone: +1 415 555 0101
              role: worker
              teams:
                - 1
              travelMode: van
              vehicleCapacity: 12
              routeStartTime: '08:00'
              routeStartLat: 37.7749
              routeStartLng: -122.4194
              workingHours:
                monday:
                  start: 800
                  end: 1700
                tuesday:
                  start: 800
                  end: 1700
                wednesday:
                  start: 800
                  end: 1700
                thursday:
                  start: 800
                  end: 1700
                friday:
                  start: 800
                  end: 1700
                saturday:
                  start: 0
                  end: 0
                sunday:
                  start: 0
                  end: 0
      responses:
        '201':
          description: Member created.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - error
                  - meta
                properties:
                  data:
                    type: object
                    properties:
                      member:
                        $ref: '#/components/schemas/Member'
                  error:
                    type: 'null'
                  meta:
                    $ref: '#/components/schemas/Meta'
              example:
                data:
                  member:
                    id: a1b2c3
                    type: person
                    username: alex@example.com
                    name: Alex Rivera
                    email: alex@example.com
                    phone: +1 415 555 0101
                    color: '#2f80ed'
                    profileImageUrl: ''
                    companyId: c0c0c0
                    role: worker
                    statusLabel: ''
                    teams:
                      - 1
                    location:
                      lat: 37.7793
                      lng: -122.4193
                      ts: 1761980400000
                      head: 90
                      accuracy: 12
                      speed: 0
                    units:
                      distance: US
                      time: '12'
                      date: MM-dd-yyyy
                    locale:
                      language: en
                      timezone: America/Los_Angeles
                    routeStartLat: 37.7749
                    routeStartLng: -122.4194
                    routeEndLat: 37.7749
                    routeEndLng: -122.4194
                    travelMode: car
                    vehicleCapacity: 0
                    routeStartTime: '08:00'
                    workingHours:
                      monday:
                        start: 800
                        end: 1700
                      tuesday:
                        start: 800
                        end: 1700
                      wednesday:
                        start: 800
                        end: 1700
                      thursday:
                        start: 800
                        end: 1700
                      friday:
                        start: 800
                        end: 1700
                      saturday:
                        start: 0
                        end: 0
                      sunday:
                        start: 0
                        end: 0
                      source: individual
                    workingHoursOverrides:
                      '20261224':
                        start: 800
                        end: 1200
                    states:
                      moving: halted
                      tracking_status: true
                      location_services: true
                      login_status: true
                      battery_save: false
                      off_trackrecording: false
                      ignoring_battery_optimization: true
                      off_gps_stationary: false
                      location_permission: true
                      background_location: true
                    timestamps:
                      signal: 1761980400000
                      created: 1735689600000
                      login: 1761970000000
                      sync: 1761975000000
                      tracking: 1761970000000
                      suspended: 0
                      recovered: 0
                      invited: 1735689600000
                      reminded: 1735689600000
                error: null
                meta:
                  path: /v1/members
                  method: POST
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    MemberWrite:
      type: object
      additionalProperties: false
      description: >-
        Fields for creating or changing a member. Unknown fields are refused
        with 400.
      properties:
        username:
          type: string
          description: >-
            Login name, e.g. an email address. Required on create. On PATCH it
            renames the member (company admins only); the old name stays as an
            alias.
        name:
          type: string
          description: Full name. Required on create.
        email:
          type: string
        phone:
          type: string
        password:
          type: string
          description: >-
            Create only: must be a strong password; without it the member gets a
            temporary one and sets their own via the invite. PATCH refuses it
            with 400.
        role:
          type: string
          description: >-
            worker (default), operator (or dispatcher), admin. Any other value
            means worker. Only admins and company keys may make admins or change
            roles, and never their own.
          examples:
            - worker
            - operator
            - admin
        color:
          type: string
        language:
          type: string
          description: ISO 639-1, e.g. en.
        timezone:
          type: string
          description: IANA time zone.
        unitDistance:
          type: string
          enum:
            - SI
            - US
        unitTime:
          type: string
          enum:
            - '12'
            - '24'
        unitDate:
          type: string
          description: Date pattern, e.g. MM-dd-yyyy.
        statusLabel:
          type: string
        routeStartLat:
          type: number
        routeStartLng:
          type: number
        routeEndLat:
          type: number
        routeEndLng:
          type: number
        travelMode:
          type: string
          enum:
            - car
            - bicycle
            - pedestrian
            - truck
            - van
            - motorcycle
        vehicleCapacity:
          type: integer
        routeStartTime:
          description: >-
            "HH:mm" (also H:mm or HHmm), a number in HHMM form (800), or "team"
            (or -1) to use the team's start time. null leaves it unchanged.
          oneOf:
            - type: string
            - type: integer
            - type: 'null'
        teams:
          type: array
          items:
            type: integer
          description: Team numbers; replaces all of the member's teams.
        workingHours:
          $ref: '#/components/schemas/MemberWorkingHours'
        workingHoursOverrides:
          $ref: '#/components/schemas/MemberWorkingHoursOverrides'
    Member:
      type: object
      properties:
        id:
          type: string
          description: Member id (6 characters).
        type:
          type: string
          enum:
            - person
            - company
          description: '"company" only in GET /auth/whoami for a company key.'
        username:
          type: string
          description: Login name, often the email address.
        name:
          type: string
        email:
          type: string
        phone:
          type: string
        color:
          type: string
        profileImageUrl:
          type: string
        companyId:
          type: string
        role:
          type: string
          enum:
            - admin
            - operator
            - worker
        statusLabel:
          type: string
        activeStatus:
          type: integer
          enum:
            - 1
            - 2
          description: >-
            Only present for a member who is not active: 1 archived (removed), 2
            deleted.
        teams:
          type: array
          items:
            type: integer
          description: Team numbers.
        location:
          type: object
          description: Last known position.
          properties:
            lat:
              type: number
            lng:
              type: number
            ts:
              type: integer
              format: int64
              description: ms timestamp
            head:
              type: number
            accuracy:
              type: number
              description: meters
            speed:
              type: number
        units:
          type: object
          properties:
            distance:
              type: string
              enum:
                - SI
                - US
            time:
              type: string
              enum:
                - '12'
                - '24'
            date:
              type: string
              description: Date pattern, e.g. MM-dd-yyyy, yyyy/MM/dd, dd.MM.yyyy.
        locale:
          type: object
          properties:
            language:
              type: string
              description: ISO 639-1, e.g. en.
            timezone:
              type: string
              description: IANA time zone, e.g. America/Los_Angeles.
        routeStartLat:
          type: number
        routeStartLng:
          type: number
        routeEndLat:
          type: number
        routeEndLng:
          type: number
        travelMode:
          type: string
          description: car, bicycle, pedestrian, truck, van or motorcycle; empty means car.
        vehicleCapacity:
          type: integer
        routeStartTime:
          type: string
          description: '"HH:mm", or "team" when the member starts at the team''s time.'
        workingHours:
          $ref: '#/components/schemas/MemberWorkingHours'
        workingHoursOverrides:
          $ref: '#/components/schemas/MemberWorkingHoursOverrides'
        states:
          type: object
          description: >-
            Live device state. moving is halted, idling, ontheway, offduty or
            empty.
          additionalProperties: true
          properties:
            moving:
              type: string
              enum:
                - halted
                - idling
                - ontheway
                - offduty
                - ''
            tracking_status:
              type: boolean
            location_services:
              type: boolean
            login_status:
              type: boolean
            battery_save:
              type: boolean
            off_trackrecording:
              type: boolean
            ignoring_battery_optimization:
              type: boolean
            off_gps_stationary:
              type: boolean
            location_permission:
              type: boolean
            background_location:
              type: boolean
              description: Only when the member has a device.
        timestamps:
          type: object
          description: ms timestamps, 0 when never.
          properties:
            signal:
              type: integer
              format: int64
            created:
              type: integer
              format: int64
            login:
              type: integer
              format: int64
            sync:
              type: integer
              format: int64
            tracking:
              type: integer
              format: int64
            suspended:
              type: integer
              format: int64
            recovered:
              type: integer
              format: int64
            invited:
              type: integer
              format: int64
            reminded:
              type: integer
              format: int64
    Meta:
      type: object
      properties:
        path:
          type: string
          description: The request path, without /v1.
          example: /jobs
        method:
          type: string
          example: GET
    MemberWorkingHours:
      type: object
      description: >-
        A week of working hours, one window per day, times as HHMM numbers. On
        write all 7 days are required; send {} to drop the member's own hours
        and use the team's again.
      properties:
        monday:
          $ref: '#/components/schemas/MemberWorkingHoursDay'
        tuesday:
          $ref: '#/components/schemas/MemberWorkingHoursDay'
        wednesday:
          $ref: '#/components/schemas/MemberWorkingHoursDay'
        thursday:
          $ref: '#/components/schemas/MemberWorkingHoursDay'
        friday:
          $ref: '#/components/schemas/MemberWorkingHoursDay'
        saturday:
          $ref: '#/components/schemas/MemberWorkingHoursDay'
        sunday:
          $ref: '#/components/schemas/MemberWorkingHoursDay'
        source:
          type: string
          enum:
            - individual
            - team
            - default
          readOnly: true
          description: Where the hours come from (response only).
    MemberWorkingHoursOverrides:
      type: object
      description: >-
        Single days with other hours, keyed by day as YYYYMMDD (8 digits). On
        write the whole set is replaced; other keys are ignored.
      additionalProperties:
        $ref: '#/components/schemas/MemberWorkingHoursDay'
    ErrorEnvelope:
      type: object
      properties:
        data:
          type: 'null'
        error:
          $ref: '#/components/schemas/Error'
        meta:
          $ref: '#/components/schemas/Meta'
    MemberWorkingHoursDay:
      type: object
      required:
        - start
        - end
      properties:
        start:
          type: integer
          description: HHMM as a number, e.g. 800 for 08:00, 1730 for 17:30.
        end:
          type: integer
          description: HHMM as a number.
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable error code for programs.
          enum:
            - invalid_request
            - invalid_format
            - invalid_data
            - invalid_api_key
            - unknown_user
            - authentication_failed
            - forbidden
            - not_found
            - already_exists
            - throttled
            - not_ready
            - clock_invalid
            - force_logout
            - internal_error
            - unknown_error
        message:
          type: string
          description: Why it failed, for people.
  responses:
    BadRequest:
      description: The request is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            data: null
            error:
              code: invalid_request
              message: date must be YYYY-MM-DD
            meta:
              path: /jobs
              method: GET
    Unauthorized:
      description: The API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            data: null
            error:
              code: invalid_api_key
              message: Invalid Hellotracks API key.
            meta:
              path: /jobs
              method: GET
    Forbidden:
      description: The key may not do this.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            data: null
            error:
              code: forbidden
              message: No permission.
            meta:
              path: /jobs
              method: GET
    Conflict:
      description: The record already exists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            data: null
            error:
              code: already_exists
              message: Username already exists.
            meta:
              path: /jobs
              method: GET
    TooManyRequests:
      description: Too many requests; slow down.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            data: null
            error:
              code: throttled
              message: Too many requests.
            meta:
              path: /jobs
              method: GET
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: API-Key
      description: >-
        Your API key, from More → API & Integrations in the dashboard, or from
        ht signup / ht auth login.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.